Permalink
Browse files

first step in frame edit...

  • Loading branch information...
1 parent 7569c54 commit 72aefbbd9f86cee27485157c72f4867d5fd56c7c Ferry Jérémie committed Dec 14, 2011
Showing with 11 additions and 5 deletions.
  1. +3 −3 utils/c_editor/__init__.py
  2. +8 −2 utils/c_editor/remote.py
View
6 utils/c_editor/__init__.py
@@ -88,7 +88,7 @@ def __init__(self):
self.size = 1000
zoom.set_active(2)
- self.timeline = TM(self.cp.get_frames())
+ self.timeline = TM(self.cp)
self.remote = RC(self.image, self.project_path, self.cp, self.timeline)
self.remote.zoom = zoom
# actions
@@ -218,7 +218,7 @@ def __movements(self, action):
def __timeline(self):
self.vbox.remove(self.timeline)
- self.timeline = TM(self.cp.get_frames(), self.size)
+ self.timeline = TM(self.cp, self.size)
self.remote.timeline = self.timeline
self.vbox.pack_start(self.timeline, False)
self.remote.create_frame(self.timeline.frames)
@@ -236,7 +236,7 @@ def __zoom(self, action):
inc += 1
self.vbox.remove(self.timeline)
- self.timeline = TM(self.cp.get_frames(), self.size)
+ self.timeline = TM(self.cp, self.size)
self.remote.timeline = self.timeline
self.remote.frame.timeline = self.timeline
self.vbox.pack_start(self.timeline, False)
View
10 utils/c_editor/remote.py
@@ -5,6 +5,7 @@
from gettext import gettext as _
+from editor import FrameEdit as FE
# Initializing the gtk's thread engine
gtk.gdk.threads_init()
@@ -43,10 +44,11 @@ def stop(self):
class TimeLine(gtk.ScrolledWindow):
- def __init__(self, frames, size=1000):
+ def __init__(self, cp, size=1000):
gtk.ScrolledWindow.__init__(self)
self.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_NEVER)
- self.frames = frames
+ self.cp = cp
+ self.frames = cp.get_frames()
self.size = size
self.hbox = gtk.HBox()
@@ -55,11 +57,15 @@ def __init__(self, frames, size=1000):
button.set_label(frame[1])
button.set_size_request(int(frame[0] * self.size), 100)
frame.append(button)
+ button.connect("clicked", self.dialog, self, frame)
self.hbox.pack_start(button, False)
self.n_style = self.frames[0][3].get_modifier_style().copy()
self.add_with_viewport(self.hbox)
self.show_all()
+ def dialog(self, widget, timeline, properties):
+ FE(widget, timeline, properties)
+
def set_focus(self):
#print '>', self.get_child().get_child()
for frame in self.frames:

0 comments on commit 72aefbb

Please sign in to comment.