summaryrefslogtreecommitdiff
path: root/portato/gui
diff options
context:
space:
mode:
Diffstat (limited to 'portato/gui')
-rw-r--r--portato/gui/session.py2
-rw-r--r--portato/gui/templates/MainWindow.glade70
-rw-r--r--portato/gui/windows/main.py16
3 files changed, 31 insertions, 57 deletions
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 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.1 on Tue Mar 25 15:26:47 2008 -->
+<!--Generated with glade3 3.4.1 on Tue Mar 25 15:34:29 2008 -->
<glade-interface>
<widget class="GtkWindow" id="MainWindow">
<property name="border_width">2</property>
@@ -413,10 +413,11 @@
<property name="label_yalign">0</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<child>
- <widget class="GtkHPaned" id="listPaned">
+ <widget class="GtkHBox" id="listHB">
<property name="visible">True</property>
- <property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">5</property>
+ <property name="homogeneous">True</property>
<child>
<widget class="GtkScrolledWindow" id="catScroll">
<property name="visible">True</property>
@@ -430,59 +431,42 @@
</widget>
</child>
</widget>
- <packing>
- <property name="resize">True</property>
- <property name="shrink">True</property>
- </packing>
</child>
<child>
- <widget class="GtkHPaned" id="listPaned2">
+ <widget class="GtkScrolledWindow" id="pkgScroll">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="can_focus">False</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<child>
- <widget class="GtkScrolledWindow" id="pkgScroll">
+ <widget class="GtkTreeView" id="pkgList">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <child>
- <widget class="GtkTreeView" id="pkgList">
- <property name="visible">True</property>
- <property name="headers_clickable">True</property>
- <property name="search_column">0</property>
- </widget>
- </child>
+ <property name="headers_clickable">True</property>
+ <property name="search_column">0</property>
</widget>
- <packing>
- <property name="resize">True</property>
- <property name="shrink">True</property>
- </packing>
</child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkScrolledWindow" id="versionScroll">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<child>
- <widget class="GtkScrolledWindow" id="versionScroll">
+ <widget class="GtkTreeView" id="versionList">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <child>
- <widget class="GtkTreeView" id="versionList">
- <property name="visible">True</property>
- <property name="headers_clickable">True</property>
- <property name="search_column">1</property>
- <signal name="cursor_changed" handler="cb_version_list_changed"/>
- </widget>
- </child>
+ <property name="headers_clickable">True</property>
+ <property name="search_column">1</property>
+ <signal name="cursor_changed" handler="cb_version_list_changed"/>
</widget>
- <packing>
- <property name="resize">True</property>
- <property name="shrink">True</property>
- </packing>
</child>
</widget>
<packing>
- <property name="resize">True</property>
- <property name="shrink">True</property>
+ <property name="position">2</property>
</packing>
</child>
</widget>
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),