From e56f12cbaa9c0d8e88696ce2e32b76dd525fdb6d Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Tue, 4 Mar 2008 13:39:40 +0100 Subject: Reduced lag in searching --- portato/gui/gtk/windows.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'portato') diff --git a/portato/gui/gtk/windows.py b/portato/gui/gtk/windows.py index 02785ed..5b6c621 100644 --- a/portato/gui/gtk/windows.py +++ b/portato/gui/gtk/windows.py @@ -948,6 +948,7 @@ class MainWindow (Window): # booleans self.doUpdate = False self.showAll = True # show only installed or all packages? + self.__searchChanged = False # installed pixbuf self.instPixbuf = self.window.render_icon(gtk.STOCK_YES, gtk.ICON_SIZE_MENU) @@ -1675,16 +1676,26 @@ class MainWindow (Window): Called when the user enters something in the search field. Updates the packages according to the search expression. """ - if self.cfg.get_boolean("searchOnType", section="GUI"): - txt = self.searchEntry.get_text() + if not self.__searchChanged and self.cfg.get_boolean("searchOnType", section="GUI"): + self.__searchChanged = True + + def __update(): + self.__searchChanged = False + 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 - self.refresh_stores() - self.catList.get_selection().select_path("0") # XXX make this smarter + self.refresh_stores() + self.catList.get_selection().select_path("0") # XXX make this smarter - return True + return False # not again ;) + + gobject.timeout_add(100, __update) + + def cb_delete_search_clicked (self, *args): + self.searchEntry.set_text("") + return True def cb_preferences_clicked (self, *args): """ -- cgit v1.2.3-54-g00ecf o/gui/templates/UpdateWindow.glade'>
path: root/portato/gui/templates/UpdateWindow.glade (unfollow)
Commit message (Collapse)AuthorFilesLines
2009-10-28Corrected config path handling.René 'Necoro' Neumann2-9/+6
Now also the 2.1 portage does not include / anymore. Handle this. (cherry picked from commit 58c5b49ae6d822f07879bf7f6a87271b77e7e75d)
2009-10-08Enhance the splash window handling.René 'Necoro' Neumann2-2/+9
Now the splash window is forced to stay on top. Hopes no users are going to complain ;). Additionally, the splash window is destroyed opposed to only hidden. As it is not reused, there is no use in keeping it alive. (cherry picked from commit 0a30d24e34493a2f56ba801facf4daba711d363e)
2009-09-03Fix the segfault in GLib due to wrong encodingRené 'Necoro' Neumann1-0/+1
2009-08-31Removed the gtk- strings from translationsRené 'Necoro' Neumann7-3639/+3479
2009-08-31Removed the 'translatable' attribute from 'gtk-*' stringsRené 'Necoro' Neumann5-11/+11
2009-08-25Release the threadQueue-Lock in syncv0.13René 'Necoro' Neumann1-0/+1
2009-08-25Updated portugese translationAlberto Federman Neto1-650/+687
2009-08-15Update spanish translationDaniel Halens1-245/+258
2009-08-12Updated polish translationTomasz Osiński1-644/+680
2009-08-12Updated catalan translationRoger Calvó1-643/+676
2009-08-11Sync portage and the DB after emerge syncRené 'Necoro' Neumann1-0/+9
2009-08-11Do not show masking label, if the package is not in system anymoreRené 'Necoro' Neumann1-2/+2
2009-08-11Update turkish translationGürkan Gür1-640/+676
2009-08-11Fix handling of slots in /etc/portage/*René 'Necoro' Neumann2-2/+4
2009-08-11Fix package detailsRené 'Necoro' Neumann1-1/+1
2009-08-11Fix GPytage pluginRené 'Necoro' Neumann1-2/+2
2009-08-11Update translationRené 'Necoro' Neumann2-1112/+1120
2009-08-11Update changelogRené 'Necoro' Neumann1-0/+1
2009-08-10Fixed pt_BR translationAlberto Federman Neto1-2/+5
2009-08-10Add credits for translationRené 'Necoro' Neumann2-0/+2