From 370e80894ea7f05841fb463033494fa6d1ee2a5b Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 8 May 2003 17:38:49 +0000 Subject: [PATCH] Fixed missing button events svn: r1507 --- gramps2/src/EditPlace.py | 1 + gramps2/src/Marriage.py | 5 ++++- gramps2/src/PlaceView.py | 10 ++++++++++ gramps2/src/marriage.glade | 6 ++++-- gramps2/src/places.glade | 6 ++++-- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/gramps2/src/EditPlace.py b/gramps2/src/EditPlace.py index a5169a327..084903e4c 100644 --- a/gramps2/src/EditPlace.py +++ b/gramps2/src/EditPlace.py @@ -142,6 +142,7 @@ class EditPlace: "on_switch_page" : self.on_switch_page, "on_addphoto_clicked" : self.glry.on_add_photo_clicked, "on_deletephoto_clicked" : self.glry.on_delete_photo_clicked, + "on_edit_photo_clicked" : self.glry.on_edit_photo_clicked, "on_edit_properties_clicked": self.glry.popup_change_description, "on_add_url_clicked" : self.on_add_url_clicked, "on_delete_url_clicked" : self.on_delete_url_clicked, diff --git a/gramps2/src/Marriage.py b/gramps2/src/Marriage.py index 072f6d33c..da24c1058 100644 --- a/gramps2/src/Marriage.py +++ b/gramps2/src/Marriage.py @@ -99,8 +99,11 @@ class Marriage: "on_lds_src_clicked" : self.lds_src_clicked, "on_lds_note_clicked" : self.lds_note_clicked, "on_deletephoto_clicked" : self.gallery.on_delete_photo_clicked, + "on_edit_photo_clicked" : self.gallery.on_edit_photo_clicked, "on_edit_properties_clicked": self.gallery.popup_change_description, "on_marriageAddBtn_clicked" : self.on_add_clicked, + "on_event_update_clicked" : self.on_event_update_clicked, + "on_attr_update_clicked" : self.on_update_attr_clicked, "on_marriageDeleteBtn_clicked" : self.on_delete_clicked, }) @@ -500,7 +503,7 @@ class Marriage: EventEdit.EventEditor(self,name,const.marriageEvents, const.save_pevent,None,None,0,self.cb) - def on_update_clicked(self,obj): + def on_event_update_clicked(self,obj): import EventEdit model,iter = self.etree.get_selected() if not iter: diff --git a/gramps2/src/PlaceView.py b/gramps2/src/PlaceView.py index 8482b783b..6157bb8f4 100644 --- a/gramps2/src/PlaceView.py +++ b/gramps2/src/PlaceView.py @@ -93,6 +93,16 @@ class PlaceView: self.list.set_model(self.model) self.list.get_column(0).clicked() self.selection = self.list.get_selection() + self.list.connect('button-press-event',self.button_press) + + def button_press(self,obj,event): + if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1: + store,iter = self.selection.get_selected() + id = store.get_value(iter,1) + source = self.db.getPlace(id) + EditPlace.EditPlace(self, place, self.update_display) + return 1 + return 0 def change_db(self,db): self.db = db diff --git a/gramps2/src/marriage.glade b/gramps2/src/marriage.glade index ceb211a70..f2f56b858 100644 --- a/gramps2/src/marriage.glade +++ b/gramps2/src/marriage.glade @@ -2,6 +2,7 @@ + @@ -101,8 +102,6 @@ True GTK_POS_TOP False - 5 - 2 False @@ -762,6 +761,7 @@ _Edit... True GTK_RELIEF_NORMAL + 0 @@ -1156,6 +1156,7 @@ _Edit... True GTK_RELIEF_NORMAL + 0 @@ -1343,6 +1344,7 @@ _Edit... True GTK_RELIEF_NORMAL + 0 diff --git a/gramps2/src/places.glade b/gramps2/src/places.glade index 1c46b2e96..e139f6f72 100644 --- a/gramps2/src/places.glade +++ b/gramps2/src/places.glade @@ -2,6 +2,7 @@ + @@ -98,8 +99,6 @@ True GTK_POS_TOP False - 2 - 2 False @@ -915,6 +914,7 @@ _Edit... True GTK_RELIEF_NORMAL + 0 @@ -1267,6 +1267,7 @@ _Edit... True GTK_RELIEF_NORMAL + 0 @@ -1553,6 +1554,7 @@ _Edit... True GTK_RELIEF_NORMAL + 0