Navigation menu fix
svn: r5065
This commit is contained in:
parent
9d9f08129d
commit
2c9e7fe552
@ -1,3 +1,6 @@
|
||||
2005-08-12 Don Allingham <don@gramps-project.org>
|
||||
* src/Navigation.py: Don't disable the interface all the time.
|
||||
|
||||
2005-08-12 Alex Roitman <shura@gramps-project.org>
|
||||
* src/ArgHandler.py: start fixing.
|
||||
* src/gramps_main.py: Run ArgHandler with new arguments.
|
||||
|
@ -80,7 +80,10 @@ class BaseNavigation:
|
||||
Builds the UI and action group.
|
||||
"""
|
||||
self.items = items
|
||||
self.disable()
|
||||
|
||||
if self.active != DISABLED:
|
||||
self.uistate.uimanager.remove_ui(self.active)
|
||||
self.uistate.uimanager.remove_action_group(self.action_group)
|
||||
|
||||
data = map(lambda x: '<menuitem action="%s%02d"/>' % (self.title,x), range(0,len(items)))
|
||||
self.ui = _top + "".join(data) + _btm
|
||||
@ -119,8 +122,8 @@ class PersonNavigation(BaseNavigation):
|
||||
Builds a name in the format of 'NAME [GRAMPSID]'
|
||||
"""
|
||||
person = self.uistate.dbstate.db.get_person_from_handle(item)
|
||||
name = "%s [%s]" % (NameDisplay.displayer.display(person),
|
||||
person.gramps_id)
|
||||
return "%s [%s]" % (NameDisplay.displayer.display(person),
|
||||
person.gramps_id)
|
||||
|
||||
def f0(self,obj):
|
||||
self.uistate.dbstate.change_active_handle(self.items[0])
|
||||
|
@ -251,7 +251,6 @@ class PersonNavView(PageView):
|
||||
|
||||
def change_page(self):
|
||||
hobj = self.uistate.phistory
|
||||
print hobj.at_end(), hobj.at_front()
|
||||
self.fwd_action.set_sensitive(not hobj.at_end())
|
||||
self.back_action.set_sensitive(not hobj.at_front())
|
||||
|
||||
|
@ -95,7 +95,7 @@ class PersonView(PageView.PersonNavView):
|
||||
self.add_action('Edit', gtk.STOCK_EDIT, "_Edit", callback=self.edit)
|
||||
self.add_action('Remove', gtk.STOCK_REMOVE,"_Remove",callback=self.remove)
|
||||
self.add_action('HomePerson',gtk.STOCK_HOME, "_Home", callback=self.home)
|
||||
|
||||
|
||||
self.add_toggle_action('Filter', None, '_Filter', callback=self.filter_toggle)
|
||||
|
||||
def get_stock(self):
|
||||
|
Loading…
Reference in New Issue
Block a user