summaryrefslogtreecommitdiff
path: root/portato/gui
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2010-03-05 03:07:10 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2010-03-05 03:07:10 +0100
commita7af114590bfb4a6d2f125610c2c755339f993a2 (patch)
tree406095d420613504f2175df6f3ee688ab22abd5f /portato/gui
parent22bf1fe929e9997f13d0110cba1347d00fdd21cf (diff)
downloadportato-a7af114590bfb4a6d2f125610c2c755339f993a2.tar.gz
portato-a7af114590bfb4a6d2f125610c2c755339f993a2.tar.bz2
portato-a7af114590bfb4a6d2f125610c2c755339f993a2.zip
Save current search type in session
Diffstat (limited to 'portato/gui')
-rw-r--r--portato/gui/windows/main.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index 4a9971f..a29664a 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -29,6 +29,7 @@ from ... import get_listener
from ...helper import debug, warning, error, info
from ...session import Session
from ...db import Database
+from ...db.database import UnsupportedSearchTypeError
from ...constants import CONFIG_LOCATION, VERSION, APP_ICON
from ...backend.exceptions import PackageNotFoundException, BlockedException, VersionsNotFoundException
@@ -496,8 +497,6 @@ class MainWindow (Window):
# search entry
self.searchEntry = self.tree.get_widget("searchEntry")
- self.typeCombo = self.tree.get_widget("typeCombo")
- self.build_type_combo()
# queue list
self.queueOneshot = self.tree.get_widget("oneshotCB")
@@ -558,6 +557,10 @@ class MainWindow (Window):
splash(_("Finishing startup"))
+ # depends on session
+ self.typeCombo = self.tree.get_widget("typeCombo")
+ self.build_type_combo()
+
self.window.show_all()
def show_package (self, pkg = None, cpv = None, cp = None, version = None, **kwargs):
@@ -1009,6 +1012,14 @@ class MainWindow (Window):
return _save
+ # SEARCH TYPE
+ def load_search_type (t):
+ t = int(t)
+ try:
+ self.db.type = t
+ except UnsupportedSearchTypeError:
+ info("Cannot set search type. '%s' not supported by database '%s'.", t, self.db.__class__.__name__)
+
# SESSION VERSION
def load_session_version (version):
@@ -1037,7 +1048,8 @@ class MainWindow (Window):
(["width", "height"], lambda w,h: self.window.resize(int(w), int(h)), self.window.get_size),
(["vpanedpos", "hpanedpos"], load_paned, save_paned),
(["catsel"], load_cat_selection, save_cat_selection, ["app-portage@0"]),
- (["pkgsel"], load_pkg_selection, save_pkg_selection, ["portato@0"])
+ (["pkgsel"], load_pkg_selection, save_pkg_selection, ["portato@0"]),
+ (["searchtype"], load_search_type, lambda: self.db.type)
#([("merge", "queue"), ("unmerge", "queue"), ("oneshot", "queue")], load_queue, save_queue),
])
to.git/commit/portato/db/sql.py?h=no_config&id=f254bd593f3c1842658f4fb57fa87ed77d9fe993&follow=1'>Previous commits done more correct :PRené 'Necoro' Neumann2-6/+6 2010-03-05Fix commit 7449bc5fb8fRené 'Necoro' Neumann1-3/+3 2010-03-05Ignore swap files in gitRené 'Necoro' Neumann1-0/+1 2010-03-05Added some textual descriptionsRené 'Necoro' Neumann2-1/+8 2010-03-05Add description support to the databasesRené 'Necoro' Neumann4-8/+55 2010-03-04Also parse descriptions from eixRené 'Necoro' Neumann1-2/+2 2009-11-08Added Italian translation. Thanks to Ponsi.René 'Necoro' Neumann3-0/+1166 2009-10-28Changelogv0.13.10.13René 'Necoro' Neumann1-0/+4 2009-10-28Corrected config path handling.René 'Necoro' Neumann2-9/+6 2009-10-28Corrected config path handling.René 'Necoro' Neumann2-9/+6 2009-10-24Fix the segfault in GLib due to wrong encodingRené 'Necoro' Neumann1-0/+1 2009-10-24Wrong debug message in new_version pluginRené 'Necoro' Neumann1-1/+1 2009-10-24Update TRANSLATING to use gitRené 'Necoro' Neumann1-2/+15 2009-10-24Also show revision during startup and with -vRené 'Necoro' Neumann1-1/+5 2009-10-24Adding revison info to version output.René 'Necoro' Neumann3-2/+44 2009-10-23Turn new_version plugin from a mess into sth useful.René 'Necoro' Neumann2-10/+10 2009-10-23Honor branches different from masterRené 'Necoro' Neumann1-2/+4 2009-10-23Change the new_version plugin to use git.René 'Necoro' Neumann2-32/+33 2009-10-15Objectified all the functional stuff in backend.__init__.René 'Necoro' Neumann2-32/+34 2009-10-08Enhance the splash window handling.René 'Necoro' Neumann2-2/+9 2009-10-08Enhance the splash window handling.René 'Necoro' Neumann2-2/+9 2009-10-05Some more stuff to ignoreRené 'Necoro' Neumann1-0/+3 2009-10-05Renamed the ignore fileRené 'Necoro' Neumann1-0/+0 2009-10-05Update NEWSRené 'Necoro' Neumann1-0/+1 2009-10-05Also allow 'unselect all' in the PkgListRené 'Necoro' Neumann1-1/+10 2009-10-05Now have it the sorted way in PkgListsRené 'Necoro' Neumann2-3/+9 2009-10-05Enhanced system.sort_package_list to also sort CPVsRené 'Necoro' Neumann5-27/+38 2009-10-05Added an PkgList window and rewrote UpdateWindow and WorldListWindow to use itRené 'Necoro' Neumann3-39/+63 2009-10-05Add uninstall button and rename to PkgListWindowRené 'Necoro' Neumann1-2/+17 2009-10-05First quick hack to have a world listRené 'Necoro' Neumann3-2/+24