Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2013-04-11 19:20:25 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2013-04-11 19:20:25 (GMT)
commitd3e97b327c500ba023d8f37c91fd1e5b35e47854 (patch)
treed5eb90829182e7dae46bc5ce1714896293d1f804
parent0dfc0796ab2ee77cc23543fe8e28077b2e552fe5 (diff)
Reorganize toolbar
The stop button falled out of the toolbar, and we can't add more functionality with the actual design. Now instead of use one button for every type of globe, add one menuitem "Add globe" with options by type. The icons were changed to remove the "+" sign because is redundant. Separator removed from the toolbar too. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r--historietaactivity.py3
-rw-r--r--icons/add-box.svg29
-rw-r--r--icons/add-globe.svg26
-rw-r--r--icons/add-scream.svg25
-rw-r--r--icons/add-whisper.svg24
-rw-r--r--icons/box.svg27
-rw-r--r--icons/exclamation.svg24
-rw-r--r--icons/globe.svg23
-rw-r--r--icons/think.svg30
-rw-r--r--icons/whisper.svg24
-rw-r--r--toolbar.py75
11 files changed, 151 insertions, 159 deletions
diff --git a/historietaactivity.py b/historietaactivity.py
index bd57791..481a611 100644
--- a/historietaactivity.py
+++ b/historietaactivity.py
@@ -49,9 +49,6 @@ class HistorietaActivity(activity.Activity):
activity_toolbar = activity_button.page
toolbar_box.toolbar.insert(activity_button, 0)
- separator = Gtk.SeparatorToolItem()
- toolbar_box.toolbar.insert(separator, -1)
-
view_subtoolbar = ToolbarButton()
view_toolbar = Gtk.Toolbar()
view_subtoolbar.props.page = view_toolbar
diff --git a/icons/add-box.svg b/icons/add-box.svg
deleted file mode 100644
index 2e9c962..0000000
--- a/icons/add-box.svg
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
- <!ENTITY fill_color "#FFFFFF">
- <!ENTITY stroke_color "#010101">
-]>
-<svg
- xmlns="http://www.w3.org/2000/svg"
- version="1.0"
- width="55"
- height="55"
- viewBox="0 0 55 55"
- id="svg120"
- xml:space="preserve">
- <rect
- width="37.177303"
- height="21.948048"
- ry="0.22275767"
- x="14.109459"
- y="5.2809548"
- id="rect1700"
- style="fill-opacity:1;stroke:&fill_color;;fill:none;stroke-width:2;stroke-linecap:square;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /><g
- transform="translate(25.519287,11.066432)"
- id="g3759"><path
- d="m -13.107667,23.926346 0,14.670779"
- id="path2987"
- style="fill:none;stroke:&fill_color;;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /><path
- d="m -20.443057,31.261735 14.670779,0"
- id="path3757"
- style="fill:none;stroke:&fill_color;;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /></g></svg>
diff --git a/icons/add-globe.svg b/icons/add-globe.svg
deleted file mode 100644
index 137925e..0000000
--- a/icons/add-globe.svg
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
- <!ENTITY fill_color "#FFFFFF">
- <!ENTITY stroke_color "#010101">
-]>
-<svg
- xmlns="http://www.w3.org/2000/svg"
- version="1.0"
- width="55"
- height="55"
- viewBox="0 0 55 55"
- id="svg120"
- xml:space="preserve"><path
- d="m 31.447785,2.0457409 c -11.843026,0 -21.440125,6.7597343 -21.440125,15.0850351 0,8.325301 9.597099,15.057807 21.440125,15.057807 0.914185,0 1.811611,-0.03087 2.695688,-0.108917 2.643928,4.512539 7.805427,7.593994 13.760548,7.760352 -2.925897,-2.504111 -5.139787,-5.740724 -6.300388,-9.42134 6.719651,-2.545253 11.284277,-7.545962 11.284277,-13.287902 0,-8.3253008 -9.597099,-15.0850351 -21.440125,-15.0850351 z"
- id="path1046"
- style="fill:none;stroke:&fill_color;;stroke-width:1.86975145;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
-
- <g
- transform="translate(25.519287,11.066432)"
- id="g3759"><path
- d="m -13.107667,23.926346 0,14.670779"
- id="path2987"
- style="fill:none;stroke:&fill_color;;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /><path
- d="m -20.443057,31.261735 14.670779,0"
- id="path3757"
- style="fill:none;stroke:&fill_color;;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /></g></svg> \ No newline at end of file
diff --git a/icons/add-scream.svg b/icons/add-scream.svg
deleted file mode 100644
index 3a7404e..0000000
--- a/icons/add-scream.svg
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
- <!ENTITY fill_color "#FFFFFF">
- <!ENTITY stroke_color "#010101">
-]>
-<svg
- xmlns="http://www.w3.org/2000/svg"
- version="1.0"
- width="55"
- height="55"
- viewBox="0 0 55 55"
- id="svg120"
- xml:space="preserve"><path
- d="m 37.065325,16.254979 -4.402673,-0.580843 0.274493,4.551646 -3.220426,-3.057737 -2.453321,3.843701 -0.808087,-4.36668 -4.244049,1.667594 1.912914,-4.0077 -4.413695,-1.145478 3.903247,-2.117915 -2.897459,-3.5210157 4.402672,0.5808424 -0.274493,-4.5516459 3.220426,3.0577373 2.453322,-3.8437016 0.808086,4.3666804 4.24405,-1.6675939 -1.912915,4.0077 4.413696,1.145478 -3.903248,2.117914 z"
- transform="matrix(2.2288567,-0.19971595,0.16722614,1.5157713,-38.203792,5.0333362)"
- id="path2233"
- style="fill:none;stroke:&fill_color;;stroke-width:1.20351303;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /><g
- transform="translate(25.519287,11.066432)"
- id="g3759"><path
- d="m -13.107667,23.926346 0,14.670779"
- id="path2987"
- style="fill:none;stroke:&fill_color;;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /><path
- d="m -20.443057,31.261735 14.670779,0"
- id="path3757"
- style="fill:none;stroke:&fill_color;;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /></g></svg> \ No newline at end of file
diff --git a/icons/add-whisper.svg b/icons/add-whisper.svg
deleted file mode 100644
index dce307e..0000000
--- a/icons/add-whisper.svg
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
- <!ENTITY fill_color "#FFFFFF">
- <!ENTITY stroke_color "#010101">
-]>
-<svg
- xmlns="http://www.w3.org/2000/svg"
- version="1.0"
- width="55"
- height="55"
- viewBox="0 0 55 55"
- id="svg120"
- xml:space="preserve"><path
- d="m 31.559765,2.1577207 c -11.843026,0 -21.440125,6.7597343 -21.440125,15.0850343 0,8.325301 9.597099,15.057807 21.440125,15.057807 0.914185,0 1.811611,-0.03087 2.695688,-0.108917 2.643928,4.512539 7.805427,7.593994 13.760548,7.760352 -2.925897,-2.504111 -5.139787,-5.740724 -6.300388,-9.42134 6.719651,-2.545253 11.284277,-7.545962 11.284277,-13.287902 0,-8.3253 -9.597099,-15.0850343 -21.440125,-15.0850343 z"
- id="path1046"
- style="fill:none;stroke:&fill_color;;stroke-width:1.86975145;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.86975145, 3.73950291;stroke-dashoffset:0" /><g
- transform="translate(25.649409,11.420483)"
- id="g3759"><path
- d="m -13.107667,23.926346 0,14.670779"
- id="path2987"
- style="fill:none;stroke:&fill_color;;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /><path
- d="m -20.443057,31.261735 14.670779,0"
- id="path3757"
- style="fill:none;stroke:&fill_color;;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /></g></svg> \ No newline at end of file
diff --git a/icons/box.svg b/icons/box.svg
new file mode 100644
index 0000000..b3b64a9
--- /dev/null
+++ b/icons/box.svg
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY fill_color "#FFFFFF">
+ <!ENTITY stroke_color "#010101">
+]><svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.0"
+ width="55"
+ height="55"
+ viewBox="0 0 55 55"
+ id="svg120"
+ xml:space="preserve"><metadata
+ id="metadata3949"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ id="defs3947" /><rect
+ width="46.266285"
+ height="31.270082"
+ ry="0.31736994"
+ x="4.3668575"
+ y="11.864959"
+ id="rect1700"
+ style="fill:none;stroke:&fill_color;;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /></svg>
diff --git a/icons/exclamation.svg b/icons/exclamation.svg
new file mode 100644
index 0000000..6430fbb
--- /dev/null
+++ b/icons/exclamation.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY fill_color "#FFFFFF">
+ <!ENTITY stroke_color "#010101">
+]>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.0"
+ width="55"
+ height="55"
+ viewBox="0 0 55 55"
+ id="svg120"
+ xml:space="preserve"><metadata
+ id="metadata4528"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ id="defs4526" /><path
+ d="M 50.19001,30.051717 41.588655,31.063428 39.9681,38.418816 32.787644,35.451979 33.538965,48.352674 22.403176,35.841985 10.960604,37.492371 12.111287,30.273232 3.2548932,28.552687 9.7579131,23.449314 4.8099904,17.856503 14.08675,16.619655 15.031898,9.4894032 23.112896,12.681378 30.0162,6.6473255 l 3.030893,5.5314825 10.992304,-1.762955 -1.263254,7.106571 8.968964,1.833113 -6.390455,4.427964 z"
+ id="path2233"
+ style="fill:none;stroke:&fill_color;;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /></svg>
diff --git a/icons/globe.svg b/icons/globe.svg
new file mode 100644
index 0000000..c37b43b
--- /dev/null
+++ b/icons/globe.svg
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY fill_color "#FFFFFF">
+ <!ENTITY stroke_color "#010101">
+]><svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.0"
+ width="55"
+ height="55"
+ viewBox="0 0 55 55"
+ id="svg120"
+ xml:space="preserve"><metadata
+ id="metadata3097"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ id="defs3095" /><path
+ d="m 27.5,6.0685479 c -13.213137,0 -23.9205171,7.6662891 -23.9205171,17.1081041 0,9.441815 10.7073801,17.077224 23.9205171,17.077224 1.019946,0 2.021195,-0.03501 3.00755,-0.123524 2.949802,5.11772 8.708431,8.612432 15.352496,8.8011 C 42.595654,46.091513 40.12564,42.420834 38.83077,38.246607 46.327813,35.360008 51.420517,29.688649 51.420517,23.176652 51.420517,13.734837 40.713137,6.0685479 27.5,6.0685479 z"
+ id="path1046"
+ style="fill:none;stroke:&fill_color;;stroke-width:3;" /></svg>
diff --git a/icons/think.svg b/icons/think.svg
new file mode 100644
index 0000000..f952126
--- /dev/null
+++ b/icons/think.svg
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY fill_color "#FFFFFF">
+ <!ENTITY stroke_color "#010101">
+]>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.0"
+ width="55"
+ height="55"
+ viewBox="0 0 55 55"
+ id="svg120"
+ xml:space="preserve"><metadata
+ id="metadata4674"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ id="defs4672" /><path
+ d="M 13.532375,11.710368 C 12.982511,5.5402534 21.461469,2.0709806 24.529298,7.3290281 29.426726,0.5011254 39.360963,4.7729756 38.496464,9.8369399 44.641983,6.84713 52.112868,12.218465 47.838068,18.307986 c 5.544347,3.666862 3.096828,14.293064 -3.708065,12.584772 4.207968,6.103914 -3.778048,11.067413 -9.043131,7.508047 -3.313252,4.27784 -15.217504,3.510564 -16.1307,-2.82672 C 10.55512,39.786421 1.868217,34.334866 7.762381,24.879261 -3.3665566,17.002174 7.2989685,8.3567341 13.532375,11.710368 z"
+ id="path2256"
+ style="fill:none;stroke:&fill_color;;stroke-width:3;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /><path
+ d="m 40.444105,43.742967 a 2.8130016,2.4760497 0 1 1 -5.626002,0 2.8130016,2.4760497 0 1 1 5.626002,0 z"
+ id="path2263"
+ style="fill:none;stroke:&fill_color;;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /><path
+ d="m 44.3446,48.325319 a 1.962588,1.7934421 0 0 1 -3.925176,0 1.962588,1.7934421 0 1 1 3.925176,0 z"
+ id="path2265"
+ style="fill:none;stroke:&fill_color;;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /></svg>
diff --git a/icons/whisper.svg b/icons/whisper.svg
new file mode 100644
index 0000000..b09f005
--- /dev/null
+++ b/icons/whisper.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY fill_color "#FFFFFF">
+ <!ENTITY stroke_color "#010101">
+]>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.0"
+ width="55"
+ height="55"
+ viewBox="0 0 55 55"
+ id="svg120"
+ xml:space="preserve"><metadata
+ id="metadata4599"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ id="defs4597" /><path
+ d="m 27.5,4.8881193 c -14.143684,0 -25.6051394,8.0885427 -25.6051394,18.0504047 0,9.961865 11.4614554,18.017826 25.6051394,18.017826 1.091777,0 2.163539,-0.03694 3.219359,-0.130328 3.157545,5.399601 9.32173,9.086799 16.433708,9.285859 -3.49429,-2.996362 -6.138255,-6.869218 -7.524318,-11.273359 8.025028,-3.045591 13.47639,-9.029324 13.47639,-15.899998 C 53.105139,12.976662 41.643682,4.8881193 27.5,4.8881193 z"
+ id="path1046"
+ style="fill:none;stroke:&fill_color;;stroke-width:3;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:3, 3.73950291;stroke-dashoffset:0" /></svg>
diff --git a/toolbar.py b/toolbar.py
index d0c17f5..2cbc770 100644
--- a/toolbar.py
+++ b/toolbar.py
@@ -79,48 +79,24 @@ class GlobesManager():
# agregar cuadro
self.add_photo = ToolButton()
self.add_photo.props.icon_name = 'insert-picture'
- self.add_photo.connect('clicked', self.__btn_clicked)
+ self.add_photo.connect('clicked', self.__add_photo_clicked_cb)
self.add_photo.set_tooltip(_('Add Photo'))
toolbar.insert(self.add_photo, -1)
- separator = Gtk.SeparatorToolItem()
- separator.set_draw(True)
- toolbar.insert(separator, -1)
+ self._globes = {'globe': _('Globe'), 'think': _('Think'),
+ 'whisper': _('Whisper'),
+ 'exclamation': _('Exclamation'), 'box': _('Box')}
- # agrega globo
- self.add_globe = ToolButton()
- self.add_globe.props.icon_name = 'add-globe'
- self.add_globe.connect('clicked', self.__btn_clicked)
- self.add_globe.set_tooltip(_('Add Globe'))
- toolbar.insert(self.add_globe, -1)
-
- #agrega nube
- self.add_cloud = ToolButton()
- self.add_cloud.props.icon_name = 'add-think'
- self.add_cloud.connect('clicked', self.__btn_clicked)
- self.add_cloud.set_tooltip(_('Add Think'))
- toolbar.insert(self.add_cloud, -1)
-
- # agrega susurro
- self.add_whisp = ToolButton()
- self.add_whisp.props.icon_name = 'add-whisper'
- self.add_whisp.connect('clicked', self.__btn_clicked)
- self.add_whisp.set_tooltip(_('Add Whisper'))
- toolbar.insert(self.add_whisp, -1)
-
- # agrega grito
- self.add_scream = ToolButton()
- self.add_scream.props.icon_name = 'add-scream'
- self.add_scream.connect('clicked', self.__btn_clicked)
- self.add_scream.set_tooltip(_('Add Exclamation'))
- toolbar.insert(self.add_scream, -1)
-
- # agrega caja
- self.add_box = ToolButton()
- self.add_box.props.icon_name = 'add-box'
- self.add_box.connect('clicked', self.__btn_clicked)
- self.add_box.set_tooltip(_('Add Box'))
- toolbar.insert(self.add_box, -1)
+ self._globes_menu = RadioMenuButton(icon_name='globe')
+ self._globes_menu.props.tooltip = _('Add a globe')
+
+ for globe in self._globes.keys():
+ menu_item = MenuItem(icon_name=globe,
+ text_label=self._globes[globe])
+ menu_item.connect('activate', self.__activate_add_globe_cb, globe)
+ self._globes_menu.props.palette.menu.append(menu_item)
+ menu_item.show()
+ toolbar.insert(self._globes_menu, -1)
# lineas de movimiento
# Agregar aqui el nombre de archivo de una linea de moviemiento
@@ -154,12 +130,7 @@ class GlobesManager():
toolbar.insert(self.b_borrar, -1)
def set_buttons_sensitive(self, sensitive):
- self.add_box.set_sensitive(sensitive)
- self.add_cloud.set_sensitive(sensitive)
- self.add_globe.set_sensitive(sensitive)
- self.add_photo.set_sensitive(sensitive)
- self.add_scream.set_sensitive(sensitive)
- self.add_whisp.set_sensitive(sensitive)
+ self._globes_menu.set_sensitive(sensitive)
self.add_photo.set_sensitive(sensitive)
self.b_borrar.set_sensitive(sensitive)
self.b_girar.set_sensitive(sensitive)
@@ -169,30 +140,30 @@ class GlobesManager():
active_box = self._page.get_active_box()
active_box.add_imagen("icons/" + image_name + ".svg", 60, 60)
- def __btn_clicked(self, boton):
- logging.error('boton clicked %s', boton.props.icon_name)
+ def __activate_add_globe_cb(self, widget, globe):
selected_font_name = self._activity.page.selected_font_name
- if boton == self.add_globe:
+
+ if globe == 'globe':
self._page.get_active_box().add_globo(60, 60,
font_name=selected_font_name)
- if boton == self.add_cloud:
+ if globe == 'think':
self._page.get_active_box().add_nube(60, 60,
font_name=selected_font_name)
- if boton == self.add_whisp:
+ if globe == 'whisper':
self._page.get_active_box().add_globo(60, 60, gmodo="despacio",
font_name=selected_font_name)
- if boton == self.add_scream:
+ if globe == 'exclamation':
self._page.get_active_box().add_grito(60, 60,
font_name=selected_font_name)
- if boton == self.add_box:
+ if globe == 'box':
self._page.get_active_box().add_rectangulo(60, 60,
font_name=selected_font_name)
- if boton == self.add_photo:
+ def __add_photo_clicked_cb(self, button):
self.add_image()
def girar(self, boton):