From 15c7937fc324480c2c0883dcff96a74017e8c603 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Fri, 21 Mar 2008 22:09:23 +0000 Subject: [PATCH] moved defines to the header file and changed to 640x400 which is actually 2008-03-21 Sven Neumann * app/core/gimptemplate.[ch]: moved defines to the header file and changed to 640x400 which is actually almost the golden mean as claimed by the comment. * app/display/gimpdisplayshell.c: use the defines here. svn path=/trunk/; revision=25165 --- ChangeLog | 8 ++++++++ app/core/gimptemplate.c | 17 ++--------------- app/core/gimptemplate.h | 14 ++++++++++++++ app/display/gimpdisplayshell.c | 10 ++++------ 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4f9ce227e2..9eae1a0dc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-03-21 Sven Neumann + + * app/core/gimptemplate.[ch]: moved defines to the header file and + changed to 640x400 which is actually almost the golden mean as + claimed by the comment. + + * app/display/gimpdisplayshell.c: use the defines here. + 2008-03-21 Sven Neumann * app/core/gimptemplate.c: increased the size of the default image diff --git a/app/core/gimptemplate.c b/app/core/gimptemplate.c index a50bf7e095..b40f7da5d3 100644 --- a/app/core/gimptemplate.c +++ b/app/core/gimptemplate.c @@ -40,19 +40,6 @@ #include "gimp-intl.h" -/* 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. - */ - -#ifdef GIMP_UNSTABLE -#define DEFAULT_IMAGE_WIDTH 610 -#define DEFAULT_IMAGE_HEIGHT 377 -#else -#define DEFAULT_IMAGE_WIDTH 600 -#define DEFAULT_IMAGE_HEIGHT 480 -#endif - #define DEFAULT_RESOLUTION 72.0 @@ -108,12 +95,12 @@ gimp_template_class_init (GimpTemplateClass *klass) GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_WIDTH, "width", NULL, GIMP_MIN_IMAGE_SIZE, GIMP_MAX_IMAGE_SIZE, - DEFAULT_IMAGE_WIDTH, + GIMP_DEFAULT_IMAGE_WIDTH, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_HEIGHT, "height", NULL, GIMP_MIN_IMAGE_SIZE, GIMP_MAX_IMAGE_SIZE, - DEFAULT_IMAGE_HEIGHT, + GIMP_DEFAULT_IMAGE_HEIGHT, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_INSTALL_PROP_UNIT (object_class, PROP_UNIT, "unit", N_("The unit used for coordinate display " diff --git a/app/core/gimptemplate.h b/app/core/gimptemplate.h index 4afaeb8b6e..00f30dea1d 100644 --- a/app/core/gimptemplate.h +++ b/app/core/gimptemplate.h @@ -26,6 +26,20 @@ #include "gimpviewable.h" +/* 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. + */ + +#ifdef GIMP_UNSTABLE +#define GIMP_DEFAULT_IMAGE_WIDTH 610 +#define GIMP_DEFAULT_IMAGE_HEIGHT 377 +#else +#define GIMP_DEFAULT_IMAGE_WIDTH 640 +#define GIMP_DEFAULT_IMAGE_HEIGHT 400 +#endif + + #define GIMP_TYPE_TEMPLATE (gimp_template_get_type ()) #define GIMP_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_TEMPLATE, GimpTemplate)) #define GIMP_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_TEMPLATE, GimpTemplateClass)) diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c index 927e7ab7d0..db5f3e9399 100644 --- a/app/display/gimpdisplayshell.c +++ b/app/display/gimpdisplayshell.c @@ -45,6 +45,7 @@ #include "core/gimpprojection.h" #include "core/gimpmarshal.h" #include "core/gimpsamplepoint.h" +#include "core/gimptemplate.h" #include "widgets/gimphelp-ids.h" #include "widgets/gimpmenufactory.h" @@ -668,10 +669,7 @@ gimp_display_shell_new (GimpDisplay *display, /* the toplevel shell */ shell = g_object_new (GIMP_TYPE_DISPLAY_SHELL, - "window-position", (display->image ? - GTK_WIN_POS_MOUSE : - GTK_WIN_POS_CENTER), - "unit", unit, + "unit", unit, NULL); shell->display = display; @@ -683,8 +681,8 @@ gimp_display_shell_new (GimpDisplay *display, } else { - image_width = 640; - image_height = 480; + image_width = GIMP_DEFAULT_IMAGE_WIDTH; + image_height = GIMP_DEFAULT_IMAGE_HEIGHT; } shell->dot_for_dot = shell->display->config->default_dot_for_dot;