Right-clicks and gtk_list's



Hi!  I'm trying to write an mpg123 front-end and I'm using gtk_list's for
the playlists.  Now, I want it so when you right click on the list, a menu
pops up for adding songs, deleting songs, and so on.  Now, I have all this
working great, except for one little problem that's quite annoying:
Because the gtk_list responds to ALL mouse clicks, when the user
right-clicks on the list, it selects/unselects the list item the mouse is
pointing at.  This behaviour is really irritating because if the user
selects all their songs, and then right-clicks, the last song they
selected (which the mouse happens to be pointing at) is unselected by the
right click.  Is there any way to make the gtk_list NOT respond to the
right clicks? 

Right now the list widget is inside an eventbox, and it is this eventbox
which responds to the right-click event and popups up the menu.  So, is
there a way to have the eventbox "eat" the right-click event to prevent it
from being passed to the gtk_list?  Perhaps there is a way to stop the
list widget from responding to the right click event? I've tried returning
TRUE from the menu popup callback code, but this doesn't seem to work. 
Any suggestions here would be *greatly* appreciated. :)

Brett.




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