gimp r27091 - in trunk: . app/core app/dialogs libgimpconfig
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27091 - in trunk: . app/core app/dialogs libgimpconfig
- Date: Tue, 30 Sep 2008 16:06:24 +0000 (UTC)
Author: mitch
Date: Tue Sep 30 16:06:24 2008
New Revision: 27091
URL: http://svn.gnome.org/viewvc/gimp?rev=27091&view=rev
Log:
2008-09-30 Michael Natterer <mitch gimp org>
Bug 546924 â "New Image" misscalculating dimensions for non-pixel
sized templates
* app/core/gimptemplate.h: added private param flag
GIMP_TEMPLATE_PARAM_COPY_FIRST.
* app/core/gimptemplate.c (gimp_template_class_init): set the flag
on the resolution properties.
* app/dialogs/image-new-dialog.c (image_new_template_changed):
make sure the resolution properties are copied first.
* libgimpconfig/gimpconfig-utils.c (gimp_config_sync): remove
comment about fixing the template editor. That's not true any
more.
Modified:
trunk/ChangeLog
trunk/app/core/gimptemplate.c
trunk/app/core/gimptemplate.h
trunk/app/dialogs/image-new-dialog.c
trunk/libgimpconfig/gimpconfig-utils.c
Modified: trunk/app/core/gimptemplate.c
==============================================================================
--- trunk/app/core/gimptemplate.c (original)
+++ trunk/app/core/gimptemplate.c Tue Sep 30 16:06:24 2008
@@ -112,12 +112,14 @@
"xresolution",
N_("The horizontal image resolution."),
DEFAULT_RESOLUTION,
- GIMP_PARAM_STATIC_STRINGS);
+ GIMP_PARAM_STATIC_STRINGS |
+ GIMP_TEMPLATE_PARAM_COPY_FIRST);
GIMP_CONFIG_INSTALL_PROP_RESOLUTION (object_class, PROP_YRESOLUTION,
"yresolution",
N_("The vertical image resolution."),
DEFAULT_RESOLUTION,
- GIMP_PARAM_STATIC_STRINGS);
+ GIMP_PARAM_STATIC_STRINGS |
+ GIMP_TEMPLATE_PARAM_COPY_FIRST);
GIMP_CONFIG_INSTALL_PROP_UNIT (object_class, PROP_RESOLUTION_UNIT,
"resolution-unit",
NULL,
Modified: trunk/app/core/gimptemplate.h
==============================================================================
--- trunk/app/core/gimptemplate.h (original)
+++ trunk/app/core/gimptemplate.h Tue Sep 30 16:06:24 2008
@@ -26,6 +26,8 @@
#include "gimpviewable.h"
+#define GIMP_TEMPLATE_PARAM_COPY_FIRST (1 << (8 + G_PARAM_USER_SHIFT))
+
/* The default image aspect ratio is the golden mean. We use
* two adjacent fibonacci numbers for the unstable series and
* some less odd values for the stable version.
Modified: trunk/app/dialogs/image-new-dialog.c
==============================================================================
--- trunk/app/dialogs/image-new-dialog.c (original)
+++ trunk/app/dialogs/image-new-dialog.c Tue Sep 30 16:06:24 2008
@@ -245,6 +245,9 @@
if (!template->comment || !strlen (template->comment))
comment = g_strdup (dialog->template->comment);
+ /* make sure the resolution values are copied first (see bug #546924) */
+ gimp_config_sync (G_OBJECT (template), G_OBJECT (dialog->template),
+ GIMP_TEMPLATE_PARAM_COPY_FIRST);
gimp_config_sync (G_OBJECT (template), G_OBJECT (dialog->template), 0);
if (comment)
Modified: trunk/libgimpconfig/gimpconfig-utils.c
==============================================================================
--- trunk/libgimpconfig/gimpconfig-utils.c (original)
+++ trunk/libgimpconfig/gimpconfig-utils.c Tue Sep 30 16:06:24 2008
@@ -206,7 +206,6 @@
/* we use the internal versions here for a number of reasons:
* - it saves a g_list_reverse()
* - it avoids duplicated parameter checks
- * - it makes GimpTemplateEditor work (resolution is set before size)
*/
if (G_TYPE_FROM_INSTANCE (src) == G_TYPE_FROM_INSTANCE (dest))
diff = gimp_config_diff_same (src, dest, (flags | G_PARAM_READWRITE));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]