From: Ed Page Date: Fri, 30 Oct 2009 02:07:37 +0000 (-0500) Subject: Removing a function by taking advantage of GTK X-Git-Url: http://git.maemo.org/git/?p=gonvert;a=commitdiff_plain;h=501c7863cc2fd83b982259bc5040575cb782ab2c Removing a function by taking advantage of GTK --- diff --git a/data/gonvert.glade b/data/gonvert.glade index dfafd67..779ba1a 100644 --- a/data/gonvert.glade +++ b/data/gonvert.glade @@ -420,7 +420,7 @@ True * False - + diff --git a/src/gonvert_glade.py b/src/gonvert_glade.py index 3f1033f..0f2efac 100755 --- a/src/gonvert_glade.py +++ b/src/gonvert_glade.py @@ -149,7 +149,7 @@ class Gonvert(object): "on_previousUnitValue_changed": self._on_previous_unit_value_changed, "on_writeUnitsMenuItem_activate": self._on_user_write_units, "on_findButton_clicked": self._on_user_find_units, - "on_findEntry_key_press_event": self._on_find_key_press, + "on_findEntry_activated": self._on_user_find_units, "on_findEntry_changed": self._on_findEntry_changed, "on_aboutMenuItem_activate": self._on_about_clicked, "on_messagebox_ok_clicked": self.messagebox_ok_clicked, @@ -263,14 +263,6 @@ class Gonvert(object): self._find_count = 0 #default to find result number zero self._findLabel.set_text('') #clear result - def _on_find_key_press(self, a, b): - #Check if the key pressed was an ASCII key - if len(b.string)>0: - #Check if the key pressed was the 'Enter' key - if ord(b.string[0]) == 13: - #Execute the find units function - self._on_user_find_units(1) - def _on_about_clicked(self, a): dlg = gtk.AboutDialog() dlg.set_name(constants.__pretty_app_name__)