more report changes
svn: r9781
This commit is contained in:
parent
a2c2f70022
commit
7c37b80716
@ -1,3 +1,11 @@
|
|||||||
|
2008-01-11 Stéphane Charette <stephanecharette@gmail.com>
|
||||||
|
* src/ReportBase/_BareReportDialog.py: allow scroll arrows on the
|
||||||
|
notebook if there are too many tabs to display
|
||||||
|
* src/plugins/GVFamilyLines.py: context-sensitive control feedback
|
||||||
|
based on other selected controls
|
||||||
|
* src/PluginUtils/_MenuOptions.py: define inheritable method that gets
|
||||||
|
called after all of the controls have been created
|
||||||
|
|
||||||
2008-01-11 Benny Malengier <benny.malengier@gramps-project.org>
|
2008-01-11 Benny Malengier <benny.malengier@gramps-project.org>
|
||||||
* src/glade/gramps.glade: add alt key combo's for buttons
|
* src/glade/gramps.glade: add alt key combo's for buttons
|
||||||
|
|
||||||
|
@ -1146,6 +1146,17 @@ class MenuOptions:
|
|||||||
option.add_dialog_category(dialog, category)
|
option.add_dialog_category(dialog, category)
|
||||||
option.add_tooltip(self.tooltips)
|
option.add_tooltip(self.tooltips)
|
||||||
|
|
||||||
|
# give the reports the opportunity to tweak the
|
||||||
|
# controls or possibly setup some event connections
|
||||||
|
self.post_init(dialog)
|
||||||
|
|
||||||
|
def post_init(self, dialog):
|
||||||
|
"""
|
||||||
|
Inheritable method to give reports the chance to setup
|
||||||
|
control event connections.
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
def parse_user_options(self,dialog):
|
def parse_user_options(self,dialog):
|
||||||
"""
|
"""
|
||||||
Generic method to parse the user options and cache result in options_dict.
|
Generic method to parse the user options and cache result in options_dict.
|
||||||
|
@ -151,6 +151,7 @@ class BareReportDialog(ManagedWindow.ManagedWindow):
|
|||||||
self.setup_style_frame()
|
self.setup_style_frame()
|
||||||
|
|
||||||
self.notebook = gtk.Notebook()
|
self.notebook = gtk.Notebook()
|
||||||
|
self.notebook.set_scrollable(True)
|
||||||
self.notebook.set_border_width(6)
|
self.notebook.set_border_width(6)
|
||||||
self.window.vbox.add(self.notebook)
|
self.window.vbox.add(self.notebook)
|
||||||
|
|
||||||
|
@ -153,35 +153,35 @@ class FamilyLinesOptions(MenuReportOptions):
|
|||||||
colourFamily.set_help( _('The colour to use to display families.'))
|
colourFamily.set_help( _('The colour to use to display families.'))
|
||||||
menu.add_option(category, 'FLcolourFamilies', colourFamily)
|
menu.add_option(category, 'FLcolourFamilies', colourFamily)
|
||||||
|
|
||||||
limitParents = BooleanOption( _('Limit the number of parents'), False)
|
self.limitParents = BooleanOption( _('Limit the number of parents'), False)
|
||||||
limitParents.set_help( _('The maximum number of ancestors to include.'))
|
self.limitParents.set_help( _('The maximum number of ancestors to include.'))
|
||||||
menu.add_option(category, 'FLlimitParents', limitParents)
|
menu.add_option(category, 'FLlimitParents', self.limitParents)
|
||||||
|
|
||||||
maxParents = NumberOption( '', 50, 10, 9999)
|
self.maxParents = NumberOption( '', 50, 10, 9999)
|
||||||
maxParents.set_help( _('The maximum number of ancestors to include.'))
|
self.maxParents.set_help( _('The maximum number of ancestors to include.'))
|
||||||
menu.add_option(category, 'FLmaxParents', maxParents)
|
menu.add_option(category, 'FLmaxParents', self.maxParents)
|
||||||
|
|
||||||
limitChildren = BooleanOption( _('Limit the number of children'), False)
|
self.limitChildren = BooleanOption( _('Limit the number of children'), False)
|
||||||
limitChildren.set_help( _('The maximum number of children to include.'))
|
self.limitChildren.set_help( _('The maximum number of children to include.'))
|
||||||
menu.add_option(category, 'FLlimitChildren', limitChildren)
|
menu.add_option(category, 'FLlimitChildren', self.limitChildren)
|
||||||
|
|
||||||
maxChildren = NumberOption( '', 50, 10, 9999)
|
self.maxChildren = NumberOption( '', 50, 10, 9999)
|
||||||
maxChildren.set_help( _('The maximum number of children to include.'))
|
self.maxChildren.set_help( _('The maximum number of children to include.'))
|
||||||
menu.add_option(category, 'FLmaxChildren', maxChildren)
|
menu.add_option(category, 'FLmaxChildren', self.maxChildren)
|
||||||
|
|
||||||
# --------------------
|
# --------------------
|
||||||
category = _('Images')
|
category = _('Images')
|
||||||
# --------------------
|
# --------------------
|
||||||
|
|
||||||
includeImages = BooleanOption( _('Include thumbnail images of people'), True)
|
self.includeImages = BooleanOption( _('Include thumbnail images of people'), True)
|
||||||
includeImages.set_help( _('The maximum number of children to include.'))
|
self.includeImages.set_help( _('The maximum number of children to include.'))
|
||||||
menu.add_option(category, 'FLincludeImages', includeImages)
|
menu.add_option(category, 'FLincludeImages', self.includeImages)
|
||||||
|
|
||||||
imageLocation = EnumeratedListOption(_('Thumbnail location'), 0)
|
self.imageLocation = EnumeratedListOption(_('Thumbnail location'), 0)
|
||||||
imageLocation.add_item(0, _('Above the name'))
|
self.imageLocation.add_item(0, _('Above the name'))
|
||||||
imageLocation.add_item(1, _('Beside the name'))
|
self.imageLocation.add_item(1, _('Beside the name'))
|
||||||
imageLocation.set_help( _('Where the thumbnail image should appear relative to the name'))
|
self.imageLocation.set_help( _('Where the thumbnail image should appear relative to the name'))
|
||||||
menu.add_option(category, 'FLimageOnTheSide', imageLocation)
|
menu.add_option(category, 'FLimageOnTheSide', self.imageLocation)
|
||||||
|
|
||||||
# ---------------------
|
# ---------------------
|
||||||
category = _('Options')
|
category = _('Options')
|
||||||
@ -215,6 +215,32 @@ class FamilyLinesOptions(MenuReportOptions):
|
|||||||
menu.add_option(category, 'FLincludePrivate', includePrivate)
|
menu.add_option(category, 'FLincludePrivate', includePrivate)
|
||||||
|
|
||||||
|
|
||||||
|
def limitChanged(self, button):
|
||||||
|
self.maxParents.gobj.set_sensitive(self.limitParents.gobj.get_active())
|
||||||
|
self.maxChildren.gobj.set_sensitive(self.limitChildren.gobj.get_active())
|
||||||
|
|
||||||
|
|
||||||
|
def imagesChanged(self, button):
|
||||||
|
self.imageLocation.gobj.set_sensitive(self.includeImages.gobj.get_active())
|
||||||
|
|
||||||
|
|
||||||
|
def post_init(self, dialog):
|
||||||
|
# this method is called after all of the controls have been
|
||||||
|
# created, but before the notebook is shown to the user
|
||||||
|
|
||||||
|
# re-order the notebook tabs the way we want
|
||||||
|
# dialog.notebook.
|
||||||
|
|
||||||
|
self.limitParents.gobj.connect('toggled', self.limitChanged)
|
||||||
|
self.limitChildren.gobj.connect('toggled', self.limitChanged)
|
||||||
|
|
||||||
|
self.includeImages.gobj.connect('toggled', self.imagesChanged)
|
||||||
|
|
||||||
|
# ensure things are initialized correctly when it first comes up
|
||||||
|
self.limitChanged(self.limitParents.gobj)
|
||||||
|
self.imagesChanged(self.includeImages.gobj)
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# FamilyLinesReport -- created once the user presses 'OK'
|
# FamilyLinesReport -- created once the user presses 'OK'
|
||||||
|
Loading…
Reference in New Issue
Block a user