Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
diff options
context:
space:
mode:
Diffstat (limited to 'activity.py')
-rw-r--r--activity.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/activity.py b/activity.py
index c8d765c..ff40855 100644
--- a/activity.py
+++ b/activity.py
@@ -55,6 +55,7 @@ class AnimateActivity(activity.Activity):
self._toolbarbox.show_all()
canvas = gtk.EventBox()
+ canvas.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('white'))
self._animation = None
self._animation_frames = []
@@ -62,8 +63,8 @@ class AnimateActivity(activity.Activity):
self.modes_buttons = self._toolbarbox.modes_buttons
self._frames_tray = FramesTray()
-# self._frames_tray.connect("current-frame-changed",
-# self._current_frame_changed_cb)
+ self._frames_tray.connect("current-frame-changed",
+ self._current_frame_changed_cb)
# self._frames_tray.connect("move", self._move_cb)
# self._frames_tray.connect('get-current-frame',
# lambda w: self._animation.get_current_frame())
@@ -147,7 +148,7 @@ class AnimateActivity(activity.Activity):
jobject = chooser.get_selected_object()
pixbuf = gtk.gdk.pixbuf_new_from_file(jobject.get_file_path())
self._animation.add_frame(pixbuf)
- self._frames_list.add_frame(pixbuf)
+ self._frames_tray.add_frame(pixbuf)
else:
return
@@ -183,9 +184,9 @@ class AnimateActivity(activity.Activity):
def _get_animation_size(self):
canvas_allocation = self.get_canvas().get_allocation()
- treeview_allocation = self._frames_list.get_allocation()
+ tray_allocation = self._frames_tray.get_allocation()
- width = canvas_allocation[-2] - treeview_allocation[-2]
+ width = canvas_allocation[-2] - tray_allocation[-2]
height = canvas_allocation[-1]
return width, height
@@ -195,9 +196,10 @@ class AnimateActivity(activity.Activity):
if not self._animation:
self._animation = animation.Animation(width, height)
- self._animation.set_mode(self._animation_mode)
- self._animation.connect('running',
- self._frames_toolbar.set_buttons_sensitive)
+ if self._animation_mode:
+ self._animation.set_mode(self._animation_mode)
+ #self._animation.connect('running',
+ # self._frames_toolbar.set_buttons_sensitive)
for pixbuf in self._animation_frames:
self._animation.add_frame(pixbuf)
self._frames_tray.add_frame(pixbuf)
@@ -206,24 +208,24 @@ class AnimateActivity(activity.Activity):
self._current_frame_updated_cb)
self._animation.show_all()
- del self._animation_mode
+ self._animation_mode = None
canvas.add(self._animation)
def _current_frame_updated_cb(self, widget, index):
if widget.frames_reverse:
index = len(widget.frames) - 1 - index
- self._frames_list.select_frame(index)
+ self._frames_tray.select_frame(index)
return index
def _view_fullscreen(self, widget):
- self._frames_try.hide()
+ self._frames_tray.hide()
self._animation.set_size(gtk.gdk.screen_width(),
gtk.gdk.screen_height())
activity.Activity.fullscreen(self)
def unfullscreen(self):
- self._framestray.show()
+ self._frames_tray.show()
width, height = self._get_animation_size()
self._animation.set_size(width, height)