<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[116754] trunk/dports/graphics/gimp2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/116754">116754</a></dd>
<dt>Author</dt> <dd>devans@macports.org</dd>
<dt>Date</dt> <dd>2014-02-05 15:41:12 -0800 (Wed, 05 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>gimp2: apply latest upstream patches, intltool configuration, increment revision.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsgimp2Portfile">trunk/dports/graphics/gimp2/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsgimp2filespatchICCprofilewithlongdescriptionbz723177diff">trunk/dports/graphics/gimp2/files/patch-ICC-profile-with-long-description-bz723177.diff</a></li>
<li><a href="#trunkdportsgraphicsgimp2filespatchcrashremovingtagfrompalettebz722975diff">trunk/dports/graphics/gimp2/files/patch-crash-removing-tag-from-palette-bz722975.diff</a></li>
<li><a href="#trunkdportsgraphicsgimp2filespatchdontresetbrushsizebeforeeachpaintstrokebz721249diff">trunk/dports/graphics/gimp2/files/patch-dont-reset-brush-size-before-each-paint-stroke-bz721249.diff</a></li>
<li><a href="#trunkdportsgraphicsgimp2filespatchhalttransformtoolwhenswitchingdiff">trunk/dports/graphics/gimp2/files/patch-halt-transform-tool-when-switching.diff</a></li>
<li><a href="#trunkdportsgraphicsgimp2filespatchpluginsbmpdontcheckbiClrUsedbz697431diff">trunk/dports/graphics/gimp2/files/patch-plugins-bmp-dont-check-biClrUsed-bz697431.diff</a></li>
<li><a href="#trunkdportsgraphicsgimp2filespatchremoveconfirmonclosepreferencediff">trunk/dports/graphics/gimp2/files/patch-remove-confirm-on-close-preference.diff</a></li>
<li><a href="#trunkdportsgraphicsgimp2filespatchsnappingbehaviorscaletoolbz722034diff">trunk/dports/graphics/gimp2/files/patch-snapping-behavior-scale-tool-bz722034.diff</a></li>
<li><a href="#trunkdportsgraphicsgimp2filespatchwritingcharacterconstantsbz721775diff">trunk/dports/graphics/gimp2/files/patch-writing-character-constants-bz721775.diff</a></li>
<li><a href="#trunkdportsgraphicsgimp2filespatchwrongnametransfertooldialogsbz701159diff">trunk/dports/graphics/gimp2/files/patch-wrong-name-transfer-tool-dialogs-bz701159.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsgraphicsgimp2Portfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/graphics/gimp2/Portfile (116753 => 116754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/Portfile        2014-02-05 23:37:41 UTC (rev 116753)
+++ trunk/dports/graphics/gimp2/Portfile        2014-02-05 23:41:12 UTC (rev 116754)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> conflicts       gimp2-devel gimp3-devel
</span><span class="cx"> # please remember to update the gimp metapackage to match
</span><span class="cx"> version         2.8.10
</span><del>-revision        5
</del><ins>+revision        6
</ins><span class="cx"> license         {GPL-2+ LGPL}
</span><span class="cx"> categories      graphics
</span><span class="cx"> maintainers     devans
</span><span class="lines">@@ -102,6 +102,15 @@
</span><span class="cx">                 patch-gimp-paint-options-set-default-brush-size.diff \
</span><span class="cx">                 patch-remove-accelerator-markers-python-fu-tooltips.diff \
</span><span class="cx">                 patch-create-filechooserbutton-bz699978.diff \
</span><ins>+                patch-crash-removing-tag-from-palette-bz722975.diff \
+                patch-ICC-profile-with-long-description-bz723177.diff \
+                patch-remove-confirm-on-close-preference.diff \
+                patch-snapping-behavior-scale-tool-bz722034.diff \
+                patch-plugins-bmp-dont-check-biClrUsed-bz697431.diff \
+                patch-dont-reset-brush-size-before-each-paint-stroke-bz721249.diff \
+                patch-writing-character-constants-bz721775.diff \
+                patch-halt-transform-tool-when-switching.diff \
+                patch-wrong-name-transfer-tool-dialogs-bz701159.diff \
</ins><span class="cx">                 patch-plug-ins-twain-tw_mac.c.diff
</span><span class="cx"> 
</span><span class="cx"> # gcc-4.2 5493 and 5666.3_13: gimpcpuaccel.c:180: error: can't find a register in class 'BREG' while reloading 'asm'
</span><span class="lines">@@ -140,7 +149,12 @@
</span><span class="cx"> #     It doesn't build any more anyways:
</span><span class="cx"> #         https://trac.macports.org/ticket/35168
</span><span class="cx"> 
</span><del>-# Don't do intltool's INTLTOOL_PERL dance
</del><ins>+# update m4macros/intltool.m4 and autoreconf
+
+post-patch {
+    copy -force ${prefix}/share/aclocal/intltool.m4 ${worksrcpath}/m4macros
+}
+
</ins><span class="cx"> use_autoreconf  yes
</span><span class="cx"> autoreconf.args -fvi
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkdportsgraphicsgimp2filespatchICCprofilewithlongdescriptionbz723177diff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/gimp2/files/patch-ICC-profile-with-long-description-bz723177.diff (0 => 116754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/files/patch-ICC-profile-with-long-description-bz723177.diff                                (rev 0)
+++ trunk/dports/graphics/gimp2/files/patch-ICC-profile-with-long-description-bz723177.diff        2014-02-05 23:41:12 UTC (rev 116754)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+From 8b6b6add69d3f0d66287a3d2b4e951f28e0d7103 Mon Sep 17 00:00:00 2001
+From: Michael Natterer &lt;mitch@gimp.org&gt;
+Date: Tue, 28 Jan 2014 17:54:46 +0000
+Subject: Bug 723177 - After opening an ICC profile with a long description...
+
+...dialogs are too wide
+
+Ellipsize GimpColorProfileComboBox' label.
+
+(cherry picked from commit 219bf3529942f9b12d65cf93705dbeaf0a9812cb)
+---
+diff --git a/libgimpwidgets/gimpcolorprofilecombobox.c b/libgimpwidgets/gimpcolorprofilecombobox.c
+index 10bde3a..0a1b319 100644
+--- libgimpwidgets/gimpcolorprofilecombobox.c
++++ libgimpwidgets/gimpcolorprofilecombobox.c
+@@ -130,6 +130,11 @@ gimp_color_profile_combo_box_init (GimpColorProfileComboBox *combo_box)
+ {
+   GtkCellRenderer *cell = gtk_cell_renderer_text_new ();

++  g_object_set (cell,
++                &quot;ellipsize&quot;, PANGO_ELLIPSIZE_END,
++                NULL);
++
++
+   gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), cell, TRUE);
+   gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), cell,
+                                   &quot;text&quot;, GIMP_COLOR_PROFILE_STORE_LABEL,
+--
+cgit v0.9.2
</ins></span></pre></div>
<a id="trunkdportsgraphicsgimp2filespatchcrashremovingtagfrompalettebz722975diff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/gimp2/files/patch-crash-removing-tag-from-palette-bz722975.diff (0 => 116754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/files/patch-crash-removing-tag-from-palette-bz722975.diff                                (rev 0)
+++ trunk/dports/graphics/gimp2/files/patch-crash-removing-tag-from-palette-bz722975.diff        2014-02-05 23:41:12 UTC (rev 116754)
</span><span class="lines">@@ -0,0 +1,146 @@
</span><ins>+From 2ec7e24d805d1f524fe455ed08ac641c5244a6e6 Mon Sep 17 00:00:00 2001
+From: Michael Natterer &lt;mitch@gimp.org&gt;
+Date: Sun, 26 Jan 2014 20:03:28 +0000
+Subject: Bug 722975 - crash when removing tag from palette while filtering by same tag
+
+Each of the following cleans up tag refcounting, fixes access to
+released memory, or other small glitches. Not sure which change
+actually fixed the bug:
+
+gimp_data_remove_tag(): remove the found tag, not the passed in tag
+(which is to be treated only as a value for comparison).
+
+gimp_tagged_remove_tag(): don't continue the loop after the tag to
+remove has been found, there can only be one matching tag, and the
+list element has become invalid.
+
+gimptagentry.c: keep references around for the members of
+entry-&gt;common_tags, and make sure the references are always dropped
+properly. In assign_tags(), reference the &quot;add&quot; and &quot;remove&quot; lists for
+paranoia and safety reasons.
+
+(cherry picked from commit 7fca15c27dd944890a67bb6db90c0b1fd4238f2f)
+---
+diff --git a/app/core/gimpdata.c b/app/core/gimpdata.c
+index 711d38f..76806ff 100644
+--- app/core/gimpdata.c
++++ app/core/gimpdata.c
+@@ -421,7 +421,7 @@ gimp_data_remove_tag (GimpTagged *tagged,
+       if (gimp_tag_equals (tag, this))
+         {
+           private-&gt;tags = g_list_delete_link (private-&gt;tags, list);
+-          g_object_unref (tag);
++          g_object_unref (this);
+           return TRUE;
+         }
+     }
+diff --git a/app/core/gimptagged.c b/app/core/gimptagged.c
+index 9c44940..b04304a 100644
+--- app/core/gimptagged.c
++++ app/core/gimptagged.c
+@@ -153,6 +153,8 @@ gimp_tagged_remove_tag (GimpTagged *tagged,
+             }

+           g_object_unref (tag_ref);
++
++          return;
+         }
+     }
+ }
+diff --git a/app/widgets/gimptagentry.c b/app/widgets/gimptagentry.c
+index 5593801..73227e1 100644
+--- app/widgets/gimptagentry.c
++++ app/widgets/gimptagentry.c
+@@ -227,7 +227,7 @@ gimp_tag_entry_dispose (GObject *object)

+   if (entry-&gt;common_tags)
+     {
+-      g_list_free (entry-&gt;common_tags);
++      g_list_free_full (entry-&gt;common_tags, (GDestroyNotify) g_object_unref);
+       entry-&gt;common_tags = NULL;
+     }

+@@ -761,7 +761,7 @@ gimp_tag_entry_assign_tags (GimpTagEntry *tag_entry)
+             }
+           else
+             {
+-              add_list = g_list_prepend (add_list, tag);
++              add_list = g_list_prepend (add_list, g_object_ref (tag));
+             }

+           common_tags = g_list_prepend (common_tags, tag);
+@@ -778,7 +778,8 @@ gimp_tag_entry_assign_tags (GimpTagEntry *tag_entry)
+       if (! g_list_find_custom (dont_remove_list, tag_iter-&gt;data,
+                                 gimp_tag_compare_func))
+         {
+-          remove_list = g_list_prepend (remove_list, tag_iter-&gt;data);
++          remove_list = g_list_prepend (remove_list,
++                                        g_object_ref (tag_iter-&gt;data));
+         }
+     }

+@@ -792,20 +793,20 @@ gimp_tag_entry_assign_tags (GimpTagEntry *tag_entry)

+       for (tag_iter = remove_list; tag_iter; tag_iter = g_list_next (tag_iter))
+         {
+-          gimp_tagged_remove_tag (tagged, GIMP_TAG (tag_iter-&gt;data));
++          gimp_tagged_remove_tag (tagged, tag_iter-&gt;data);
+         }

+       for (tag_iter = add_list; tag_iter; tag_iter = g_list_next (tag_iter))
+         {
+-          gimp_tagged_add_tag (tagged, GIMP_TAG (tag_iter-&gt;data));
++          gimp_tagged_add_tag (tagged, tag_iter-&gt;data);
+         }
+     }

+-  g_list_free (add_list);
+-  g_list_free (remove_list);
++  g_list_free_full (add_list, (GDestroyNotify) g_object_unref);
++  g_list_free_full (remove_list, (GDestroyNotify) g_object_unref);

+   /* common tags list with changes applied. */
+-  g_list_free (tag_entry-&gt;common_tags);
++  g_list_free_full (tag_entry-&gt;common_tags, (GDestroyNotify) g_object_unref);
+   tag_entry-&gt;common_tags = common_tags;
+ }

+@@ -903,7 +904,7 @@ gimp_tag_entry_set_selected_items (GimpTagEntry *tag_entry,

+   if (tag_entry-&gt;common_tags)
+     {
+-      g_list_free (tag_entry-&gt;common_tags);
++      g_list_free_full (tag_entry-&gt;common_tags, (GDestroyNotify) g_object_unref);
+       tag_entry-&gt;common_tags = NULL;
+     }

+@@ -956,7 +957,7 @@ gimp_tag_entry_load_selection (GimpTagEntry *tag_entry,
+         }
+     }

+-  g_hash_table_foreach (refcounts, gimp_tag_entry_find_common_tags,tag_entry);
++  g_hash_table_foreach (refcounts, gimp_tag_entry_find_common_tags, tag_entry);

+   g_hash_table_destroy (refcounts);

+@@ -996,7 +997,8 @@ gimp_tag_entry_find_common_tags (gpointer key,
+   /* FIXME: more efficient list length */
+   if (ref_count == g_list_length (tag_entry-&gt;selected_items))
+     {
+-      tag_entry-&gt;common_tags = g_list_prepend (tag_entry-&gt;common_tags, key);
++      tag_entry-&gt;common_tags = g_list_prepend (tag_entry-&gt;common_tags,
++                                               g_object_ref (key));
+     }
+ }

+@@ -1215,7 +1217,7 @@ gimp_tag_entry_container_changed (GimpContainer *container,
+         {
+           if (gimp_tagged_get_tags (GIMP_TAGGED (list-&gt;data)) &amp;&amp;
+               gimp_container_have (GIMP_CONTAINER (tag_entry-&gt;container),
+-                                   GIMP_OBJECT(list-&gt;data)))
++                                   GIMP_OBJECT (list-&gt;data)))
+             {
+               break;
+             }
+--
+cgit v0.9.2
</ins></span></pre></div>
<a id="trunkdportsgraphicsgimp2filespatchdontresetbrushsizebeforeeachpaintstrokebz721249diff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/gimp2/files/patch-dont-reset-brush-size-before-each-paint-stroke-bz721249.diff (0 => 116754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/files/patch-dont-reset-brush-size-before-each-paint-stroke-bz721249.diff                                (rev 0)
+++ trunk/dports/graphics/gimp2/files/patch-dont-reset-brush-size-before-each-paint-stroke-bz721249.diff        2014-02-05 23:41:12 UTC (rev 116754)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+From 6cb5fcafb04c515f8773f81d6867efcedd95688e Mon Sep 17 00:00:00 2001
+From: Michael Natterer &lt;mitch@gimp.org&gt;
+Date: Mon, 03 Feb 2014 22:05:56 +0000
+Subject: Bug 721249 - pdb.gimp_context_set_brush_size() dont't work
+
+Don't reset the brush size before each PDB paint stroke.
+
+(cherry picked from commit 9fe869236bbf178ac9699e0e789f78aa085e5ef6)
+---
+diff --git a/app/pdb/paint-tools-cmds.c b/app/pdb/paint-tools-cmds.c
+index d1d6de3..ba1c826 100644
+--- app/pdb/paint-tools-cmds.c
++++ app/pdb/paint-tools-cmds.c
+@@ -62,10 +62,6 @@ paint_tools_stroke (Gimp              *gimp,

+   n_strokes /= 2;  /* #doubles -&gt; #points */

+-  /* FIXME: i'm most certain that this is wrong, see bug 721249 --mitch */
+-  gimp_paint_options_set_default_brush_size (options,
+-                                             gimp_context_get_brush (context));
+-
+   /*  undefine the paint-relevant context properties and get them
+    *  from the current context
+    */
+diff --git a/tools/pdbgen/pdb/paint_tools.pdb b/tools/pdbgen/pdb/paint_tools.pdb
+index 8544a56..d084e25 100644
+--- tools/pdbgen/pdb/paint_tools.pdb
++++ tools/pdbgen/pdb/paint_tools.pdb
+@@ -987,10 +987,6 @@ paint_tools_stroke (Gimp              *gimp,

+   n_strokes /= 2;  /* #doubles -&gt; #points */

+-  /* FIXME: i'm most certain that this is wrong, see bug 721249 --mitch */
+-  gimp_paint_options_set_default_brush_size (options,
+-                                             gimp_context_get_brush (context));
+-
+   /*  undefine the paint-relevant context properties and get them
+    *  from the current context
+    */
+--
+cgit v0.9.2
</ins></span></pre></div>
<a id="trunkdportsgraphicsgimp2filespatchhalttransformtoolwhenswitchingdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/gimp2/files/patch-halt-transform-tool-when-switching.diff (0 => 116754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/files/patch-halt-transform-tool-when-switching.diff                                (rev 0)
+++ trunk/dports/graphics/gimp2/files/patch-halt-transform-tool-when-switching.diff        2014-02-05 23:41:12 UTC (rev 116754)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+From 72942f4e6b4aa25698b6432f7a20494f61ec3fca Mon Sep 17 00:00:00 2001
+From: Michael Natterer &lt;mitch@gimp.org&gt;
+Date: Tue, 04 Feb 2014 22:28:01 +0000
+Subject: app: halt the transform tool when switching layer|selection|path transform
+
+(cherry picked from commit 1335bc42c89c7b739bba54400b6adcee3abd7423)
+---
+diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c
+index 009659c..8c31222 100644
+--- app/tools/gimptransformtool.c
++++ app/tools/gimptransformtool.c
+@@ -667,12 +667,17 @@ gimp_transform_tool_options_notify (GimpTool         *tool,

+   GIMP_TOOL_CLASS (parent_class)-&gt;options_notify (tool, options, pspec);

++  if (! strcmp (pspec-&gt;name, &quot;type&quot;))
++    {
++      gimp_tool_control (tool, GIMP_TOOL_ACTION_HALT, tool-&gt;display);
++      return;
++    }
++
+   if (tr_tool-&gt;use_grid)
+     {
+       gimp_draw_tool_pause (GIMP_DRAW_TOOL (tr_tool));

+-      if (! strcmp (pspec-&gt;name, &quot;type&quot;) ||
+-          ! strcmp (pspec-&gt;name, &quot;direction&quot;))
++      if (! strcmp (pspec-&gt;name, &quot;direction&quot;))
+         {
+           if (tr_tool-&gt;function != TRANSFORM_CREATING)
+             {
+--
+cgit v0.9.2
</ins></span></pre></div>
<a id="trunkdportsgraphicsgimp2filespatchpluginsbmpdontcheckbiClrUsedbz697431diff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/gimp2/files/patch-plugins-bmp-dont-check-biClrUsed-bz697431.diff (0 => 116754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/files/patch-plugins-bmp-dont-check-biClrUsed-bz697431.diff                                (rev 0)
+++ trunk/dports/graphics/gimp2/files/patch-plugins-bmp-dont-check-biClrUsed-bz697431.diff        2014-02-05 23:41:12 UTC (rev 116754)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+From 76ee47eff95e8dfad303d473c8a54b15720c83c0 Mon Sep 17 00:00:00 2001
+From: Téo Mazars &lt;teomazars@gmail.com&gt;
+Date: Thu, 30 Jan 2014 19:31:26 +0000
+Subject: plug-ins: don't check biClrUsed if bpp &gt; 8 (in bug 697431)
+
+(cherry picked from commit 54f83a5ba273e45a9184f13d1f4b0f5697d56555)
+---
+diff --git a/plug-ins/file-bmp/bmp-read.c b/plug-ins/file-bmp/bmp-read.c
+index e59dfb8..f088a48 100644
+--- plug-ins/file-bmp/bmp-read.c
++++ plug-ins/file-bmp/bmp-read.c
+@@ -487,7 +487,7 @@ ReadBMP (const gchar  *name,
+       goto out;
+     }

+-  if (Bitmap_Head.biClrUsed &gt; 256)
++  if (Bitmap_Head.biClrUsed &gt; 256 &amp;&amp; Bitmap_Head.biBitCnt &lt;= 8)
+     {
+       g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+                    _(&quot;'%s' is not a valid BMP file&quot;),
+--
+cgit v0.9.2
</ins></span></pre></div>
<a id="trunkdportsgraphicsgimp2filespatchremoveconfirmonclosepreferencediff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/gimp2/files/patch-remove-confirm-on-close-preference.diff (0 => 116754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/files/patch-remove-confirm-on-close-preference.diff                                (rev 0)
+++ trunk/dports/graphics/gimp2/files/patch-remove-confirm-on-close-preference.diff        2014-02-05 23:41:12 UTC (rev 116754)
</span><span class="lines">@@ -0,0 +1,172 @@
</span><ins>+From b101f38f0a7cd0b31a8c9c2b90842f75d20e97c0 Mon Sep 17 00:00:00 2001
+From: Michael Natterer &lt;mitch@gimp.org&gt;
+Date: Mon, 07 May 2012 12:02:36 +0000
+Subject: app: remove the &quot;confirm-on-close&quot; preference
+
+the warning dialog cannot be disabled any longer now.
+
+(cherry picked from commit e2c8a60665499cc945838fbd5a99964b09ec8892)
+---
+diff --git a/app/config/gimpdisplayconfig.c b/app/config/gimpdisplayconfig.c
+index 91c8c3d..36a46b2 100644
+--- app/config/gimpdisplayconfig.c
++++ app/config/gimpdisplayconfig.c
+@@ -59,7 +59,6 @@ enum
+   PROP_SHOW_PAINT_TOOL_CURSOR,
+   PROP_IMAGE_TITLE_FORMAT,
+   PROP_IMAGE_STATUS_FORMAT,
+-  PROP_CONFIRM_ON_CLOSE,
+   PROP_MONITOR_XRESOLUTION,
+   PROP_MONITOR_YRESOLUTION,
+   PROP_MONITOR_RES_FROM_GDK,
+@@ -76,6 +75,7 @@ enum
+   PROP_USE_EVENT_HISTORY,

+   /* ignored, only for backward compatibility: */
++  PROP_CONFIRM_ON_CLOSE,
+   PROP_XOR_COLOR
+ };

+@@ -185,10 +185,6 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
+                                    IMAGE_STATUS_FORMAT_BLURB,
+                                    GIMP_CONFIG_DEFAULT_IMAGE_STATUS_FORMAT,
+                                    GIMP_PARAM_STATIC_STRINGS);
+-  GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_CONFIRM_ON_CLOSE,
+-                                    &quot;confirm-on-close&quot;, CONFIRM_ON_CLOSE_BLURB,
+-                                    TRUE,
+-                                    GIMP_PARAM_STATIC_STRINGS);
+   GIMP_CONFIG_INSTALL_PROP_RESOLUTION (object_class, PROP_MONITOR_XRESOLUTION,
+                                        &quot;monitor-xresolution&quot;,
+                                        MONITOR_XRESOLUTION_BLURB,
+@@ -267,6 +263,10 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
+                                     GIMP_PARAM_STATIC_STRINGS);

+   /*  only for backward compatibility:  */
++  GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_CONFIRM_ON_CLOSE,
++                                    &quot;confirm-on-close&quot;, NULL,
++                                    TRUE,
++                                    GIMP_PARAM_STATIC_STRINGS);
+   GIMP_CONFIG_INSTALL_PROP_RGB (object_class, PROP_XOR_COLOR,
+                                 &quot;xor-color&quot;, NULL,
+                                 FALSE, &amp;color,
+@@ -366,9 +366,6 @@ gimp_display_config_set_property (GObject      *object,
+       g_free (display_config-&gt;image_status_format);
+       display_config-&gt;image_status_format = g_value_dup_string (value);
+       break;
+-    case PROP_CONFIRM_ON_CLOSE:
+-      display_config-&gt;confirm_on_close = g_value_get_boolean (value);
+-      break;
+     case PROP_MONITOR_XRESOLUTION:
+       display_config-&gt;monitor_xres = g_value_get_double (value);
+       break;
+@@ -416,6 +413,8 @@ gimp_display_config_set_property (GObject      *object,
+     case PROP_USE_EVENT_HISTORY:
+       display_config-&gt;use_event_history = g_value_get_boolean (value);
+       break;
++
++    case PROP_CONFIRM_ON_CLOSE:
+     case PROP_XOR_COLOR:
+       /* ignored */
+       break;
+@@ -481,9 +480,6 @@ gimp_display_config_get_property (GObject    *object,
+     case PROP_IMAGE_STATUS_FORMAT:
+       g_value_set_string (value, display_config-&gt;image_status_format);
+       break;
+-    case PROP_CONFIRM_ON_CLOSE:
+-      g_value_set_boolean (value, display_config-&gt;confirm_on_close);
+-      break;
+     case PROP_MONITOR_XRESOLUTION:
+       g_value_set_double (value, display_config-&gt;monitor_xres);
+       break;
+@@ -526,6 +522,8 @@ gimp_display_config_get_property (GObject    *object,
+     case PROP_USE_EVENT_HISTORY:
+       g_value_set_boolean (value, display_config-&gt;use_event_history);
+       break;
++
++    case PROP_CONFIRM_ON_CLOSE:
+     case PROP_XOR_COLOR:
+       /* ignored */
+       break;
+diff --git a/app/config/gimpdisplayconfig.h b/app/config/gimpdisplayconfig.h
+index 427e50e..2c6a7e5 100644
+--- app/config/gimpdisplayconfig.h
++++ app/config/gimpdisplayconfig.h
+@@ -56,7 +56,6 @@ struct _GimpDisplayConfig
+   gboolean            show_paint_tool_cursor;
+   gchar              *image_title_format;
+   gchar              *image_status_format;
+-  gboolean            confirm_on_close;
+   gdouble             monitor_xres;
+   gdouble             monitor_yres;
+   gboolean            monitor_res_from_gdk;
+diff --git a/app/config/gimprc-blurbs.h b/app/config/gimprc-blurbs.h
+index d8f6e44..2af5a29 100644
+--- app/config/gimprc-blurbs.h
++++ app/config/gimprc-blurbs.h
+@@ -42,9 +42,6 @@ N_(&quot;Specifies how the area around the image should be drawn.&quot;)
+ #define COLOR_PROFILE_POLICY_BLURB \
+ N_(&quot;How to handle embedded color profiles when opening a file.&quot;)

+-#define CONFIRM_ON_CLOSE_BLURB \
+-N_(&quot;Ask for confirmation before closing an image without saving.&quot;)
+-
+ #define CURSOR_FORMAT_BLURB \
+ N_(&quot;Sets the pixel format to use for mouse pointers.&quot;)

+diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c
+index a8e6d5b..259a5ee 100644
+--- app/dialogs/preferences-dialog.c
++++ app/dialogs/preferences-dialog.c
+@@ -1559,13 +1559,6 @@ prefs_dialog_new (Gimp       *gimp,
+                            _(&quot;Maximum _filesize for thumbnailing:&quot;),
+                            GTK_TABLE (table), 1, size_group);

+-  /*  File Saving  */
+-  vbox2 = prefs_frame_new (_(&quot;Saving Images&quot;), GTK_CONTAINER (vbox), FALSE);
+-
+-  prefs_check_button_add (object, &quot;confirm-on-close&quot;,
+-                          _(&quot;Confirm closing of unsa_ved images&quot;),
+-                          GTK_BOX (vbox2));
+-
+   g_object_unref (size_group);
+   size_group = NULL;

+diff --git a/app/display/gimpdisplayshell-close.c b/app/display/gimpdisplayshell-close.c
+index 6857e50..bc37295 100644
+--- app/display/gimpdisplayshell-close.c
++++ app/display/gimpdisplayshell-close.c
+@@ -98,8 +98,7 @@ gimp_display_shell_close (GimpDisplayShell *shell,
+   if (! kill_it                                 &amp;&amp;
+       image                                     &amp;&amp;
+       gimp_image_get_display_count (image) == 1 &amp;&amp;
+-      gimp_image_is_dirty (image)               &amp;&amp;
+-      shell-&gt;display-&gt;config-&gt;confirm_on_close)
++      gimp_image_is_dirty (image))
+     {
+       /*  If there's a save dialog active for this image, then raise it.
+        *  (see bug #511965)
+--
+cgit v0.9.2
+From 523f807d75efdf69473996b0fd7ede07200835c4 Mon Sep 17 00:00:00 2001
+From: Michael Natterer &lt;mitch@gimp.org&gt;
+Date: Mon, 07 May 2012 12:07:43 +0000
+Subject: app: set GIMP_CONFIG_PARAM_IGNORE on &quot;confirm-on-close&quot;
+
+(cherry picked from commit bfb875755976cd4b2cd4b02d5f3a32ebaf24642f)
+---
+diff --git a/app/config/gimpdisplayconfig.c b/app/config/gimpdisplayconfig.c
+index 36a46b2..4613535 100644
+--- app/config/gimpdisplayconfig.c
++++ app/config/gimpdisplayconfig.c
+@@ -266,7 +266,8 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
+   GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_CONFIRM_ON_CLOSE,
+                                     &quot;confirm-on-close&quot;, NULL,
+                                     TRUE,
+-                                    GIMP_PARAM_STATIC_STRINGS);
++                                    GIMP_PARAM_STATIC_STRINGS |
++                                    GIMP_CONFIG_PARAM_IGNORE);
+   GIMP_CONFIG_INSTALL_PROP_RGB (object_class, PROP_XOR_COLOR,
+                                 &quot;xor-color&quot;, NULL,
+                                 FALSE, &amp;color,
+--
+cgit v0.9.2
</ins></span></pre></div>
<a id="trunkdportsgraphicsgimp2filespatchsnappingbehaviorscaletoolbz722034diff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/gimp2/files/patch-snapping-behavior-scale-tool-bz722034.diff (0 => 116754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/files/patch-snapping-behavior-scale-tool-bz722034.diff                                (rev 0)
+++ trunk/dports/graphics/gimp2/files/patch-snapping-behavior-scale-tool-bz722034.diff        2014-02-05 23:41:12 UTC (rev 116754)
</span><span class="lines">@@ -0,0 +1,91 @@
</span><ins>+From aed3e3c741000ace5656030697cb0733c1c509ac Mon Sep 17 00:00:00 2001
+From: Michael Natterer &lt;mitch@gimp.org&gt;
+Date: Wed, 29 Jan 2014 22:40:35 +0000
+Subject: Bug 722034 - Incorrect snapping behaviour for scale tool
+
+Always snap to the center of transform tool handles.
+
+(cherry picked from commit 5054241ca61dbdf869701b429a84d0c239a2d22a)
+---
+diff --git a/app/display/gimpcanvashandle.c b/app/display/gimpcanvashandle.c
+index 45ad673..c776fb4 100644
+--- app/display/gimpcanvashandle.c
++++ app/display/gimpcanvashandle.c
+@@ -452,6 +452,21 @@ gimp_canvas_handle_new (GimpDisplayShell *shell,
+ }

+ void
++gimp_canvas_handle_get_position (GimpCanvasItem *handle,
++                                 gdouble        *x,
++                                 gdouble        *y)
++{
++  g_return_if_fail (GIMP_IS_CANVAS_HANDLE (handle));
++  g_return_if_fail (x != NULL);
++  g_return_if_fail (y != NULL);
++
++  g_object_get (handle,
++                &quot;x&quot;, x,
++                &quot;y&quot;, y,
++                NULL);
++}
++
++void
+ gimp_canvas_handle_set_position (GimpCanvasItem *handle,
+                                  gdouble         x,
+                                  gdouble         y)
+diff --git a/app/display/gimpcanvashandle.h b/app/display/gimpcanvashandle.h
+index 7dea56b..2aeae08 100644
+--- app/display/gimpcanvashandle.h
++++ app/display/gimpcanvashandle.h
+@@ -57,9 +57,13 @@ GimpCanvasItem * gimp_canvas_handle_new          (GimpDisplayShell *shell,
+                                                   gint              width,
+                                                   gint              height);

++void             gimp_canvas_handle_get_position (GimpCanvasItem   *handle,
++                                                  gdouble          *x,
++                                                  gdouble          *y);
+ void             gimp_canvas_handle_set_position (GimpCanvasItem   *handle,
+                                                   gdouble           x,
+                                                   gdouble           y);
++
+ void             gimp_canvas_handle_set_angles   (GimpCanvasItem   *handle,
+                                                   gdouble           start_handle,
+                                                   gdouble           slice_handle);
+diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c
+index 3df8f01..009659c 100644
+--- app/tools/gimptransformtool.c
++++ app/tools/gimptransformtool.c
+@@ -54,6 +54,7 @@
+ #include &quot;widgets/gimpwidgets-utils.h&quot;

+ #include &quot;display/gimpcanvasgroup.h&quot;
++#include &quot;display/gimpcanvashandle.h&quot;
+ #include &quot;display/gimpdisplay.h&quot;
+ #include &quot;display/gimpdisplayshell.h&quot;
+ #include &quot;display/gimpdisplayshell-transform.h&quot;
+@@ -341,6 +342,23 @@ gimp_transform_tool_button_press (GimpTool            *tool,
+     tr_tool-&gt;prev_trans_info[i] = tr_tool-&gt;trans_info[i];

+   gimp_tool_control_activate (tool-&gt;control);
++
++  if (GIMP_IS_CANVAS_HANDLE (tr_tool-&gt;handles[tr_tool-&gt;function]))
++    {
++      gdouble x, y;
++
++      gimp_canvas_handle_get_position (tr_tool-&gt;handles[tr_tool-&gt;function],
++                                       &amp;x, &amp;y);
++
++      gimp_tool_control_set_snap_offsets (tool-&gt;control,
++                                          SIGNED_ROUND (x - coords-&gt;x),
++                                          SIGNED_ROUND (y - coords-&gt;y),
++                                          0, 0);
++    }
++  else
++    {
++      gimp_tool_control_set_snap_offsets (tool-&gt;control, 0, 0, 0, 0);
++    }
+ }

+ static void
+--
+cgit v0.9.2
</ins></span></pre></div>
<a id="trunkdportsgraphicsgimp2filespatchwritingcharacterconstantsbz721775diff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/gimp2/files/patch-writing-character-constants-bz721775.diff (0 => 116754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/files/patch-writing-character-constants-bz721775.diff                                (rev 0)
+++ trunk/dports/graphics/gimp2/files/patch-writing-character-constants-bz721775.diff        2014-02-05 23:41:12 UTC (rev 116754)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+From 6c2cd97b868e7742f9a3ade611713e46a1759d1c Mon Sep 17 00:00:00 2001
+From: Kevin Cozens &lt;kevin@ve3syb.ca&gt;
+Date: Mon, 03 Feb 2014 22:30:04 +0000
+Subject: Removed extraneous 'x' when writing character constants. Fixes bug #721775.
+
+---
+diff --git a/plug-ins/script-fu/tinyscheme/scheme.c b/plug-ins/script-fu/tinyscheme/scheme.c
+index 8abddcd..1d288f5 100644
+--- plug-ins/script-fu/tinyscheme/scheme.c
++++ plug-ins/script-fu/tinyscheme/scheme.c
+@@ -2177,7 +2177,7 @@ static void atom2str(scheme *sc, pointer l, int f, char **pp, int *plen) {
+                       snprintf(p,STRBUFFSIZE,&quot;#\\x%x&quot;,c); break;
+                     }
+ #endif
+-                    snprintf(p,STRBUFFSIZE,&quot;#\\x%c&quot;,c); break;
++                    snprintf(p,STRBUFFSIZE,&quot;#\\%c&quot;,c); break;
+                }
+           }
+      } else if (is_symbol(l)) {
+--
+cgit v0.9.2
</ins></span></pre></div>
<a id="trunkdportsgraphicsgimp2filespatchwrongnametransfertooldialogsbz701159diff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/gimp2/files/patch-wrong-name-transfer-tool-dialogs-bz701159.diff (0 => 116754)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/gimp2/files/patch-wrong-name-transfer-tool-dialogs-bz701159.diff                                (rev 0)
+++ trunk/dports/graphics/gimp2/files/patch-wrong-name-transfer-tool-dialogs-bz701159.diff        2014-02-05 23:41:12 UTC (rev 116754)
</span><span class="lines">@@ -0,0 +1,247 @@
</span><ins>+From d94f38c18db41dce4a22a9e55a84c92c2161f169 Mon Sep 17 00:00:00 2001
+From: Michael Natterer &lt;mitch@gimp.org&gt;
+Date: Tue, 04 Feb 2014 23:54:39 +0000
+Subject: Bug 701159 - Wrong name in transform tool dialogs...
+
+...when acting on a path or selection
+
+Factor out the code that checks if an active item exists and if it's
+transformable (not locked etc.) and use that function in more places.
+This fixes both the wrong dialog labels and the tool running into
+broken states when the selection or a path are being transformed.
+
+(cherry picked from commit b13c68fda6dcedd43d7e2f4633191f9ddc6cdf3f)
+---
+diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c
+index 8c31222..ff976ea 100644
+--- app/tools/gimptransformtool.c
++++ app/tools/gimptransformtool.c
+@@ -151,6 +151,12 @@ static void      gimp_transform_tool_response               (GtkWidget
+                                                              gint                   response_id,
+                                                              GimpTransformTool     *tr_tool);

++static GimpItem *gimp_transform_tool_get_active_item        (GimpTransformTool     *tr_tool,
++                                                             GimpImage             *image);
++static GimpItem *gimp_transform_tool_check_active_item      (GimpTransformTool     *tr_tool,
++                                                             GimpImage             *display,
++                                                             GError               **error);
++

+ G_DEFINE_TYPE (GimpTransformTool, gimp_transform_tool, GIMP_TYPE_DRAW_TOOL)

+@@ -236,18 +242,17 @@ gimp_transform_tool_initialize (GimpTool     *tool,
+   GimpTransformTool *tr_tool  = GIMP_TRANSFORM_TOOL (tool);
+   GimpImage         *image    = gimp_display_get_image (display);
+   GimpDrawable      *drawable = gimp_image_get_active_drawable (image);
++  GimpItem          *item;

+   if (! GIMP_TOOL_CLASS (parent_class)-&gt;initialize (tool, display, error))
+     {
+       return FALSE;
+     }

+-  if (gimp_item_is_content_locked (GIMP_ITEM (drawable)))
+-    {
+-      g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
+-                           _(&quot;The active layer's pixels are locked.&quot;));
+-      return FALSE;
+-    }
++  item = gimp_transform_tool_check_active_item (tr_tool, image, error);
++
++  if (! item)
++    return FALSE;

+   if (display != tool-&gt;display)
+     {
+@@ -578,13 +583,10 @@ gimp_transform_tool_cursor_update (GimpTool         *tool,
+                                    GdkModifierType   state,
+                                    GimpDisplay      *display)
+ {
+-  GimpTransformTool    *tr_tool = GIMP_TRANSFORM_TOOL (tool);
+-  GimpTransformOptions *options = GIMP_TRANSFORM_TOOL_GET_OPTIONS (tool);
+-  GimpCursorType        cursor;
+-  GimpCursorModifier    modifier = GIMP_CURSOR_MODIFIER_NONE;
+-  GimpImage            *image    = gimp_display_get_image (display);
+-
+-  cursor = gimp_tool_control_get_cursor (tool-&gt;control);
++  GimpTransformTool  *tr_tool  = GIMP_TRANSFORM_TOOL (tool);
++  GimpImage          *image    = gimp_display_get_image (display);
++  GimpCursorType      cursor   = gimp_tool_control_get_cursor (tool-&gt;control);
++  GimpCursorModifier  modifier = GIMP_CURSOR_MODIFIER_NONE;

+   if (tr_tool-&gt;use_handles)
+     {
+@@ -633,24 +635,8 @@ gimp_transform_tool_cursor_update (GimpTool         *tool,
+       modifier = GIMP_CURSOR_MODIFIER_MOVE;
+     }

+-  switch (options-&gt;type)
+-    {
+-      GimpDrawable *drawable;
+-
+-    case GIMP_TRANSFORM_TYPE_LAYER:
+-      drawable = gimp_image_get_active_drawable (image);
+-      if (gimp_item_is_content_locked (GIMP_ITEM (drawable)))
+-        modifier = GIMP_CURSOR_MODIFIER_BAD;
+-      break;
+-
+-    case GIMP_TRANSFORM_TYPE_SELECTION:
+-      break;
+-
+-    case GIMP_TRANSFORM_TYPE_PATH:
+-      if (! gimp_image_get_active_vectors (image))
+-        modifier = GIMP_CURSOR_MODIFIER_BAD;
+-      break;
+-    }
++  if (! gimp_transform_tool_check_active_item (tr_tool, image, NULL))
++    modifier = GIMP_CURSOR_MODIFIER_BAD;

+   gimp_tool_control_set_cursor          (tool-&gt;control, cursor);
+   gimp_tool_control_set_cursor_modifier (tool-&gt;control, modifier);
+@@ -1073,50 +1059,23 @@ gimp_transform_tool_transform (GimpTransformTool *tr_tool,
+   GimpTransformOptions *options        = GIMP_TRANSFORM_TOOL_GET_OPTIONS (tool);
+   GimpContext          *context        = GIMP_CONTEXT (options);
+   GimpImage            *image          = gimp_display_get_image (display);
+-  GimpItem             *active_item    = NULL;
++  GimpItem             *active_item;
+   TileManager          *orig_tiles     = NULL;
+-  gint                  orig_offset_x;
+-  gint                  orig_offset_y;
++  gint                  orig_offset_x  = 0;
++  gint                  orig_offset_y  = 0;
+   TileManager          *new_tiles;
+   gint                  new_offset_x;
+   gint                  new_offset_y;
+-  const gchar          *null_message   = NULL;
+-  const gchar          *locked_message = NULL;
+   gchar                *undo_desc      = NULL;
+-  gboolean              new_layer;
++  gboolean              new_layer      = FALSE;
++  GError               *error          = NULL;

+-  switch (options-&gt;type)
+-    {
+-    case GIMP_TRANSFORM_TYPE_LAYER:
+-      active_item = GIMP_ITEM (gimp_image_get_active_drawable (image));
+-      null_message   = _(&quot;There is no layer to transform.&quot;);
+-      locked_message = _(&quot;The active layer's pixels are locked.&quot;);
+-      break;
+-
+-    case GIMP_TRANSFORM_TYPE_SELECTION:
+-      active_item = GIMP_ITEM (gimp_image_get_mask (image));
+-      /* cannot happen, so don't translate these messages */
+-      null_message   = &quot;There is no selection to transform.&quot;;
+-      locked_message = &quot;The selection's pixels are locked.&quot;;
+-      break;
+-
+-    case GIMP_TRANSFORM_TYPE_PATH:
+-      active_item = GIMP_ITEM (gimp_image_get_active_vectors (image));
+-      null_message   = _(&quot;There is no path to transform.&quot;);
+-      locked_message = _(&quot;The active path's strokes are locked.&quot;);
+-      break;
+-    }
++  active_item = gimp_transform_tool_check_active_item (tr_tool, image, &amp;error);

+   if (! active_item)
+     {
+-      gimp_tool_message_literal (tool, display, null_message);
+-      gimp_tool_control (tool, GIMP_TOOL_ACTION_HALT, display);
+-      return;
+-    }
+-
+-  if (gimp_item_is_content_locked (active_item))
+-    {
+-      gimp_tool_message_literal (tool, display, locked_message);
++      gimp_tool_message_literal (tool, display, error-&gt;message);
++      g_clear_error (&amp;error);
+       gimp_tool_control (tool, GIMP_TOOL_ACTION_HALT, display);
+       return;
+     }
+@@ -1396,10 +1355,12 @@ gimp_transform_tool_prepare (GimpTransformTool *tr_tool,
+     {
+       GimpTransformOptions *options  = GIMP_TRANSFORM_TOOL_GET_OPTIONS (tr_tool);
+       GimpImage            *image    = gimp_display_get_image (display);
+-      GimpDrawable         *drawable = gimp_image_get_active_drawable (image);
++      GimpItem             *item;
++
++      item = gimp_transform_tool_get_active_item (tr_tool, image);

+       gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (tr_tool-&gt;dialog),
+-                                         GIMP_VIEWABLE (drawable),
++                                         GIMP_VIEWABLE (item),
+                                          GIMP_CONTEXT (options));
+       gimp_tool_dialog_set_shell (GIMP_TOOL_DIALOG (tr_tool-&gt;dialog),
+                                   gimp_display_get_shell (display));
+@@ -1464,3 +1425,70 @@ gimp_transform_tool_response (GtkWidget         *widget,
+       break;
+     }
+ }
++
++static GimpItem *
++gimp_transform_tool_get_active_item (GimpTransformTool *tr_tool,
++                                     GimpImage         *image)
++{
++  GimpTransformOptions *options = GIMP_TRANSFORM_TOOL_GET_OPTIONS (tr_tool);
++
++  switch (options-&gt;type)
++    {
++    case GIMP_TRANSFORM_TYPE_LAYER:
++      return GIMP_ITEM (gimp_image_get_active_drawable (image));
++
++    case GIMP_TRANSFORM_TYPE_SELECTION:
++      return GIMP_ITEM (gimp_image_get_mask (image));
++
++    case GIMP_TRANSFORM_TYPE_PATH:
++      return GIMP_ITEM (gimp_image_get_active_vectors (image));
++    }
++
++  return NULL;
++}
++
++static GimpItem *
++gimp_transform_tool_check_active_item (GimpTransformTool  *tr_tool,
++                                       GimpImage          *image,
++                                       GError            **error)
++{
++  GimpTransformOptions *options = GIMP_TRANSFORM_TOOL_GET_OPTIONS (tr_tool);
++  GimpItem             *item;
++  const gchar          *null_message   = NULL;
++  const gchar          *locked_message = NULL;
++
++  item = gimp_transform_tool_get_active_item (tr_tool, image);
++
++  switch (options-&gt;type)
++    {
++    case GIMP_TRANSFORM_TYPE_LAYER:
++      null_message   = _(&quot;There is no layer to transform.&quot;);
++      locked_message = _(&quot;The active layer's pixels are locked.&quot;);
++      break;
++
++    case GIMP_TRANSFORM_TYPE_SELECTION:
++      /* cannot happen, so don't translate these messages */
++      null_message   = &quot;There is no selection to transform.&quot;;
++      locked_message = &quot;The selection's pixels are locked.&quot;;
++      break;
++
++    case GIMP_TRANSFORM_TYPE_PATH:
++      null_message   = _(&quot;There is no path to transform.&quot;);
++      locked_message = _(&quot;The active path's strokes are locked.&quot;);
++      break;
++    }
++
++  if (! item)
++    {
++      g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED, null_message);
++      return NULL;
++    }
++
++  if (gimp_item_is_content_locked (item))
++    {
++      g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED, locked_message);
++      return NULL;
++    }
++
++  return item;
++}
+--
+cgit v0.9.2
</ins></span></pre>
</div>
</div>

</body>
</html>