Hello:<br>A new patch to Paint. I don&#39;t know who is the mainteiner of this activity.<br>Who can commit these changes and close the bugs?<br>Thanks <br><br>Gonzalo<br><br>From f4a375b4861ca084ee03089751de82fc61233997 Mon Sep 17 00:00:00 2001<br>
From: Gonzalo Odiard &lt;<a href="mailto:godiard@gmail.com">godiard@gmail.com</a>&gt;<br>Date: Thu, 20 May 2010 01:12:54 -0300<br>Subject: [PATCH] fix #931<br><br>---<br> Area.py    |    5 +++--<br> toolbox.py |   19 ++++++++++++++++++-<br>
 2 files changed, 21 insertions(+), 3 deletions(-)<br><br>diff --git a/Area.py b/Area.py<br>index 613e66e..611f944 100644<br>--- a/Area.py<br>+++ b/Area.py<br>@@ -155,6 +155,7 @@ class Area(gtk.DrawingArea):<br>         self.line_shape = &#39;circle&#39;<br>
         self.last = []<br>         self.rainbow_counter = 0<br>+        self.keep_aspect_ratio = False<br>                 <br>         self.font = pango.FontDescription(&#39;Sans 9&#39;)<br>         self._set_selection_bounds(0,0,0,0)<br>
@@ -378,7 +379,7 @@ class Area(gtk.DrawingArea):<br>                     self.d.square(widget,event,coords,True,self.tool[&#39;fill&#39;])<br>                     <br>                 elif self.tool[&#39;name&#39;] == &#39;marquee-rectangular&#39; and not self.selmove:<br>
-                    if state &amp; gtk.gdk.CONTROL_MASK:<br>+                    if (state &amp; gtk.gdk.CONTROL_MASK) or self.keep_aspect_ratio:<br>                         coords = self._keep_selection_ratio(coords)<br>
                     self.d.selection(widget,coords)<br>                 # selected<br>@@ -462,7 +463,7 @@ class Area(gtk.DrawingArea):<br> <br>             elif self.tool[&#39;name&#39;] == &#39;marquee-rectangular&#39;:<br>
                 if self.selmove == False:<br>-                    if event.state &amp; gtk.gdk.CONTROL_MASK:<br>+                    if (event.state &amp; gtk.gdk.CONTROL_MASK) or self.keep_aspect_ratio:<br>                         coords = self._keep_selection_ratio(coords)<br>
                     self.d.selection(widget,coords,False)<br>                     self.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.FLEUR))<br>diff --git a/toolbox.py b/toolbox.py<br>index 3962b90..6a01a72 100644<br>--- a/toolbox.py<br>
+++ b/toolbox.py<br>@@ -357,6 +357,11 @@ class ToolsToolbar(gtk.Toolbar):<br>         self._tool_marquee_rectangular = ToolButton(&#39;tool-marquee-rectangular&#39;)<br>         self.insert(self._tool_marquee_rectangular, -1)<br>
         self._tool_marquee_rectangular.set_tooltip(_(&#39;Rectangular Marquee&#39;))<br>+        try:<br>+            self._configure_palette(self._tool_marquee_rectangular, self._TOOL_MARQUEE_RECTANGULAR)<br>+        except:<br>
+            logging.debug(&#39;Could not create palette for tool Rectangular Marquee&#39;)<br>+<br>                 <br>         # New connect method<br>         # Using dictionnaries to control tool&#39;s properties<br>
@@ -483,7 +488,7 @@ class ToolsToolbar(gtk.Toolbar):<br>             label.show()<br>             <br>             colorbutton = ButtonFillColor(self._activity)<br>-            colorbutton.show()<br>+            colorbutton.show_all()<br>
             <br>             hbox.pack_start(label)<br>             hbox.pack_start(colorbutton)<br>@@ -493,8 +498,20 @@ class ToolsToolbar(gtk.Toolbar):<br>             content_box.pack_start(hbox)<br>             <br>             colorbutton.connect_after(&#39;color-set&#39;, self._on_color_set, self._TOOL_POLYGON)<br>
+        if tool[&#39;name&#39;] is self._TOOL_MARQUEE_RECTANGULAR[&#39;name&#39;]:<br>+            # Creating a CheckButton named &quot;Fill&quot;.<br>+            keep_aspect_checkbutton = gtk.CheckButton(_(&#39;Keep aspect&#39;))<br>
+            keep_aspect_checkbutton.show()<br>+            keep_aspect_checkbutton.set_active(self._activity.area.keep_aspect_ratio)<br>+            <br>+            keep_aspect_checkbutton.connect(&#39;toggled&#39;, self._keep_aspect_checkbutton_toggled, widget)<br>
+            palette.action_bar.pack_start(keep_aspect_checkbutton)<br>     <br> <br>+    def _keep_aspect_checkbutton_toggled(self, checkbutton, button=None):<br>+        logging.debug(&#39;Keep aspect is Active: %s&#39;, checkbutton.get_active())<br>
+        self._activity.area.keep_aspect_ratio = checkbutton.get_active()<br>+<br>     def set_shape(self, widget=None, tool=None, shape=None):<br>         &quot;&quot;&quot;<br>         Set a tool shape according to user choice at Tool Palette<br>
-- <br>1.6.6.1<br><br clear="all"><br>-- <br>Gonzalo Odiard<br>Responsable de Desarrollo<br>Sistemas Australes<br><br>