svn: r6490

This commit is contained in:
Don Allingham 2006-04-28 22:42:07 +00:00
parent 8867cbeacc
commit 892a08232f
4 changed files with 19 additions and 9 deletions

View File

@ -311,6 +311,7 @@ class EditFamily(EditPrimary):
def __init__(self,dbstate, uistate, track, family): def __init__(self,dbstate, uistate, track, family):
self.tooltips = gtk.Tooltips()
EditPrimary.__init__(self, dbstate, uistate, track, EditPrimary.__init__(self, dbstate, uistate, track,
family, dbstate.db.get_family_from_handle) family, dbstate.db.get_family_from_handle)
@ -391,6 +392,11 @@ class EditFamily(EditPrimary):
self.fbutton = self.top.get_widget('fbutton') self.fbutton = self.top.get_widget('fbutton')
self.fbutton2= self.top.get_widget('fbutton2') self.fbutton2= self.top.get_widget('fbutton2')
self.tooltips.set_tip(self.mbutton2,
_("Add a new person as the mother"))
self.tooltips.set_tip(self.fbutton2,
_("Add a new person as the father"))
self.mbox = self.top.get_widget('mbox') self.mbox = self.top.get_widget('mbox')
self.fbox = self.top.get_widget('fbox') self.fbox = self.top.get_widget('fbox')
@ -487,11 +493,15 @@ class EditFamily(EditPrimary):
def update_father(self,handle): def update_father(self,handle):
self.load_parent(handle, self.fbox, self.fbirth, self.load_parent(handle, self.fbox, self.fbirth,
self.fdeath, self.fbutton, self.fbutton2) self.fdeath, self.fbutton, self.fbutton2,
_("Select a person as the father"),
_("Remove the person as the father"))
def update_mother(self,handle): def update_mother(self,handle):
self.load_parent(handle, self.mbox, self.mbirth, self.load_parent(handle, self.mbox, self.mbirth,
self.mdeath, self.mbutton, self.mbutton2) self.mdeath, self.mbutton, self.mbutton2,
_("Select a person as the father"),
_("Remove the person as the father"))
def add_mother_clicked(self, obj): def add_mother_clicked(self, obj):
from Editors import EditPerson from Editors import EditPerson
@ -643,7 +653,7 @@ class EditFamily(EditPrimary):
pass pass
def load_parent(self, handle, box, birth_obj, death_obj, def load_parent(self, handle, box, birth_obj, death_obj,
btn_obj, btn2_obj): btn_obj, btn2_obj, add_msg, del_msg):
is_used = handle != None is_used = handle != None
@ -668,6 +678,7 @@ class EditFamily(EditPrimary):
del_image = gtk.Image() del_image = gtk.Image()
del_image.show() del_image.show()
del_image.set_from_stock(gtk.STOCK_REMOVE,gtk.ICON_SIZE_BUTTON) del_image.set_from_stock(gtk.STOCK_REMOVE,gtk.ICON_SIZE_BUTTON)
self.tooltips.set_tip(btn_obj, del_msg)
btn_obj.add(del_image) btn_obj.add(del_image)
box.pack_start(LinkBox( box.pack_start(LinkBox(
@ -683,6 +694,7 @@ class EditFamily(EditPrimary):
add_image = gtk.Image() add_image = gtk.Image()
add_image.show() add_image.show()
add_image.set_from_stock(gtk.STOCK_INDEX,gtk.ICON_SIZE_BUTTON) add_image.set_from_stock(gtk.STOCK_INDEX,gtk.ICON_SIZE_BUTTON)
self.tooltips.set_tip(btn_obj, add_msg)
btn_obj.add(add_image) btn_obj.add(add_image)
birth_obj.set_text(birth) birth_obj.set_text(birth)

View File

@ -78,7 +78,8 @@ class LinkLabel(gtk.EventBox):
class IconButton(gtk.EventBox): class IconButton(gtk.EventBox):
def __init__(self, func, handle, icon=gtk.STOCK_EDIT, size=gtk.ICON_SIZE_MENU): def __init__(self, func, handle, icon=gtk.STOCK_EDIT,
size=gtk.ICON_SIZE_MENU):
gtk.EventBox.__init__(self) gtk.EventBox.__init__(self)
image = gtk.Image() image = gtk.Image()
image.set_from_stock(icon, size) image.set_from_stock(icon, size)

View File

@ -119,6 +119,7 @@ uidefault = '''<ui>
<menu action="ViewMenu"> <menu action="ViewMenu">
<menuitem action="Sidebar"/> <menuitem action="Sidebar"/>
<menuitem action="Toolbar"/> <menuitem action="Toolbar"/>
<menuitem action="ScratchPad"/>
<separator/> <separator/>
</menu> </menu>
<menu action="GoMenu"> <menu action="GoMenu">
@ -323,7 +324,7 @@ class ViewManager:
_('_Abandon changes and quit')), _('_Abandon changes and quit')),
('CmpMerge', None, _('_Compare and merge')), ('CmpMerge', None, _('_Compare and merge')),
('FastMerge', None, _('_Fast merge')), ('FastMerge', None, _('_Fast merge')),
('ScratchPad', gtk.STOCK_PASTE, _('_ScratchPad'), None, None, ('ScratchPad', gtk.STOCK_PASTE, _('_ScratchPad'), "", None,
self.scratchpad), self.scratchpad),
('Import', gtk.STOCK_CONVERT, _('_Import'), "<control>i", None, ('Import', gtk.STOCK_CONVERT, _('_Import'), "<control>i", None,
self.import_data), self.import_data),

View File

@ -834,7 +834,6 @@
<child> <child>
<widget class="GtkButton" id="fbutton"> <widget class="GtkButton" id="fbutton">
<property name="visible">True</property> <property name="visible">True</property>
<property name="tooltip" translatable="yes">Remove selected event reference</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property> <property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property> <property name="focus_on_click">True</property>
@ -862,7 +861,6 @@
<child> <child>
<widget class="GtkButton" id="fbutton2"> <widget class="GtkButton" id="fbutton2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="tooltip" translatable="yes">Remove selected event reference</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property> <property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property> <property name="focus_on_click">True</property>
@ -1120,7 +1118,6 @@
<child> <child>
<widget class="GtkButton" id="mbutton"> <widget class="GtkButton" id="mbutton">
<property name="visible">True</property> <property name="visible">True</property>
<property name="tooltip" translatable="yes">Remove selected event reference</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property> <property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property> <property name="focus_on_click">True</property>
@ -1148,7 +1145,6 @@
<child> <child>
<widget class="GtkButton" id="mbutton2"> <widget class="GtkButton" id="mbutton2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="tooltip" translatable="yes">Remove selected event reference</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property> <property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property> <property name="focus_on_click">True</property>