Show report frames being used, instead of hiding frames that aren't
being used. It makes for a much cleaner opening of the dialog window. svn: r639
This commit is contained in:
parent
913c0df81e
commit
26354c3b67
@ -379,6 +379,7 @@ class ReportDialog:
|
||||
"""Set up the format frame of the dialog. This function
|
||||
relies on the make_doc_menu() function to do all the hard
|
||||
work."""
|
||||
self.topDialog.get_widget("format_frame").show()
|
||||
self.format_menu = self.topDialog.get_widget("format")
|
||||
self.make_doc_menu()
|
||||
|
||||
@ -389,6 +390,7 @@ class ReportDialog:
|
||||
the builds a menu of all the available styles for the user to
|
||||
choose from."""
|
||||
self.style_frame = self.topDialog.get_widget("style_frame")
|
||||
self.style_frame.show()
|
||||
self.style_menu = self.topDialog.get_widget("style_menu")
|
||||
|
||||
# Build the default style set for this report.
|
||||
@ -428,9 +430,8 @@ class ReportDialog:
|
||||
if pagecount_map:
|
||||
myMenu = utils.build_string_optmenu(pagecount_map, start_text)
|
||||
self.pagecount_menu.set_menu(myMenu)
|
||||
else:
|
||||
self.pagecount_menu.hide()
|
||||
self.pagecount_label.hide()
|
||||
self.pagecount_menu.show()
|
||||
self.pagecount_label.show()
|
||||
|
||||
def setup_html_frame(self):
|
||||
"""Set up the html frame of the dialog. This sole purpose of
|
||||
@ -445,29 +446,29 @@ class ReportDialog:
|
||||
this box. *All* of these items are optional, although the
|
||||
generations fields and the filter combo box are used in most
|
||||
(but not all) dialog boxes."""
|
||||
self.topDialog.get_widget("options_frame").show()
|
||||
|
||||
# Set up the generations spin and page break checkbox
|
||||
(use_gen, use_break) = self.get_report_generations()
|
||||
self.generations_spinbox = self.topDialog.get_widget("generations")
|
||||
self.pagebreak_checkbox = self.topDialog.get_widget("pagebreak")
|
||||
if use_gen:
|
||||
self.topDialog.get_widget("gen_label").show()
|
||||
self.generations_spinbox.set_value(use_gen)
|
||||
self.generations_spinbox.show()
|
||||
else:
|
||||
self.topDialog.get_widget("gen_label").hide()
|
||||
self.generations_spinbox.hide()
|
||||
use_break = 0
|
||||
if not use_break:
|
||||
self.pagebreak_checkbox.hide()
|
||||
if use_break:
|
||||
self.pagebreak_checkbox.show()
|
||||
|
||||
# Now the filter combo
|
||||
self.filter_combo = self.topDialog.get_widget("filter_combo")
|
||||
filter_strings = self.get_report_filter_strings()
|
||||
if filter_strings:
|
||||
self.topDialog.get_widget("filter_label").show()
|
||||
filter_strings.sort()
|
||||
self.filter_combo.set_popdown_strings(filter_strings)
|
||||
else:
|
||||
self.topDialog.get_widget("filter_label").hide()
|
||||
self.filter_combo.hide()
|
||||
self.filter_combo.show()
|
||||
|
||||
# Now the "extra" option menu
|
||||
self.extra_menu_label = self.topDialog.get_widget("extra_menu_label")
|
||||
@ -475,12 +476,11 @@ class ReportDialog:
|
||||
(label, extra_map, preset) = self.get_report_extra_menu_map()
|
||||
if extra_map:
|
||||
self.extra_menu_label.set_text(label)
|
||||
self.extra_menu_label.show()
|
||||
myMenu = utils.build_string_optmenu(extra_map, preset)
|
||||
self.extra_menu.set_menu(myMenu)
|
||||
self.extra_menu.set_sensitive(len(extra_map) > 1)
|
||||
else:
|
||||
self.extra_menu_label.hide()
|
||||
self.extra_menu.hide()
|
||||
self.extra_menu.show()
|
||||
|
||||
# Now the "extra" text box
|
||||
self.extra_textbox_label = self.topDialog.get_widget("extra_textbox_label")
|
||||
@ -488,10 +488,9 @@ class ReportDialog:
|
||||
(label, string) = self.get_report_extra_textbox_string()
|
||||
if string:
|
||||
self.extra_textbox_label.set_text(label)
|
||||
self.extra_textbox_label.show()
|
||||
self.extra_textbox.insert_defaults(string)
|
||||
else:
|
||||
self.extra_textbox_label.hide()
|
||||
self.topDialog.get_widget("extra_scrolledwindow").hide()
|
||||
self.topDialog.get_widget("extra_scrolledwindow").show()
|
||||
|
||||
def setup_other_frames(self):
|
||||
"""Do nothing. This sole purpose of this function is to give
|
||||
|
@ -169,7 +169,7 @@ class GraphVizDialog(ReportDialog):
|
||||
#------------------------------------------------------------------------
|
||||
def setup_style_frame(self):
|
||||
"""The style frame is not used in this dialog."""
|
||||
self.topDialog.get_widget("style_frame").hide()
|
||||
pass
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -393,7 +393,7 @@ class IndivSummaryDialog(TextReportDialog):
|
||||
#------------------------------------------------------------------------
|
||||
def setup_report_options(self):
|
||||
"""The 'Report Options' frame is not used in this dialog."""
|
||||
self.topDialog.get_widget("options_frame").hide()
|
||||
pass
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -926,7 +926,6 @@ class WebReportDialog(ReportDialog):
|
||||
"""The format frame is not used in this dialog. Hide it, and
|
||||
set the output notebook to always display the html template
|
||||
page."""
|
||||
self.topDialog.get_widget("format_frame").hide()
|
||||
self.output_notebook.set_page(1)
|
||||
|
||||
def setup_other_frames(self):
|
||||
|
@ -124,7 +124,7 @@
|
||||
|
||||
<widget>
|
||||
<class>GtkFrame</class>
|
||||
<name>format_frame</name>
|
||||
<name>target_frame</name>
|
||||
<border_width>4</border_width>
|
||||
<label>Save As</label>
|
||||
<label_xalign>0</label_xalign>
|
||||
@ -193,6 +193,7 @@
|
||||
<class>GtkFrame</class>
|
||||
<name>format_frame</name>
|
||||
<border_width>4</border_width>
|
||||
<visible>False</visible>
|
||||
<label>Format</label>
|
||||
<label_xalign>0</label_xalign>
|
||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
||||
@ -217,6 +218,7 @@
|
||||
<class>GtkFrame</class>
|
||||
<name>style_frame</name>
|
||||
<border_width>4</border_width>
|
||||
<visible>False</visible>
|
||||
<label>Styles</label>
|
||||
<label_xalign>0</label_xalign>
|
||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
||||
@ -403,6 +405,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>pagecount_label</name>
|
||||
<visible>False</visible>
|
||||
<label>Count</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
@ -429,6 +432,7 @@
|
||||
<widget>
|
||||
<class>GtkOptionMenu</class>
|
||||
<name>pagecount_menu</name>
|
||||
<visible>False</visible>
|
||||
<can_focus>True</can_focus>
|
||||
<items>Single (scaled)
|
||||
</items>
|
||||
@ -560,6 +564,7 @@
|
||||
<class>GtkFrame</class>
|
||||
<name>options_frame</name>
|
||||
<border_width>4</border_width>
|
||||
<visible>False</visible>
|
||||
<label>Report Options</label>
|
||||
<label_xalign>0</label_xalign>
|
||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
||||
@ -582,6 +587,7 @@
|
||||
<class>GtkCombo</class>
|
||||
<name>filter_combo</name>
|
||||
<border_width>5</border_width>
|
||||
<visible>False</visible>
|
||||
<value_in_list>True</value_in_list>
|
||||
<ok_if_empty>True</ok_if_empty>
|
||||
<case_sensitive>False</case_sensitive>
|
||||
@ -618,6 +624,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>filter_label</name>
|
||||
<visible>False</visible>
|
||||
<label>Filter</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
@ -644,6 +651,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>gen_label</name>
|
||||
<visible>False</visible>
|
||||
<label>Generations</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
@ -670,6 +678,7 @@
|
||||
<widget>
|
||||
<class>GtkSpinButton</class>
|
||||
<name>generations</name>
|
||||
<visible>False</visible>
|
||||
<can_focus>True</can_focus>
|
||||
<climb_rate>1</climb_rate>
|
||||
<digits>0</digits>
|
||||
@ -702,6 +711,7 @@
|
||||
<widget>
|
||||
<class>GtkCheckButton</class>
|
||||
<name>pagebreak</name>
|
||||
<visible>False</visible>
|
||||
<can_focus>True</can_focus>
|
||||
<label>Page break between generations</label>
|
||||
<active>False</active>
|
||||
@ -725,6 +735,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>extra_menu_label</name>
|
||||
<visible>False</visible>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
@ -751,6 +762,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>extra_textbox_label</name>
|
||||
<visible>False</visible>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
@ -778,6 +790,7 @@
|
||||
<class>GtkOptionMenu</class>
|
||||
<name>extra_menu</name>
|
||||
<border_width>5</border_width>
|
||||
<visible>False</visible>
|
||||
<can_focus>True</can_focus>
|
||||
<items>default
|
||||
</items>
|
||||
@ -803,6 +816,7 @@
|
||||
<name>extra_scrolledwindow</name>
|
||||
<border_width>5</border_width>
|
||||
<height>80</height>
|
||||
<visible>False</visible>
|
||||
<hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
|
||||
<vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
|
||||
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
|
||||
|
@ -124,7 +124,7 @@
|
||||
|
||||
<widget>
|
||||
<class>GtkFrame</class>
|
||||
<name>format_frame</name>
|
||||
<name>target_frame</name>
|
||||
<border_width>4</border_width>
|
||||
<label>Save As</label>
|
||||
<label_xalign>0</label_xalign>
|
||||
@ -193,6 +193,7 @@
|
||||
<class>GtkFrame</class>
|
||||
<name>format_frame</name>
|
||||
<border_width>4</border_width>
|
||||
<visible>False</visible>
|
||||
<label>Format</label>
|
||||
<label_xalign>0</label_xalign>
|
||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
||||
@ -217,6 +218,7 @@
|
||||
<class>GtkFrame</class>
|
||||
<name>style_frame</name>
|
||||
<border_width>4</border_width>
|
||||
<visible>False</visible>
|
||||
<label>Styles</label>
|
||||
<label_xalign>0</label_xalign>
|
||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
||||
@ -403,6 +405,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>pagecount_label</name>
|
||||
<visible>False</visible>
|
||||
<label>Count</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
@ -429,6 +432,7 @@
|
||||
<widget>
|
||||
<class>GtkOptionMenu</class>
|
||||
<name>pagecount_menu</name>
|
||||
<visible>False</visible>
|
||||
<can_focus>True</can_focus>
|
||||
<items>Single (scaled)
|
||||
</items>
|
||||
@ -560,6 +564,7 @@
|
||||
<class>GtkFrame</class>
|
||||
<name>options_frame</name>
|
||||
<border_width>4</border_width>
|
||||
<visible>False</visible>
|
||||
<label>Report Options</label>
|
||||
<label_xalign>0</label_xalign>
|
||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
||||
@ -582,6 +587,7 @@
|
||||
<class>GtkCombo</class>
|
||||
<name>filter_combo</name>
|
||||
<border_width>5</border_width>
|
||||
<visible>False</visible>
|
||||
<value_in_list>True</value_in_list>
|
||||
<ok_if_empty>True</ok_if_empty>
|
||||
<case_sensitive>False</case_sensitive>
|
||||
@ -618,6 +624,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>filter_label</name>
|
||||
<visible>False</visible>
|
||||
<label>Filter</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
@ -644,6 +651,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>gen_label</name>
|
||||
<visible>False</visible>
|
||||
<label>Generations</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
@ -670,6 +678,7 @@
|
||||
<widget>
|
||||
<class>GtkSpinButton</class>
|
||||
<name>generations</name>
|
||||
<visible>False</visible>
|
||||
<can_focus>True</can_focus>
|
||||
<climb_rate>1</climb_rate>
|
||||
<digits>0</digits>
|
||||
@ -725,6 +734,7 @@
|
||||
<widget>
|
||||
<class>GtkCheckButton</class>
|
||||
<name>pagebreak</name>
|
||||
<visible>False</visible>
|
||||
<can_focus>True</can_focus>
|
||||
<label>Page break between generations</label>
|
||||
<active>False</active>
|
||||
@ -748,6 +758,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>extra_menu_label</name>
|
||||
<visible>False</visible>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
@ -771,36 +782,11 @@
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>extra_textbox_label</name>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>1</xalign>
|
||||
<yalign>0</yalign>
|
||||
<xpad>5</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>4</top_attach>
|
||||
<bottom_attach>5</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkOptionMenu</class>
|
||||
<name>extra_menu</name>
|
||||
<border_width>5</border_width>
|
||||
<visible>False</visible>
|
||||
<can_focus>True</can_focus>
|
||||
<items>default
|
||||
</items>
|
||||
@ -826,6 +812,7 @@
|
||||
<name>extra_scrolledwindow</name>
|
||||
<border_width>5</border_width>
|
||||
<height>80</height>
|
||||
<visible>False</visible>
|
||||
<hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
|
||||
<vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
|
||||
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
|
||||
@ -853,6 +840,33 @@
|
||||
<text></text>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>extra_textbox_label</name>
|
||||
<visible>False</visible>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>1</xalign>
|
||||
<yalign>0</yalign>
|
||||
<xpad>5</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>4</top_attach>
|
||||
<bottom_attach>5</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>True</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user