5834: Fix bug with non-managed windows due to file re-organisation

svn: r19781
This commit is contained in:
Nick Hall 2012-06-07 12:00:44 +00:00
parent 9f6def272f
commit 4f51cfcf92
3 changed files with 10 additions and 14 deletions

View File

@ -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)]

View File

@ -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')

View File

@ -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")