GtkList in 1.1.3



Hello,

recently I switched to GTK+1.1.3 and are impressed from the
enhanced menu system based on itemfactory.  Thanks for the
developers, it was a great job.

Nevertheless I have a problem with the GtkList widget.
Using GTK+1.0.? it was possible to select/unselect list items
with each mouse button.  Now in the GTK+ sources it is explicitely
checked, that button 1 was pressed and the other two buttons
didn't cause any effect to a GtkList.  GtkCList seems to have
the same behaviour and so it isn't an alternative.

Why it makes sense to use *all* buttons.  I wrote a kind of an
image viewer:
   ftp://tower.physik.uni-halle.de/pub/debian-maintain/paul
It is capable to do operations on single images and on a set of
selected images.  I presented the images in a GtkList.  A single
image could be selected with the left mouse button.  To add
images to the set of selected images one could press the right
mouse button and to select all images the middle button could
be used.

I solved this by doing 
  gtk_list_set_selection_mode(filelist, GTK_SELECTION_MULTIPLE);
and checked in a callback function, which button was pressed to
cause the specified behaviour.

So it makes sense to use more than one button to
get different behaviour for instance.

The question is: Is there any way to get this behaviour with GTK+1.1.3??
If not I would strongly recommend to leave out the explicite check
for the left mouse button to give the programmer more flexibility.
Restricting to only one button does not make sense and if it is
whished, the programmer can do it easy from his application.

Kind regards

         Andreas.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]