summaryrefslogtreecommitdiff
path: root/grc/gui/BlockTreeWindow.py
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2014-10-01 12:27:08 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2014-10-01 12:27:08 -0700
commita166f439d9c33165ccc0a3fee3d63cdef2040d5a (patch)
tree3df6ba5cd6b5fb8ab28e065e20256ea022d1d219 /grc/gui/BlockTreeWindow.py
parent029079cf5cee92c64755318b4fe5d46d45b61b7a (diff)
parent1edeff17c0b11e9ab2c626a82472690318268a9a (diff)
Merge branch 'maint'
Diffstat (limited to 'grc/gui/BlockTreeWindow.py')
-rw-r--r--grc/gui/BlockTreeWindow.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/grc/gui/BlockTreeWindow.py b/grc/gui/BlockTreeWindow.py
index b04a4dda7c..76eebdb959 100644
--- a/grc/gui/BlockTreeWindow.py
+++ b/grc/gui/BlockTreeWindow.py
@@ -58,10 +58,13 @@ class BlockTreeWindow(gtk.VBox):
# search entry
self.search_entry = gtk.Entry()
- self.search_entry.set_icon_from_stock(gtk.ENTRY_ICON_PRIMARY, gtk.STOCK_FIND)
- self.search_entry.set_icon_activatable(gtk.ENTRY_ICON_PRIMARY, False)
- self.search_entry.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, gtk.STOCK_CLOSE)
- self.search_entry.connect('icon-release', self._handle_icon_event)
+ try:
+ self.search_entry.set_icon_from_stock(gtk.ENTRY_ICON_PRIMARY, gtk.STOCK_FIND)
+ self.search_entry.set_icon_activatable(gtk.ENTRY_ICON_PRIMARY, False)
+ self.search_entry.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, gtk.STOCK_CLOSE)
+ self.search_entry.connect('icon-release', self._handle_icon_event)
+ except AttributeError:
+ pass # no icon for old pygtk
self.search_entry.connect('changed', self._update_search_tree)
self.search_entry.connect('key-press-event', self._handle_search_key_press)
self.pack_start(self.search_entry, False)