# HG changeset patch # User Erik Grinaker # Date 1091976038 0 # Node ID f4e8220f0a3a5847cb9f8b55b624b090bff17ec7 # Parent 784a991e653d7433f4b9687f21273d051b0f52c4 window position is stored on exit diff -r 784a991e653d7433f4b9687f21273d051b0f52c4 -r f4e8220f0a3a5847cb9f8b55b624b090bff17ec7 ChangeLog --- a/ChangeLog Sun Aug 08 14:30:59 2004 +0000 +++ b/ChangeLog Sun Aug 08 14:40:38 2004 +0000 @@ -8,6 +8,8 @@ * fixed some bugs introduced during development + * the window position is stored on quit + 2004-08-07 Erik Grinaker * minor code cleanups diff -r 784a991e653d7433f4b9687f21273d051b0f52c4 -r f4e8220f0a3a5847cb9f8b55b624b090bff17ec7 NEWS --- a/NEWS Sun Aug 08 14:30:59 2004 +0000 +++ b/NEWS Sun Aug 08 14:40:38 2004 +0000 @@ -3,10 +3,10 @@ New features: - added a preference for autosaving data on change -- window geometry is stored on quit - added import/export of .netrc files - added import/export of GNOME Password Manager (gpass) files - replaced the import/export druids with normal file selectors +- window size and position is stored on quit - default type when adding entries is Generic - vertical scrollbar only displayed when needed - most dialogs can be closed by pressing Escape diff -r 784a991e653d7433f4b9687f21273d051b0f52c4 -r f4e8220f0a3a5847cb9f8b55b624b090bff17ec7 gnome/revelation.schemas --- a/gnome/revelation.schemas Sun Aug 08 14:30:59 2004 +0000 +++ b/gnome/revelation.schemas Sun Aug 08 14:40:38 2004 +0000 @@ -217,6 +217,38 @@ + /schemas/apps/revelation/view/window-position-x + /apps/revelation/view/window-position-x + revelation + int + 0 + + + Initial horizontal window position + + The initial horizontal position of the main + window, in pixels. + + + + + + /schemas/apps/revelation/view/window-position-y + /apps/revelation/view/window-position-y + revelation + int + 0 + + + Initial vertical window position + + The initial vertical position of the main + window, in pixels. + + + + + /schemas/apps/revelation/view/window-width /apps/revelation/view/window-width revelation diff -r 784a991e653d7433f4b9687f21273d051b0f52c4 -r f4e8220f0a3a5847cb9f8b55b624b090bff17ec7 src/lib/data.py --- a/src/lib/data.py Sun Aug 08 14:30:59 2004 +0000 +++ b/src/lib/data.py Sun Aug 08 14:40:38 2004 +0000 @@ -169,9 +169,10 @@ "Checks if the configuration is available" try: - self.get("view/window-width") self.get("file/autoload_file") self.get("file/autosave") + self.get("view/window-position-y") + self.get("view/window-width") except ConfigError: return gtk.FALSE diff -r 784a991e653d7433f4b9687f21273d051b0f52c4 -r f4e8220f0a3a5847cb9f8b55b624b090bff17ec7 src/revelation --- a/src/revelation Sun Aug 08 14:30:59 2004 +0000 +++ b/src/revelation Sun Aug 08 14:40:38 2004 +0000 @@ -157,6 +157,7 @@ "Sets the initial application state" self.set_default_size(self.config.get("view/window-width"), self.config.get("view/window-height")) + self.move(self.config.get("view/window-position-x"), self.config.get("view/window-position-y")) self.connect("delete_event", lambda w,d: gtk.TRUE ^ self.quit()) self.tree.select(None) @@ -768,6 +769,11 @@ width, height = self.get_size() self.config.set("view/window-width", width) self.config.set("view/window-height", height) + + x, y = self.get_position() + self.config.set("view/window-position-x", x) + self.config.set("view/window-position-y", y) + self.config.set("view/pane-position", self.hpaned.get_position()) gtk.mainquit()