----- "Jasper Groenewegen" <[EMAIL PROTECTED]> wrote: > Yeah this seems to do the trick. Again a question. Now that it is > possible to see whether we try to click _not_ on a specific file, > should > there be an else statement with a OliveMenu without the > selected=self.get_selected_right() or maybe a > treeselection.select_path(None) to reflect that fact?
In thinking about this, since this is GTK, I'll use Nautilus as my guide. Clicking (left or right) on the empty space below a file list will de-select any selection. Right clicking on an item will select the item, even if the pop-up menu is canceled (escape key). > And stylewise according to PEP8 'if treepathpos is not None' is better > > so changing that would be nice. Done. > Also, I noticed that a right mouse button press event on the > bookmarklist does 'The Right Thing'. I think this is (if you look at > line 824, the on_treeview_left_button_press_event method) because > self.get_selected_left is called twice. So I guess that is option > number > three to fix the behaviour. :) Right click in the bookmark list (left panel) is broken the same way for me. If you only do right-clicks, the item the pop-up menu is operating on is the previous click not the item selected. For the bookmark panel I'm not sure the press and release functions really need to be separate items. Also the double call to get_selected_left you referenced seems unnecessary. Stay tuned for try number 3... -- bzr-gtk mailing list [email protected] Modify settings or unsubscribe at: https://lists.canonical.com/mailman/listinfo/bzr-gtk
