From d65fd555952a49977bca8f892c4b31355707ab08 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Tue, 25 Mar 2008 15:25:02 +0100 Subject: First try of using a version list --- portato/gui/templates/MainWindow.glade | 136 +++++++++++++++++---------------- 1 file changed, 69 insertions(+), 67 deletions(-) (limited to 'portato/gui/templates') diff --git a/portato/gui/templates/MainWindow.glade b/portato/gui/templates/MainWindow.glade index c9e32fd..07349fa 100644 --- a/portato/gui/templates/MainWindow.glade +++ b/portato/gui/templates/MainWindow.glade @@ -1,6 +1,6 @@ - + 2 @@ -436,17 +436,48 @@ - + True - False - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True - True - 0 + False + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + True + 0 + + + + True + True + + + + + True + False + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + True + 0 + + + + + + True + True + @@ -478,90 +509,61 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 2 - 2 - 4 - 4 + label + + + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_ICON_SIZE_BUTTON + True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - label + Install onto system + gtk-add + - 2 - GTK_FILL - GTK_FILL + False - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Uninstall from system + gtk-remove + - 1 - 2 - GTK_FILL + False - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_ICON_SIZE_BUTTON - True - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Install onto system - gtk-add - - - - False - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Uninstall from system - gtk-remove - - - - False - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Revert changes - gtk-undo - - - - False - - + Revert changes + gtk-undo + - 1 - 2 - 1 - 2 + False False - 5 + 1 @@ -1031,7 +1033,7 @@ - 1 + 2 -- cgit v1.2.3-70-g09d2 From 9af6e349169e5df5e130701a6e09ec6411712673 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Tue, 25 Mar 2008 15:27:52 +0100 Subject: Polished frontend --- portato/gui/templates/MainWindow.glade | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'portato/gui/templates') diff --git a/portato/gui/templates/MainWindow.glade b/portato/gui/templates/MainWindow.glade index 07349fa..0ebb78e 100644 --- a/portato/gui/templates/MainWindow.glade +++ b/portato/gui/templates/MainWindow.glade @@ -1,6 +1,6 @@ - + 2 @@ -469,7 +469,7 @@ True True - 0 + 1 @@ -563,6 +563,7 @@ False + 5 1 -- cgit v1.2.3-70-g09d2 From 08d77f06f8b90ebef81255f1fcedf6ff8953aa98 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Tue, 25 Mar 2008 15:36:24 +0100 Subject: Converted back to HB instead of HPaned --- portato/gui/session.py | 2 +- portato/gui/templates/MainWindow.glade | 70 +++++++++++++--------------------- portato/gui/windows/main.py | 16 ++------ 3 files changed, 31 insertions(+), 57 deletions(-) (limited to 'portato/gui/templates') diff --git a/portato/gui/session.py b/portato/gui/session.py index 1e3d759..e356fbd 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 = 2 +SESSION_VERSION = 1 class SessionException (Exception): diff --git a/portato/gui/templates/MainWindow.glade b/portato/gui/templates/MainWindow.glade index 0ebb78e..f99d77f 100644 --- a/portato/gui/templates/MainWindow.glade +++ b/portato/gui/templates/MainWindow.glade @@ -1,6 +1,6 @@ - + 2 @@ -413,10 +413,11 @@ 0 GTK_SHADOW_IN - + True - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + True True @@ -430,59 +431,42 @@ - - True - True - - + True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC - + True - False - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - True - 0 - - + True + 0 - - True - True - + + + 1 + + + + + True + False + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC - + True - False - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - True - 1 - - - + True + 1 + - - True - True - - True - True + 2 diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index e52439a..0a217ea 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -148,10 +148,8 @@ class PackageTable: self.instPackages = system.sort_package_list(system.find_installed_packages(cp, masked = True)) # version-combo-box - #self.versionCombo.handler_block(self.versionCombo.changeHandler) # block change handler, because it would be called several times self.versionList.get_model().clear() self.fill_version_list() - #self.versionCombo.handler_unblock(self.versionCombo.changeHandler) # unblock handler again if not self.queue or not self.doEmerge: self.emergeBtn.set_sensitive(False) @@ -358,9 +356,6 @@ class PackageTable: self.versionList.append_column(col) - # connect - #self.versionCombo.changeHandler = self.versionCombo.connect("changed", self.cb_version_combo_changed) - def fill_version_list (self): store = self.versionList.get_model() @@ -697,8 +692,6 @@ 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 @@ -965,13 +958,10 @@ class MainWindow (Window): # PANED def load_paned (*pos): pos = map(int, 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)] + [x.set_position(p) for x,p in zip((self.vpaned, self.hpaned), pos)] def save_paned (): - return [x.get_position() for x in (self.vpaned, self.hpaned, self.listPaned)] + return [x.get_position() for x in (self.vpaned, self.hpaned)] # SELECTION def load_selection (list, col): @@ -1040,7 +1030,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"), ("listpanedpos", "window")], load_paned, save_paned), + ([("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) #([("merge", "queue"), ("unmerge", "queue"), ("oneshot", "queue")], load_queue, save_queue), -- cgit v1.2.3-70-g09d2 From 913cf96bb600ca29f522aac9f547a098cedb638d Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Tue, 25 Mar 2008 19:57:45 +0100 Subject: Added preference switch for showing the slots --- portato/gui/templates/PreferenceWindow.glade | 231 ++++++++++++++++----------- portato/gui/windows/preference.py | 3 +- 2 files changed, 138 insertions(+), 96 deletions(-) (limited to 'portato/gui/templates') diff --git a/portato/gui/templates/PreferenceWindow.glade b/portato/gui/templates/PreferenceWindow.glade index 9b52e66..4cc7dce 100644 --- a/portato/gui/templates/PreferenceWindow.glade +++ b/portato/gui/templates/PreferenceWindow.glade @@ -1,6 +1,6 @@ - + 5 @@ -214,189 +214,189 @@ - - True - 0 - 5 - <u><i>Masking Keywords</i></u> - True - True - - - 7 - 8 - 5 - - - - + True - 0 - 5 - <u><i>Testing Keywords</i></u> - True - True - 4 - 5 - 5 + 1 + 2 + 3 + 4 - + True 0 - 5 - <u><i>Use-Flags</i></u> - True + File name to use, if package.use is a directory: True - 1 - 2 - 6 + 3 + 4 - + True - - - True - 0 - GTK_SHADOW_OUT - - - True - 0 - <u>You may use the following placeholders:</u> - -<i>$(cat)</i>: category -<i>$(pkg)</i>: package name -<i>$(cat-1)/$(cat-2)</i>: first/second part of the category - True - - - - - - label_item - - - - + Add only exact version to package.use + 0 + True 2 + 2 + 3 - + True - Add only exact version to package.mask/package.unmask + Add only exact version to package.keywords 0 True 2 - 8 - 9 + 5 + 6 - + True 0 - File name to use, if package.mask/package.unmask is a directory: + File name to use, if package.keywords is a directory: True - 9 - 10 + 6 + 7 - + True 1 2 - 9 - 10 + 6 + 7 - + True 1 2 - 6 - 7 + 9 + 10 - + True 0 - File name to use, if package.keywords is a directory: + File name to use, if package.mask/package.unmask is a directory: True - 6 - 7 + 9 + 10 - + True - Add only exact version to package.keywords + Add only exact version to package.mask/package.unmask 0 True 2 - 5 - 6 + 8 + 9 - + True - Add only exact version to package.use - 0 - True + + + True + 0 + GTK_SHADOW_OUT + + + True + 0 + <u>You may use the following placeholders:</u> + +<i>$(cat)</i>: category +<i>$(pkg)</i>: package name +<i>$(cat-1)/$(cat-2)</i>: first/second part of the category + True + + + + + + label_item + + + + 2 - 2 - 3 - + True 0 - File name to use, if package.use is a directory: + 5 + <u><i>Use-Flags</i></u> + True True - 3 - 4 + 1 + 2 + 6 - + + True + 0 + 5 + <u><i>Testing Keywords</i></u> + True + True + + + 4 + 5 + 5 + + + + True + 0 + 5 + <u><i>Masking Keywords</i></u> + True + True - 1 - 2 - 3 - 4 + 7 + 8 + 5 @@ -701,6 +701,47 @@ 2 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + 12 + 5 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Show slots in the version list + 0 + True + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>Package Options</b> + True + + + label_item + + + + + False + 3 + + diff --git a/portato/gui/windows/preference.py b/portato/gui/windows/preference.py index 079a80d..d69c99c 100644 --- a/portato/gui/windows/preference.py +++ b/portato/gui/windows/preference.py @@ -24,16 +24,17 @@ class PreferenceWindow (AbstractDialog): # all checkboxes in the window # widget name -> option name checkboxes = { + "consoleUpdateCheck" : ("updateConsole", "GUI"), "debugCheck" : "debug", "deepCheck" : "deep", "newUseCheck" : "newuse", "maskPerVersionCheck" : "maskPerVersion", "minimizeCheck" : ("hideOnMinimize", "GUI"), "searchOnTypeCheck" : ("searchOnType", "GUI"), + "showSlotsCheck" : ("showSlots", "GUI"), "systrayCheck" : ("showSystray", "GUI"), "testPerVersionCheck" : "keywordPerVersion", "titleUpdateCheck" : ("updateTitle", "GUI"), - "consoleUpdateCheck" : ("updateConsole", "GUI"), "usePerVersionCheck" : "usePerVersion" } -- cgit v1.2.3-70-g09d2 From 0e62d04b6bf5cd91eefeae523ca47f6e1f49ca5a Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Tue, 25 Mar 2008 20:30:02 +0100 Subject: Use buttons instead of toolbar --- portato/gui/templates/MainWindow.glade | 79 +++++++++++++++++++++++----------- 1 file changed, 53 insertions(+), 26 deletions(-) (limited to 'portato/gui/templates') diff --git a/portato/gui/templates/MainWindow.glade b/portato/gui/templates/MainWindow.glade index f99d77f..5a60ed4 100644 --- a/portato/gui/templates/MainWindow.glade +++ b/portato/gui/templates/MainWindow.glade @@ -1,6 +1,6 @@ - + 2 @@ -479,8 +479,8 @@ - False - True + True + False @@ -493,62 +493,89 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - label - - - False - - - - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_ICON_SIZE_BUTTON - True + 5 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + label + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Install onto system - gtk-add + GTK_RELIEF_NONE + 0 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-add + + False + 1 - + True + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Uninstall from system - gtk-remove + GTK_RELIEF_NONE + 0 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-remove + + False + 2 - + True + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Revert changes - gtk-undo + GTK_RELIEF_NONE + 0 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-undo + + False + 3 False - 5 - 1 + 4 @@ -1018,7 +1045,7 @@ - 2 + 1 -- cgit v1.2.3-70-g09d2