[PATCH] fix #1015
Gonzalo Odiard (none)
gonzalo at aronax.
Mon May 17 19:43:05 EDT 2010
---
icons/icon-fill.svg | 11 +++--
icons/icon-stroke.svg | 30 ++++----------
toolbox.py | 109
+++++++++----------------------------------------
3 files changed, 34 insertions(+), 116 deletions(-)
diff --git a/icons/icon-fill.svg b/icons/icon-fill.svg
index bf1925a..d424356 100644
--- a/icons/icon-fill.svg
+++ b/icons/icon-fill.svg
@@ -1,5 +1,7 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version:
6.00 Build 14948) -->
+<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' '
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
+ <!ENTITY stroke_color "#010101">
+ <!ENTITY fill_color "#FFFFFF">
+]>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
@@ -48,9 +50,10 @@
inkscape:current-layer="svg2" />
<path
- style="fill:#ffffff;display:inline"
+ style="fill:&fill_color;;display:inline;stroke-opacity:1"
stroke-width="3"
d="M 48.897307,33.594988 C 48.897307,44.525692 24.353188,48.898307
15.889502,42.513082 C 7.1635122,35.929969 8.1442163,21.098901
17.129718,14.87467 C 22.64423,11.054784 34.272782,10.165018
36.496363,19.452618 C 39.041402,30.082908 48.897307,22.664284
48.897307,33.594988 z "
id="circle5"
sodipodi:nodetypes="csssc" />
-</svg>
\ No newline at end of file
+</svg>
+
diff --git a/icons/icon-stroke.svg b/icons/icon-stroke.svg
index 71545c8..cb6f5b4 100644
--- a/icons/icon-stroke.svg
+++ b/icons/icon-stroke.svg
@@ -1,5 +1,7 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version:
6.00 Build 14948) -->
+<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' '
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
+ <!ENTITY stroke_color "#010101">
+ <!ENTITY fill_color "#FFFFFF">
+]>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
@@ -28,29 +30,13 @@
rdf:resource="http://purl.org/dc/dcmitype/StillImage"
/></cc:Work></rdf:RDF></metadata><defs
id="defs8">
-</defs><sodipodi:namedview
- inkscape:window-height="941"
- inkscape:window-width="1269"
- inkscape:pageshadow="2"
- inkscape:pageopacity="0.0"
- guidetolerance="10.0"
- gridtolerance="10.0"
- objecttolerance="10.0"
- borderopacity="1.0"
- bordercolor="#666666"
- pagecolor="#ffffff"
- id="base"
- inkscape:zoom="6.8909091"
- inkscape:cx="27.5"
- inkscape:cy="15.890501"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:current-layer="svg2" />
+</defs>
<path
- style="fill:none;display:inline;stroke:#ffffff;stroke-opacity:1"
+ style="fill:none;display:inline;stroke:&fill_color;;stroke-opacity:1"
stroke-width="3"
d="M 48.897307,33.594988 C 48.897307,44.525692 24.353188,48.898307
15.889502,42.513082 C 7.1635122,35.929969 8.1442163,21.098901
17.129718,14.87467 C 22.64423,11.054784 34.272782,10.165018
36.496363,19.452618 C 39.041402,30.082908 48.897307,22.664284
48.897307,33.594988 z "
id="circle5"
sodipodi:nodetypes="csssc" />
-</svg>
\ No newline at end of file
+</svg>
+
diff --git a/toolbox.py b/toolbox.py
index 9bed17b..3962b90 100644
--- a/toolbox.py
+++ b/toolbox.py
@@ -72,6 +72,7 @@ from sugar.graphics.toggletoolbutton import
ToggleToolButton
from sugar.graphics.combobox import ComboBox
from sugar.graphics.palette import Palette
from sugar.graphics.menuitem import MenuItem
+from sugar.graphics.colorbutton import ColorToolButton
from sugar.graphics.objectchooser import ObjectChooser
##Create toolbars for the activity
@@ -84,27 +85,27 @@ class Toolbox(ActivityToolbox):
self._edit_toolbar = DrawEditToolbar(activity)
self.add_toolbar(_('Edit'), self._edit_toolbar)
- self._edit_toolbar.show()
+ self._edit_toolbar.show_all()
self._tools_toolbar = ToolsToolbar(activity)
self.add_toolbar(_('Tools'), self._tools_toolbar)
- self._tools_toolbar.show()
+ self._tools_toolbar.show_all()
self._shapes_toolbar = ShapesToolbar(activity)
self.add_toolbar(_('Shapes'), self._shapes_toolbar)
- self._shapes_toolbar.show()
+ self._shapes_toolbar.show_all()
self._text_toolbar = TextToolbar(activity)
self.add_toolbar(_('Text'), self._text_toolbar)
- self._text_toolbar.show()
+ self._text_toolbar.show_all()
self._image_toolbar = ImageToolbar(activity)
self.add_toolbar(_('Image'), self._image_toolbar)
- self._image_toolbar.show()
+ self._image_toolbar.show_all()
self._effects_toolbar = EffectsToolbar(activity)
self.add_toolbar(_('Effects'), self._effects_toolbar)
- self._effects_toolbar.show()
+ self._effects_toolbar.show_all()
#self._view_toolbar = ViewToolbar(activity)
#self.add_toolbar(_('View'), self._view_toolbar)
@@ -129,11 +130,9 @@ class DrawEditToolbar(EditToolbar):
separator = gtk.SeparatorToolItem()
separator.set_draw(True)
self.insert(separator, -1)
- separator.show()
self._clear_all = ToolButton('edit-clear')
self.insert(self._clear_all, -1)
- self._clear_all.show()
self._clear_all.set_tooltip(_('Clear'))
self.undo.connect('clicked', self._undo_cb)
@@ -285,27 +284,19 @@ class ToolsToolbar(gtk.Toolbar):
self._activity = activity
- self._icon_stroke = ToolButton('icon-stroke')
- self.insert(self._icon_stroke, -1)
- self._icon_stroke.show()
- self._icon_stroke.set_tooltip(_('Tool Color'))
-
self._stroke_color = ButtonStrokeColor(activity)
- self._stroke_color.show()
-# self._stroke_color.set_tooltip(_('Stroke Color'))
+ self._stroke_color.set_icon_name('icon-stroke')
+ self._stroke_color.set_title(_('Stroke Color'))
item = gtk.ToolItem()
item.add(self._stroke_color)
self.insert(item, -1)
- item.show()
separator = gtk.SeparatorToolItem()
separator.set_draw(True)
self.insert(separator, -1)
- separator.show()
self._tool_pencil = ToolButton('tool-pencil')
self.insert(self._tool_pencil, -1)
- self._tool_pencil.show()
self._tool_pencil.set_tooltip(_('Pencil'))
try:
self._configure_palette(self._tool_pencil, self._TOOL_PENCIL)
@@ -314,7 +305,6 @@ class ToolsToolbar(gtk.Toolbar):
self._tool_brush = ToolButton('tool-brush')
self.insert(self._tool_brush, -1)
- self._tool_brush.show()
self._tool_brush.set_tooltip(_('Brush'))
try:
self._configure_palette(self._tool_brush, self._TOOL_BRUSH)
@@ -323,7 +313,6 @@ class ToolsToolbar(gtk.Toolbar):
self._tool_eraser = ToolButton('tool-eraser')
self.insert(self._tool_eraser, -1)
- self._tool_eraser.show()
self._tool_eraser.set_tooltip(_('Eraser'))
try:
self._configure_palette(self._tool_eraser, self._TOOL_ERASER)
@@ -332,7 +321,6 @@ class ToolsToolbar(gtk.Toolbar):
self._tool_polygon = ToolButton('tool-polygon')
self.insert(self._tool_polygon, -1)
- self._tool_polygon.show()
self._tool_polygon.set_tooltip(_('Polygon'))
try:
self._configure_palette(self._tool_polygon, self._TOOL_POLYGON)
@@ -341,13 +329,11 @@ class ToolsToolbar(gtk.Toolbar):
self._tool_bucket = ToolButton('tool-bucket')
self.insert(self._tool_bucket, -1)
- self._tool_bucket.show()
self._tool_bucket.set_tooltip(_('Bucket'))
separator = gtk.SeparatorToolItem()
separator.set_draw(True)
self.insert(separator, -1)
- separator.show()
"""
@@ -370,11 +356,8 @@ class ToolsToolbar(gtk.Toolbar):
self._tool_marquee_rectangular =
ToolButton('tool-marquee-rectangular')
self.insert(self._tool_marquee_rectangular, -1)
- self._tool_marquee_rectangular.show()
self._tool_marquee_rectangular.set_tooltip(_('Rectangular
Marquee'))
-
- self._icon_stroke.connect('clicked', self._on_icon_stroke_clicked)
-
+
# New connect method
# Using dictionnaries to control tool's properties
self._tool_polygon.connect('clicked', self.set_tool,
self._TOOL_POLYGON)
@@ -544,8 +527,6 @@ class ToolsToolbar(gtk.Toolbar):
#setting cursor: Moved to Area
- def _on_icon_stroke_clicked(self, widget, data=None):
- self._stroke_color.clicked()
def _on_fill_checkbutton_toggled(self, checkbutton, button=None,
tool=None):
logging.debug('Checkbutton is Active: %s', checkbutton.get_active()
)
@@ -584,10 +565,10 @@ class ToolsToolbar(gtk.Toolbar):
##Class to manage the Fill Color of a Button
-class ButtonFillColor(gtk.ColorButton):
+class ButtonFillColor(ColorToolButton):
##The Constructor
def __init__(self, activity):
- gtk.ColorButton.__init__(self)
+ ColorToolButton.__init__(self)
self._activity = activity
self.connect('color-set', self._color_button_cb)
@@ -605,10 +586,10 @@ class ButtonFillColor(gtk.ColorButton):
self._activity.area.set_fill_color(new_color)
##Class to manage the Stroke Color of a Button
-class ButtonStrokeColor(gtk.ColorButton):
+class ButtonStrokeColor(ColorToolButton):
##The Constructor
def __init__(self, activity):
- gtk.ColorButton.__init__(self)
+ ColorToolButton.__init__(self)
self._activity = activity
self.connect('color-set', self._color_button_cb)
@@ -743,39 +724,26 @@ class ShapesToolbar(gtk.Toolbar):
self._activity = activity
- self._icon_fill = ToolButton('icon-fill')
- self.insert(self._icon_fill, -1)
- self._icon_fill.show()
- self._icon_fill.set_tooltip(_('Fill Color'))
-
self._fill_color = ButtonFillColor(activity)
- self._fill_color.show()
+ self._fill_color.set_icon_name('icon-fill')
+ self._fill_color.set_title(_('Fill Color'))
item = gtk.ToolItem()
item.add(self._fill_color)
self.insert(item, -1)
- item.show()
-
- self._icon_stroke = ToolButton('icon-stroke')
- self.insert(self._icon_stroke, -1)
- self._icon_stroke.show()
- self._icon_stroke.set_tooltip(_('Stroke Color'))
-
self._stroke_color = ButtonStrokeColor(activity)
- self._stroke_color.show()
+ self._stroke_color.set_icon_name('icon-stroke')
+ self._stroke_color.set_title(_('Stroke Color'))
item = gtk.ToolItem()
item.add(self._stroke_color)
self.insert(item, -1)
- item.show()
separator = gtk.SeparatorToolItem()
separator.set_draw(True)
self.insert(separator, -1)
- separator.show()
self._shape_ellipse = ToolButton('tool-shape-ellipse')
self.insert(self._shape_ellipse, -1)
- self._shape_ellipse.show()
self._shape_ellipse.set_tooltip(_('Ellipse'))
try:
self._configure_palette_shape_ellipse()
@@ -784,7 +752,6 @@ class ShapesToolbar(gtk.Toolbar):
self._shape_rectangle = ToolButton('tool-shape-rectangle')
self.insert(self._shape_rectangle, -1)
- self._shape_rectangle.show()
self._shape_rectangle.set_tooltip(_('Rectangle'))
try:
self._configure_palette_shape_rectangle()
@@ -793,7 +760,6 @@ class ShapesToolbar(gtk.Toolbar):
self._shape_line = ToolButton('tool-shape-line')
self.insert(self._shape_line, -1)
- self._shape_line.show()
self._shape_line.set_tooltip(_('Line'))
try:
self._configure_palette_shape_line()
@@ -802,7 +768,6 @@ class ShapesToolbar(gtk.Toolbar):
self._shape_polygon = ToolButton('tool-shape-polygon')
self.insert(self._shape_polygon, -1)
- self._shape_polygon.show()
self._shape_polygon.set_tooltip(_('Polygon'))
try:
self._configure_palette_shape_polygon()
@@ -820,7 +785,6 @@ class ShapesToolbar(gtk.Toolbar):
self._shape_heart = ToolButton('tool-shape-heart')
self.insert(self._shape_heart, -1)
- self._shape_heart.show()
self._shape_heart.set_tooltip(_('Heart'))
try:
self._configure_palette_shape_heart()
@@ -830,7 +794,6 @@ class ShapesToolbar(gtk.Toolbar):
self._shape_parallelogram = ToolButton('tool-shape-parallelogram')
self.insert(self._shape_parallelogram, -1)
- self._shape_parallelogram.show()
self._shape_parallelogram.set_tooltip(_('Parallelogram'))
try:
self._configure_palette_shape_parallelogram()
@@ -839,7 +802,6 @@ class ShapesToolbar(gtk.Toolbar):
self._shape_arrow = ToolButton('tool-shape-arrow')
self.insert(self._shape_arrow, -1)
- self._shape_arrow.show()
self._shape_arrow.set_tooltip(_('Arrow'))
try:
self._configure_palette_shape_arrow()
@@ -848,7 +810,6 @@ class ShapesToolbar(gtk.Toolbar):
self._shape_star = ToolButton('tool-shape-star')
self.insert(self._shape_star, -1)
- self._shape_star.show()
self._shape_star.set_tooltip(_('Star'))
try:
self._configure_palette_shape_star()
@@ -857,7 +818,6 @@ class ShapesToolbar(gtk.Toolbar):
self._shape_trapezoid = ToolButton('tool-shape-trapezoid')
self.insert(self._shape_trapezoid, -1)
- self._shape_trapezoid.show()
self._shape_trapezoid.set_tooltip(_('Trapezoid'))
try:
self._configure_palette_shape_trapezoid()
@@ -866,7 +826,6 @@ class ShapesToolbar(gtk.Toolbar):
self._shape_triangle = ToolButton('tool-shape-triangle')
self.insert(self._shape_triangle, -1)
- self._shape_triangle.show()
self._shape_triangle.set_tooltip(_('Triangle'))
try:
self._configure_palette_shape_triangle()
@@ -874,9 +833,6 @@ class ShapesToolbar(gtk.Toolbar):
logging.debug('Could not create palette for Shape Triangle')
- self._icon_stroke.connect('clicked', self._on_icon_stroke_clicked)
- self._icon_fill.connect('clicked', self._on_icon_fill_clicked)
-
self._shape_arrow.connect('clicked', self.set_tool,
self._SHAPE_ARROW)
self._shape_ellipse.connect('clicked', self.set_tool,
self._SHAPE_ELLIPSE)
#self._shape_freeform.connect('clicked', self.set_tool,
self._SHAPE_FREEFORM)
@@ -902,15 +858,7 @@ class ShapesToolbar(gtk.Toolbar):
self._activity.area.set_tool(tool)
#setting cursor: moved to Area
-
-
- def _on_icon_stroke_clicked(self, widget, data=None):
- self._stroke_color.clicked()
-
- def _on_icon_fill_clicked(self, widget, data=None):
- self._fill_color.clicked()
-
-
+
def _on_vertices_value_changed(self, spinbutton, tool):
#self._activity.area.polygon_sides = spinbutton.get_value_as_int()
tool['vertices'] = spinbutton.get_value_as_int()
@@ -1100,21 +1048,17 @@ class TextToolbar(gtk.Toolbar):
self._text = ToolButton('text')
self.insert(self._text, -1)
- self._text.show()
self._text.set_tooltip(_('Type'))
self._text.connect('clicked', self.set_tool, self._ACTION_TEXT)
self._text_color = ButtonFillColor(activity)
- self._text_color.show()
item = gtk.ToolItem()
item.add(self._text_color)
self.insert(item, -1)
- item.show()
separator = gtk.SeparatorToolItem()
separator.set_draw(True)
self.insert(separator, -1)
- separator.show()
"""
@@ -1171,32 +1115,27 @@ class ImageToolbar(gtk.Toolbar):
self._object_insert = ToolButton('object-insert')
self.insert(self._object_insert, -1)
- self._object_insert.show()
self._object_insert.set_tooltip(_('Insert Image'))
separator = gtk.SeparatorToolItem()
separator.set_draw(True)
self.insert(separator, -1)
- separator.show()
self.width_percent = 1.
self.height_percent = 1.
self._object_rotate_left = ToolButton('object-rotate-left')
self.insert(self._object_rotate_left, -1)
- self._object_rotate_left.show()
self._object_rotate_left.set_tooltip(_('Rotate Left'))
self._object_rotate_left.set_sensitive(
self._activity.area.is_selected() )
self._object_rotate_right = ToolButton('object-rotate-right')
self.insert(self._object_rotate_right, -1)
- self._object_rotate_right.show()
self._object_rotate_right.set_tooltip(_('Rotate Right'))
self._object_rotate_right.set_sensitive(
self._activity.area.is_selected() )
self._object_height = ToolButton('object-height')
self.insert(self._object_height, -1)
- self._object_height.show()
self._object_height.set_tooltip(_('Height'))
height_spinButton = self._create_spinButton(self._object_height,
'object-height', activity)
@@ -1204,11 +1143,9 @@ class ImageToolbar(gtk.Toolbar):
item = gtk.ToolItem()
item.add(height_spinButton)
self.insert(item, -1)
- item.show()
self._object_width = ToolButton('object-width')
self.insert(self._object_width, -1)
- self._object_width.show()
self._object_width.set_tooltip(_('Width'))
width_spinButton = self._create_spinButton(self._object_width,
'object-width', activity)
@@ -1216,7 +1153,6 @@ class ImageToolbar(gtk.Toolbar):
item = gtk.ToolItem()
item.add(width_spinButton)
self.insert(item, -1)
- item.show()
self._object_insert.connect('clicked', self.insertImage, activity)
self._object_rotate_left.connect('clicked', self.rotate_left,
activity)
@@ -1350,18 +1286,15 @@ class EffectsToolbar(gtk.Toolbar):
self._effect_grayscale = ToolButton('effect-grayscale')
self.insert(self._effect_grayscale, -1)
- self._effect_grayscale.show()
self._effect_grayscale.set_tooltip(_('Grayscale'))
self._effect_rainbow = ToolButton('effect-rainbow')
self.insert(self._effect_rainbow, -1)
- self._effect_rainbow.show()
self._effect_rainbow.set_tooltip(_('Rainbow'))
self._configure_palette(self._effect_rainbow, self._EFFECT_RAINBOW)
separator = gtk.SeparatorToolItem()
self.insert(separator, -1)
- separator.show()
"""
#FIXME: Must be implemented
@@ -1504,20 +1437,16 @@ class ViewToolbar(gtk.Toolbar):
self._view_percent.set_active(0)
self._view_percent.connect('changed', self._combo_changed_cb)
self.insert(tool_item, -1)
- tool_item.show()
separator = gtk.SeparatorToolItem()
self.insert(separator, -1)
- separator.show()
self._zoom_plus = ToolButton('zoom-plus')
self.insert(self._zoom_plus, -1)
- self._zoom_plus.show()
self._zoom_plus.set_tooltip(_('ZOOM +'))
self._zoom_minus = ToolButton('zoom-minus')
self.insert(self._zoom_minus, -1)
- self._zoom_minus.show()
self._zoom_minus.set_tooltip(_('ZOOM -'))
'''
--
1.6.6.1
On Mon, May 17, 2010 at 7:43 PM, James Cameron <quozl at laptop.org> wrote:
> On Mon, May 17, 2010 at 11:32:13AM -0300, Gonzalo Odiard wrote:
> > Sorry, i have did "diff -ur" comparing directories. I must use git to
> > do the patch?
>
> There are several ways to do the patch, using git makes it easiest for
> those other people who must read your patch. You don't have to make it
> easy, but it helps. It is like writing neatly.
>
> Here's how to make a patch using git ...
>
> $ git clone git://git.sugarlabs.org/paint/mainline.git paint.git
> $ cd paint.git
> $ ... change the files you want to change ...
> $ git commit -a -m 'fix #1015'
> $ git format-patch -1
> 0001-fix-1015.patch
>
> Then include that patch file in your e-mail, or use the file as the
> basis for an e-mail. Avoid "attach".
>
> --
> James Cameron
> http://quozl.linux.org.au/
>
--000e0cd5cb00c378b60486d2cfce
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Thanks James!<br>Trying again...<br><br>From dd88a9833d7bf0a4de3dd64bf306c7=
13db84711e Mon Sep 17 00:00:00 2001<br>From: Gonzalo Odiard <gonzalo at aro=
nax.(none)><br>Date: Mon, 17 May 2010 20:43:05 -0300<br>Subject: [PATCH]=
fix #1015<br>
<br>---<br>=A0icons/icon-fill.svg=A0=A0 |=A0=A0 11 +++--<br>=A0icons/icon-s=
troke.svg |=A0=A0 30 ++++----------<br>=A0toolbox.py=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0 |=A0 109 +++++++++----------------------------------------<br>=
=A03 files changed, 34 insertions(+), 116 deletions(-)<br>
<br>diff --git a/icons/icon-fill.svg b/icons/icon-fill.svg<br>index bf1925a=
..d424356 100644<br>--- a/icons/icon-fill.svg<br>+++ b/icons/icon-fill.svg<=
br>@@ -1,5 +1,7 @@<br>-<?xml version=3D"1.0" encoding=3D"=
UTF-8" standalone=3D"no"?><br>
-<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Vers=
ion: 6.00 Build 14948)=A0 --><br>+<?xml version=3D"1.0" ?&g=
t;<!DOCTYPE svg=A0 PUBLIC '-//W3C//DTD SVG 1.1//EN'=A0 '<a h=
ref=3D"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">http://www.w3.org/=
Graphics/SVG/1.1/DTD/svg11.dtd</a>' [<br>
+=A0=A0=A0 <!ENTITY stroke_color "#010101"><br>+=A0=A0=A0 &=
lt;!ENTITY fill_color "#FFFFFF"><br>+]><br>=A0<svg<br>=
=A0=A0=A0 xmlns:dc=3D"<a href=3D"http://purl.org/dc/elements/1.1/">htt=
p://purl.org/dc/elements/1.1/</a>"<br>
=A0=A0=A0 xmlns:cc=3D"<a href=3D"http://web.resource.org/cc/">http://w=
eb.resource.org/cc/</a>"<br>@@ -48,9 +50,10 @@<br>=A0=A0=A0 inkscape:c=
urrent-layer=3D"svg2" /><br>=A0<br>=A0<path<br>-=A0=A0 styl=
e=3D"fill:#ffffff;display:inline"<br>
+=A0=A0 style=3D"fill:&fill_color;;display:inline;stroke-opacity:1=
" stroke-width=3D"3"<br>=A0=A0=A0 d=3D"M 48.897307,33.5=
94988 C 48.897307,44.525692 24.353188,48.898307 15.889502,42.513082 C 7.163=
5122,35.929969 8.1442163,21.098901 17.129718,14.87467 C 22.64423,11.054784 =
34.272782,10.165018 36.496363,19.452618 C 39.041402,30.082908 48.897307,22.=
664284 48.897307,33.594988 z "<br>
=A0=A0=A0 id=3D"circle5"<br>=A0=A0=A0 sodipodi:nodetypes=3D"=
csssc" /><br>=A0<br>-</svg><br>\ No newline at end of file<br=
>+</svg><br>+<br>diff --git a/icons/icon-stroke.svg b/icons/icon-stro=
ke.svg<br>index 71545c8..cb6f5b4 100644<br>
--- a/icons/icon-stroke.svg<br>+++ b/icons/icon-stroke.svg<br>@@ -1,5 +1,7 =
@@<br>-<?xml version=3D"1.0" encoding=3D"UTF-8" stan=
dalone=3D"no"?><br>-<!-- Generator: Adobe Illustrator 13.0.=
0, SVG Export Plug-In . SVG Version: 6.00 Build 14948)=A0 --><br>
+<?xml version=3D"1.0" ?><!DOCTYPE svg=A0 PUBLIC '-/=
/W3C//DTD SVG 1.1//EN'=A0 '<a href=3D"http://www.w3.org/Graphics/SV=
G/1.1/DTD/svg11.dtd">http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd</a>&#=
39; [<br>
+=A0=A0=A0 <!ENTITY stroke_color "#010101"><br>+=A0=A0=A0 &=
lt;!ENTITY fill_color "#FFFFFF"><br>+]><br>=A0<svg<br>=
=A0=A0=A0 xmlns:dc=3D"<a href=3D"http://purl.org/dc/elements/1.1/">htt=
p://purl.org/dc/elements/1.1/</a>"<br>
=A0=A0=A0 xmlns:cc=3D"<a href=3D"http://web.resource.org/cc/">http://w=
eb.resource.org/cc/</a>"<br>@@ -28,29 +30,13 @@<br>=A0=A0=A0=A0=A0=A0=
=A0=A0=A0 rdf:resource=3D"<a href=3D"http://purl.org/dc/dcmitype/Still=
Image">http://purl.org/dc/dcmitype/StillImage</a>" /></cc:Work&g=
t;</rdf:RDF></metadata><defs<br>
=A0=A0=A0 id=3D"defs8"><br>=A0=A0=A0=A0 <br>-</defs><=
sodipodi:namedview<br>-=A0=A0 inkscape:window-height=3D"941"<br>-=
=A0=A0 inkscape:window-width=3D"1269"<br>-=A0=A0 inkscape:pagesha=
dow=3D"2"<br>-=A0=A0 inkscape:pageopacity=3D"0.0"<br>
-=A0=A0 guidetolerance=3D"10.0"<br>-=A0=A0 gridtolerance=3D"=
10.0"<br>-=A0=A0 objecttolerance=3D"10.0"<br>-=A0=A0 bordero=
pacity=3D"1.0"<br>-=A0=A0 bordercolor=3D"#666666"<br>-=
=A0=A0 pagecolor=3D"#ffffff"<br>
-=A0=A0 id=3D"base"<br>-=A0=A0 inkscape:zoom=3D"6.8909091&qu=
ot;<br>-=A0=A0 inkscape:cx=3D"27.5"<br>-=A0=A0 inkscape:cy=3D&quo=
t;15.890501"<br>-=A0=A0 inkscape:window-x=3D"0"<br>-=A0=A0 i=
nkscape:window-y=3D"27"<br>
-=A0=A0 inkscape:current-layer=3D"svg2" /><br>+</defs><b=
r>=A0<br>=A0<path<br>-=A0=A0 style=3D"fill:none;display:inline;stro=
ke:#ffffff;stroke-opacity:1"<br>+=A0=A0 style=3D"fill:none;displa=
y:inline;stroke:&fill_color;;stroke-opacity:1" stroke-width=3D&quo=
t;3"<br>
=A0=A0=A0 d=3D"M 48.897307,33.594988 C 48.897307,44.525692 24.353188,4=
8.898307 15.889502,42.513082 C 7.1635122,35.929969 8.1442163,21.098901 17.1=
29718,14.87467 C 22.64423,11.054784 34.272782,10.165018 36.496363,19.452618=
C 39.041402,30.082908 48.897307,22.664284 48.897307,33.594988 z "<br>
=A0=A0=A0 id=3D"circle5"<br>=A0=A0=A0 sodipodi:nodetypes=3D"=
csssc" /><br>=A0<br>-</svg><br>\ No newline at end of file<br=
>+</svg><br>+<br>diff --git a/toolbox.py b/toolbox.py<br>index 9bed17=
b..3962b90 100644<br>
--- a/toolbox.py<br>+++ b/toolbox.py<br>@@ -72,6 +72,7 @@ from sugar.graphi=
cs.toggletoolbutton import ToggleToolButton<br>=A0from sugar.graphics.combo=
box import ComboBox<br>=A0from sugar.graphics.palette import Palette<br>=A0=
from sugar.graphics.menuitem import MenuItem<br>
+from sugar.graphics.colorbutton import ColorToolButton<br>=A0from sugar.gr=
aphics.objectchooser import ObjectChooser<br>=A0<br>=A0##Create toolbars fo=
r the activity<br>@@ -84,27 +85,27 @@ class Toolbox(ActivityToolbox):<br>=
=A0=A0=A0=A0=A0=A0=A0=A0 <br>
=A0=A0=A0=A0=A0=A0=A0=A0 self._edit_toolbar =3D DrawEditToolbar(activity)<b=
r>=A0=A0=A0=A0=A0=A0=A0=A0 self.add_toolbar(_('Edit'), self._edit_t=
oolbar)<br>-=A0=A0=A0=A0=A0=A0=A0 self._edit_toolbar.show()<br>+=A0=A0=A0=
=A0=A0=A0=A0 self._edit_toolbar.show_all()<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=
=A0=A0=A0=A0=A0=A0=A0=A0 self._tools_toolbar =3D ToolsToolbar(activity)<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self.add_toolbar(_('Tools'), self._tools_t=
oolbar)<br>-=A0=A0=A0=A0=A0=A0=A0 self._tools_toolbar.show()<br>+=A0=A0=A0=
=A0=A0=A0=A0 self._tools_toolbar.show_all()<br>=A0<br>=A0=A0=A0=A0=A0=A0=A0=
=A0 self._shapes_toolbar =3D ShapesToolbar(activity)<br>=A0=A0=A0=A0=A0=A0=
=A0=A0 self.add_toolbar(_('Shapes'), self._shapes_toolbar)<br>
-=A0=A0=A0=A0=A0=A0=A0 self._shapes_toolbar.show()<br>+=A0=A0=A0=A0=A0=A0=
=A0 self._shapes_toolbar.show_all()<br>=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self=
._text_toolbar =3D TextToolbar(activity)<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.a=
dd_toolbar(_('Text'), self._text_toolbar)<br>-=A0=A0=A0=A0=A0=A0=A0=
self._text_toolbar.show()=A0=A0 <br>
+=A0=A0=A0=A0=A0=A0=A0 self._text_toolbar.show_all()=A0=A0 <br>=A0<br>=A0=
=A0=A0=A0=A0=A0=A0=A0 self._image_toolbar =3D ImageToolbar(activity)<br>=A0=
=A0=A0=A0=A0=A0=A0=A0 self.add_toolbar(_('Image'), self._image_tool=
bar)<br>-=A0=A0=A0=A0=A0=A0=A0 self._image_toolbar.show()<br>+=A0=A0=A0=A0=
=A0=A0=A0 self._image_toolbar.show_all()<br>
=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._effects_toolbar =3D EffectsToolbar(ac=
tivity)<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.add_toolbar(_('Effects'), =
self._effects_toolbar)<br>-=A0=A0=A0=A0=A0=A0=A0 self._effects_toolbar.show=
()<br>+=A0=A0=A0=A0=A0=A0=A0 self._effects_toolbar.show_all()<br>
=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 #self._view_toolbar =3D ViewToolbar(activit=
y)<br>=A0=A0=A0=A0=A0=A0=A0=A0 #self.add_toolbar(_('View'), self._v=
iew_toolbar)<br>@@ -129,11 +130,9 @@ class DrawEditToolbar(EditToolbar):<br=
>=A0=A0=A0=A0=A0=A0=A0=A0 separator =3D gtk.SeparatorToolItem()<br>
=A0=A0=A0=A0=A0=A0=A0=A0 separator.set_draw(True)<br>=A0=A0=A0=A0=A0=A0=A0=
=A0 self.insert(separator, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 separator.show()<b=
r>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self._clear_all =3D=
ToolButton('edit-clear')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(s=
elf._clear_all, -1)<br>
-=A0=A0=A0=A0=A0=A0=A0 self._clear_all.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0 s=
elf._clear_all.set_tooltip(_('Clear'))<br>=A0=A0=A0=A0=A0=A0=A0=A0 =
<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.undo.connect('clicked', self._und=
o_cb)<br>@@ -285,27 +284,19 @@ class ToolsToolbar(gtk.Toolbar):<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self._activity =3D=
activity<br>=A0<br>-=A0=A0=A0=A0=A0=A0=A0 self._icon_stroke =3D ToolButton=
('icon-stroke')<br>-=A0=A0=A0=A0=A0=A0=A0 self.insert(self._icon_st=
roke, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 self._icon_stroke.show()<br>-=A0=A0=A0=
=A0=A0=A0=A0 self._icon_stroke.set_tooltip(_('Tool Color'))<br>
-=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self._stroke_color =3D =
ButtonStrokeColor(activity)<br>-=A0=A0=A0=A0=A0=A0=A0 self._stroke_color.sh=
ow()<br>-#=A0=A0=A0=A0=A0=A0=A0=A0 self._stroke_color.set_tooltip(_('St=
roke Color'))<br>+=A0=A0=A0=A0=A0=A0=A0 self._stroke_color.set_icon_nam=
e('icon-stroke')<br>
+=A0=A0=A0=A0=A0=A0=A0 self._stroke_color.set_title(_('Stroke Color'=
;))<br>=A0=A0=A0=A0=A0=A0=A0=A0 item =3D gtk.ToolItem()<br>=A0=A0=A0=A0=A0=
=A0=A0=A0 item.add(self._stroke_color)<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.ins=
ert(item, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 item.show()<br>=A0=A0=A0=A0=A0=A0=
=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 separator =3D gtk.SeparatorToolItem()<b=
r>
=A0=A0=A0=A0=A0=A0=A0=A0 separator.set_draw(True)<br>=A0=A0=A0=A0=A0=A0=A0=
=A0 self.insert(separator, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 separator.show()<b=
r>=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._tool_pencil =3D ToolButton('too=
l-pencil')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(self._tool_pencil, -=
1)<br>
-=A0=A0=A0=A0=A0=A0=A0 self._tool_pencil.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0=
self._tool_pencil.set_tooltip(_('Pencil'))<br>=A0=A0=A0=A0=A0=A0=
=A0=A0 try:<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self._configure_palette=
(self._tool_pencil, self._TOOL_PENCIL)<br>@@ -314,7 +305,6 @@ class ToolsTo=
olbar(gtk.Toolbar):<br>
=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self._tool_brush =3D =
ToolButton('tool-brush')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(se=
lf._tool_brush, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 self._tool_brush.show()<br>=
=A0=A0=A0=A0=A0=A0=A0=A0 self._tool_brush.set_tooltip(_('Brush'))<b=
r>=A0=A0=A0=A0=A0=A0=A0=A0 try:<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self._configure_palette(self._tool_bru=
sh, self._TOOL_BRUSH)<br>@@ -323,7 +313,6 @@ class ToolsToolbar(gtk.Toolbar=
):<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self._tool_eras=
er =3D ToolButton('tool-eraser')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.i=
nsert(self._tool_eraser, -1)<br>
-=A0=A0=A0=A0=A0=A0=A0 self._tool_eraser.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0=
self._tool_eraser.set_tooltip(_('Eraser'))<br>=A0=A0=A0=A0=A0=A0=
=A0=A0 try:<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self._configure_palette=
(self._tool_eraser, self._TOOL_ERASER)<br>@@ -332,7 +321,6 @@ class ToolsTo=
olbar(gtk.Toolbar):<br>
=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self._tool_polygon =
=3D ToolButton('tool-polygon')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.ins=
ert(self._tool_polygon, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 self._tool_polygon.sh=
ow()<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._tool_polygon.set_tooltip(_('Poly=
gon'))<br>
=A0=A0=A0=A0=A0=A0=A0=A0 try:<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self.=
_configure_palette(self._tool_polygon, self._TOOL_POLYGON)<br>@@ -341,13 +3=
29,11 @@ class ToolsToolbar(gtk.Toolbar):<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=
=A0=A0=A0=A0=A0=A0=A0=A0 self._tool_bucket =3D ToolButton('tool-bucket&=
#39;)<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(self._tool_bucket, -1)<br>-=A0=A0=A0=
=A0=A0=A0=A0 self._tool_bucket.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._too=
l_bucket.set_tooltip(_('Bucket'))<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=
=A0=A0=A0=A0=A0=A0=A0=A0 separator =3D gtk.SeparatorToolItem()<br>=A0=A0=A0=
=A0=A0=A0=A0=A0 separator.set_draw(True)<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(separator, -1)<br>-=A0=A0=A0=A0=A0=A0=
=A0 separator.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=
=A0 """<br>=A0<br>@@ -370,11 +356,8 @@ class ToolsToolbar(gt=
k.Toolbar):<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self._=
tool_marquee_rectangular =3D ToolButton('tool-marquee-rectangular')=
<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(self._tool_marquee_rectangular, -1)<br=
>-=A0=A0=A0=A0=A0=A0=A0 self._tool_marquee_rectangular.show()<br>=A0=A0=A0=
=A0=A0=A0=A0=A0 self._tool_marquee_rectangular.set_tooltip(_('Rectangul=
ar Marquee'))<br>-=A0=A0=A0=A0=A0=A0=A0 <br>-=A0=A0=A0=A0=A0=A0=A0 self=
._icon_stroke.connect('clicked', self._on_icon_stroke_clicked)<br>
-=A0=A0=A0=A0=A0=A0=A0 <br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <=
br>=A0=A0=A0=A0=A0=A0=A0=A0 # New connect method<br>=A0=A0=A0=A0=A0=A0=A0=
=A0 # Using dictionnaries to control tool's properties<br>=A0=A0=A0=A0=
=A0=A0=A0=A0 self._tool_polygon.connect('clicked', self.set_tool, s=
elf._TOOL_POLYGON)<br>
@@ -544,8 +527,6 @@ class ToolsToolbar(gtk.Toolbar):<br>=A0=A0=A0=A0=A0=A0=
=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 #setting cursor: Moved to Area<br>=A0=
=A0=A0=A0=A0=A0=A0=A0 <br>-=A0=A0=A0 def _on_icon_stroke_clicked(self, widg=
et, data=3DNone):<br>-=A0=A0=A0=A0=A0=A0=A0 self._stroke_color.clicked()<br=
>
=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0 def _on_fill_checkbutton_toggled(=
self, checkbutton, button=3DNone, tool=3DNone):<br>=A0=A0=A0=A0=A0=A0=A0=A0=
logging.debug('Checkbutton is Active: %s', checkbutton.get_active(=
) )<br>@@ -584,10 +565,10 @@ class ToolsToolbar(gtk.Toolbar):<br>
=A0<br>=A0<br>=A0##Class to manage the Fill Color of a Button<br>-class But=
tonFillColor(gtk.ColorButton):<br>+class ButtonFillColor(ColorToolButton):<=
br>=A0=A0=A0=A0 ##The Constructor<br>=A0=A0=A0=A0 def __init__(self, activi=
ty):<br>-=A0=A0=A0=A0=A0=A0=A0 gtk.ColorButton.__init__(self)<br>
+=A0=A0=A0=A0=A0=A0=A0 ColorToolButton.__init__(self)<br>=A0=A0=A0=A0=A0=A0=
=A0=A0 self._activity =3D activity<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=
=A0=A0=A0=A0=A0=A0 self.connect('color-set', self._color_button_cb)=
<br>@@ -605,10 +586,10 @@ class ButtonFillColor(gtk.ColorButton):<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self._activity.area.set_fill_color(new_color)<br>=
=A0<br>=A0##Class to manage the Stroke Color of a Button<br>-class ButtonSt=
rokeColor(gtk.ColorButton):<br>+class ButtonStrokeColor(ColorToolButton):<b=
r>=A0=A0=A0=A0 ##The Constructor<br>
=A0=A0=A0=A0 def __init__(self, activity):<br>-=A0=A0=A0=A0=A0=A0=A0 gtk.Co=
lorButton.__init__(self)<br>+=A0=A0=A0=A0=A0=A0=A0 ColorToolButton.__init__=
(self)<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._activity =3D activity<br>=A0=A0=A0=
=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self.connect('color-set=
9;, self._color_button_cb)<br>
@@ -743,39 +724,26 @@ class ShapesToolbar(gtk.Toolbar):<br>=A0<br>=A0=A0=A0=
=A0=A0=A0=A0=A0 self._activity =3D activity<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br=
>-=A0=A0=A0=A0=A0=A0=A0 self._icon_fill =3D ToolButton('icon-fill')=
<br>-=A0=A0=A0=A0=A0=A0=A0 self.insert(self._icon_fill, -1)<br>
-=A0=A0=A0=A0=A0=A0=A0 self._icon_fill.show()<br>-=A0=A0=A0=A0=A0=A0=A0 sel=
f._icon_fill.set_tooltip(_('Fill Color'))<br>-=A0=A0=A0=A0=A0=A0=A0=
<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._fill_color =3D ButtonFillColor(activity=
)<br>-=A0=A0=A0=A0=A0=A0=A0 self._fill_color.show()<br>+=A0=A0=A0=A0=A0=A0=
=A0 self._fill_color.set_icon_name('icon-fill')<br>
+=A0=A0=A0=A0=A0=A0=A0 self._fill_color.set_title(_('Fill Color'))<=
br>=A0=A0=A0=A0=A0=A0=A0=A0 item =3D gtk.ToolItem()<br>=A0=A0=A0=A0=A0=A0=
=A0=A0 item.add(self._fill_color)<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(i=
tem, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 item.show()<br>-=A0=A0=A0=A0=A0=A0=A0 <b=
r>-=A0=A0=A0=A0=A0=A0=A0 self._icon_stroke =3D ToolButton('icon-stroke&=
#39;)<br>
-=A0=A0=A0=A0=A0=A0=A0 self.insert(self._icon_stroke, -1)<br>-=A0=A0=A0=A0=
=A0=A0=A0 self._icon_stroke.show()<br>-=A0=A0=A0=A0=A0=A0=A0 self._icon_str=
oke.set_tooltip(_('Stroke Color'))<br>-=A0=A0=A0=A0=A0=A0=A0 <br>=
=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self._stroke_color =
=3D ButtonStrokeColor(activity)<br>
-=A0=A0=A0=A0=A0=A0=A0 self._stroke_color.show()<br>+=A0=A0=A0=A0=A0=A0=A0 =
self._stroke_color.set_icon_name('icon-stroke')<br>+=A0=A0=A0=A0=A0=
=A0=A0 self._stroke_color.set_title(_('Stroke Color'))<br>=A0=A0=A0=
=A0=A0=A0=A0=A0 item =3D gtk.ToolItem()<br>=A0=A0=A0=A0=A0=A0=A0=A0 item.ad=
d(self._stroke_color)<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(item, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 it=
em.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 separato=
r =3D gtk.SeparatorToolItem()<br>=A0=A0=A0=A0=A0=A0=A0=A0 separator.set_dra=
w(True)<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(separator, -1)<br>-=A0=A0=
=A0=A0=A0=A0=A0 separator.show()<br>
=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._shape_ellipse =3D ToolButton('too=
l-shape-ellipse')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(self._shape_e=
llipse, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 self._shape_ellipse.show()<br>=A0=A0=
=A0=A0=A0=A0=A0=A0 self._shape_ellipse.set_tooltip(_('Ellipse'))<br=
>
=A0=A0=A0=A0=A0=A0=A0=A0 try:<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self.=
_configure_palette_shape_ellipse()<br>@@ -784,7 +752,6 @@ class ShapesToolb=
ar(gtk.Toolbar):<br>=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._shape_rectangle =
=3D ToolButton('tool-shape-rectangle')<br>=A0=A0=A0=A0=A0=A0=A0=A0 =
self.insert(self._shape_rectangle, -1)<br>
-=A0=A0=A0=A0=A0=A0=A0 self._shape_rectangle.show()<br>=A0=A0=A0=A0=A0=A0=
=A0=A0 self._shape_rectangle.set_tooltip(_('Rectangle'))<br>=A0=A0=
=A0=A0=A0=A0=A0=A0 try:<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self._confi=
gure_palette_shape_rectangle()<br>@@ -793,7 +760,6 @@ class ShapesToolbar(g=
tk.Toolbar):<br>
=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self._shape_line =3D =
ToolButton('tool-shape-line')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.inse=
rt(self._shape_line, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 self._shape_line.show()<=
br>=A0=A0=A0=A0=A0=A0=A0=A0 self._shape_line.set_tooltip(_('Line'))=
<br>
=A0=A0=A0=A0=A0=A0=A0=A0 try:<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self.=
_configure_palette_shape_line()<br>@@ -802,7 +768,6 @@ class ShapesToolbar(=
gtk.Toolbar):<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self=
._shape_polygon =3D ToolButton('tool-shape-polygon')<br>=A0=A0=A0=
=A0=A0=A0=A0=A0 self.insert(self._shape_polygon, -1)<br>
-=A0=A0=A0=A0=A0=A0=A0 self._shape_polygon.show()<br>=A0=A0=A0=A0=A0=A0=A0=
=A0 self._shape_polygon.set_tooltip(_('Polygon'))<br>=A0=A0=A0=A0=
=A0=A0=A0=A0 try:<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self._configure_p=
alette_shape_polygon()<br>@@ -820,7 +785,6 @@ class ShapesToolbar(gtk.Toolb=
ar):<br>
=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._shape_heart =3D ToolButton('tool-=
shape-heart')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(self._shape_heart=
, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 self._shape_heart.show()<br>=A0=A0=A0=A0=A0=
=A0=A0=A0 self._shape_heart.set_tooltip(_('Heart'))<br>
=A0=A0=A0=A0=A0=A0=A0=A0 try:<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self.=
_configure_palette_shape_heart()<br>@@ -830,7 +794,6 @@ class ShapesToolbar=
(gtk.Toolbar):<br>=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._shape_parallelogram=
=3D ToolButton('tool-shape-parallelogram')<br>=A0=A0=A0=A0=A0=A0=
=A0=A0 self.insert(self._shape_parallelogram, -1)<br>
-=A0=A0=A0=A0=A0=A0=A0 self._shape_parallelogram.show()<br>=A0=A0=A0=A0=A0=
=A0=A0=A0 self._shape_parallelogram.set_tooltip(_('Parallelogram'))=
<br>=A0=A0=A0=A0=A0=A0=A0=A0 try:<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 s=
elf._configure_palette_shape_parallelogram()<br>@@ -839,7 +802,6 @@ class S=
hapesToolbar(gtk.Toolbar):<br>
=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._shape_arrow =3D ToolButton('tool-=
shape-arrow')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(self._shape_arrow=
, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 self._shape_arrow.show()<br>=A0=A0=A0=A0=A0=
=A0=A0=A0 self._shape_arrow.set_tooltip(_('Arrow'))<br>
=A0=A0=A0=A0=A0=A0=A0=A0 try:<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self.=
_configure_palette_shape_arrow()<br>@@ -848,7 +810,6 @@ class ShapesToolbar=
(gtk.Toolbar):<br>=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._shape_star =3D Tool=
Button('tool-shape-star')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(s=
elf._shape_star, -1)<br>
-=A0=A0=A0=A0=A0=A0=A0 self._shape_star.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0 =
self._shape_star.set_tooltip(_('Star'))<br>=A0=A0=A0=A0=A0=A0=A0=A0=
try:<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self._configure_palette_shape=
_star()<br>@@ -857,7 +818,6 @@ class ShapesToolbar(gtk.Toolbar):<br>
=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._shape_trapezoid =3D ToolButton('t=
ool-shape-trapezoid')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(self._sha=
pe_trapezoid, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 self._shape_trapezoid.show()<br=
>=A0=A0=A0=A0=A0=A0=A0=A0 self._shape_trapezoid.set_tooltip(_('Trapezoi=
d'))<br>
=A0=A0=A0=A0=A0=A0=A0=A0 try:<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self.=
_configure_palette_shape_trapezoid()<br>@@ -866,7 +826,6 @@ class ShapesToo=
lbar(gtk.Toolbar):<br>=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._shape_triangle =
=3D ToolButton('tool-shape-triangle')<br>=A0=A0=A0=A0=A0=A0=A0=A0 s=
elf.insert(self._shape_triangle, -1)<br>
-=A0=A0=A0=A0=A0=A0=A0 self._shape_triangle.show()<br>=A0=A0=A0=A0=A0=A0=A0=
=A0 self._shape_triangle.set_tooltip(_('Triangle'))<br>=A0=A0=A0=A0=
=A0=A0=A0=A0 try:<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self._configure_p=
alette_shape_triangle()<br>@@ -874,9 +833,6 @@ class ShapesToolbar(gtk.Tool=
bar):<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 logging.debug('Could not create pa=
lette for Shape Triangle')<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=
=A0=A0=A0=A0 <br>-=A0=A0=A0=A0=A0=A0=A0 self._icon_stroke.connect('clic=
ked', self._on_icon_stroke_clicked)<br>-=A0=A0=A0=A0=A0=A0=A0 self._ico=
n_fill.connect('clicked', self._on_icon_fill_clicked)<br>
-<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._shape_arrow.connect('clicked', =
self.set_tool, self._SHAPE_ARROW)<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._shape_e=
llipse.connect('clicked', self.set_tool, self._SHAPE_ELLIPSE)<br>=
=A0=A0=A0=A0=A0=A0=A0=A0 #self._shape_freeform.connect('clicked', s=
elf.set_tool, self._SHAPE_FREEFORM)<br>
@@ -902,15 +858,7 @@ class ShapesToolbar(gtk.Toolbar):<br>=A0=A0=A0=A0=A0=
=A0=A0=A0 self._activity.area.set_tool(tool)<br>=A0=A0=A0=A0=A0=A0=A0=A0 <b=
r>=A0=A0=A0=A0=A0=A0=A0=A0 #setting cursor: moved to Area<br>-=A0=A0=A0=A0=
=A0=A0=A0 <br>-=A0=A0=A0=A0=A0=A0=A0 <br>-=A0=A0=A0 def _on_icon_stroke_cli=
cked(self, widget, data=3DNone):<br>
-=A0=A0=A0=A0=A0=A0=A0 self._stroke_color.clicked()<br>-=A0=A0=A0=A0=A0=A0=
=A0 <br>-=A0=A0=A0 def _on_icon_fill_clicked(self, widget, data=3DNone):<br=
>-=A0=A0=A0=A0=A0=A0=A0 self._fill_color.clicked()<br>-=A0=A0=A0=A0=A0=A0=
=A0 <br>-=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0 def _on_vertices_value_chan=
ged(self, spinbutton, tool):<br>
=A0=A0=A0=A0=A0=A0=A0=A0 #self._activity.area.polygon_sides =3D spinbutton.=
get_value_as_int()<br>=A0=A0=A0=A0=A0=A0=A0=A0 tool['vertices'] =3D=
spinbutton.get_value_as_int()<br>@@ -1100,21 +1048,17 @@ class TextToolbar=
(gtk.Toolbar):<br>=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._text =3D ToolButton=
('text')<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(self._text, -1)<br>-=A0=A0=A0=A0=A0=A0=
=A0 self._text.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._text.set_tooltip(_(=
'Type'))<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._text.connect('clicke=
d', self.set_tool, self._ACTION_TEXT)<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>
=A0=A0=A0=A0=A0=A0=A0=A0 self._text_color =3D ButtonFillColor(activity)<br>=
-=A0=A0=A0=A0=A0=A0=A0 self._text_color.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0 =
item =3D gtk.ToolItem()<br>=A0=A0=A0=A0=A0=A0=A0=A0 item.add(self._text_col=
or)<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(item, -1)<br>-=A0=A0=A0=A0=A0=
=A0=A0 item.show()<br>
=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 separator =3D gtk.Sep=
aratorToolItem()<br>=A0=A0=A0=A0=A0=A0=A0=A0 separator.set_draw(True)<br>=
=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(separator, -1)<br>-=A0=A0=A0=A0=A0=A0=
=A0 separator.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=
=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 """<br>
@@ -1171,32 +1115,27 @@ class ImageToolbar(gtk.Toolbar):<br>=A0=A0=A0=A0=A0=
=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self._object_insert =3D ToolButton(&=
#39;object-insert')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(self._objec=
t_insert, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 self._object_insert.show()<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self._object_insert.set_tooltip(_('Insert Imag=
e'))<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 separator=
=3D gtk.SeparatorToolItem()<br>=A0=A0=A0=A0=A0=A0=A0=A0 separator.set_draw=
(True)<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(separator, -1)<br>-=A0=A0=A0=
=A0=A0=A0=A0 separator.show()<br>
=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self.width_percent =
=3D 1.<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.height_percent =3D 1.<br>=A0=A0=A0=
=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self._object_rotate_left =3D T=
oolButton('object-rotate-left')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.in=
sert(self._object_rotate_left, -1)<br>
-=A0=A0=A0=A0=A0=A0=A0 self._object_rotate_left.show()<br>=A0=A0=A0=A0=A0=
=A0=A0=A0 self._object_rotate_left.set_tooltip(_('Rotate Left'))<br=
>=A0=A0=A0=A0=A0=A0=A0=A0 self._object_rotate_left.set_sensitive( self._act=
ivity.area.is_selected() )<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=
=A0=A0=A0 self._object_rotate_right =3D ToolButton('object-rotate-right=
')<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(self._object_rotate_right, -1)<br>-=A0=
=A0=A0=A0=A0=A0=A0 self._object_rotate_right.show()<br>=A0=A0=A0=A0=A0=A0=
=A0=A0 self._object_rotate_right.set_tooltip(_('Rotate Right'))<br>=
=A0=A0=A0=A0=A0=A0=A0=A0 self._object_rotate_right.set_sensitive( self._act=
ivity.area.is_selected() )<br>
=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self._object_height =
=3D ToolButton('object-height')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.in=
sert(self._object_height, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 self._object_height=
.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._object_height.set_tooltip(_('=
Height'))=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <br>
=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 height_spinButton =3D self._create_spinButt=
on(self._object_height, 'object-height', activity)<br>@@ -1204,11 +=
1143,9 @@ class ImageToolbar(gtk.Toolbar):<br>=A0=A0=A0=A0=A0=A0=A0=A0 item=
=3D gtk.ToolItem()<br>=A0=A0=A0=A0=A0=A0=A0=A0 item.add(height_spinButton)=
<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(item, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 it=
em.show()<br>=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._object_width =3D ToolBut=
ton('object-width')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(self._o=
bject_width, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 self._object_width.show()<br>=A0=
=A0=A0=A0=A0=A0=A0=A0 self._object_width.set_tooltip(_('Width'))<br=
>
=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 width_spinButton =3D self._create_spinButto=
n(self._object_width, 'object-width', activity)<br>@@ -1216,7 +1153=
,6 @@ class ImageToolbar(gtk.Toolbar):<br>=A0=A0=A0=A0=A0=A0=A0=A0 item =3D=
gtk.ToolItem()<br>=A0=A0=A0=A0=A0=A0=A0=A0 item.add(width_spinButton)<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(item, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 it=
em.show()<br>=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._object_insert.connect(&#=
39;clicked', self.insertImage, activity)<br>=A0=A0=A0=A0=A0=A0=A0=A0 se=
lf._object_rotate_left.connect('clicked', self.rotate_left, activit=
y)<br>
@@ -1350,18 +1286,15 @@ class EffectsToolbar(gtk.Toolbar):<br>=A0<br>=A0=A0=
=A0=A0=A0=A0=A0=A0 self._effect_grayscale =3D ToolButton('effect-graysc=
ale')<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(self._effect_grayscale, -=
1)<br>-=A0=A0=A0=A0=A0=A0=A0 self._effect_grayscale.show()<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self._effect_grayscale.set_tooltip(_('Grayscal=
e'))<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 self._eff=
ect_rainbow =3D ToolButton('effect-rainbow')<br>=A0=A0=A0=A0=A0=A0=
=A0=A0 self.insert(self._effect_rainbow, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 self=
._effect_rainbow.show()<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self._effect_rainbow.set_tooltip(_('Rainbow=
9;))<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._configure_palette(self._effect_rainb=
ow, self._EFFECT_RAINBOW)<br>=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0 sepa=
rator =3D gtk.SeparatorToolItem()<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(s=
eparator, -1)<br>
-=A0=A0=A0=A0=A0=A0=A0 separator.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=
=A0=A0=A0=A0=A0=A0=A0 """<br>=A0=A0=A0=A0=A0=A0=A0=A0 #FIXME=
: Must be implemented<br>@@ -1504,20 +1437,16 @@ class ViewToolbar(gtk.Tool=
bar):<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._view_percent.set_active(0)<br>=A0=
=A0=A0=A0=A0=A0=A0=A0 self._view_percent.connect('changed', self._c=
ombo_changed_cb)<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(tool_item, -1)<br>-=A0=A0=A0=A0=A0=A0=
=A0 tool_item.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=
=A0 separator =3D gtk.SeparatorToolItem()<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.=
insert(separator, -1)<br>-=A0=A0=A0=A0=A0=A0=A0 separator.show()<br>=A0<br>=
=A0=A0=A0=A0=A0=A0=A0=A0 self._zoom_plus =3D ToolButton('zoom-plus'=
)<br>
=A0=A0=A0=A0=A0=A0=A0=A0 self.insert(self._zoom_plus, -1)<br>-=A0=A0=A0=A0=
=A0=A0=A0 self._zoom_plus.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0 self._zoom_plu=
s.set_tooltip(_('ZOOM +'))<br>=A0<br>=A0=A0=A0=A0=A0=A0=A0=A0 self.=
_zoom_minus =3D ToolButton('zoom-minus')<br>=A0=A0=A0=A0=A0=A0=A0=
=A0 self.insert(self._zoom_minus, -1)<br>
-=A0=A0=A0=A0=A0=A0=A0 self._zoom_minus.show()<br>=A0=A0=A0=A0=A0=A0=A0=A0 =
self._zoom_minus.set_tooltip(_('ZOOM -'))<br>=A0<br>=A0=A0=A0=A0=A0=
=A0=A0=A0 '''<br>-- <br>1.6.6.1<br><br><br><br><div class=3D"gm=
ail_quote">On Mon, May 17, 2010 at 7:43 PM, James Cameron <span dir=3D"ltr"=
><<a href=3D"mailto:quozl at laptop.org">quozl at laptop.org</a>></span> wr=
ote:<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class=3D"im"=
>On Mon, May 17, 2010 at 11:32:13AM -0300, Gonzalo Odiard wrote:<br>
> Sorry, i have did "diff -ur" comparing directories. I must u=
se git to<br>
> do the patch?<br>
<br>
</div>There are several ways to do the patch, using git makes it easiest fo=
r<br>
those other people who must read your patch. =A0You don't have to make =
it<br>
easy, but it helps. =A0It is like writing neatly.<br>
<br>
Here's how to make a patch using git ...<br>
<br>
$ git clone git://<a href=3D"http://git.sugarlabs.org/paint/mainline.git" t=
arget=3D"_blank">git.sugarlabs.org/paint/mainline.git</a> paint.git<br>
$ cd paint.git<br>
$ ... change the files you want to change ...<br>
$ git commit -a -m 'fix #1015'<br>
$ git format-patch -1<br>
0001-fix-1015.patch<br>
<br>
Then include that patch file in your e-mail, or use the file as the<br>
basis for an e-mail. =A0Avoid "attach".<br>
<font color=3D"#888888"><br>
--<br>
</font><div><div></div><div class=3D"h5">James Cameron<br>
<a href=3D"http://quozl.linux.org.au/" target=3D"_blank">http://quozl.linux=
.org.au/</a><br>
</div></div></blockquote></div><br><br>
--000e0cd5cb00c378b60486d2cfce--
More information about the Sugar-devel
mailing list