Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

first step in frame edit...

  • Loading branch information...
commit 72aefbbd9f86cee27485157c72f4867d5fd56c7c 1 parent 7569c54
Jérémie Ferry mothsART authored

Showing 2 changed files with 11 additions and 5 deletions. Show diff stats Hide diff stats

  1. +3 3 utils/c_editor/__init__.py
  2. +8 2 utils/c_editor/remote.py
6 utils/c_editor/__init__.py
@@ -88,7 +88,7 @@ def __init__(self):
88 88 self.size = 1000
89 89 zoom.set_active(2)
90 90
91   - self.timeline = TM(self.cp.get_frames())
  91 + self.timeline = TM(self.cp)
92 92 self.remote = RC(self.image, self.project_path, self.cp, self.timeline)
93 93 self.remote.zoom = zoom
94 94 # actions
@@ -218,7 +218,7 @@ def __movements(self, action):
218 218
219 219 def __timeline(self):
220 220 self.vbox.remove(self.timeline)
221   - self.timeline = TM(self.cp.get_frames(), self.size)
  221 + self.timeline = TM(self.cp, self.size)
222 222 self.remote.timeline = self.timeline
223 223 self.vbox.pack_start(self.timeline, False)
224 224 self.remote.create_frame(self.timeline.frames)
@@ -236,7 +236,7 @@ def __zoom(self, action):
236 236 inc += 1
237 237
238 238 self.vbox.remove(self.timeline)
239   - self.timeline = TM(self.cp.get_frames(), self.size)
  239 + self.timeline = TM(self.cp, self.size)
240 240 self.remote.timeline = self.timeline
241 241 self.remote.frame.timeline = self.timeline
242 242 self.vbox.pack_start(self.timeline, False)
10 utils/c_editor/remote.py
@@ -5,6 +5,7 @@
5 5
6 6 from gettext import gettext as _
7 7
  8 +from editor import FrameEdit as FE
8 9 # Initializing the gtk's thread engine
9 10 gtk.gdk.threads_init()
10 11
@@ -43,10 +44,11 @@ def stop(self):
43 44
44 45
45 46 class TimeLine(gtk.ScrolledWindow):
46   - def __init__(self, frames, size=1000):
  47 + def __init__(self, cp, size=1000):
47 48 gtk.ScrolledWindow.__init__(self)
48 49 self.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_NEVER)
49   - self.frames = frames
  50 + self.cp = cp
  51 + self.frames = cp.get_frames()
50 52
51 53 self.size = size
52 54 self.hbox = gtk.HBox()
@@ -55,11 +57,15 @@ def __init__(self, frames, size=1000):
55 57 button.set_label(frame[1])
56 58 button.set_size_request(int(frame[0] * self.size), 100)
57 59 frame.append(button)
  60 + button.connect("clicked", self.dialog, self, frame)
58 61 self.hbox.pack_start(button, False)
59 62 self.n_style = self.frames[0][3].get_modifier_style().copy()
60 63 self.add_with_viewport(self.hbox)
61 64 self.show_all()
62 65
  66 + def dialog(self, widget, timeline, properties):
  67 + FE(widget, timeline, properties)
  68 +
63 69 def set_focus(self):
64 70 #print '>', self.get_child().get_child()
65 71 for frame in self.frames:

0 comments on commit 72aefbb

Please sign in to comment.
Something went wrong with that request. Please try again.