5206: Remember size of FilterEditor and EditFilter windows

svn: r19266
This commit is contained in:
Nick Hall 2012-04-07 19:03:41 +00:00
parent 080f4ee1fa
commit 92c3c4e824
2 changed files with 10 additions and 2 deletions

View File

@ -189,6 +189,8 @@ register('interface.view-categories',
["Gramplets", "People", "Relationships", "Families", ["Gramplets", "People", "Relationships", "Families",
"Ancestry", "Events", "Places", "Geography", "Sources", "Ancestry", "Events", "Places", "Geography", "Sources",
"Citations", "Repositories", "Media", "Notes"]) "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-width', 600)
register('interface.edit-rule-height', 450) register('interface.edit-rule-height', 450)
register('interface.event-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-sel-width', 600)
register('interface.family-width', 700) register('interface.family-width', 700)
register('interface.filter', False) register('interface.filter', False)
register('interface.filter-editor-width', 400)
register('interface.filter-editor-height', 350)
register('interface.fullscreen', False) register('interface.fullscreen', False)
register('interface.height', 500) register('interface.height', 500)
register('interface.lds-height', 450) register('interface.lds-height', 450)

View File

@ -704,7 +704,6 @@ class EditRule(ManagedWindow.ManagedWindow):
new_rule = class_obj(value_list) new_rule = class_obj(value_list)
self.update_rule(self.active_rule, new_rule) self.update_rule(self.active_rule, new_rule)
self._save_size()
self.close() self.close()
except KeyError: except KeyError:
pass pass
@ -720,7 +719,8 @@ class EditFilter(ManagedWindow.ManagedWindow):
filterdb, update=None, selection_callback=None): filterdb, update=None, selection_callback=None):
ManagedWindow.ManagedWindow.__init__(self, uistate, track, self) 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.namespace = namespace
self.update = update self.update = update
self.dbstate = dbstate self.dbstate = dbstate
@ -771,6 +771,7 @@ class EditFilter(ManagedWindow.ManagedWindow):
self.comment.set_text(self.filter.get_comment()) self.comment.set_text(self.filter.get_comment())
self.draw_rules() self.draw_rules()
self._set_size()
self.show() self.show()
def on_help_clicked(self, obj): def on_help_clicked(self, obj):
@ -987,6 +988,8 @@ class FilterEditor(ManagedWindow.ManagedWindow):
self.db = dbstate.db self.db = dbstate.db
self.filterdb = FilterList(filterdb) self.filterdb = FilterList(filterdb)
self.filterdb.load() self.filterdb.load()
self.width_key = "interface.filter-editor-width"
self.height_key = "interface.filter-editor-height"
self.namespace = namespace self.namespace = namespace
self.define_glade('filter_list', const.RULE_GLADE) self.define_glade('filter_list', const.RULE_GLADE)
@ -1022,6 +1025,7 @@ class FilterEditor(ManagedWindow.ManagedWindow):
self.filter_select_row, self.filter_select_row,
self.edit_filter) self.edit_filter)
self.draw_filters() self.draw_filters()
self._set_size()
self.show() self.show()
def build_menu_names(self, obj): def build_menu_names(self, obj):