diff options
author | Charlie <charlie@tutorius-dev.(none)> | 2009-10-25 01:18:10 (GMT) |
---|---|---|
committer | Charlie <charlie@tutorius-dev.(none)> | 2009-10-25 01:18:10 (GMT) |
commit | 48ba2db44bb2054222cad3aca3e027e24c51c090 (patch) | |
tree | 13a25552db428a3a97e22e09f7936c4a988f11cf /addons/gtkwidgeteventfilter.py | |
parent | 2b4eaea8f46e846799595b3c7015f77c6156532b (diff) | |
parent | aa4868af13437f4718e8ce7972b79b496d296068 (diff) |
Merge branch 'demo' into activity
Diffstat (limited to 'addons/gtkwidgeteventfilter.py')
-rw-r--r-- | addons/gtkwidgeteventfilter.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/addons/gtkwidgeteventfilter.py b/addons/gtkwidgeteventfilter.py index cbfb00c..5811744 100644 --- a/addons/gtkwidgeteventfilter.py +++ b/addons/gtkwidgeteventfilter.py @@ -13,23 +13,23 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -from sugar.tutorius.filters import * -from sugar.tutorius.properties import * +from sugar.tutorius.filters import EventFilter +from sugar.tutorius.properties import TUAMProperty, TGtkSignal +from sugar.tutorius.gtkutils import find_widget class GtkWidgetEventFilter(EventFilter): """ Basic Event filter for Gtk widget events """ object_id = TUAMProperty() - event_name = TStringProperty("clicked") + event_name = TGtkSignal('clicked') - def __init__(self, next_state=None, object_id=None, event_name=None): + def __init__(self, object_id=None, event_name=None): """Constructor - @param next_state default EventFilter param, passed on to EventFilter @param object_id object fqdn-style identifier @param event_name event to attach to """ - super(GtkWidgetEventFilter,self).__init__(next_state) + super(GtkWidgetEventFilter,self).__init__() self._callback = None self.object_id = object_id self.event_name = event_name @@ -64,6 +64,6 @@ __event__ = { "display_name" : "GTK Event catcher", "icon" : "player_play", "class" : GtkWidgetEventFilter, - "mandatory_props" : ["object_id"] + "mandatory_props" : ["object_id", "event_name"] } |