Tooltip addtion to report template
svn: r872
This commit is contained in:
parent
39c36fb539
commit
34f671b0d3
@ -324,7 +324,7 @@ class ReportDialog:
|
|||||||
this task."""
|
this task."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def add_option(self,label_text,widget):
|
def add_option(self,label_text,widget,tooltip=None):
|
||||||
"""Takes a text string and a Gtk Widget, and stores them to be
|
"""Takes a text string and a Gtk Widget, and stores them to be
|
||||||
appended to the Options section of the dialog. The text string
|
appended to the Options section of the dialog. The text string
|
||||||
is used to create a label for the passed widget. This allows the
|
is used to create a label for the passed widget. This allows the
|
||||||
@ -333,8 +333,10 @@ class ReportDialog:
|
|||||||
extracting the final value before the report executes. This task
|
extracting the final value before the report executes. This task
|
||||||
should only be called in the add_user_options task."""
|
should only be called in the add_user_options task."""
|
||||||
self.widgets.append((label_text,widget))
|
self.widgets.append((label_text,widget))
|
||||||
|
if tooltip:
|
||||||
|
self.add_tooltip(widget,tooltip)
|
||||||
|
|
||||||
def add_frame_option(self,frame_name,label_text,widget):
|
def add_frame_option(self,frame_name,label_text,widget,tooltip=None):
|
||||||
"""Similar to add_option this method takes a frame_name, a
|
"""Similar to add_option this method takes a frame_name, a
|
||||||
text string and a Gtk Widget. When the interface is built,
|
text string and a Gtk Widget. When the interface is built,
|
||||||
all widgets with the same frame_name are grouped into a
|
all widgets with the same frame_name are grouped into a
|
||||||
@ -349,6 +351,8 @@ class ReportDialog:
|
|||||||
else:
|
else:
|
||||||
self.frames[frame_name] = [(label_text,widget)]
|
self.frames[frame_name] = [(label_text,widget)]
|
||||||
self.frame_names.append(frame_name)
|
self.frame_names.append(frame_name)
|
||||||
|
if tooltip:
|
||||||
|
self.add_tooltip(widget,tooltip)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -170,21 +170,18 @@ class GraphVizDialog(ReportDialog):
|
|||||||
|
|
||||||
menu.set_active(0)
|
menu.set_active(0)
|
||||||
self.arrowhead_optionmenu.set_menu(menu)
|
self.arrowhead_optionmenu.set_menu(menu)
|
||||||
tip = GtkTooltips()
|
self.add_frame_option(_("GraphViz Options"), _("Arrowhead Options"),
|
||||||
tip.set_tip(self.arrowhead_optionmenu, _("Choose the direction that the arrows point."))
|
self.arrowhead_optionmenu,_("Choose the direction that the arrows point."))
|
||||||
self.add_frame_option(_("GraphViz Options"), _("Arrowhead Options"), self.arrowhead_optionmenu)
|
|
||||||
|
|
||||||
self.includedates_checkbutton = GtkCheckButton(_("Include Birth and Death Dates"))
|
self.includedates_checkbutton = GtkCheckButton(_("Include Birth and Death Dates"))
|
||||||
self.includedates_checkbutton.set_active(1)
|
self.includedates_checkbutton.set_active(1)
|
||||||
tip = GtkTooltips()
|
self.add_frame_option(_("GraphViz Options"), '', self.includedates_checkbutton,
|
||||||
tip.set_tip(self.includedates_checkbutton, _("Include the years that the individual was born and/or died in the graph node labels."))
|
_("Include the years that the individual was born and/or died in the graph node labels."))
|
||||||
self.add_frame_option(_("GraphViz Options"), ' ', self.includedates_checkbutton)
|
|
||||||
|
|
||||||
self.includeurl_checkbutton = GtkCheckButton(_("Include URLs"))
|
self.includeurl_checkbutton = GtkCheckButton(_("Include URLs"))
|
||||||
self.includeurl_checkbutton.set_active(1)
|
self.includeurl_checkbutton.set_active(1)
|
||||||
tip = GtkTooltips()
|
self.add_frame_option(_("GraphViz Options"), '', self.includeurl_checkbutton,
|
||||||
tip.set_tip(self.includeurl_checkbutton, _("Include a URL in each graph node so that PDF and imagemap files can be generated that contain active links to the files generated by the 'Generate Web Site' report."))
|
_("Include a URL in each graph node so that PDF and imagemap files can be generated that contain active links to the files generated by the 'Generate Web Site' report."))
|
||||||
self.add_frame_option(_("GraphViz Options"), ' ', self.includeurl_checkbutton)
|
|
||||||
|
|
||||||
self.tb_margin_adjustment = GtkAdjustment(value=0.5, lower=0.25, upper=100.0, step_incr=0.25)
|
self.tb_margin_adjustment = GtkAdjustment(value=0.5, lower=0.25, upper=100.0, step_incr=0.25)
|
||||||
self.lr_margin_adjustment = GtkAdjustment(value=0.5, lower=0.25, upper=100.0, step_incr=0.25)
|
self.lr_margin_adjustment = GtkAdjustment(value=0.5, lower=0.25, upper=100.0, step_incr=0.25)
|
||||||
|
Loading…
Reference in New Issue
Block a user