From 912528253fcf1fc43c1a2d02ffe6e540fe60d8e7 Mon Sep 17 00:00:00 2001 From: Vincent Vinet Date: Mon, 19 Oct 2009 20:15:41 +0000 Subject: Merge the TProbe Integration and fix merging induced bugs --- (limited to 'tutorius/creator.py') diff --git a/tutorius/creator.py b/tutorius/creator.py index 513e312..efa17c3 100644 --- a/tutorius/creator.py +++ b/tutorius/creator.py @@ -114,7 +114,6 @@ class Creator(object): """ self.introspecting = False eventfilter = addon.create('GtkWidgetEventFilter', - next_state=None, object_id=self._selected_widget, event_name=event_name) # undo actions so they don't persist through step editing @@ -207,9 +206,13 @@ class Creator(object): had_introspect = True self.introspecting = True elif isinstance(prop, properties.TStringProperty): - dlg = TextInputDialog(title="Mandatory property", + dlg = TextInputDialog(text="Mandatory property", field=propname) setattr(action, propname, dlg.pop()) + elif isinstance(prop, properties.TIntProperty): + dlg = TextInputDialog(text="Mandatory property", + field=propname) + setattr(action, propname, int(dlg.pop())) else: raise NotImplementedError() @@ -240,7 +243,7 @@ class Creator(object): Quit editing and cleanup interface artifacts. """ self.introspecting = False - eventfilter = filters.EventFilter(None) + eventfilter = filters.EventFilter() # undo actions so they don't persist through step editing for action in self._tutorial.current_actions: action.exit_editmode() @@ -396,7 +399,10 @@ class EditToolBox(gtk.Window): def _list_prop_changed(self, widget, evt, action, propname, idx): try: - getattr(action, propname)[idx] = int(widget.get_text()) + #Save props as tuples so that they can be hashed + attr = list(getattr(action, propname)) + attr[idx] = int(widget.get_text()) + setattr(action, propname, tuple(attr)) except ValueError: widget.set_text(str(getattr(action, propname)[idx])) self.__parent._creator._action_refresh_cb(None, None, action) -- cgit v0.9.1