[kupfer] preferences: add "clear" icon to filter entry in plugins tab



commit b4f824e8694707a9fe1ba8ec37220dbc9dac5d9e
Author: Karol BÄ?dkowski <karol bedkowski gmail com>
Date:   Thu Mar 25 19:58:12 2010 +0100

    preferences: add "clear" icon to filter entry in plugins tab
    
    With this change, Kupfer now requires GTK+ 2.16

 README                   |    2 +-
 data/preferences.ui      |    4 +++-
 kupfer/ui/preferences.py |    6 ++++--
 3 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/README b/README
index 35070ac..50725e3 100644
--- a/README
+++ b/README
@@ -37,7 +37,7 @@ Requirements
 
 Kupfer requires Python 2.6 or later, and the following important libraries:
 
-* gtk python bindings, version 2.14
+* gtk python bindings, GTK+ version 2.16
 * glib python bindings (pygobject) 2.18
 * dbus python bindings
 * keyring python module
diff --git a/data/preferences.ui b/data/preferences.ui
index c623ab4..dee157a 100644
--- a/data/preferences.ui
+++ b/data/preferences.ui
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <interface>
-  <requires lib="gtk+" version="2.14"/>
+  <requires lib="gtk+" version="2.16"/>
   <!-- interface-naming-policy project-wide -->
   <object class="GtkWindow" id="preferenceswindow">
     <property name="border_width">10</property>
@@ -330,7 +330,9 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">&#x25CF;</property>
+                            <property name="secondary_icon_stock">gtk-clear</property>
                             <signal name="changed" handler="on_entry_plugins_filter_changed"/>
+                            <signal name="icon_press" handler="on_entry_plugins_filter_icon_press"/>
                           </object>
                           <packing>
                             <property name="expand">False</property>
diff --git a/kupfer/ui/preferences.py b/kupfer/ui/preferences.py
index 3944267..5725fe5 100644
--- a/kupfer/ui/preferences.py
+++ b/kupfer/ui/preferences.py
@@ -109,7 +109,7 @@ class PreferencesWindowController (pretty.OutputMixin):
 		self.dir_table.get_selection().set_mode(gtk.SELECTION_BROWSE)
 
 		icon_cell = gtk.CellRendererPixbuf()
-			
+
 		icon_col = gtk.TreeViewColumn("icon", icon_cell)
 		icon_col.add_attribute(icon_cell, "gicon", 1)
 
@@ -265,7 +265,6 @@ class PreferencesWindowController (pretty.OutputMixin):
 		plugin_id = first_row[0]
 		self.show_focus_plugin(plugin_id)
 
-
 	def on_checkplugin_toggled(self, cell, path):
 		checkcol = self.columns.index("enabled")
 		plugin_id = self._id_for_table_path(path)
@@ -587,6 +586,9 @@ class PreferencesWindowController (pretty.OutputMixin):
 		us_filter = kupferstring.tounicode(s_filter).lower()
 		self._refresh_plugin_list(us_filter)
 
+	def on_entry_plugins_filter_icon_press(self, entry, icon_pos, event):
+		entry.set_text('')
+
 	def dir_table_cursor_changed(self, table):
 		curpath, curcol = table.get_cursor()
 		if not curpath or not self.dir_store:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]