diff --git a/ChangeLog b/ChangeLog index 9145cb108..fec320555 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ to the tuple of tables. 2006-05-05 Don Allingham + * src/DisplayTabs/_BackRefList.py: handle edit of events + * src/DisplayTabs/_NoteTab.py: stock_notes icon + * src/DisplayTabs/_GrampsTab.py: handle named icons + * src/glade/gramps.glade: hide date edit by default * src/DateEdit.py: ManagedWindow * src/Editors/_EditAddress.py: new DateEdit interface * src/Editors/_EditLdsOrd.py: new DateEdit interface diff --git a/src/DateEdit.py b/src/DateEdit.py index 73805608b..8b1f75c22 100644 --- a/src/DateEdit.py +++ b/src/DateEdit.py @@ -287,7 +287,7 @@ class DateEditorDialog(ManagedWindow.ManagedWindow): break else: break - self.window.destroy() + self.close() def build_menu_names(self, obj): return (_("Date selection"), None) diff --git a/src/DisplayTabs/_BackRefList.py b/src/DisplayTabs/_BackRefList.py index 23f705565..67b4bfd9b 100644 --- a/src/DisplayTabs/_BackRefList.py +++ b/src/DisplayTabs/_BackRefList.py @@ -147,3 +147,11 @@ class BackRefList(EmbeddedList): EditMedia(self.dbstate, self.uistate, [], obj) except Errors.WindowActiveError: pass + elif reftype == 'Event': + try: + from Editors import EditEvent + + obj = self.dbstate.db.get_event_from_handle(ref) + EditEvent(obj, self.dbstate, self.uistate, []) + except Errors.WindowActiveError: + pass diff --git a/src/DisplayTabs/_GrampsTab.py b/src/DisplayTabs/_GrampsTab.py index 3718829e0..207a71448 100644 --- a/src/DisplayTabs/_GrampsTab.py +++ b/src/DisplayTabs/_GrampsTab.py @@ -95,8 +95,19 @@ class GrampsTab(gtk.HBox): @rtype: gtk.HBox """ hbox = gtk.HBox() - self.tab_image = gtk.image_new_from_stock(self.get_icon_name(), - gtk.ICON_SIZE_MENU) + icon = self.get_icon_name() + + if type(icon) == tuple: + if icon[0] == 0: + func = gtk.image_new_from_icon_name + else: + func = gtk.image_new_from_stock + name = icon[1] + else: + func = gtk.image_new_from_stock + name = icon + + self.tab_image = func(name, gtk.ICON_SIZE_MENU) self.label = gtk.Label(self.tab_name) hbox.pack_start(self.tab_image) hbox.set_spacing(6) diff --git a/src/DisplayTabs/_NoteTab.py b/src/DisplayTabs/_NoteTab.py index 43fbba436..f59050a44 100644 --- a/src/DisplayTabs/_NoteTab.py +++ b/src/DisplayTabs/_NoteTab.py @@ -54,6 +54,9 @@ class NoteTab(GrampsTab): GrampsTab.__init__(self, dbstate, uistate, track, title) self.show_all() + def get_icon_name(self): + return (0,'stock_notes') + def _update_label(self, *obj): cc = self.buf.get_char_count() if cc == 0 and not self.empty: diff --git a/src/glade/gramps.glade b/src/glade/gramps.glade index 304f6c276..bc61aa767 100644 --- a/src/glade/gramps.glade +++ b/src/glade/gramps.glade @@ -11667,7 +11667,6 @@ Text Beside Icons - True GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE