From 5bf51b33e66bfb8f813d65edabf5dfdd66a277b0 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Sat, 5 Apr 2008 12:41:26 +0000 Subject: [PATCH] Enable the "help" button to work on the report dialog. svn: r10473 --- src/ReportBase/_BareReportDialog.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/ReportBase/_BareReportDialog.py b/src/ReportBase/_BareReportDialog.py index 17ed4286f..c5d1f05aa 100644 --- a/src/ReportBase/_BareReportDialog.py +++ b/src/ReportBase/_BareReportDialog.py @@ -51,6 +51,13 @@ import logging log = logging.getLogger(".") +#------------------------------------------------------------------------- +# +# Private Constants +# +#------------------------------------------------------------------------- +URL_REPORT_PAGE = "Gramps_3.0_Wiki_Manual_-_Reports" + #------------------------------------------------------------------------- # # BareReportDialog class @@ -68,7 +75,6 @@ class BareReportDialog(ManagedWindow.ManagedWindow): frame_pad = 5 border_pad = 6 - HELP_TOPIC = None def __init__(self, dbstate, uistate, option_class, name, translated_name, track=[]): @@ -113,9 +119,8 @@ class BareReportDialog(ManagedWindow.ManagedWindow): self.window.set_has_separator(False) self.window.set_modal(True) - if self.HELP_TOPIC: - self.help = self.window.add_button(gtk.STOCK_HELP, gtk.RESPONSE_HELP) - self.help.connect('clicked',self.on_help_clicked) + self.help = self.window.add_button(gtk.STOCK_HELP, gtk.RESPONSE_HELP) + self.help.connect('clicked',self.on_help_clicked) self.cancel = self.window.add_button(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL) self.cancel.connect('clicked',self.on_cancel) @@ -447,9 +452,10 @@ class BareReportDialog(ManagedWindow.ManagedWindow): pass def on_help_clicked(self, *obj): - if self.HELP_TOPIC: - import GrampsDisplay - GrampsDisplay.help(self.HELP_TOPIC) + import GrampsDisplay + GrampsDisplay.help(None, + URL_REPORT_PAGE, + self.report_name.replace(" ", "_") ) def on_ok_clicked(self, obj): """The user is satisfied with the dialog choices. Parse all options