[maemo-developers] Treeview multiple selection mode

From: Jeffrey Barish jeff_barish at earthlink.net
Date: Sat Sep 8 23:59:17 EEST 2007
Jeffrey Barish wrote:

> Jeffrey Barish wrote:
> 
>> I just got multiple selection to work in a test application using PyGTK,
>> so something is wrong in my application.
> 
> Although I have multiple selection working in a test program, I still have
> not been able to get it to work in my application.  Only the first item
> that I touch gets selected.  I am now capturing button-press-event and
> button-release-event, so I can see the press when I contact the first row
> and the release after I sweep out a region, but none of the other rows get
> selected.  I have confirmed that the mode is SELECTION_MULTIPLE when I
> receive the first selection event.  I disabled the handler for the tree
> selection changed signal, so the problem cannot be in my handler.  I can't
> think what else to try.  Any suggestions?

Considering that multiple selection works in my application on the desktop
(albeit in a slightly different fashion), I still suspect that something is
wrong with the maemo implementation of PyGTK or GTK.  Moreover, the maemo
implementation had to be changed from the standard version because multiple
selection works differently with a stylus than it does with a mouse and
keyboard.  Making those changes provided an opportunity for a bug to sneak
in.  Clearly, the implementation is not completely wrong (if it is wrong at
all) because I was able to get multiple selection to work in a test
application.  I am wondering whether it is possible that there is a weird
interaction along the lines of one that I reported previously (tapping the
scrollbar sends execution to the handler for popup menu selection done). 
Maybe something is interfering with the stylus tap signal so that even
though the stylus did not lose contact with the screen (and there was no
button-release-event), the library code behaves as if the stylus tapped
only the first item.  The only way I could find something like this is to
start whittling down my application code until it starts working or to
build up the test code until it stops working.  I am hoping that someone
might be able to give me some direction on things to eliminate (or add)
that are more likely to contain the interfering element.  Also, it would be
interesting to know whether anyone has successfully used multiple selection
under PyGTK in a large application.  If so, then I would have to refocus my
suspicions on my own code again, although I would probably still approach
the diagnosis the same way.

-- 
Jeffrey Barish


More information about the maemo-developers mailing list