From 4eae1d0ad2e5e52b896e53bcdbb575be82c03a90 Mon Sep 17 00:00:00 2001
From: Necoro <>
Date: Sun, 24 Feb 2008 13:17:53 +0000
Subject: r159@Zakarumiy: necoro | 2008-02-24 14:16:32 +0100 Added
searchOnType pref.
---
portato/gui/gtk/windows.py | 28 +++++++++++++++-------------
portato/gui/templates/portato.glade | 17 +++++++++++++++++
2 files changed, 32 insertions(+), 13 deletions(-)
(limited to 'portato/gui')
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("")
diff --git a/portato/gui/templates/portato.glade b/portato/gui/templates/portato.glade
index 8b577e3..baedf91 100644
--- a/portato/gui/templates/portato.glade
+++ b/portato/gui/templates/portato.glade
@@ -1762,6 +1762,23 @@
2
+
+
+ True
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ True
+ Update the package list with the current search results while you are typing.
+<b>Note</b>: Will slow down the typing process.
+ Search while typing
+ 0.47999998927116394
+ -3
+ True
+
+
+ 3
+
+
--
cgit v1.2.3-70-g09d2