Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/creator.py
diff options
context:
space:
mode:
Diffstat (limited to 'tutorius/creator.py')
-rw-r--r--tutorius/creator.py14
1 files changed, 10 insertions, 4 deletions
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)