From f1a0524e2616b44c418bd2e77b4ecc00a793120a Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Tue, 25 Mar 2008 15:02:54 +0100 Subject: Added hpaned between category and package --- portato/gui/session.py | 2 +- portato/gui/templates/MainWindow.glade | 251 +++++++++++++++++---------------- portato/gui/windows/main.py | 13 +- 3 files changed, 138 insertions(+), 128 deletions(-) (limited to 'portato/gui') diff --git a/portato/gui/session.py b/portato/gui/session.py index e356fbd..1e3d759 100644 --- a/portato/gui/session.py +++ b/portato/gui/session.py @@ -14,7 +14,7 @@ from ..helper import _, debug # the current version for saved sessions # change this, whenever the change is incompatible with previous versions -SESSION_VERSION = 1 +SESSION_VERSION = 2 class SessionException (Exception): diff --git a/portato/gui/templates/MainWindow.glade b/portato/gui/templates/MainWindow.glade index f43dd9e..c9e32fd 100644 --- a/portato/gui/templates/MainWindow.glade +++ b/portato/gui/templates/MainWindow.glade @@ -1,6 +1,6 @@ - + 2 @@ -413,10 +413,10 @@ 0 GTK_SHADOW_IN - + True - 5 - True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True @@ -430,6 +430,10 @@ + + True + True + @@ -446,7 +450,8 @@ - 1 + True + True @@ -480,6 +485,29 @@ 2 4 4 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + label + + + 2 + GTK_FILL + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + GTK_FILL + + True @@ -530,29 +558,6 @@ 2 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 1 - 2 - GTK_FILL - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - label - - - 2 - GTK_FILL - GTK_FILL - - False @@ -593,271 +598,271 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True 0 - label + use flags + PANGO_ELLIPSIZE_END True 1 2 - 3 - 4 + 4 + 5 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True 0 - <b>License:</b> + <b>Use Flags:</b> True True - 3 - 4 + 4 + 5 GTK_FILL 5 - + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True - <b>Installed, but not in portage anymore</b> - True + Testing + 0 + 0 + True + - 2 - 5 - 6 + 7 + 8 + GTK_FILL - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - <span foreground='red'><b>MISSING KEYWORD</b></span> - True + 0 + 1 2 - 5 - 6 + 8 + 9 - + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - + True + Masked + 0 + 0 + True + - 1 - 2 - 2 - 3 + 8 + 9 + GTK_FILL - + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + Installed 0 - <b>Description:</b> - True - True + 0 + True + + 6 + 7 GTK_FILL - 5 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True 0 - <b>Overlay:</b> + <b>Homepage:</b> True True - 1 - 2 + 2 + 3 GTK_FILL 5 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True 0 label - True + True 1 2 + 1 + 2 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True 0 label - True + True 1 2 - 1 - 2 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True 0 - <b>Homepage:</b> + <b>Overlay:</b> True True - 2 - 3 + 1 + 2 GTK_FILL 5 - + True - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - Installed 0 - 0 - True - + <b>Description:</b> + True + True - 6 - 7 GTK_FILL + 5 - + True - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - Masked - 0 - 0 - True - + 5 + + + - 8 - 9 - GTK_FILL + 1 + 2 + 2 + 3 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 + True + <span foreground='red'><b>MISSING KEYWORD</b></span> + True - 1 2 - 8 - 9 + 5 + 6 - + True - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True - Testing - 0 - 0 - True - + <b>Installed, but not in portage anymore</b> + True - 7 - 8 - GTK_FILL + 2 + 5 + 6 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True 0 - <b>Use Flags:</b> + <b>License:</b> True True - 4 - 5 + 3 + 4 GTK_FILL 5 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True 0 - use flags - PANGO_ELLIPSIZE_END + label True 1 2 - 4 - 5 + 3 + 4 diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index e841cb4..d996526 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -689,6 +689,8 @@ class MainWindow (Window): self.vpaned.set_position(int(self.window.get_size()[1]/2)) self.hpaned = self.tree.get_widget("hpaned") self.hpaned.set_position(int(self.window.get_size()[0]/1.5)) + self.listPaned = self.tree.get_widget("listPaned") + self.listPaned.set_position(int(self.window.get_size()[0]/2)) # cat and pkg list self.sortPkgListByName = True @@ -921,7 +923,7 @@ class MainWindow (Window): return oldVersion = SESSION_VERSION - allowedVersions = (0,) + allowedVersions = (0,1) if sessionEx and isinstance(sessionEx, SessionException): if sessionEx.got in allowedVersions: @@ -955,10 +957,13 @@ class MainWindow (Window): # PANED def load_paned (*pos): pos = map(int, pos) - [x.set_position(p) for x,p in zip((self.vpaned, self.hpaned), pos)] + if oldVersion < 2: + [x.set_position(p) for x,p in zip((self.vpaned, self.hpaned), pos)] + else: + [x.set_position(p) for x,p in zip((self.vpaned, self.hpaned, self.listPaned), pos)] def save_paned (): - return [x.get_position() for x in (self.vpaned, self.hpaned)] + return [x.get_position() for x in (self.vpaned, self.hpaned, self.listPaned)] # SELECTION def load_selection (list, col): @@ -1027,7 +1032,7 @@ class MainWindow (Window): map(self.session.add_handler,[ ([("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), + ([("vpanedpos", "window"), ("hpanedpos", "window"), ("listpanedpos", "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) #([("merge", "queue"), ("unmerge", "queue"), ("oneshot", "queue")], load_queue, save_queue), -- cgit v1.2.3-54-g00ecf