Fixed missing button events

svn: r1507
This commit is contained in:
Don Allingham 2003-05-08 17:38:49 +00:00
parent 8fd080f8c9
commit 370e80894e
5 changed files with 23 additions and 5 deletions

View File

@ -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,

View File

@ -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:

View File

@ -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

View File

@ -2,6 +2,7 @@
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
<requires lib="gnome"/>
<requires lib="canvas"/>
<widget class="GtkDialog" id="marriageEditor">
@ -101,8 +102,6 @@
<property name="show_border">True</property>
<property name="tab_pos">GTK_POS_TOP</property>
<property name="scrollable">False</property>
<property name="tab_hborder">5</property>
<property name="tab_vborder">2</property>
<property name="enable_popup">False</property>
<child>
@ -762,6 +761,7 @@
<property name="label" translatable="yes">_Edit...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_event_update_clicked" last_modification_time="Thu, 08 May 2003 17:11:05 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@ -1156,6 +1156,7 @@
<property name="label" translatable="yes">_Edit...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_attr_update_clicked" last_modification_time="Thu, 08 May 2003 17:12:07 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@ -1343,6 +1344,7 @@
<property name="label" translatable="yes">_Edit...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_edit_photo_clicked" last_modification_time="Thu, 08 May 2003 17:13:52 GMT"/>
</widget>
<packing>
<property name="padding">0</property>

View File

@ -2,6 +2,7 @@
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
<requires lib="gnome"/>
<requires lib="canvas"/>
<widget class="GtkDialog" id="placeEditor">
@ -98,8 +99,6 @@
<property name="show_border">True</property>
<property name="tab_pos">GTK_POS_TOP</property>
<property name="scrollable">False</property>
<property name="tab_hborder">2</property>
<property name="tab_vborder">2</property>
<property name="enable_popup">False</property>
<signal name="switch_page" handler="on_switch_page" object="placeEditor"/>
@ -915,6 +914,7 @@
<property name="label" translatable="yes">_Edit...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_update_loc_clicked" last_modification_time="Thu, 08 May 2003 17:20:46 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@ -1267,6 +1267,7 @@
<property name="label" translatable="yes">_Edit...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_edit_photo_clicked" last_modification_time="Thu, 08 May 2003 17:23:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@ -1553,6 +1554,7 @@
<property name="label" translatable="yes">_Edit...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_update_url_clicked" last_modification_time="Thu, 08 May 2003 17:24:09 GMT"/>
</widget>
<packing>
<property name="padding">0</property>