Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/addons/gtkwidgeteventfilter.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/gtkwidgeteventfilter.py')
-rw-r--r--addons/gtkwidgeteventfilter.py14
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"]
}