* src/DateEdit.py (DateEdit): Take care of both the button and

the LED pixmap now; Invoke DateEditorDialog if the button is pressed;
(DateEditorDialog): Correct the use of constants; adjust the date
on the calendar change; preserve the old date unless OK was pressed;
* src/AddrEdit.py: Remove date editor callback in favor of DateEdit.
* src/EditPerson.py: Remove date editor callback in favor of DateEdit.
* src/EventEdit.py: Remove date editor callback in favor of DateEdit.
* src/gramps.glade: Minor cleanup; remove unused signal handlers.


svn: r3554
This commit is contained in:
Alex Roitman
2004-09-18 23:39:40 +00:00
parent b66cf9e5f0
commit b9d8abee14
6 changed files with 173 additions and 93 deletions

View File

@ -213,18 +213,12 @@ class EventEditor:
"on_deletephoto_clicked" : self.gallery.on_delete_media_clicked,
"on_edit_properties_clicked": self.gallery.popup_change_description,
"on_editphoto_clicked" : self.gallery.on_edit_media_clicked,
"on_date_edit_clicked" : self.on_date_edit_clicked,
})
self.window.set_transient_for(self.parent.window)
self.add_itself_to_menu()
self.window.show()
def on_date_edit_clicked(self,obj):
date_dialog = DateEdit.DateEditorDialog(self.date_check.checkval)
the_date = date_dialog.get_date()
print "The date was built as follows:", the_date
def on_delete_event(self,obj,b):
self.gallery.close()
self.close_child_windows()
@ -273,13 +267,6 @@ class EventEditor:
"""Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','gramps-edit-complete')
def on_menu_changed(self,obj):
cobj = obj.get_data("d")
self.date = self.dp.parse(self.date_field.get_text())
self.date.set_calendar(cobj)
self.date_field.set_text(self.dd(self.date))
self.date_check.set_calendar(cobj)
def get_place(self,field,trans):
text = strip(unicode(field.get_text()))
if text: