From 04f34f605910bd13e4bec4fa38c9c0f9885839cb Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 7 Apr 2012 19:01:53 +0000 Subject: [PATCH] 5206: Remember size of FilterEditor and EditFilter windows svn: r19265 --- src/config.py | 4 ++++ src/gui/filtereditor.py | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/config.py b/src/config.py index 64fdfeeb6..a16b67690 100644 --- a/src/config.py +++ b/src/config.py @@ -189,6 +189,8 @@ register('interface.view-categories', ["Gramplets", "People", "Relationships", "Families", "Ancestry", "Events", "Places", "Geography", "Sources", "Citations", "Repositories", "Media", "Notes"]) +register('interface.edit-filter-width', 500) +register('interface.edit-filter-height', 420) register('interface.edit-rule-width', 600) register('interface.edit-rule-height', 450) register('interface.event-height', 450) @@ -202,6 +204,8 @@ register('interface.family-sel-height', 450) register('interface.family-sel-width', 600) register('interface.family-width', 700) register('interface.filter', False) +register('interface.filter-editor-width', 400) +register('interface.filter-editor-height', 350) register('interface.fullscreen', False) register('interface.height', 500) register('interface.lds-height', 450) diff --git a/src/gui/filtereditor.py b/src/gui/filtereditor.py index 7d921ca2f..31322a22c 100644 --- a/src/gui/filtereditor.py +++ b/src/gui/filtereditor.py @@ -704,7 +704,6 @@ class EditRule(ManagedWindow.ManagedWindow): new_rule = class_obj(value_list) self.update_rule(self.active_rule, new_rule) - self._save_size() self.close() except KeyError: pass @@ -720,7 +719,8 @@ class EditFilter(ManagedWindow.ManagedWindow): filterdb, update=None, selection_callback=None): ManagedWindow.ManagedWindow.__init__(self, uistate, track, self) - + self.width_key = "interface.edit-filter-width" + self.height_key = "interface.edit-filter-height" self.namespace = namespace self.update = update self.dbstate = dbstate @@ -771,6 +771,7 @@ class EditFilter(ManagedWindow.ManagedWindow): self.comment.set_text(self.filter.get_comment()) self.draw_rules() + self._set_size() self.show() def on_help_clicked(self, obj): @@ -987,6 +988,8 @@ class FilterEditor(ManagedWindow.ManagedWindow): self.db = dbstate.db self.filterdb = FilterList(filterdb) self.filterdb.load() + self.width_key = "interface.filter-editor-width" + self.height_key = "interface.filter-editor-height" self.namespace = namespace self.define_glade('filter_list', const.RULE_GLADE) @@ -1022,6 +1025,7 @@ class FilterEditor(ManagedWindow.ManagedWindow): self.filter_select_row, self.edit_filter) self.draw_filters() + self._set_size() self.show() def build_menu_names(self, obj):