* 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


svn: r6561
This commit is contained in:
Don Allingham 2006-05-06 05:12:33 +00:00
parent fee0af9a4d
commit 121ead2906
6 changed files with 29 additions and 4 deletions

View File

@ -3,6 +3,10 @@
to the tuple of tables.
2006-05-05 Don Allingham <don@gramps-project.org>
* 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

View File

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

View File

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

View File

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

View File

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

View File

@ -11667,7 +11667,6 @@ Text Beside Icons</property>
</widget>
<widget class="GtkDialog" id="date_edit">
<property name="visible">True</property>
<property name="title" translatable="yes"></property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>