diff options
author | Gonzalo Odiard <godiard@sugarlabs.org> | 2011-03-24 19:12:29 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@sugarlabs.org> | 2011-03-24 19:12:29 (GMT) |
commit | efd61bca60a2f88d94cbb87972449586a51b17e6 (patch) | |
tree | 14aa0f605fd9e4371dfc5a9cfb70fe900cc235b2 | |
parent | 8a6a4a29ca5f684d75d4dd18069f0fedb0a65b66 (diff) |
Stetic changes in icons and toolbar code
-rw-r--r-- | icons/add-box.svg | 4 | ||||
-rw-r--r-- | icons/add-globe.svg | 4 | ||||
-rw-r--r-- | icons/add-grito.svg | 4 | ||||
-rw-r--r-- | icons/add-nube.svg | 4 | ||||
-rw-r--r-- | icons/add-photo.svg | 6 | ||||
-rw-r--r-- | icons/add-susurro.svg | 6 | ||||
-rw-r--r-- | icons/turn.svg | 94 | ||||
-rw-r--r-- | toolbar.py | 82 |
8 files changed, 112 insertions, 92 deletions
diff --git a/icons/add-box.svg b/icons/add-box.svg index ebc4f25..9ce75ab 100644 --- a/icons/add-box.svg +++ b/icons/add-box.svg @@ -68,14 +68,14 @@ inkscape:vp_x="0 : 0.5 : 1" sodipodi:type="inkscape:persp3d" /></defs> - <rect + <!--rect style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect1644" width="54.898254" height="55.122215" x="-0.014068492" y="0.0038335328" - ry="3.8061128" /> + ry="3.8061128" / --> <path style="fill:none;stroke:#ffffff;stroke-width:2.55703568;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" d="m 10.239387,32.106685 c -0.213635,0 -0.399797,0.159301 -0.399797,0.372659 l 0,7.293453 -7.2763082,0 c -0.2136354,0 -0.3731441,0.159301 -0.3731441,0.372658 l 0,4.365425 c 0,0.213357 0.1595087,0.372659 0.3731441,0.372659 l 7.2763082,0 0,7.266834 c 0,0.213356 0.186162,0.399277 0.399797,0.399277 l 4.344464,0 c 0.213636,0 0.399797,-0.185921 0.399797,-0.399277 l 0,-7.266834 7.27631,0 c 0.213636,0 0.373144,-0.159302 0.373144,-0.372659 l 0,-4.365425 c 0,-0.213357 -0.159508,-0.372658 -0.373144,-0.372658 l -7.27631,0 0,-7.293453 c 0,-0.213358 -0.186161,-0.372659 -0.399797,-0.372659 l -4.344464,0 z" diff --git a/icons/add-globe.svg b/icons/add-globe.svg index 8e75678..648dc3d 100644 --- a/icons/add-globe.svg +++ b/icons/add-globe.svg @@ -66,14 +66,14 @@ inkscape:vp_z="1 : 0.5 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 0.5 : 1" - sodipodi:type="inkscape:persp3d" /></defs><rect + sodipodi:type="inkscape:persp3d" /></defs><!--rect style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect1644" width="54.898254" height="55.122215" x="-0.014068492" y="0.0038335328" - ry="3.8061128" /> + ry="3.8061128" /--> <!-- globo --> <path style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.86975145;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" diff --git a/icons/add-grito.svg b/icons/add-grito.svg index 48837d7..832e3f1 100644 --- a/icons/add-grito.svg +++ b/icons/add-grito.svg @@ -69,14 +69,14 @@ sodipodi:type="inkscape:persp3d" /></defs> - <rect + <!--rect style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect1644" width="54.898254" height="55.122215" x="-0.014068492" y="0.0038335328" - ry="3.8061128" /> + ry="3.8061128" / --> <path style="fill:none;stroke:#ffffff;stroke-width:2.55703568;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" diff --git a/icons/add-nube.svg b/icons/add-nube.svg index 62ac466..027a79d 100644 --- a/icons/add-nube.svg +++ b/icons/add-nube.svg @@ -68,14 +68,14 @@ inkscape:vp_x="0 : 0.5 : 1" sodipodi:type="inkscape:persp3d" /></defs> - <rect + <!--rect style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect1644" width="54.898254" height="55.122215" x="-0.014068492" y="0.0038335328" - ry="3.8061128" /> + ry="3.8061128" /--> <path style="fill:none;stroke:#ffffff;stroke-width:2.55703568;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" d="m 10.239387,32.106685 c -0.213635,0 -0.399797,0.159301 -0.399797,0.372659 l 0,7.293453 -7.2763082,0 c -0.2136354,0 -0.3731441,0.159301 -0.3731441,0.372658 l 0,4.365425 c 0,0.213357 0.1595087,0.372659 0.3731441,0.372659 l 7.2763082,0 0,7.266834 c 0,0.213356 0.186162,0.399277 0.399797,0.399277 l 4.344464,0 c 0.213636,0 0.399797,-0.185921 0.399797,-0.399277 l 0,-7.266834 7.27631,0 c 0.213636,0 0.373144,-0.159302 0.373144,-0.372659 l 0,-4.365425 c 0,-0.213357 -0.159508,-0.372658 -0.373144,-0.372658 l -7.27631,0 0,-7.293453 c 0,-0.213358 -0.186161,-0.372659 -0.399797,-0.372659 l -4.344464,0 z" diff --git a/icons/add-photo.svg b/icons/add-photo.svg index 8306e05..c8354c6 100644 --- a/icons/add-photo.svg +++ b/icons/add-photo.svg @@ -76,14 +76,16 @@ inkscape:vp_x="0 : 0.5 : 1" sodipodi:type="inkscape:persp3d" /></defs> - <rect + <!-- rect style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect1644" width="54.898254" height="55.122215" x="-0.014068492" y="0.0038335328" - ry="3.8061128" /><!--rect + ry="3.8061128" / --> + +<!--rect style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:square;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect1700" width="49.587032" diff --git a/icons/add-susurro.svg b/icons/add-susurro.svg index e4d75e2..ce90857 100644 --- a/icons/add-susurro.svg +++ b/icons/add-susurro.svg @@ -66,14 +66,16 @@ inkscape:vp_z="1 : 0.5 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 0.5 : 1" - sodipodi:type="inkscape:persp3d" /></defs><rect + sodipodi:type="inkscape:persp3d" /></defs> +<!--rect style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;fill-opacity:1" id="rect1644" width="54.898254" height="55.122215" x="0.20989008" y="0.11581264" - ry="3.8061128" /><path + ry="3.8061128" / --> +<path style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.86975145;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.86975145, 3.73950291;stroke-dashoffset:0" 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" /><path diff --git a/icons/turn.svg b/icons/turn.svg index 00c29bd..080e728 100644 --- a/icons/turn.svg +++ b/icons/turn.svg @@ -16,31 +16,32 @@ id="svg120" xml:space="preserve" sodipodi:version="0.32" - inkscape:version="0.46+devel" - sodipodi:docname="add-nube.svg" + inkscape:version="0.48.1 r9760" + sodipodi:docname="turn.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata - id="metadata25"><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><sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="1280" - inkscape:window-height="950" - id="namedview23" - showgrid="false" - inkscape:zoom="8.9301795" - inkscape:cx="21.570155" - inkscape:cy="27.152882" - inkscape:window-x="0" - inkscape:window-y="25" - inkscape:current-layer="svg120" /><defs - id="defs133"><marker + id="metadata25"><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 /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1572" + inkscape:window-height="950" + id="namedview23" + showgrid="false" + inkscape:zoom="8.9301795" + inkscape:cx="1.4137852" + inkscape:cy="27.152882" + inkscape:window-x="0" + inkscape:window-y="25" + inkscape:current-layer="svg120" + inkscape:window-maximized="0" /><defs + id="defs133"><marker inkscape:stockid="Arrow1Lstart" orient="auto" refY="0.0" @@ -82,28 +83,35 @@ inkscape:vp_z="1 : 0.5 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 0.5 : 1" - sodipodi:type="inkscape:persp3d" /></defs><rect + sodipodi:type="inkscape:persp3d" /></defs> +<!-- rect style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.1;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect1644" width="54.898254" height="55.122215" x="0.20989117" y="0.11581337" - ry="3.8061128" /><g - id="g3547"><path - sodipodi:nodetypes="cc" - id="path2296" - d="M 31.759361,6.6760004 C 56.831407,7.1331102 55.500823,45.010531 32.227974,45.206468" - style="fill:none;stroke:#000000;stroke-width:3.27607918;stroke-miterlimit:3;stroke-opacity:1;stroke-dasharray:none;marker-end:none" /><path - sodipodi:nodetypes="ccc" - id="path2318" - d="m 33.749853,42.01425 -7.308383,3.304734 7.846354,3.317575" - style="stroke-width:3;stroke-miterlimit:3;stroke-dasharray:none" /><path - sodipodi:nodetypes="cc" - id="path2296-7" - d="M 25.624276,45.314969 C 0.69698726,44.860443 2.0198876,7.197182 25.158368,7.0023533" - style="fill:none;stroke:#000000;stroke-width:3.38195086;stroke-miterlimit:3;stroke-opacity:1;stroke-dasharray:none;marker-end:none" /><path - sodipodi:nodetypes="ccc" - id="path2318-1" - d="M 22.703214,10.365595 29.483037,7.0608607 22.20415,3.7432857" - style="stroke-width:3;stroke-miterlimit:3;stroke-dasharray:none" /></g></svg>
\ No newline at end of file + ry="3.8061128" / --> +<g + id="g3899"><path + sodipodi:nodetypes="cc" + id="path2296-7" + d="M 12.522635,28.853934 C 7.4252677,17.718959 11.032466,11.041917 23.92659,6.7783937" + style="fill:none;stroke:#ffffff;stroke-width:3.38195086;stroke-miterlimit:3;stroke-opacity:1;stroke-dasharray:none;marker-end:none" + inkscape:connector-curvature="0" /><path + sodipodi:nodetypes="cccc" + inkscape:connector-curvature="0" + id="path3853" + d="m 23.067845,2.9293781 8.846407,4.0312739 -7.950568,4.367213 z" + style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /></g><g + id="g3903"><path + sodipodi:nodetypes="cccc" + inkscape:connector-curvature="0" + id="path3853-2" + d="m 34.321818,49.233038 -8.846407,-4.031274 7.950568,-4.367213 z" + style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /><path + sodipodi:nodetypes="cc" + id="path2296-7-6" + d="m 45.462444,23.133981 c 5.097368,11.134975 1.490169,17.812017 -11.403955,22.07554" + style="fill:none;stroke:#ffffff;stroke-width:3.38195086;stroke-miterlimit:3;stroke-opacity:1;stroke-dasharray:none;marker-end:none" + inkscape:connector-curvature="0" /></g></svg>
\ No newline at end of file @@ -76,44 +76,50 @@ class GlobesManager(): self._activity = activity # agregar cuadro - self.b_add_photo = ToolButton('add-photo') - self.b_add_photo.connect('clicked', self._image_cb) - self.b_add_photo.set_tooltip(_('Add Photo')) - toolbar.insert(self.b_add_photo, -1) + self.add_photo = ToolButton() + self.add_photo.props.icon_name = 'add-photo' + self.add_photo.connect('clicked', self.__btn_clicked) + self.add_photo.set_tooltip(_('Add Photo')) + toolbar.insert(self.add_photo, -1) separator = gtk.SeparatorToolItem() separator.set_draw(True) toolbar.insert(separator, -1) # agrega globo - self.b_agregar = ToolButton('add-globe') - self.b_agregar.connect('clicked', self.agrega_gnormal) - self.b_agregar.set_tooltip(_('Add Globe')) - toolbar.insert(self.b_agregar, -1) + 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.b_agregar = ToolButton('add-nube') - self.b_agregar.connect('clicked', self.agrega_gpensar) - self.b_agregar.set_tooltip(_('Add Think')) - toolbar.insert(self.b_agregar, -1) + self.add_cloud = ToolButton() + self.add_cloud.props.icon_name = 'add-nube' + self.add_cloud.connect('clicked', self.__btn_clicked) + self.add_cloud.set_tooltip(_('Add Think')) + toolbar.insert(self.add_cloud, -1) # agrega susurro - self.b_agregar = ToolButton('add-susurro') - self.b_agregar.connect('clicked', self.agrega_gdespacio) - self.b_agregar.set_tooltip(_('Add Whisper')) - toolbar.insert(self.b_agregar, -1) + self.add_whisp = ToolButton() + self.add_whisp.props.icon_name = 'add-susurro' + self.add_whisp.connect('clicked', self.__btn_clicked) + self.add_whisp.set_tooltip(_('Add Whisper')) + toolbar.insert(self.add_whisp, -1) # agrega grito - self.b_agregar = ToolButton('add-grito') - self.b_agregar.connect('clicked', self.agrega_ggrito) - self.b_agregar.set_tooltip(_('Add Exclamation')) - toolbar.insert(self.b_agregar, -1) + self.add_scream = ToolButton() + self.add_scream.props.icon_name = 'add-grito' + self.add_scream.connect('clicked', self.__btn_clicked) + self.add_scream.set_tooltip(_('Add Exclamation')) + toolbar.insert(self.add_scream, -1) # agrega caja - self.b_agregar = ToolButton('add-box') - self.b_agregar.connect('clicked', self.agrega_grect) - self.b_agregar.set_tooltip(_('Add Box')) - toolbar.insert(self.b_agregar, -1) + 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) separator = gtk.SeparatorToolItem() separator.set_draw(True) @@ -131,23 +137,25 @@ class GlobesManager(): self.b_borrar.set_tooltip(_('Delete')) toolbar.insert(self.b_borrar, -1) - def agrega_gnormal(self, boton): - self._page.get_active_box().add_globo(60, 60) + def __btn_clicked(self, boton): + logging.error('boton clicked %s', boton.props.icon_name) + if boton == self.add_globe: + self._page.get_active_box().add_globo(60, 60) - def agrega_gpensar(self, boton): - self._page.get_active_box().add_nube(60, 60) + if boton == self.add_cloud: + self._page.get_active_box().add_nube(60, 60) - def agrega_gdespacio(self, boton): - self._page.get_active_box().add_globo(60, 60, gmodo="despacio") + if boton == self.add_whisp: + self._page.get_active_box().add_globo(60, 60, gmodo="despacio") - def agrega_ggrito(self, boton): - self._page.get_active_box().add_grito(60, 60) + if boton == self.add_scream: + self._page.get_active_box().add_grito(60, 60) - def agrega_grect(self, boton): - self._page.get_active_box().add_rectangulo(60, 60) + if boton == self.add_box: + self._page.get_active_box().add_rectangulo(60, 60) - def agrega_imagen(self, boton): - self._page.get_active_box().add_imagen(60, 60) + if boton == self.add_photo: + self.add_image() def girar(self, boton): print "girando" @@ -200,7 +208,7 @@ class GlobesManager(): last_box.queue_draw() self._page.boxs.pop() - def _image_cb(self, button): + def add_image(self): try: chooser = ObjectChooser(_('Choose image'), self._activity, gtk.DIALOG_MODAL | |