summaryrefslogtreecommitdiff
path: root/portato/gui/gtk/windows.py
diff options
context:
space:
mode:
authorNecoro <>2008-02-24 13:17:53 +0000
committerNecoro <>2008-02-24 13:17:53 +0000
commit4eae1d0ad2e5e52b896e53bcdbb575be82c03a90 (patch)
tree9280b77e3d91765685ed414583adaca3f9570e38 /portato/gui/gtk/windows.py
parentc8d34d5474bfef3f1a621aad63311dcc971cef99 (diff)
downloadportato-4eae1d0ad2e5e52b896e53bcdbb575be82c03a90.tar.gz
portato-4eae1d0ad2e5e52b896e53bcdbb575be82c03a90.tar.bz2
portato-4eae1d0ad2e5e52b896e53bcdbb575be82c03a90.zip
r159@Zakarumiy: necoro | 2008-02-24 14:16:32 +0100
Added searchOnType pref.
Diffstat (limited to 'portato/gui/gtk/windows.py')
-rw-r--r--portato/gui/gtk/windows.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/portato/gui/gtk/windows.py b/portato/gui/gtk/windows.py
index 03fb5b4..417c626 100644
--- a/portato/gui/gtk/windows.py
+++ b/portato/gui/gtk/windows.py
@@ -288,6 +288,7 @@ class PreferenceWindow (AbstractDialog):
"newUseCheck" : "newuse",
"maskPerVersionCheck" : "maskPerVersion",
"minimizeCheck" : ("hideOnMinimize", "GUI"),
+ "searchOnTypeCheck" : ("searchOnType", "GUI"),
"systrayCheck" : ("showSystray", "GUI"),
"testPerVersionCheck" : "keywordPerVersion",
"titleUpdateCheck" : ("updateTitle", "GUI"),
@@ -1556,23 +1557,24 @@ class MainWindow (Window):
return True
def cb_search_changed (self, *args):
- txt = self.searchEntry.get_text()
+ if self.cfg.get_boolean("searchOnType", section="GUI"):
+ txt = self.searchEntry.get_text()
- if txt or self.db.restrict:
- self.db.restrict = txt
+ if txt or self.db.restrict:
+ self.db.restrict = txt
- store = self.catList.get_model()
- store.clear()
- self.fill_cat_store(store)
+ store = self.catList.get_model()
+ store.clear()
+ self.fill_cat_store(store)
- store = self.pkgList.get_model()
- store.clear()
- try:
- self.fill_pkg_store(store, self.selCatName)
- except AttributeError: # no selCatName -> so no category selected --> ignore
- debug("No category selected --> should be no harm.")
+ store = self.pkgList.get_model()
+ store.clear()
+ try:
+ self.fill_pkg_store(store, self.selCatName)
+ except AttributeError: # no selCatName -> so no category selected --> ignore
+ debug("No category selected --> should be no harm.")
- return True
+ return True
def cb_delete_search_clicked (self, *args):
self.searchEntry.set_text("")