Discussion:
[Bitpim-devel] Re: Bitpim-devel digest, Vol 1 #334 - 1 msg
Peter Pletcher
2004-08-26 02:07:18 UTC
Permalink
I'm getting around to working with the import code now. Had to spend
some time with synce but that's another story. My overall plan is to
sync my PDA (ipaq), Evolution and LG VX4500 as much as possible, with
Linux. Hah. Anyway,

I'm working with about 100 real phone book entries, and the second
ImportDialog (in phonebook.py) needs a scrollbar on the left pane of
the splitter. I haven't used wxWindows, as it was called, in a *long*
time. Any suggestions on how to add this? Or is one supposed to be
there :)

It seems that the first ImportDialog (in importexport.py) is the place
to do all your initial filtering. I added filtering by categories but
it would be good to have other options there such as picking individual
rows for exclusion. Any suggestions?

Then the second ImportDialog is for editing and fine tuning. Maybe
that is a better place to delete individual rows?

The second dialog went away for a while. What's the long term plan for
the import process?
Date: Fri, 20 Aug 2004 22:55:24 -0700
Subject: [Bitpim-devel] Please test!
For those of you running from CVS, please test the
new import/merge dialog.
This shows how phonebook data you have imported or
read from the phone is merged into the existing
data.
Help and screenshots are at
http://bitpim.org/testhelp/dialog-mergingphonebookentries.htm
I have tried to colour code it, make it logical and
right click on entries.
Roger
--__--__--
_______________________________________________
Bitpim-devel mailing list
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
End of Bitpim-devel Digest
Roger Binns
2004-08-26 04:03:20 UTC
Permalink
Post by Peter Pletcher
I'm working with about 100 real phone book entries, and the second
ImportDialog (in phonebook.py) needs a scrollbar on the left pane of
the splitter.
There is indeed a scrollbar there. Unfortunately wxGrid is very
stubborn, and on Linux does bizarre things. In particular it likes
to ignore the size it is supposed to be, and pretends it is
infinitely sized. I am hoping that the update to wxPython
2.5 may fix it.
Post by Peter Pletcher
It seems that the first ImportDialog (in importexport.py) is the place
to do all your initial filtering. I added filtering by categories but
Are you can give us the source for the category filtering?
Post by Peter Pletcher
it would be good to have other options there such as picking
individual rows for exclusion. Any suggestions?
I definitely wanted the "rough" filtering in the first dialog
especially since some data sources are "polluted" by having a
lot of entries that aren't useful for a phone. The filtering
checkboxes were intended to be the first filtering (for example
you are unlikely to want entries that don't at least have a
phone number).

I do expect people to primarily use categories in their data
source to determine what ends up on the phone, and for category
selection to happen in that first dialog.
Post by Peter Pletcher
Then the second ImportDialog is for editing and fine tuning. Maybe
that is a better place to delete individual rows?
Yes, it is intended for fine tuning.

I would expect the vast majority of people to setup categories
in their original data, and end up dragging those in an, and
then rarely touching any data in the second dialog (the exception
would be when data has changed in multiple places and the
user knows which is more recent).
Post by Peter Pletcher
The second dialog went away for a while. What's the long term plan
for the import process?
The long term plan is for it to pretty much be as it is now.
At some point (probably a 2.0 feature) I will add proper syncing
which mainly involves doing imports and generating lists of
deltas, applying the deltas and then doing exports.

Roger
Peter Pletcher
2004-08-27 01:10:10 UTC
Permalink
Post by Roger Binns
I"m working with about 100 real phone book entries, and the second
ImportDialog (in phonebook.py) needs a scrollbar on the left pane
of
Post by Roger Binns
the splitter.
I am hoping that the update to wxPython
2.5 may fix it.
2.5 *does* fix the scrollbar. But there are other problems for now, at
least on my machine (using python2.3-2.3.4-3pydotorg.src.rpm and
wxPythonGTK-py2.3-2.5.2.7-RH9.i386.rpm) with yesterday's CVS.
e.g. the splitter sash ends up *way* on the left because the initial
splitter window size thinks it is 20x10 (!). Setting an initial size
when creating the splitter seems to fix this. Initial sizes should
help elsewhere too (according to the wx migration guide if I understand
it correctly). Another example: The main window needs a little resize
nudge with the mouse to show its scrollbars.

How about something like guiwidgets.get_size()?
Post by Roger Binns
It seems that the first ImportDialog (in importexport.py) is the
place
Post by Roger Binns
to do all your initial filtering. I added filtering by categories
but
Post by Roger Binns
Are you can give us the source for the category filtering?
I've attached a patch to importexport.py. Note that it won't work for
ImportCSVDialog (something crazy is going on there) or
ImportOutlookDialog yet. They should be easy to add. Does it really
reimport the outlook data each time you set a filter?
I was hoping to unify most of this back up into ImportDialog so it
could be a general base that can browse, reload and filter.
Post by Roger Binns
I would expect the vast majority of people to setup categories
in their original data, and end up dragging those in an, and
then rarely touching any data in the second dialog (the exception
would be when data has changed in multiple places and the
user knows which is more recent).
Agreed. If you can have multiple categories per item in your storage
you can make a "cellphone" category and be pretty much done.

For now I just clean up (deleting the "pollution" I still don't want)
in the main window before sending to the phone.
Roger Binns
2004-08-27 02:04:08 UTC
Permalink
Post by Peter Pletcher
2.5 *does* fix the scrollbar.
It did for me as well.
Post by Peter Pletcher
But there are other problems for now,
at least on my machine (using python2.3-2.3.4-3pydotorg.src.rpm and
wxPythonGTK-py2.3-2.5.2.7-RH9.i386.rpm) with yesterday's CVS.
I have made the code work with both unicode and non-unicode builds
of wxPython. On Linux the idea is to use GTK2 which should be better
than GTK1 (conclusion based entirely on the fact that '2' is a bigger
number than '1' :-)
Post by Peter Pletcher
e.g. the splitter sash ends up *way* on the left because the initial
splitter window size thinks it is 20x10 (!). Setting an initial size
when creating the splitter seems to fix this. Initial sizes should
help elsewhere too (according to the wx migration guide if I
understand it correctly).
The splitters have got downright stupid in wx 2.5.
Post by Peter Pletcher
Another example: The main window needs a
little resize nudge with the mouse to show its scrollbars.
On Windows, it doesn't even draw the main window on startup
until an event is received (any event is fine).
Post by Peter Pletcher
How about something like guiwidgets.get_size()?
Have a look at the bottom of guiwidgets.py. The problem is
that we only remember and restore the size of the window/dialog
as a whole. It has no idea what the internal component
sizes are. However some code after calling set_size may
do the trick.
Post by Peter Pletcher
Post by Roger Binns
Are you can give us the source for the category filtering?
I'll have a look at that tomorrow.
Post by Peter Pletcher
Does it really reimport the outlook data each time you set a filter?
Yes. The reason is that the very first one I wrote was CSV
where changing the separator (eg comma vs tab) or delimiter
(eg double quotes, single quotes, nothing) fundamentally
changes the data that gets read in.

In theory, it also allows the data source to return only the subset
of data requested as well.
Post by Peter Pletcher
I was hoping to unify most of this back up into ImportDialog so it
could be a general base that can browse, reload and filter.
That is exactly where it should all be.

Roger
Roger Binns
2004-09-06 21:52:37 UTC
Permalink
Post by Peter Pletcher
Post by Peter Pletcher
It seems that the first ImportDialog (in importexport.py) is the
place to do all your initial filtering. I added filtering by
categories but
I've attached a patch to importexport.py.
I am busy reading this and will be rewriting it :-)

The biggest change is to use a wx.CheckListBox for the
category selection. I believe the rest of the code
can be isolated to the area where the name/number/address
filtering happens only, but I guess I'll find out why
you had extra stuff the hard way :-)

Roger
Peter Pletcher
2004-09-11 20:53:35 UTC
Permalink
Getting back to this,
Post by Roger Binns
Post by Peter Pletcher
It seems that the first ImportDialog (in importexport.py) is the
place to do all your initial filtering. I added filtering by
categories but
I"ve attached a patch to importexport.py.
I am busy reading this and will be rewriting it :-)
The biggest change is to use a wx.CheckListBox for the
category selection.
Yes, I used a choice to only select one category but multiple
selections would be better. Personally, I only import one category :)
Post by Roger Binns
I believe the rest of the code
can be isolated to the area where the name/number/address
filtering happens only, but I guess I"ll find out why
you had extra stuff the hard way :-)
I added the NewData method to recompute the available category filter
choices (all categories in the new data set) each time new data is
imported into an ImportDialog. That's when, and the only time, the
category choices can change.
The other things were mainly to unify the handling of
self.orig{data,columns} with an eye towards moving that up from the
subclasses to ImportDialog. Or was there some reason to use vcarddata,
evodata, etc. that I'm missing?
Roger Binns
2004-09-12 23:39:50 UTC
Permalink
Post by Peter Pletcher
Yes, I used a choice to only select one category but multiple
selections would be better. Personally, I only import one category :)
The code for the category filtering is now complete.
Post by Peter Pletcher
The other things were mainly to unify the handling of
self.orig{data,columns} with an eye towards moving that up from the
subclasses to ImportDialog. Or was there some reason to use
vcarddata, evodata, etc. that I'm missing?
The reason quite simply was that the first import code that was written
(CSV) actually needed to re-read the data if you changed any of the settings
(especially the seperator, quoting and first line is header stuff).
For the code after that, they didn't need to do a re-read so they just
cached the data after the first read. However there is no reason why
they couldn't look at the current filters and do a first round of
filtering in their specific ReReadData method.

Anyway, have a look at the code, try it out and let us know what you
think.

Roger

Loading...