Remove deprecated tooltip support from the report system.

svn: r10463
This commit is contained in:
Brian Matherly 2008-04-04 03:33:15 +00:00
parent 50539237d7
commit 474d681011
2 changed files with 4 additions and 22 deletions

View File

@ -388,7 +388,7 @@ class ToolManagedWindowBase(ManagedWindow.ManagedWindow):
label.set_use_markup(True) label.set_use_markup(True)
self.window.vbox.pack_start(label, True, True, self.border_pad) self.window.vbox.pack_start(label, True, True, self.border_pad)
def add_frame_option(self, frame_name, label_text, widget, tooltip=None): def add_frame_option(self, frame_name, label_text, widget):
"""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
@ -403,8 +403,6 @@ class ToolManagedWindowBase(ManagedWindow.ManagedWindow):
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)
def set_current_frame(self, name): def set_current_frame(self, name):
if name == None: if name == None:

View File

@ -205,7 +205,7 @@ class BareReportDialog(ManagedWindow.ManagedWindow):
log.error("Failed to parse user options.", exc_info=True) log.error("Failed to parse user options.", exc_info=True)
def add_option(self,label_text,widget,tooltip=None): def add_option(self, label_text, widget):
"""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
@ -213,11 +213,9 @@ class BareReportDialog(ManagedWindow.ManagedWindow):
subclass is reponsible for all managing of the widgets, including subclass is reponsible for all managing of the widgets, including
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,tooltip=None): def add_frame_option(self, frame_name, label_text, widget):
"""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
@ -232,8 +230,6 @@ class BareReportDialog(ManagedWindow.ManagedWindow):
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)
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #
@ -487,15 +483,3 @@ class BareReportDialog(ManagedWindow.ManagedWindow):
better yet, should create a subclass of a Report that will better yet, should create a subclass of a Report that will
write the data to a file.""" write the data to a file."""
pass pass
#------------------------------------------------------------------------
#
# Miscellaneous functions.
#
#------------------------------------------------------------------------
def add_tooltip(self,widget,string):
"""Add a tooltip to the specified widget"""
if not widget or not string:
return
tip = gtk.Tooltips()
tip.set_tip(widget,string)