summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-03-25 15:02:54 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-03-25 15:02:54 +0100
commitf1a0524e2616b44c418bd2e77b4ecc00a793120a (patch)
treee40e5fcaa34c250f8fb166f674605d266263be02
parent5e87c5be785d3f9c49aa4f9306bad42864858aa0 (diff)
downloadportato-f1a0524e2616b44c418bd2e77b4ecc00a793120a.tar.gz
portato-f1a0524e2616b44c418bd2e77b4ecc00a793120a.tar.bz2
portato-f1a0524e2616b44c418bd2e77b4ecc00a793120a.zip
Added hpaned between category and package
-rw-r--r--portato/gui/session.py2
-rw-r--r--portato/gui/templates/MainWindow.glade251
-rw-r--r--portato/gui/windows/main.py13
3 files changed, 138 insertions, 128 deletions
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 @@
<?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 13:10:49 2008 -->
+<!--Generated with glade3 3.4.1 on Tue Mar 25 14:51:55 2008 -->
<glade-interface>
<widget class="GtkWindow" id="MainWindow">
<property name="border_width">2</property>
@@ -413,10 +413,10 @@
<property name="label_yalign">0</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<child>
- <widget class="GtkHBox" id="listHB">
+ <widget class="GtkHPaned" id="listPaned">
<property name="visible">True</property>
- <property name="spacing">5</property>
- <property name="homogeneous">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>
<child>
<widget class="GtkScrolledWindow" id="catScroll">
<property name="visible">True</property>
@@ -430,6 +430,10 @@
</widget>
</child>
</widget>
+ <packing>
+ <property name="resize">True</property>
+ <property name="shrink">True</property>
+ </packing>
</child>
<child>
<widget class="GtkScrolledWindow" id="pkgScroll">
@@ -446,7 +450,8 @@
</child>
</widget>
<packing>
- <property name="position">1</property>
+ <property name="resize">True</property>
+ <property name="shrink">True</property>
</packing>
</child>
</widget>
@@ -481,6 +486,29 @@
<property name="column_spacing">4</property>
<property name="row_spacing">4</property>
<child>
+ <widget class="GtkLabel" id="nameLabel">
+ <property name="visible">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="label" translatable="yes">label</property>
+ </widget>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="versionCombo">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkToolbar" id="packageTB">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -530,29 +558,6 @@
<property name="bottom_attach">2</property>
</packing>
</child>
- <child>
- <widget class="GtkComboBox" id="versionCombo">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- </widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="nameLabel">
- <property name="visible">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="label" translatable="yes">label</property>
- </widget>
- <packing>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -593,271 +598,271 @@
<placeholder/>
</child>
<child>
- <widget class="GtkLabel" id="licenseLabel">
+ <widget class="GtkLabel" id="useFlagsLabel">
<property name="visible">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="no_show_all">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">label</property>
+ <property name="label">use flags</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_END</property>
<property name="single_line_mode">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="licenseLabelLabel">
+ <widget class="GtkLabel" id="useFlagsLabelLabel">
<property name="visible">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="no_show_all">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;License:&lt;/b&gt;</property>
+ <property name="label" translatable="yes">&lt;b&gt;Use Flags:&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="single_line_mode">True</property>
</widget>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">5</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="notInSysLabel">
+ <widget class="GtkCheckButton" id="testingCheck">
<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="no_show_all">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Installed, but not in portage anymore&lt;/b&gt;</property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Testing</property>
+ <property name="xalign">0</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="cb_testing_toggled"/>
</widget>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="missingLabel">
+ <widget class="GtkLabel" id="maskedLabel">
<property name="visible">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="no_show_all">True</property>
- <property name="label" translatable="yes">&lt;span foreground='red'&gt;&lt;b&gt;MISSING KEYWORD&lt;/b&gt;&lt;/span&gt;</property>
- <property name="use_markup">True</property>
+ <property name="xalign">0</property>
</widget>
<packing>
+ <property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="linkBox">
+ <widget class="GtkCheckButton" id="maskedCheck">
<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>
- <child>
- <placeholder/>
- </child>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes">Masked</property>
+ <property name="xalign">0</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="cb_masked_toggled"/>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="descLabelLabel">
+ <widget class="GtkCheckButton" id="installedCheck">
<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="no_show_all">True</property>
+ <property name="label" translatable="yes">Installed</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Description:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- <property name="single_line_mode">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="button_press_event" handler="cb_button_pressed"/>
</widget>
<packing>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
- <property name="y_padding">5</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="overlayLabelLabel">
+ <widget class="GtkLabel" id="homepageLinkLabel">
<property name="visible">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="no_show_all">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Overlay:&lt;/b&gt;</property>
+ <property name="label" translatable="yes">&lt;b&gt;Homepage:&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="single_line_mode">True</property>
</widget>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">5</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="descLabel">
+ <widget class="GtkLabel" id="overlayLabel">
<property name="visible">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="no_show_all">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">label</property>
- <property name="wrap">True</property>
+ <property name="single_line_mode">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="overlayLabel">
+ <widget class="GtkLabel" id="descLabel">
<property name="visible">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="no_show_all">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">label</property>
- <property name="single_line_mode">True</property>
+ <property name="wrap">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="homepageLinkLabel">
+ <widget class="GtkLabel" id="overlayLabelLabel">
<property name="visible">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="no_show_all">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Homepage:&lt;/b&gt;</property>
+ <property name="label" translatable="yes">&lt;b&gt;Overlay:&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="single_line_mode">True</property>
</widget>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">5</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="installedCheck">
+ <widget class="GtkLabel" id="descLabelLabel">
<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="no_show_all">True</property>
- <property name="label" translatable="yes">Installed</property>
<property name="xalign">0</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- <signal name="button_press_event" handler="cb_button_pressed"/>
+ <property name="label" translatable="yes">&lt;b&gt;Description:&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ <property name="single_line_mode">True</property>
</widget>
<packing>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
+ <property name="y_padding">5</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="maskedCheck">
+ <widget class="GtkHBox" id="linkBox">
<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="no_show_all">True</property>
- <property name="label" translatable="yes">Masked</property>
- <property name="xalign">0</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="cb_masked_toggled"/>
+ <property name="spacing">5</property>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="maskedLabel">
+ <widget class="GtkLabel" id="missingLabel">
<property name="visible">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="xalign">0</property>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes">&lt;span foreground='red'&gt;&lt;b&gt;MISSING KEYWORD&lt;/b&gt;&lt;/span&gt;</property>
+ <property name="use_markup">True</property>
</widget>
<packing>
- <property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="testingCheck">
+ <widget class="GtkLabel" id="notInSysLabel">
<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="no_show_all">True</property>
- <property name="label" translatable="yes">Testing</property>
- <property name="xalign">0</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="cb_testing_toggled"/>
+ <property name="label" translatable="yes">&lt;b&gt;Installed, but not in portage anymore&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
</widget>
<packing>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="useFlagsLabelLabel">
+ <widget class="GtkLabel" id="licenseLabelLabel">
<property name="visible">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="no_show_all">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;b&gt;Use Flags:&lt;/b&gt;</property>
+ <property name="label" translatable="yes">&lt;b&gt;License:&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="single_line_mode">True</property>
</widget>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="y_padding">5</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="useFlagsLabel">
+ <widget class="GtkLabel" id="licenseLabel">
<property name="visible">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="no_show_all">True</property>
<property name="xalign">0</property>
- <property name="label">use flags</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_END</property>
+ <property name="label" translatable="yes">label</property>
<property name="single_line_mode">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="y_options"></property>
</packing>
</child>
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),