diff --git a/ChangeLog b/ChangeLog index 7577f93f4..2fe7060a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-12-09 Douglas S. Blank + * src/plugins/CalculateEstimatedDates.py: define set_title + * src/plugins/OwnerEditor.py: define build_menu_names + * src/PluginUtils/_PluginWindows.py: Fixed layer window issues + 2007-12-09 Benny Malengier * src/gen/db/dbdir.py: rebuild ref map correctly, bug #1421 diff --git a/src/PluginUtils/_PluginWindows.py b/src/PluginUtils/_PluginWindows.py index bdb3a06f0..24d18c46c 100644 --- a/src/PluginUtils/_PluginWindows.py +++ b/src/PluginUtils/_PluginWindows.py @@ -177,6 +177,7 @@ class ToolManagedWindowBase(ManagedWindow.ManagedWindow): border_pad = 6 HELP_TOPIC = None def __init__(self, dbstate, uistate, option_class, name, callback=None): + self.name = name ManagedWindow.ManagedWindow.__init__(self, uistate, [], self) self.extra_menu = None @@ -322,7 +323,7 @@ class ToolManagedWindowBase(ManagedWindow.ManagedWindow): def pre_run(self): from Utils import ProgressMeter - self.progress = ProgressMeter(_('Tool')) + self.progress = ProgressMeter(self.get_title()) def run(self): raise NotImplementedError, "tool needs to define a run() method" @@ -337,7 +338,7 @@ class ToolManagedWindowBase(ManagedWindow.ManagedWindow): #------------------------------------------------------------------------ def get_title(self): """The window title for this dialog""" - return "Tool" + return "Tool" # self.title def get_header(self, name): """The header line to put at the top of the contents of the @@ -345,14 +346,12 @@ class ToolManagedWindowBase(ManagedWindow.ManagedWindow): selected person. Most subclasses will customize this to give some indication of what the report will be, i.e. 'Descendant Report for %s'.""" - return _("%(tool_name)s for GRAMPS") % { - 'tool_name' : "Tool"} + return self.get_title() def setup_title(self): """Set up the title bar of the dialog. This function relies on the get_title() customization function for what the title should be.""" - self.name = '' self.window.set_title(self.get_title()) def setup_header(self): @@ -362,7 +361,7 @@ class ToolManagedWindowBase(ManagedWindow.ManagedWindow): supplied by the subclass, the default is to use the full name of the currently selected person.""" - title = self.get_header(self.name) + title = self.get_header(self.get_title()) label = gtk.Label('%s' % title) label.set_use_markup(True) self.window.vbox.pack_start(label, True, True, self.border_pad) @@ -463,6 +462,11 @@ class ToolManagedWindowBase(ManagedWindow.ManagedWindow): this task.""" self.options.add_user_options(self) + def build_menu_names(self, obj): + return (_('Main window'), self.get_title()) + + + class ToolManagedWindowBatch(Tool.BatchTool, ToolManagedWindowBase): def __init__(self, dbstate, uistate, options_class, name, callback=None): # This constructor will ask a question, set self.fail: diff --git a/src/plugins/CalculateEstimatedDates.py b/src/plugins/CalculateEstimatedDates.py index 54ce0b360..6889c6947 100644 --- a/src/plugins/CalculateEstimatedDates.py +++ b/src/plugins/CalculateEstimatedDates.py @@ -110,6 +110,9 @@ class CalcEstDateOptions(MenuToolOptions): class CalcToolManagedWindow(PluginWindows.ToolManagedWindowBatch): + def get_title(self): + return _("Calculate Estimated Dates") + def initial_frame(self): return _("Options") diff --git a/src/plugins/OwnerEditor.py b/src/plugins/OwnerEditor.py index 42e4b2938..259bf8988 100644 --- a/src/plugins/OwnerEditor.py +++ b/src/plugins/OwnerEditor.py @@ -152,6 +152,9 @@ class OwnerEditor(Tool.Tool, ManagedWindow.ManagedWindow): if event.button == 3 and event.type == gtk.gdk.BUTTON_PRESS: self.menu.popup(None,None,None,0,0) + def build_menu_names(self, obj): + return (_('Main window'), _("Edit database owner information")) + def on_menu_activate(self, menuitem): """Copies the owner information from/to the preferences""" if menuitem.name == 'copy_from_preferences_to_db':