Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAgustin Zubiaga <aguz@sugarlabs.org>2012-05-27 03:58:14 (GMT)
committer Agustin Zubiaga <aguz@sugarlabs.org>2012-05-27 03:58:14 (GMT)
commit2152dc0f11ac085e9aecbe574774c7253612a7d3 (patch)
tree2c30c323cd45a8ce98c5b5ce14a03c960fa6d6c8
parent4291de2ab351f597a79b49ebf9ada68d04c64d49 (diff)
Return checkbutton added
-rw-r--r--TODO6
-rw-r--r--activity.py24
2 files changed, 28 insertions, 2 deletions
diff --git a/TODO b/TODO
index e1ca68f..2ef1ce3 100644
--- a/TODO
+++ b/TODO
@@ -1,7 +1,9 @@
New functions:
- Save data in journal
+ - Select time between frames
+ - Check button for set return (In progress)
Fixes:
- - Select the frame in the list when the animation is running
- - Use the treeselection in the place of row-selected event in treeview (In progress)
+ - Select the frame in the list when the animation is running [DONE]
+ - Use the treeselection in the place of row-selected event in treeview [DONE]
Bugs:
- Show correctly indexed the selected image from the FramesList in the Animation.
diff --git a/activity.py b/activity.py
index 81c421b..0a71fba 100644
--- a/activity.py
+++ b/activity.py
@@ -25,6 +25,7 @@ import gtk
from sugar.activity import activity
from sugar.activity.widgets import StopButton
+from sugar.activity.widgets import ToolbarButton
from sugar.activity.widgets import ActivityToolbarButton
from sugar.graphics.objectchooser import ObjectChooser
from sugar.graphics.toolbarbox import ToolbarBox
@@ -80,6 +81,26 @@ class AnimateActivity(activity.Activity):
toolbarbox.toolbar.insert(next_btn, -1)
separator = gtk.SeparatorToolItem()
+ separator.set_expand(False)
+ separator.set_draw(True)
+ toolbarbox.toolbar.insert(separator, -1)
+
+ options_button = ToolbarButton(icon_name='preferences-system')
+ options_toolbar = gtk.Toolbar()
+
+ checkbutton = gtk.CheckButton("Return ")
+ checkbutton.set_active(True)
+ checkbutton.connect("toggled", self._set_return)
+ toolitem = gtk.ToolItem()
+ toolitem.add(checkbutton)
+ options_toolbar.insert(toolitem, -1)
+
+ options_button.props.page = options_toolbar
+ options_toolbar.show_all()
+
+ toolbarbox.toolbar.insert(options_button, -1)
+
+ separator = gtk.SeparatorToolItem()
separator.set_expand(True)
separator.set_draw(False)
toolbarbox.toolbar.insert(separator, -1)
@@ -117,6 +138,9 @@ class AnimateActivity(activity.Activity):
else:
return
+ def _set_return(self, widget):
+ self._animation.set_return(widget.get_active())
+
def _previous_frame(self, widget):
self._animation.back()