From 2151ad978046d8f325e48b30c578e3bd1901d414 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Tue, 27 Mar 2007 12:04:07 +0000 Subject: [PATCH] Remove the "pagecount" option from the paper menu in the reports. It is not used. svn: r8325 --- ChangeLog | 6 +++++ src/ReportBase/_BareReportDialog.py | 3 --- src/ReportBase/_ReportDialog.py | 42 +++-------------------------- 3 files changed, 9 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a58dcb59..888aaffa0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-03-27 Brian Matherly + * src/ReportBase/_ReportDialog.py + * src/ReportBase/_BareReportDialog.py + Remove the "pagecount" option from the paper menu in the reports. It is not + used. + 2007-03-27 Don Allingham * src/DbManager.py (DbManager.populate): make default directory if it does not exist diff --git a/src/ReportBase/_BareReportDialog.py b/src/ReportBase/_BareReportDialog.py index fb5b04d62..954a6d57e 100644 --- a/src/ReportBase/_BareReportDialog.py +++ b/src/ReportBase/_BareReportDialog.py @@ -102,9 +102,6 @@ class BareReportDialog(ManagedWindow.ManagedWindow): return (_("Configuration"),self.report_name) def init_interface(self): - #self.output_notebook = None - #self.notebook_page = 1 - self.pagecount_menu = None self.extra_menu = None self.extra_textbox = None self.widgets = [] diff --git a/src/ReportBase/_ReportDialog.py b/src/ReportBase/_ReportDialog.py index bd4944c9e..f31d44274 100644 --- a/src/ReportBase/_ReportDialog.py +++ b/src/ReportBase/_ReportDialog.py @@ -133,15 +133,6 @@ class ReportDialog(BareReportDialog): spath = self.options.handler.get_stylesheet_savefile() return spath.split('.')[0] - def get_print_pagecount_map(self): - """Return the data used to fill out the 'pagecount' option - menu in the print options box. The first value is a mapping - of string:value pairs. The strings will be used to label - individual menu items, and the values are what will be - returned if a given menu item is selected. The second value - is the name of menu item to pre-select.""" - return (None, None) - #------------------------------------------------------------------------ # # Functions related getting/setting the default directory for a dialog. @@ -348,17 +339,9 @@ class ReportDialog(BareReportDialog): self.pheight.set_text("%.2f" % paper.get_height_inches()) def setup_paper_frame(self): - """Set up the paper selection frame of the dialog. This - function relies on a paper_xxx() customization functions to - determine whether the pagecount menu should appear and what - its strings should be.""" + """Set up the paper selection frame of the dialog.""" - (pagecount_map, start_text) = self.get_print_pagecount_map() - - if pagecount_map: - self.paper_table = gtk.Table(3,6) - else: - self.paper_table = gtk.Table(4,6) + self.paper_table = gtk.Table(4,6) self.paper_table.set_col_spacings(12) self.paper_table.set_row_spacings(6) self.paper_table.set_border_width(6) @@ -411,16 +394,6 @@ class ReportDialog(BareReportDialog): self.orientation_menu.set(self.options.handler.get_orientation()) self.metric.set_active(1) - # The optional pagecount stuff. - if pagecount_map: - self.pagecount_menu = gtk.OptionMenu() - myMenu = Utils.build_string_optmenu(pagecount_map, start_text) - self.pagecount_menu.set_menu(myMenu) - l = gtk.Label("%s:" % _("Page Count")) - l.set_alignment(0.0,0.5) - self.paper_table.attach(l,1,2,3,4,gtk.SHRINK|gtk.FILL) - self.paper_table.attach(self.pagecount_menu,2,3,3,4) - def html_file_enable(self,obj): active = obj.get_active() text = unicode(obj.get_model()[active][0]) @@ -557,10 +530,7 @@ class ReportDialog(BareReportDialog): def parse_paper_frame(self): """Parse the paper frame of the dialog. Save the user - selected choices for later use. Note that this routine - retrieves a value from the pagecount menu, whether or not it - is displayed on the screen. The subclass will know which ones - it has enabled. This is for simplicity of programming.""" + selected choices for later use.""" (self.paper,paper_name) = self.papersize_menu.get_value() @@ -590,12 +560,6 @@ class ReportDialog(BareReportDialog): self.orien = self.orientation_menu.get_value() self.options.handler.set_orientation(self.orien) - if self.pagecount_menu == None: - self.pagecount = 0 - else: - self.pagecount = \ - self.pagecount_menu.get_menu().get_active().get_data("d") - def parse_html_frame(self): """Parse the html frame of the dialog. Save the user selected html template name for later use. Note that this routine