9795: remember the last location of windows [partial]

This commit is contained in:
Paul Franklin 2016-12-05 18:50:13 -08:00
parent 66a3dd6050
commit ff6be8b3d6
7 changed files with 13 additions and 8 deletions

View File

@ -104,6 +104,7 @@ class DisplayNameEditor(ManagedWindow):
Gtk.Dialog(_('Display Name Editor'),
buttons=(_('_Close'), Gtk.ResponseType.CLOSE)),
None, _('Display Name Editor'), None)
self.setup_configs('interface.displaynameeditor', 820, 550)
grid = self.dialog._build_custom_name_ui()
label = Gtk.Label(label=_("""The following keywords are replaced with the appropriate name parts:<tt>
<b>Given</b> - given name (first name) <b>Surname</b> - surnames (with prefix and connectors)
@ -126,7 +127,6 @@ UPPERCASE keyword forces uppercase. Extra parentheses, commas are removed. Other
label.set_use_markup(True)
self.window.vbox.pack_start(label, False, True, 0)
self.window.vbox.pack_start(grid, True, True, 0)
self.window.set_default_size(600, 550)
self.window.connect('response', self.close)
self.show()
def close(self, *obj):
@ -178,6 +178,7 @@ class ConfigureDialog(ManagedWindow):
Gtk.Dialog(dialogtitle,
buttons=(_('_Close'), Gtk.ResponseType.CLOSE)),
None, dialogtitle, None)
self.setup_configs('interface.configuredialog', 920, 450)
self.panel = Gtk.Notebook()
self.panel.set_scrollable(True)
self.window.vbox.pack_start(self.panel, True, True, 0)

View File

@ -116,11 +116,10 @@ class Information(ManagedWindow):
super().__init__(uistate, [], self)
self.window = Gtk.Dialog()
self.set_window(self.window, None, _("Database Information"))
self.setup_configs('interface.information', 600, 400)
self.window.set_modal(True)
self.ok = self.window.add_button(_('_OK'), Gtk.ResponseType.OK)
self.ok.connect('clicked', self.on_ok_clicked)
self.window.set_position(Gtk.WindowPosition.CENTER)
self.window.set_default_size(600, 400)
s = Gtk.ScrolledWindow()
titles = [
(_('Setting'), 0, 150),

View File

@ -5,8 +5,6 @@
<object class="GtkWindow" id="report">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="default_width">600</property>
<property name="default_height">400</property>
<signal name="delete-event" handler="on_delete_event" swapped="no"/>
<child>
<object class="GtkBox" id="vbox38">

View File

@ -101,6 +101,12 @@ class PluginDialog(ManagedWindow):
self.title = self.dialog.get_object("title")
self.set_window(window, self.title, msg)
if content == _REPORTS:
self.setup_configs('interface.reportplugindialog', 600, 400)
elif content == _TOOLS:
self.setup_configs('interface.toolplugindialog', 600, 400)
else:
raise ValueError("PluginDialog selection must be a report or tool")
self.store = Gtk.TreeStore(str)
self.selection = self.tree.get_selection()

View File

@ -101,7 +101,7 @@ class PluginStatus(ManagedWindow):
Gtk.DialogFlags.DESTROY_WITH_PARENT,
(_('_Close'), Gtk.ResponseType.CLOSE)),
None, self.title)
self.window.set_size_request(750, 400)
self.setup_configs('interface.pluginstatus', 750, 400)
self.window.connect('response', self.close)
notebook = Gtk.Notebook()
@ -681,7 +681,7 @@ class PluginTrace(ManagedWindow):
Gtk.DialogFlags.DESTROY_WITH_PARENT,
(_('_Close'), Gtk.ResponseType.CLOSE)),
None, title)
self.window.set_size_request(600, 400)
self.setup_configs('interface.plugintrace', 600, 400)
self.window.connect('response', self.close)
scrolled_window = Gtk.ScrolledWindow()

View File

@ -66,6 +66,7 @@ class TipOfDay(ManagedWindow):
xml.get_object("title"),
_("Tip of the Day"),
_("Tip of the Day"))
self.setup_configs('interface.tipofday', 550, 350)
self.tip = xml.get_object("tip")
self.use = xml.get_object('usetips')

View File

@ -91,7 +91,7 @@ class UndoHistory(ManagedWindow):
Gtk.ResponseType.CLOSE)
self.set_window(window, None, self.title)
self.window.set_size_request(400, 200)
self.setup_configs('interface.undohistory', 400, 200)
self.window.connect('response', self._response)
scrolled_window = Gtk.ScrolledWindow()