From 4f51cfcf9222354d4041c9aaf134f05832d33dcc Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Thu, 7 Jun 2012 12:00:44 +0000 Subject: [PATCH] 5834: Fix bug with non-managed windows due to file re-organisation svn: r19781 --- src/gui/plug/report/_styleeditor.py | 12 +++++------- src/gui/viewmanager.py | 7 +++---- src/plugins/BookReport.py | 5 ++--- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/gui/plug/report/_styleeditor.py b/src/gui/plug/report/_styleeditor.py index 759de49c5..30d92c518 100644 --- a/src/gui/plug/report/_styleeditor.py +++ b/src/gui/plug/report/_styleeditor.py @@ -55,7 +55,7 @@ from gen.plug.docgen import (StyleSheet, FONT_SERIF, FONT_SANS_SERIF, PARA_ALIGN_RIGHT, PARA_ALIGN_CENTER, PARA_ALIGN_LEFT, PARA_ALIGN_JUSTIFY) from gui.listmodel import ListModel -from gui.managedwindow import ManagedWindow +from gui.managedwindow import set_titles from gui.glade import Glade #------------------------------------------------------------------------ @@ -84,9 +84,8 @@ class StyleListDisplay(object): self.top = Glade(toplevel='styles') self.window = self.top.toplevel - ManagedWindow.set_titles( self.window, - self.top.get_object('title'), - _('Document Styles') ) + set_titles(self.window, self.top.get_object('title'), + _('Document Styles')) self.top.connect_signals({ "destroy_passed_object" : self.__close, @@ -211,9 +210,8 @@ class StyleEditor(object): self.pname = self.top.get_object('pname') self.pdescription = self.top.get_object('pdescription') - ManagedWindow.set_titles( self.window, - self.top.get_object('title'), - _('Style editor')) + set_titles(self.window, self.top.get_object('title'), + _('Style editor')) self.top.get_object("label6").set_text(_("point size|pt")) titles = [(_('Paragraph'), 0, 130)] diff --git a/src/gui/viewmanager.py b/src/gui/viewmanager.py index d695ba7d6..1229390b2 100644 --- a/src/gui/viewmanager.py +++ b/src/gui/viewmanager.py @@ -443,13 +443,12 @@ class ViewManager(CLIManager): def update_addons(self, addon_update_list): from gui.glade import Glade - from gui.managedwindow import ManagedWindow + from gui.managedwindow import set_titles from gui.listmodel import ListModel, NOSORT, TOGGLE glade = Glade("updateaddons.glade") self.update_dialog = glade.toplevel - ManagedWindow.set_titles(self.update_dialog, - glade.get_object('title'), - _('Available Gramps Updates for Addons')) + set_titles(self.update_dialog, glade.get_object('title'), + _('Available Gramps Updates for Addons')) apply_button = glade.get_object('apply') cancel_button = glade.get_object('cancel') select_all = glade.get_object('select_all') diff --git a/src/plugins/BookReport.py b/src/plugins/BookReport.py index dfd4fb8c4..9f80fcee0 100644 --- a/src/plugins/BookReport.py +++ b/src/plugins/BookReport.py @@ -75,7 +75,7 @@ from gui.pluginmanager import GuiPluginManager from gen.plug.docgen import StyleSheet, StyleSheetList, PaperStyle from gui.dialog import WarningDialog, ErrorDialog from gen.plug.menu import PersonOption, FilterOption, FamilyOption -from gui.managedwindow import ManagedWindow +from gui.managedwindow import ManagedWindow, set_titles from gui.glade import Glade import gui.utils import gui.user @@ -598,8 +598,7 @@ class BookListDisplay(object): self.top = self.xml.toplevel self.unsaved_changes = False - ManagedWindow.set_titles(self.top, - self.xml.get_object('title'),_('Available Books')) + set_titles(self.top, self.xml.get_object('title'), _('Available Books')) if nodelete: delete_button = self.xml.get_object("delete_button")