* src/PageView.py: support for ctrl-j for jump to person by gramps id
* src/PersonView.py: support for ctrl-j for jump to person by gramps id svn: r5693
This commit is contained in:
parent
04c3f9a9c8
commit
1f7c1c4f4a
@ -1,4 +1,6 @@
|
|||||||
2006-01-07 Don Allingham <don@gramps-project.org>
|
2006-01-07 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/PageView.py: support for ctrl-j for jump to person by gramps id
|
||||||
|
* src/PersonView.py: support for ctrl-j for jump to person by gramps id
|
||||||
* src/ToolTips.py: fix spacing
|
* src/ToolTips.py: fix spacing
|
||||||
* src/ViewManager.py: remember toolbar/sidebar status.
|
* src/ViewManager.py: remember toolbar/sidebar status.
|
||||||
* src/FamilyView.py: fix gtk.Table's bizzare way of handling empty
|
* src/FamilyView.py: fix gtk.Table's bizzare way of handling empty
|
||||||
|
@ -199,6 +199,35 @@ class PersonNavView(PageView):
|
|||||||
if defperson:
|
if defperson:
|
||||||
self.dbstate.change_active_person(defperson)
|
self.dbstate.change_active_person(defperson)
|
||||||
|
|
||||||
|
def jumpto(self,obj):
|
||||||
|
dialog = gtk.Dialog(_('Jump to by GRAMPS ID'),None,
|
||||||
|
gtk.DIALOG_NO_SEPARATOR)
|
||||||
|
dialog.set_border_width(12)
|
||||||
|
label = gtk.Label('<span weight="bold" size="larger">%s</span>' % _('Jump to by GRAMPS ID'))
|
||||||
|
label.set_use_markup(True)
|
||||||
|
dialog.vbox.add(label)
|
||||||
|
dialog.vbox.set_spacing(10)
|
||||||
|
dialog.vbox.set_border_width(12)
|
||||||
|
hbox = gtk.HBox()
|
||||||
|
hbox.pack_start(gtk.Label("%s: " % _('ID')),False)
|
||||||
|
text = gtk.Entry()
|
||||||
|
text.set_activates_default(True)
|
||||||
|
hbox.pack_start(text,False)
|
||||||
|
dialog.vbox.pack_start(hbox,False)
|
||||||
|
dialog.add_buttons(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
|
||||||
|
gtk.STOCK_JUMP_TO, gtk.RESPONSE_OK)
|
||||||
|
dialog.set_default_response(gtk.RESPONSE_OK)
|
||||||
|
dialog.vbox.show_all()
|
||||||
|
|
||||||
|
if dialog.run() == gtk.RESPONSE_OK:
|
||||||
|
gid = text.get_text()
|
||||||
|
person = self.dbstate.db.get_person_from_gramps_id(gid)
|
||||||
|
if person:
|
||||||
|
self.dbstate.change_active_person(person)
|
||||||
|
else:
|
||||||
|
self.uistate.push_message(_("Error: %s is not a valid GRAMPS ID") % gid)
|
||||||
|
dialog.destroy()
|
||||||
|
|
||||||
def fwd_clicked(self,obj,step=1):
|
def fwd_clicked(self,obj,step=1):
|
||||||
hobj = self.uistate.phistory
|
hobj = self.uistate.phistory
|
||||||
hobj.lock = True
|
hobj.lock = True
|
||||||
|
@ -102,6 +102,8 @@ class PersonView(PageView.PersonNavView):
|
|||||||
callback=self.edit)
|
callback=self.edit)
|
||||||
self.add_action('Remove', gtk.STOCK_REMOVE, "_Remove",
|
self.add_action('Remove', gtk.STOCK_REMOVE, "_Remove",
|
||||||
callback=self.remove)
|
callback=self.remove)
|
||||||
|
self.add_action('Jump', None, "_Jump",
|
||||||
|
accel="<control>j",callback=self.jumpto)
|
||||||
|
|
||||||
self.add_toggle_action('Filter', None, '_Filter', None, None,
|
self.add_toggle_action('Filter', None, '_Filter', None, None,
|
||||||
self.filter_toggle)
|
self.filter_toggle)
|
||||||
@ -179,6 +181,7 @@ class PersonView(PageView.PersonNavView):
|
|||||||
associated with the interface.
|
associated with the interface.
|
||||||
"""
|
"""
|
||||||
return '''<ui>
|
return '''<ui>
|
||||||
|
<accelerator action="Jump"/>
|
||||||
<menubar name="MenuBar">
|
<menubar name="MenuBar">
|
||||||
<menu action="ViewMenu">
|
<menu action="ViewMenu">
|
||||||
<menuitem action="Filter"/>
|
<menuitem action="Filter"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user