diff options
author | flavio <fdanesse@gmail.com> | 2012-11-05 20:28:44 (GMT) |
---|---|---|
committer | flavio <fdanesse@gmail.com> | 2012-11-05 20:28:44 (GMT) |
commit | 1ac90b2362308bd3f2463edd5fa6128d9bbfaa07 (patch) | |
tree | 9c0f1fc638553d842e35c7151acddeb48ca73753 | |
parent | c0c4ab3e1e9d96551f4596d229cdcd081bcb1527 (diff) |
Comments
-rw-r--r-- | document.py | 2 | ||||
-rw-r--r-- | montage.py | 39 | ||||
-rw-r--r-- | screenbuil.py | 10 |
3 files changed, 27 insertions, 24 deletions
diff --git a/document.py b/document.py index 1d29bab..e0167a7 100644 --- a/document.py +++ b/document.py @@ -31,7 +31,7 @@ from toolkit.tarball import Tarball logger = logging.getLogger('cartoon-builder') -class Document: +class Document(): tape = [] ground = None sound = None @@ -149,7 +149,7 @@ class View(Gtk.EventBox): def stop(self): self._playing = None self._screen.fgpixbuf = Document.tape[self._tape_selected].orig() - self._screen.draw() + #self._screen.draw() def set_tempo(self, tempo): self._delay = 10 + (10 - int(tempo)) * 100 @@ -246,8 +246,7 @@ class View(Gtk.EventBox): tape.pack_start(frame_box, False, False, 0) - # left control box - + # >> Left side Combos self.controlbox = Gtk.VBox() self.controlbox.props.border_width = theme.BORDER_WIDTH self.controlbox.props.spacing = theme.BORDER_WIDTH @@ -258,28 +257,28 @@ class View(Gtk.EventBox): leftbox.set_size_request(logo.props.pixbuf.get_width(), -1) leftbox.pack_start(logo, False, False, 0) leftbox.pack_start(self.controlbox, True, True, 0) - - # screen box - + # << Left side Combos + + # >> Drawing Central Area screen_alignment = Gtk.Alignment() - screen_alignment.set(0.5, 0.5, 0, 0) + screen_alignment.set( 0.0, 0.0, 1.0, 1.0) screen_alignment.add(screen_pink) box = Gtk.EventBox() box.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('BACKGROUND')) box.connect('size-allocate', self._screen_size_cb, screen_pink) box.add(screen_alignment) - + # << Drawing Central Area + cetralbox = Gtk.HBox() cetralbox.pack_start(box, True, True, 0) - cetralbox.pack_start(frames_box, False, True, 0) + cetralbox.pack_start(frames_box, False, False, 0) hdesktop = Gtk.HBox() hdesktop.pack_start(leftbox, False, True, 0) hdesktop.pack_start(cetralbox, True, True, 0) - # tape box - + # >> Videotape bottom frames arrow = Gtk.Image() arrow.set_from_file(theme.path('icons', 'pink_arrow.png')) tape_pink = Gtk.EventBox() @@ -297,7 +296,8 @@ class View(Gtk.EventBox): tape_box.props.border_width = theme.BORDER_WIDTH tape_box.pack_start(arrow, False, False, 0) tape_box.pack_start(tape_hbox, True, True, 0) - + # << Videotape bottom frames + desktop = Gtk.VBox() desktop.pack_start(hdesktop, True, True, 0) desktop.pack_start(tape_box, False, False, 0) @@ -333,7 +333,7 @@ class View(Gtk.EventBox): return False self._screen.fgpixbuf = Document.tape[self._play_tape_num].orig() - self._screen.draw() + #self._screen.draw() for i in range(theme.TAPE_COUNT): self._play_tape_num += 1 @@ -393,7 +393,7 @@ class View(Gtk.EventBox): self._tape_selected = index self._screen.fgpixbuf = Document.tape[index].orig() - self._screen.draw() + #self._screen.draw() def _frame_cb(self, widget, event, i): @@ -440,7 +440,7 @@ class View(Gtk.EventBox): def _ground_cb(self, choice): self._screen.bgpixbuf = choice.orig() - self._screen.draw() + #self._screen.draw() Document.ground = choice if self._emission: self.emit('ground-changed', choice) @@ -453,10 +453,11 @@ class View(Gtk.EventBox): def _screen_size_cb(self, sender, aloc, widget): # FIXME: Clear the set_size() function and enable the following lines to avoid the error: received an X Window System error. - #size = min(aloc.width, aloc.height) - #widget.set_size_request(size, size) - #return True + size = min(aloc.width, aloc.height) + widget.set_size_request(size, size) + return True + ''' def set_size(): size = min(aloc.width, aloc.height) @@ -466,4 +467,4 @@ class View(Gtk.EventBox): if self._screen_size_id is not None: GObject.source_remove(self._screen_size_id) - self._screen_size_id = GObject.timeout_add(500, set_size) + self._screen_size_id = GObject.timeout_add(500, set_size)''' diff --git a/screenbuil.py b/screenbuil.py index 59eaa0e..a1d06fa 100644 --- a/screenbuil.py +++ b/screenbuil.py @@ -38,10 +38,10 @@ class Screen(Gtk.DrawingArea): allocation = self.get_allocation() value = min(allocation.width, allocation.height) - + if self.bgpixbuf: pixbuf = self.bgpixbuf - + if pixbuf.get_width != value: pixbuf = theme.scale(pixbuf, value) @@ -57,5 +57,7 @@ class Screen(Gtk.DrawingArea): Gdk.cairo_set_source_pixbuf(context, pixbuf, 0, 0) context.paint() - def draw(self): - self.queue_draw() + return True + + #def draw(self): + # self.queue_draw() |