diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2008-06-10 01:17:56 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2008-06-10 01:17:56 +0200 |
commit | 772b3bb14fc3103d774e4e0d907a6c4670ed03f3 (patch) | |
tree | 6945a5f7d03838d9c934875377dfcf3d98ebb102 /portato/gui | |
parent | 7a12f4c4031c85e4301d09ea5aa86e55103bb5e1 (diff) | |
download | portato-772b3bb14fc3103d774e4e0d907a6c4670ed03f3.tar.gz portato-772b3bb14fc3103d774e4e0d907a6c4670ed03f3.tar.bz2 portato-772b3bb14fc3103d774e4e0d907a6c4670ed03f3.zip |
Allowed default for session; load 'app-portage/portato' as default for selections :)
Diffstat (limited to '')
-rw-r--r-- | portato/gui/windows/main.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index 8a2f170..0d40968 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -702,9 +702,6 @@ class MainWindow (Window): self.queueTree = GtkTree(self.queueList.get_model()) self.queue = EmergeQueue(console = self.console, tree = self.queueTree, db = self.db, title_update = self.title_update, threadClass = GtkThread) - self.catList.get_selection().select_path(1) - self.pkgList.get_selection().select_path(0) - # session splash(_("Restoring Session")) try: @@ -1107,13 +1104,19 @@ class MainWindow (Window): elif version > SESSION_VERSION: raise NewSessionException(version, SESSION_VERSION) + def _add (value): + if len(value) == 4: + self.session.add_handler(value[:3], default = value[3]) + else: + self.session.add_handler(value) + # set the simple ones :) - map(self.session.add_handler,[ + map(_add,[ ([("gtksessionversion", "session")], load_session_version, lambda: SESSION_VERSION), ([("width", "window"), ("height", "window")], lambda w,h: self.window.resize(int(w), int(h)), self.window.get_size), ([("vpanedpos", "window"), ("hpanedpos", "window")], load_paned, save_paned), - ([("catsel", "window")], load_selection(self.catList, 0), save_cat_selection), - ([("pkgsel", "window")], load_selection(self.pkgList, 1), save_pkg_selection) + ([("catsel", "window")], load_selection(self.catList, 0), save_cat_selection, ["app-portage"]), + ([("pkgsel", "window")], load_selection(self.pkgList, 1), save_pkg_selection, ["portato"]) #([("merge", "queue"), ("unmerge", "queue"), ("oneshot", "queue")], load_queue, save_queue), ]) |