Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt
diff options
context:
space:
mode:
Diffstat (limited to 'TurtleArt')
-rw-r--r--TurtleArt/tagplay.py6
-rw-r--r--TurtleArt/talogo.py15
2 files changed, 16 insertions, 5 deletions
diff --git a/TurtleArt/tagplay.py b/TurtleArt/tagplay.py
index a90104b..7acc249 100644
--- a/TurtleArt/tagplay.py
+++ b/TurtleArt/tagplay.py
@@ -104,7 +104,7 @@ class Gplay():
if lc.tw.running_sugar:
self.bin.set_transient_for(lc.tw.activity)
- self.bin.move(x, y + 108)
+ self.bin.move(x, y)
self.bin.resize(w, h)
self.bin.show_all()
@@ -220,8 +220,8 @@ class GstPlayer(gobject.GObject):
if old == gst.STATE_READY and new == gst.STATE_PAUSED:
self.emit('stream-info',
self.player.props.stream_info_value_array)
- else:
- logging.debug(message.type)
+ # else:
+ # logging.debug(message.type)
def _init_video_sink(self):
self.bin = gst.Bin()
diff --git a/TurtleArt/talogo.py b/TurtleArt/talogo.py
index db44a8e..03d4957 100644
--- a/TurtleArt/talogo.py
+++ b/TurtleArt/talogo.py
@@ -27,6 +27,8 @@ from time import time
from operator import isNumberType
from UserDict import UserDict
+from sugar.graphics import style
+
from taconstants import TAB_LAYER, DEFAULT_SCALE, PREFIX_DICTIONARY
from tapalette import block_names, value_blocks
from tautils import get_pixbuf_from_journal, convert, data_from_file, \
@@ -752,8 +754,17 @@ class LogoCode:
return
if self.tw.gst_available:
from tagplay import play_movie_from_file
- play_movie_from_file(self, self.filepath, self.x2tx(), self.y2ty(),
- w, h)
+ # The video window is an overlay, so we need to know where
+ # the canvas is relative to the window, e.g., which
+ # toolbars, if any are open.
+ yoffset = 0
+ if self.tw.running_sugar:
+ if not self.tw.activity.is_fullscreen():
+ yoffset += style.GRID_CELL_SIZE
+ if self.tw.activity.toolbars_expanded():
+ yoffset += style.GRID_CELL_SIZE
+ play_movie_from_file(self, self.filepath, self.x2tx(),
+ self.y2ty() + yoffset, w, h)
def _expand_forever(self, b, blk, blocks):
""" Expand a while or until block into: forever, ifelse, stopstack