gget r52 - trunk/gget
- From: johans svn gnome org
- To: svn-commits-list gnome org
- Subject: gget r52 - trunk/gget
- Date: Tue, 5 Aug 2008 12:38:37 +0000 (UTC)
Author: johans
Date: Tue Aug 5 12:38:37 2008
New Revision: 52
URL: http://svn.gnome.org/viewvc/gget?rev=52&view=rev
Log:
Added support for interactive search in the list of downloads.
Modified:
trunk/gget/MainWindow.py
Modified: trunk/gget/MainWindow.py
==============================================================================
--- trunk/gget/MainWindow.py (original)
+++ trunk/gget/MainWindow.py Tue Aug 5 12:38:37 2008
@@ -163,6 +163,8 @@
self.name_treeview_column.set_cell_data_func(cell_renderer_text,
self.__name_cell_data_func)
self.downloads_treeview.append_column(self.name_treeview_column)
+ self.downloads_treeview.set_search_column(1)
+ self.downloads_treeview.set_search_equal_func(self.__downloads_treeview_search_equal)
# Status column
self.status_treeview_column = gtk.TreeViewColumn(_("Status"),
@@ -260,6 +262,11 @@
download = model.get_value(iter, 0)
cell.props.text = download.file_name
+ def __downloads_treeview_search_equal(self, model, column, key, iter):
+ """Compare method for search in the downloads treeview."""
+ download = model.get_value(iter, 0)
+ return key.lower() not in download.file_name.lower()
+
def __status_cell_data_func(self, column, cell, model, iter):
"""Data function for the status of downloads."""
download = model.get_value(iter, 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]