2008-03-07 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/DataViews/GrampletView.py (GrampletView): turned GrampletView into a PersonNavView to get Forward/Next/Home * src/GrampsDbUtils/_WriteGedcom.py: #1849 gedcom output: omit 'Y' * src/test/gedread_util.py: update test utility per r10169 changes that svn: r10205
This commit is contained in:
parent
9a0a08bfd2
commit
0b60f234a7
@ -1,9 +1,13 @@
|
||||
2008-03-07 Douglas S. Blank <dblank@cs.brynmawr.edu>
|
||||
* src/DataViews/GrampletView.py (GrampletView):
|
||||
turned GrampletView into a PersonNavView to get Forward/Next/Home
|
||||
|
||||
2008.03.06 Jim Sack <jgsack@san.rr.com>
|
||||
src/GrampsDbUtils/_WriteGedcom.py: #1849 gedcom output: omit 'Y'
|
||||
* src/GrampsDbUtils/_WriteGedcom.py: #1849 gedcom output: omit 'Y'
|
||||
when there is subpordinate data in event (person or family)
|
||||
|
||||
2008.03.06 Jim Sack <jgsack@san.rr.com>
|
||||
src/test/gedread_util.py: update test utility per r10169 changes that
|
||||
* src/test/gedread_util.py: update test utility per r10169 changes that
|
||||
removed the "TRANSACTIONS" option.
|
||||
|
||||
2008-03-06 Jason Simanek <jsimanek@gmail.com>
|
||||
|
@ -679,7 +679,7 @@ class MyScrolledWindow(gtk.ScrolledWindow):
|
||||
if gramplet.state == "minimized":
|
||||
gramplet.set_state("minimized")
|
||||
|
||||
class GrampletView(PageView.PageView):
|
||||
class GrampletView(PageView.PersonNavView):
|
||||
"""
|
||||
GrampletView interface
|
||||
"""
|
||||
@ -688,15 +688,9 @@ class GrampletView(PageView.PageView):
|
||||
"""
|
||||
Create a GrampletView, with the current dbstate and uistate
|
||||
"""
|
||||
PageView.PageView.__init__(self, _('Gramplets'), dbstate, uistate)
|
||||
PageView.PersonNavView.__init__(self, _('Gramplets'), dbstate, uistate)
|
||||
self._popup_xy = None
|
||||
|
||||
def change_db(self, event):
|
||||
"""
|
||||
"""
|
||||
# FIXME: remove/add widgets from new db ini file
|
||||
pass
|
||||
|
||||
def build_widget(self):
|
||||
"""
|
||||
Builds the container widget for the interface. Must be overridden by the
|
||||
@ -967,6 +961,47 @@ class GrampletView(PageView.PageView):
|
||||
lambda obj:self.set_columns(3)),
|
||||
])
|
||||
self._add_action_group(self.action)
|
||||
# Back, Forward, Home
|
||||
self.fwd_action = gtk.ActionGroup(self.title + '/Forward')
|
||||
self.fwd_action.add_actions([
|
||||
('Forward', gtk.STOCK_GO_FORWARD, _("_Forward"),
|
||||
"<ALT>Right", _("Go to the next person in the history"),
|
||||
self.fwd_clicked)
|
||||
])
|
||||
|
||||
# add the Backward action group to handle the Forward button
|
||||
self.back_action = gtk.ActionGroup(self.title + '/Backward')
|
||||
self.back_action.add_actions([
|
||||
('Back', gtk.STOCK_GO_BACK, _("_Back"),
|
||||
"<ALT>Left", _("Go to the previous person in the history"),
|
||||
self.back_clicked)
|
||||
])
|
||||
self._add_action('HomePerson', gtk.STOCK_HOME, _("_Home"),
|
||||
accel="<Alt>Home",
|
||||
tip=_("Go to the default person"), callback=self.home)
|
||||
self.other_action = gtk.ActionGroup(self.title + '/PersonOther')
|
||||
self.other_action.add_actions([
|
||||
('SetActive', gtk.STOCK_HOME, _("Set _Home Person"), None,
|
||||
None, self.set_default_person),
|
||||
])
|
||||
self._add_action_group(self.back_action)
|
||||
self._add_action_group(self.fwd_action)
|
||||
self._add_action_group(self.other_action)
|
||||
|
||||
def set_active(self):
|
||||
PageView.PersonNavView.set_active(self)
|
||||
self.key_active_changed = self.dbstate.connect('active-changed',
|
||||
self.goto_active_person)
|
||||
|
||||
def set_inactive(self):
|
||||
PageView.PersonNavView.set_inactive(self)
|
||||
self.dbstate.disconnect(self.key_active_changed)
|
||||
|
||||
def goto_active_person(self, handle=None):
|
||||
self.dirty = True
|
||||
if handle:
|
||||
self.handle_history(handle)
|
||||
self.uistate.modify_statusbar(self.dbstate)
|
||||
|
||||
def set_columns(self, num):
|
||||
# clear the gramplets:
|
||||
@ -987,22 +1022,6 @@ class GrampletView(PageView.PageView):
|
||||
self.place_gramplets()
|
||||
self.widget.show()
|
||||
|
||||
def delete_gramplet(self, obj):
|
||||
name = obj.get_child().get_label()
|
||||
############### First kind: from current session
|
||||
for gramplet in self.closed_gramplets:
|
||||
if gramplet.title == name:
|
||||
self.closed_gramplets.remove(gramplet)
|
||||
self.gramplet_map[gramplet.title]
|
||||
self.frame_map[str(gramplet.mainframe)]
|
||||
del gramplet
|
||||
return
|
||||
################ Second kind: from options
|
||||
for opts in self.closed_opts:
|
||||
if opts["title"] == name:
|
||||
self.closed_opts.remove(opts)
|
||||
return
|
||||
|
||||
def restore_gramplet(self, obj):
|
||||
name = obj.get_child().get_label()
|
||||
############### First kind: from current session
|
||||
@ -1098,12 +1117,28 @@ class GrampletView(PageView.PageView):
|
||||
return """
|
||||
<ui>
|
||||
<menubar name="MenuBar">
|
||||
<menu action="GoMenu">
|
||||
<placeholder name="CommonGo">
|
||||
<menuitem action="Back"/>
|
||||
<menuitem action="Forward"/>
|
||||
<separator/>
|
||||
<menuitem action="HomePerson"/>
|
||||
<separator/>
|
||||
</placeholder>
|
||||
</menu>
|
||||
<menu action="ViewMenu">
|
||||
<menuitem action="Columns1"/>
|
||||
<menuitem action="Columns2"/>
|
||||
<menuitem action="Columns3"/>
|
||||
</menu>
|
||||
</menubar>
|
||||
<toolbar name="ToolBar">
|
||||
<placeholder name="CommonNavigation">
|
||||
<toolitem action="Back"/>
|
||||
<toolitem action="Forward"/>
|
||||
<toolitem action="HomePerson"/>
|
||||
</placeholder>
|
||||
</toolbar>
|
||||
<popup name="Popup">
|
||||
<menuitem action="AddGramplet"/>
|
||||
<menuitem action="RestoreGramplet"/>
|
||||
|
Loading…
Reference in New Issue
Block a user