Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Francis <santiago.danielfrancis@gmail.com>2012-05-09 21:17:35 (GMT)
committer Daniel Francis <santiago.danielfrancis@gmail.com>2012-05-09 21:17:35 (GMT)
commitf57898a8425f3cc886850c9e4964718bb5c17a1d (patch)
tree81e03b45776081bd8502734cdcba4c13bf7fb9c4
parente56e2ec169eca77ca184c987613c230e60f8c71d (diff)
Removing Tray
-rw-r--r--illustrate.py37
1 files changed, 12 insertions, 25 deletions
diff --git a/illustrate.py b/illustrate.py
index 0c39df9..0e034dd 100644
--- a/illustrate.py
+++ b/illustrate.py
@@ -132,22 +132,8 @@ class IllustrateActivity(activity.Activity):
canvas = gtk.EventBox()
canvas.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("white"))
- box = gtk.VBox()
- box.pack_start(canvas, True, True, 0)
- self.tray = tray.HTray()
- for i in ["sugar-integration"]:
- icon = Icon(icon_name=i, icon_size=gtk.ICON_SIZE_DIALOG)
- icon.props.fill_color = profile_color.get_fill_color()
- icon.props.stroke_color = profile_color.get_stroke_color()
- icon.show()
- button = gtk.ToolButton()
- button.set_icon_widget(icon)
- button.show()
- self.tray.add_item(button, -1)
- self.tray.show()
- box.pack_start(self.tray, False, True, 0)
-
- self.set_canvas(box)
+
+ self.set_canvas(canvas)
self.show_all()
@@ -189,7 +175,7 @@ class IllustrateActivity(activity.Activity):
self._icon.props.pixel_size = pixel_size
canvas.add(self._icon)
self._icon.show()
-
+
self._set_fill_color(self.fill_color_btn, None)
self._set_stroke_color(self.stroke_color_btn, None)
@@ -200,33 +186,34 @@ class IllustrateActivity(activity.Activity):
helpbutton.add_paragraph(_("You can add all the paragraphs you want"))
helpbutton.add_section(
_("Why your activity should be well integrated?"))
- helpbutton.add_paragraph(_("There are a lot of activities for sugar, and if they all work the same way, children who use sugar will feel more comfortable"))
+ helpbutton.add_paragraph(_("There are a lot of activities for sugar,\
+ and if they all work the same way,\
+ children who use sugar will feel more comfortable"))
helpbutton.add_section(_("About"))
helpbutton.add_paragraph(
_("This is an activity with sugar integration examples"))
helpbutton.add_paragraph(_("Thanks for using!"))
toolbarbox.toolbar.insert(helpbutton, -1)
-
+
def write_file(self, file_path):
jfile = open(file_path, "w")
-
+
colors = {"fill": self._icon.props.fill_color,
"stroke": self._icon.props.stroke_color}
-
+
try:
json.dump(colors, jfile)
finally:
jfile.close()
-
+
def read_file(self, file_path):
jfile = open(file_path, "r")
-
+
try:
colors = json.load(jfile)
finally:
jfile.close()
-
+
self.fill_color_btn.set_color(gtk.gdk.Color(colors["fill"]))
self.stroke_color_btn.set_color(gtk.gdk.Color(colors["stroke"]))
-