diff --git a/ChangeLog b/ChangeLog index 175fca757..e6f592557 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-02-12 Benny Malengier + * src/DisplayTabs/_EmbeddedList.py: allow to define middle click + * src/Editors/_EditFamily.py: middle click on child calls edit child + 2008-02-12 Benny Malengier * src/Editors/_EditFamily.py: popup: edit child at top, add images. * src/DisplayTabs/_EmbeddedList.py: allow popup with image/custom text diff --git a/src/DisplayTabs/_EmbeddedList.py b/src/DisplayTabs/_EmbeddedList.py index 391a4190a..a9a83d22a 100644 --- a/src/DisplayTabs/_EmbeddedList.py +++ b/src/DisplayTabs/_EmbeddedList.py @@ -90,10 +90,17 @@ class EmbeddedList(ButtonTab): self.show_all() def _on_button_press(self, obj, event): + """ + Handle button press, not double-click, that is done in init_interface + """ if event.type == gtk.gdk.BUTTON_PRESS and event.button == 3: ref = self.get_selected() if ref: self.right_click(obj, event) + elif event.type == gtk.gdk.BUTTON_PRESS and event.button == 2: + fun = self.get_middle_click() + if fun: + fun(obj) def get_popup_menu_items(self): """ @@ -121,6 +128,9 @@ class EmbeddedList(ButtonTab): ] return itemlist + def get_middle_click(self): + return None + def right_click(self, obj, event): """ On right click show a popup menu. diff --git a/src/Editors/_EditFamily.py b/src/Editors/_EditFamily.py index 0390e5593..a9af8f2a0 100644 --- a/src/Editors/_EditFamily.py +++ b/src/Editors/_EditFamily.py @@ -125,6 +125,9 @@ class ChildEmbedList(EmbeddedList): (True, True, gtk.STOCK_REMOVE, self.del_button_clicked), ] + def get_middle_click(self): + return self.edit_child_button_clicked + def find_index(self, obj): """ returns the index of the object within the associated data