Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPootle daemon <pootle@pootle.sugarlabs.org>2013-10-10 04:30:57 (GMT)
committer Pootle daemon <pootle@pootle.sugarlabs.org>2013-10-10 04:30:57 (GMT)
commit9d6151d36650a4900d463a7a43c9e47faf2031d2 (patch)
tree34959e60dc3a36e49e29a07d62bd2e1351566af2
parent9d337829cdf0c7a27af91edada46ea9a630036d9 (diff)
parent05daa8ecb1e9ffc856d32e3c5265fc090818536a (diff)
Merge branch 'master' of git.sugarlabs.org:turtleart/mainline
-rw-r--r--TurtleArt/tawindow.py9
-rw-r--r--TurtleArtActivity.py25
-rw-r--r--activity/activity.info2
-rw-r--r--samples/graphics-reflections.ta46
-rw-r--r--samples/thumbnails/graphics-reflections.pngbin22827 -> 0 bytes
5 files changed, 28 insertions, 54 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index 2bd720e..73ce930 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -2864,13 +2864,10 @@ before making changes to your program'))
0,
'label',
[],
- 2.0 / self.scale,
+ 1.5 / self.scale,
colors)
- turtle.label_block.spr.set_label_attributes(12.0 / self.scale)
- if len(name) > 6:
- turtle.label_block.spr.set_label(name[0:4] + '…')
- else:
- turtle.label_block.spr.set_label(name)
+ turtle.label_block.spr.set_label_attributes(10.0 / self.scale)
+ turtle.label_block.spr.set_label(name)
turtle.set_remote()
turtle.show()
diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py
index 078377b..7019a2b 100644
--- a/TurtleArtActivity.py
+++ b/TurtleArtActivity.py
@@ -41,8 +41,10 @@ except ImportError:
HAS_TOOLBARBOX = False
from sugar.graphics.toolbutton import ToolButton
from sugar.graphics.radiotoolbutton import RadioToolButton
-from sugar.graphics.alert import (ConfirmationAlert, NotifyAlert)
+from sugar.graphics.alert import (ConfirmationAlert, NotifyAlert, Alert)
from sugar.graphics import style
+from sugar.graphics.icon import Icon
+from sugar.graphics.xocolor import XoColor
from sugar.datastore import datastore
from sugar import profile
@@ -114,6 +116,21 @@ class TurtleArtActivity(activity.Activity):
self._setup_extra_controls()
_logger.debug('_setup_sharing')
+ if self.shared_activity:
+ # We're joining
+ if not self.get_shared():
+ xocolors = XoColor(profile.get_color().to_string())
+ share_icon = Icon(icon_name='zoom-neighborhood',
+ xo_color=xocolors)
+ self._joined_alert = Alert()
+ self._joined_alert.props.icon = share_icon
+ self._joined_alert.props.title = _('Please wait')
+ self._joined_alert.props.msg = _('Starting connection...')
+ self.add_alert(self._joined_alert)
+
+ # Wait for joined signal
+ self.connect("joined", self._joined_cb)
+
self._setup_sharing()
# Activity count is the number of times this instance has been
@@ -1186,6 +1203,12 @@ class TurtleArtActivity(activity.Activity):
self._collaboration = Collaboration(self.tw, self)
self._collaboration.setup()
+ def _joined_cb(self, widget):
+ if self._joined_alert is not None:
+ self.remove_alert(self._joined_alert)
+ self._joined_alert = None
+ self.set_canvas(self.fixed)
+
def send_xy(self):
''' Resync xy position (and orientation) of my turtle. '''
self._collaboration.send_my_xy()
diff --git a/activity/activity.info b/activity/activity.info
index 9952038..3ddb5ef 100644
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,6 +1,6 @@
[Activity]
name = TurtleBlocks
-activity_version = 191
+activity_version = 192
license = MIT
bundle_id = org.laptop.TurtleArtActivity
exec = sugar-activity TurtleArtActivity.TurtleArtActivity
diff --git a/samples/graphics-reflections.ta b/samples/graphics-reflections.ta
deleted file mode 100644
index 124727d..0000000
--- a/samples/graphics-reflections.ta
+++ /dev/null
@@ -1,46 +0,0 @@
-[[0, "clean", 176, 221, [12, 1]],
-[1, "setpensize", 176, 263, [0, 2, 28]],
-[2, ["number", 15], 278, 263, [1, null]],
-[3, ["number", 6200.0], 244, 347, [28, null]],
-[4, "repeat", 176, 389, [28, 5, 30, null]],
-[5, ["number", 6200], 227, 389, [4, null]],
-[6, "setshade", 241, 575, [23, 13, 24]],
-[7, "forward", 241, 659, [24, 19, 25]],
-[8, "back", 241, 743, [25, 21, 26]],
-[9, "right", 241, 827, [26, 10, 40]],
-[10, ["number", 1], 299, 827, [9, null]],
-[11, "setcolor", 241, 995, [27, 44, null]],
-[12, ["start", 2.0], 176, 179, [null, 0]],
-[13, ["minus2", 0], 326, 575, [6, 14, 34]],
-[14, ["number", 100], 380, 575, [13, null]],
-[15, ["minus2", 0], 309, 911, [40, 42, 16]],
-[16, ["number", 1], 387, 953, [15, null]],
-[17, ["division2", 0], 309, 491, [30, 32, 18]],
-[18, ["number", 50], 387, 533, [17, null]],
-[19, ["division2", 0], 312, 659, [7, 36, 20]],
-[20, ["number", 8], 390, 701, [19, null]],
-[21, ["division2", 0], 299, 743, [8, 38, 22]],
-[22, ["number", 8], 377, 785, [21, null]],
-[23, ["vspace", 0], 241, 533, [30, 6]],
-[24, ["vspace", 0], 241, 617, [6, 7]],
-[25, ["vspace", 0], 241, 701, [7, 8]],
-[26, ["vspace", 0], 241, 785, [8, 9]],
-[27, ["vspace", 0], 241, 953, [40, 11]],
-[28, ["storein", 0], 176, 305, [1, 29, 3, 4]],
-[29, ["string", "my box 1"], 244, 305, [28, null]],
-[30, ["storein", 0], 241, 449, [4, 31, 17, 23]],
-[31, ["string", "my box 2"], 309, 449, [30, null]],
-[32, "box", 363, 491, [17, 33, null]],
-[33, ["string", "my box 1"], 418, 491, [32, null]],
-[34, "box", 404, 617, [13, 35, null]],
-[35, ["string", "my box 2"], 459, 617, [34, null]],
-[36, "box", 366, 659, [19, 37, null]],
-[37, ["string", "my box 1"], 421, 659, [36, null]],
-[38, "box", 353, 743, [21, 39, null]],
-[39, ["string", "my box 1"], 408, 743, [38, null]],
-[40, ["storein", 0], 241, 869, [9, 41, 15, 27]],
-[41, ["string", "my box 1"], 309, 869, [40, null]],
-[42, "box", 363, 911, [15, 43, null]],
-[43, ["string", "my box 1"], 418, 911, [42, null]],
-[44, "box", 318, 995, [11, 45, null]],
-[45, ["string", "my box 1"], 373, 995, [44, null]]]
diff --git a/samples/thumbnails/graphics-reflections.png b/samples/thumbnails/graphics-reflections.png
deleted file mode 100644
index 7f3ee8b..0000000
--- a/samples/thumbnails/graphics-reflections.png
+++ /dev/null
Binary files differ