From 1e0816fa939fbf4e9496c5b140d100746c2fddd2 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Wed, 15 Oct 2003 15:30:11 +0000 Subject: [PATCH] minor cleanup. 2003-10-15 Sven Neumann * app/config/gimpconfig-utils.c (gimp_config_diff_internal): minor cleanup. * app/core/gimptemplate.[ch]: added a comment property. * app/config/gimpcoreconfig.[ch] * app/config/gimprc-blurbs.h: removed "default_comment" property and set the default comment on the default image template. * app/widgets/gimptemplateeditor.c: added a comment editor widget. * app/core/gimp.c * app/gui/file-new-dialog.c * app/gui/preferences-dialog.c * app/pdb/gimprc_cmds.c * tools/pdbgen/pdb/gimprc.pdb: changed accordingly. * libgimpwidgets/gimpmemsizeentry.c (gimp_memsize_entry_init): increased spacing between the spinbutton and the menu. --- ChangeLog | 22 +++++++++++++ app/config/gimpconfig-utils.c | 4 +-- app/config/gimpcoreconfig.c | 17 ++-------- app/config/gimpcoreconfig.h | 1 - app/config/gimprc-blurbs.h | 3 -- app/core/gimp.c | 19 ++++++----- app/core/gimptemplate.c | 52 ++++++++++++++++++++++++++++--- app/core/gimptemplate.h | 1 + app/dialogs/image-new-dialog.c | 23 ++++++++++++-- app/dialogs/preferences-dialog.c | 44 -------------------------- app/gui/file-new-dialog.c | 23 ++++++++++++-- app/gui/preferences-dialog.c | 44 -------------------------- app/pdb/gimprc_cmds.c | 3 +- app/widgets/gimptemplateeditor.c | 39 ++++++++++++++++++++--- libgimpconfig/gimpconfig-utils.c | 4 +-- libgimpwidgets/gimpmemsizeentry.c | 6 ++-- tools/pdbgen/pdb/gimprc.pdb | 4 +-- 17 files changed, 170 insertions(+), 139 deletions(-) diff --git a/ChangeLog b/ChangeLog index 318b099a57..21b2e345d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2003-10-15 Sven Neumann + + * app/config/gimpconfig-utils.c (gimp_config_diff_internal): minor + cleanup. + + * app/core/gimptemplate.[ch]: added a comment property. + + * app/config/gimpcoreconfig.[ch] + * app/config/gimprc-blurbs.h: removed "default_comment" property + and set the default comment on the default image template. + + * app/widgets/gimptemplateeditor.c: added a comment editor widget. + + * app/core/gimp.c + * app/gui/file-new-dialog.c + * app/gui/preferences-dialog.c + * app/pdb/gimprc_cmds.c + * tools/pdbgen/pdb/gimprc.pdb: changed accordingly. + + * libgimpwidgets/gimpmemsizeentry.c (gimp_memsize_entry_init): + increased spacing between the spinbutton and the menu. + 2003-10-15 Michael Natterer * app/widgets/widgets-enums.[ch]: new enum GimpColorFrameMode. diff --git a/app/config/gimpconfig-utils.c b/app/config/gimpconfig-utils.c index b4dd84bd2b..dd783051de 100644 --- a/app/config/gimpconfig-utils.c +++ b/app/config/gimpconfig-utils.c @@ -135,12 +135,12 @@ gimp_config_diff_internal (GimpConfig *a, if (! gimp_config_is_equal_to (g_value_get_object (&a_value), g_value_get_object (&b_value))) { - list = g_list_prepend (list, param_specs[i]); + list = g_list_prepend (list, prop_spec); } } else { - list = g_list_prepend (list, param_specs[i]); + list = g_list_prepend (list, prop_spec); } } diff --git a/app/config/gimpcoreconfig.c b/app/config/gimpcoreconfig.c index a4a2507c4c..0a320dd60e 100644 --- a/app/config/gimpcoreconfig.c +++ b/app/config/gimpcoreconfig.c @@ -86,7 +86,6 @@ enum PROP_DEFAULT_GRADIENT, PROP_DEFAULT_FONT, PROP_DEFAULT_IMAGE, - PROP_DEFAULT_COMMENT, PROP_DEFAULT_GRID, PROP_UNDO_LEVELS, PROP_UNDO_SIZE, @@ -213,10 +212,6 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass) "default-image", DEFAULT_IMAGE_BLURB, GIMP_TYPE_TEMPLATE, GIMP_PARAM_AGGREGATE); - GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_COMMENT, - "default-comment", DEFAULT_COMMENT_BLURB, - DEFAULT_COMMENT, - 0); GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_DEFAULT_GRID, "default-grid", DEFAULT_GRID_BLURB, GIMP_TYPE_GRID, @@ -267,7 +262,9 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass) static void gimp_core_config_init (GimpCoreConfig *config) { - config->default_image = g_object_new (GIMP_TYPE_TEMPLATE, NULL); + config->default_image = g_object_new (GIMP_TYPE_TEMPLATE, + "comment", DEFAULT_COMMENT, + NULL); g_signal_connect (config->default_image, "notify", G_CALLBACK (gimp_core_config_default_image_changed), config); @@ -298,7 +295,6 @@ gimp_core_config_finalize (GObject *object) g_free (core_config->default_palette); g_free (core_config->default_gradient); g_free (core_config->default_font); - g_free (core_config->default_comment); g_free (core_config->plug_in_rc_path); if (core_config->default_image) @@ -382,10 +378,6 @@ gimp_core_config_set_property (GObject *object, gimp_config_sync (GIMP_CONFIG (g_value_get_object (value)), GIMP_CONFIG (core_config->default_image), 0); break; - case PROP_DEFAULT_COMMENT: - g_free (core_config->default_comment); - core_config->default_comment = g_value_dup_string (value); - break; case PROP_DEFAULT_GRID: if (g_value_get_object (value)) gimp_config_sync (GIMP_CONFIG (g_value_get_object (value)), @@ -483,9 +475,6 @@ gimp_core_config_get_property (GObject *object, case PROP_DEFAULT_IMAGE: g_value_set_object (value, core_config->default_image); break; - case PROP_DEFAULT_COMMENT: - g_value_set_string (value, core_config->default_comment); - break; case PROP_DEFAULT_GRID: g_value_set_object (value, core_config->default_grid); break; diff --git a/app/config/gimpcoreconfig.h b/app/config/gimpcoreconfig.h index 53390b7617..f4fe74e6c6 100644 --- a/app/config/gimpcoreconfig.h +++ b/app/config/gimpcoreconfig.h @@ -55,7 +55,6 @@ struct _GimpCoreConfig gchar *default_gradient; gchar *default_font; GimpTemplate *default_image; - gchar *default_comment; GimpGrid *default_grid; gint levels_of_undo; gulong undo_size; diff --git a/app/config/gimprc-blurbs.h b/app/config/gimprc-blurbs.h index 77d93c346e..b555a1dba1 100644 --- a/app/config/gimprc-blurbs.h +++ b/app/config/gimprc-blurbs.h @@ -46,9 +46,6 @@ N_("Context-dependent cursors are cool. They are enabled by default. " \ "Specify a default brush. The brush is searched for in the " \ "specified brush path." -#define DEFAULT_COMMENT_BLURB \ -"Sets the default comment." - #define DEFAULT_DOT_FOR_DOT_BLURB \ N_("When enabled, this will ensure that each pixel of an image gets " \ "mapped to a pixel on the screen.") diff --git a/app/core/gimp.c b/app/core/gimp.c index 1695a44141..26a18235c9 100644 --- a/app/core/gimp.c +++ b/app/core/gimp.c @@ -1148,16 +1148,19 @@ gimp_create_image (Gimp *gimp, gimp_container_add (gimp->images, GIMP_OBJECT (gimage)); - if (attach_comment && gimp->config->default_comment) + if (attach_comment) { - GimpParasite *parasite; + const gchar *comment = gimp->config->default_image->comment; - parasite = gimp_parasite_new ("gimp-comment", - GIMP_PARASITE_PERSISTENT, - strlen (gimp->config->default_comment) + 1, - gimp->config->default_comment); - gimp_image_parasite_attach (gimage, parasite); - gimp_parasite_free (parasite); + if (comment) + { + GimpParasite *parasite = gimp_parasite_new ("gimp-comment", + GIMP_PARASITE_PERSISTENT, + strlen (comment) + 1, + comment); + gimp_image_parasite_attach (gimage, parasite); + gimp_parasite_free (parasite); + } } return gimage; diff --git a/app/core/gimptemplate.c b/app/core/gimptemplate.c index eabad50626..8f8de5cdd2 100644 --- a/app/core/gimptemplate.c +++ b/app/core/gimptemplate.c @@ -54,6 +54,7 @@ enum PROP_RESOLUTION_UNIT, PROP_IMAGE_TYPE, PROP_FILL_TYPE, + PROP_COMMENT, PROP_FILENAME }; @@ -184,6 +185,12 @@ gimp_template_class_init (GimpTemplateClass *klass) GIMP_TYPE_FILL_TYPE, GIMP_BACKGROUND_FILL, 0); + GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_COMMENT, + "comment", + NULL, + NULL, + 0); + GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_FILENAME, "filename", NULL, @@ -203,6 +210,12 @@ gimp_template_finalize (GObject *object) { GimpTemplate *template = GIMP_TEMPLATE (object); + if (template->comment) + { + g_free (template->comment); + template->comment = NULL; + } + if (template->filename) { g_free (template->filename); @@ -246,6 +259,11 @@ gimp_template_set_property (GObject *object, case PROP_FILL_TYPE: template->fill_type = g_value_get_enum (value); break; + case PROP_COMMENT: + if (template->comment) + g_free (template->comment); + template->comment = g_value_dup_string (value); + break; case PROP_FILENAME: if (template->filename) g_free (template->filename); @@ -291,6 +309,9 @@ gimp_template_get_property (GObject *object, case PROP_FILL_TYPE: g_value_set_enum (value, template->fill_type); break; + case PROP_COMMENT: + g_value_set_string (value, template->comment); + break; case PROP_FILENAME: g_value_set_string (value, template->filename); break; @@ -372,9 +393,11 @@ void gimp_template_set_from_image (GimpTemplate *template, GimpImage *gimage) { - gdouble xresolution; - gdouble yresolution; - GimpImageBaseType image_type; + gdouble xresolution; + gdouble yresolution; + GimpImageBaseType image_type; + GimpParasite *parasite; + gchar *comment = NULL; g_return_if_fail (GIMP_IS_TEMPLATE (template)); g_return_if_fail (GIMP_IS_IMAGE (gimage)); @@ -386,6 +409,11 @@ gimp_template_set_from_image (GimpTemplate *template, if (image_type == GIMP_INDEXED) image_type = GIMP_RGB; + parasite = gimp_image_parasite_find (gimage, "gimp-comment"); + if (parasite) + comment = g_strndup (gimp_parasite_data (parasite), + gimp_parasite_data_size (parasite)); + g_object_set (template, "width", gimp_image_get_width (gimage), "height", gimp_image_get_height (gimage), @@ -394,7 +422,11 @@ gimp_template_set_from_image (GimpTemplate *template, "yresolution", yresolution, "resolution-unit", gimage->gimp->config->default_image->resolution_unit, "image-type", image_type, + "comment", comment, NULL); + + if (comment) + g_free (comment); } GimpImage * @@ -412,10 +444,22 @@ gimp_template_create_image (Gimp *gimp, gimage = gimp_create_image (gimp, template->width, template->height, template->image_type, - TRUE); + FALSE); gimp_image_undo_disable (gimage); + if (template->comment) + { + GimpParasite *parasite; + + parasite = gimp_parasite_new ("gimp-comment", + GIMP_PARASITE_PERSISTENT, + strlen (template->comment) + 1, + template->comment); + gimp_image_parasite_attach (gimage, parasite); + gimp_parasite_free (parasite); + } + gimp_image_set_resolution (gimage, template->xresolution, template->yresolution); gimp_image_set_unit (gimage, template->unit); diff --git a/app/core/gimptemplate.h b/app/core/gimptemplate.h index be97b95482..a9a7c3a8fb 100644 --- a/app/core/gimptemplate.h +++ b/app/core/gimptemplate.h @@ -51,6 +51,7 @@ struct _GimpTemplate GimpImageBaseType image_type; GimpFillType fill_type; + gchar *comment; gchar *filename; gulong initial_size; diff --git a/app/dialogs/image-new-dialog.c b/app/dialogs/image-new-dialog.c index 4e871ca2ac..d80e575f16 100644 --- a/app/dialogs/image-new-dialog.c +++ b/app/dialogs/image-new-dialog.c @@ -18,6 +18,8 @@ #include "config.h" +#include + #include #include "libgimpbase/gimpbase.h" @@ -242,9 +244,24 @@ file_new_template_select (GimpContainerMenu *menu, gpointer insert_data, FileNewDialog *dialog) { - if (template) - gimp_config_sync (GIMP_CONFIG (template), - GIMP_CONFIG (dialog->template), 0); + gchar *comment = NULL; + + if (!template) + return; + + if (!template->comment || !strlen (template->comment)) + comment = g_strdup (dialog->template->comment); + + gimp_config_sync (GIMP_CONFIG (template), GIMP_CONFIG (dialog->template), 0); + + if (comment) + { + g_object_set (dialog->template, + "comment", comment, + NULL); + + g_free (comment); + } } diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c index 81ffe4bdb1..abf0974fa3 100644 --- a/app/dialogs/preferences-dialog.c +++ b/app/dialogs/preferences-dialog.c @@ -57,9 +57,6 @@ #include "gimp-intl.h" -#define MAX_COMMENT_LENGTH 512 /* arbitrary */ - - /* preferences local functions */ static GtkWidget * prefs_dialog_new (Gimp *gimp, @@ -864,9 +861,6 @@ prefs_dialog_new (Gimp *gimp, GtkWidget *sizeentry; GtkWidget *separator; GtkWidget *calibrate_button; - GtkWidget *scrolled_window; - GtkWidget *text_view; - GtkTextBuffer *text_buffer; PangoAttrList *attrs; PangoAttribute *attr; GSList *group; @@ -1047,44 +1041,6 @@ prefs_dialog_new (Gimp *gimp, _("Maximum Image Size:"), GTK_TABLE (table), 1); - /*********************************/ - /* New Image / Default Comment */ - /*********************************/ - vbox = prefs_notebook_append_page (gimp, - GTK_NOTEBOOK (notebook), - _("Default Image Comment"), - "default-comment.png", - GTK_TREE_STORE (tree), - _("Default Comment"), - GIMP_HELP_PREFS_NEW_IMAGE_COMMENT, - &top_iter, - &child_iter, - page_index++); - - /* Comment */ - vbox2 = prefs_frame_new (_("Comment Used for New Images"), - GTK_CONTAINER (vbox), TRUE); - - scrolled_window = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), - GTK_SHADOW_ETCHED_IN); - gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 4); - gtk_container_add (GTK_CONTAINER (vbox2), scrolled_window); - gtk_widget_show (scrolled_window); - - text_buffer = gimp_prop_text_buffer_new (object, "default-comment", - MAX_COMMENT_LENGTH); - - text_view = gtk_text_view_new_with_buffer (text_buffer); - gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), GTK_WRAP_WORD); - gtk_container_add (GTK_CONTAINER (scrolled_window), text_view); - gtk_widget_show (text_view); - - g_object_unref (text_buffer); - /*********************************/ /* New Image / Default Grid */ diff --git a/app/gui/file-new-dialog.c b/app/gui/file-new-dialog.c index 4e871ca2ac..d80e575f16 100644 --- a/app/gui/file-new-dialog.c +++ b/app/gui/file-new-dialog.c @@ -18,6 +18,8 @@ #include "config.h" +#include + #include #include "libgimpbase/gimpbase.h" @@ -242,9 +244,24 @@ file_new_template_select (GimpContainerMenu *menu, gpointer insert_data, FileNewDialog *dialog) { - if (template) - gimp_config_sync (GIMP_CONFIG (template), - GIMP_CONFIG (dialog->template), 0); + gchar *comment = NULL; + + if (!template) + return; + + if (!template->comment || !strlen (template->comment)) + comment = g_strdup (dialog->template->comment); + + gimp_config_sync (GIMP_CONFIG (template), GIMP_CONFIG (dialog->template), 0); + + if (comment) + { + g_object_set (dialog->template, + "comment", comment, + NULL); + + g_free (comment); + } } diff --git a/app/gui/preferences-dialog.c b/app/gui/preferences-dialog.c index 81ffe4bdb1..abf0974fa3 100644 --- a/app/gui/preferences-dialog.c +++ b/app/gui/preferences-dialog.c @@ -57,9 +57,6 @@ #include "gimp-intl.h" -#define MAX_COMMENT_LENGTH 512 /* arbitrary */ - - /* preferences local functions */ static GtkWidget * prefs_dialog_new (Gimp *gimp, @@ -864,9 +861,6 @@ prefs_dialog_new (Gimp *gimp, GtkWidget *sizeentry; GtkWidget *separator; GtkWidget *calibrate_button; - GtkWidget *scrolled_window; - GtkWidget *text_view; - GtkTextBuffer *text_buffer; PangoAttrList *attrs; PangoAttribute *attr; GSList *group; @@ -1047,44 +1041,6 @@ prefs_dialog_new (Gimp *gimp, _("Maximum Image Size:"), GTK_TABLE (table), 1); - /*********************************/ - /* New Image / Default Comment */ - /*********************************/ - vbox = prefs_notebook_append_page (gimp, - GTK_NOTEBOOK (notebook), - _("Default Image Comment"), - "default-comment.png", - GTK_TREE_STORE (tree), - _("Default Comment"), - GIMP_HELP_PREFS_NEW_IMAGE_COMMENT, - &top_iter, - &child_iter, - page_index++); - - /* Comment */ - vbox2 = prefs_frame_new (_("Comment Used for New Images"), - GTK_CONTAINER (vbox), TRUE); - - scrolled_window = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), - GTK_SHADOW_ETCHED_IN); - gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 4); - gtk_container_add (GTK_CONTAINER (vbox2), scrolled_window); - gtk_widget_show (scrolled_window); - - text_buffer = gimp_prop_text_buffer_new (object, "default-comment", - MAX_COMMENT_LENGTH); - - text_view = gtk_text_view_new_with_buffer (text_buffer); - gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), GTK_WRAP_WORD); - gtk_container_add (GTK_CONTAINER (scrolled_window), text_view); - gtk_widget_show (text_view); - - g_object_unref (text_buffer); - /*********************************/ /* New Image / Default Grid */ diff --git a/app/pdb/gimprc_cmds.c b/app/pdb/gimprc_cmds.c index 0f3a1062b9..3acc37ee61 100644 --- a/app/pdb/gimprc_cmds.c +++ b/app/pdb/gimprc_cmds.c @@ -33,6 +33,7 @@ #include "config/gimpdisplayconfig.h" #include "config/gimprc.h" #include "core/gimp.h" +#include "core/gimptemplate.h" static ProcRecord gimprc_query_proc; static ProcRecord gimprc_set_proc; @@ -178,7 +179,7 @@ get_default_comment_invoker (Gimp *gimp, Argument *return_args; gchar *comment; - comment = g_strdup (gimp->config->default_comment); + comment = g_strdup (gimp->config->default_image->comment); success = TRUE; return_args = procedural_db_return_args (&get_default_comment_proc, success); diff --git a/app/widgets/gimptemplateeditor.c b/app/widgets/gimptemplateeditor.c index 89e867d3a0..4ccd368496 100644 --- a/app/widgets/gimptemplateeditor.c +++ b/app/widgets/gimptemplateeditor.c @@ -44,7 +44,8 @@ #include "gimp-intl.h" -#define SB_WIDTH 10 +#define SB_WIDTH 10 +#define MAX_COMMENT_LENGTH 512 /* arbitrary */ enum { @@ -199,6 +200,9 @@ gimp_template_editor_constructor (GType type, GtkWidget *xres; GtkWidget *yres; GtkWidget *chainbutton; + GtkWidget *scrolled_window; + GtkWidget *text_view; + GtkTextBuffer *text_buffer; GList *focus_chain = NULL; object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params); @@ -417,6 +421,11 @@ gimp_template_editor_constructor (GType type, 0, 1, 0, 1); gtk_widget_show (xres); + gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (editor->size_se), 0, + editor->template->xresolution, FALSE); + gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (editor->size_se), 1, + editor->template->yresolution, FALSE); + /* the resolution chainbutton */ chainbutton = gimp_chain_button_new (GIMP_CHAIN_RIGHT); gtk_table_attach_defaults (GTK_TABLE (editor->resolution_se), chainbutton, @@ -461,10 +470,30 @@ gimp_template_editor_constructor (GType type, gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); gtk_widget_show (frame); - gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (editor->size_se), 0, - editor->template->xresolution, FALSE); - gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (editor->size_se), 1, - editor->template->yresolution, FALSE); + /* frame for Comment */ + frame = gtk_frame_new (_("Image Comment")); + gtk_box_pack_start (GTK_BOX (editor), frame, TRUE, TRUE, 0); + gtk_widget_show (frame); + + scrolled_window = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), + GTK_SHADOW_ETCHED_IN); + gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 4); + gtk_container_add (GTK_CONTAINER (frame), scrolled_window); + gtk_widget_show (scrolled_window); + + text_buffer = gimp_prop_text_buffer_new (G_OBJECT (editor->template), + "comment", MAX_COMMENT_LENGTH); + + text_view = gtk_text_view_new_with_buffer (text_buffer); + g_object_unref (text_buffer); + + gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), GTK_WRAP_WORD); + gtk_container_add (GTK_CONTAINER (scrolled_window), text_view); + gtk_widget_show (text_view); g_signal_connect (editor->template, "notify", G_CALLBACK (gimp_template_editor_template_notify), diff --git a/libgimpconfig/gimpconfig-utils.c b/libgimpconfig/gimpconfig-utils.c index b4dd84bd2b..dd783051de 100644 --- a/libgimpconfig/gimpconfig-utils.c +++ b/libgimpconfig/gimpconfig-utils.c @@ -135,12 +135,12 @@ gimp_config_diff_internal (GimpConfig *a, if (! gimp_config_is_equal_to (g_value_get_object (&a_value), g_value_get_object (&b_value))) { - list = g_list_prepend (list, param_specs[i]); + list = g_list_prepend (list, prop_spec); } } else { - list = g_list_prepend (list, param_specs[i]); + list = g_list_prepend (list, prop_spec); } } diff --git a/libgimpwidgets/gimpmemsizeentry.c b/libgimpwidgets/gimpmemsizeentry.c index 68a0554c92..b331374a33 100644 --- a/libgimpwidgets/gimpmemsizeentry.c +++ b/libgimpwidgets/gimpmemsizeentry.c @@ -90,7 +90,7 @@ gimp_memsize_entry_class_init (GimpMemsizeEntryClass *klass) object_class->finalize = gimp_memsize_entry_finalize; - gimp_memsize_entry_signals[VALUE_CHANGED] = + gimp_memsize_entry_signals[VALUE_CHANGED] = g_signal_new ("value_changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, @@ -105,7 +105,7 @@ gimp_memsize_entry_class_init (GimpMemsizeEntryClass *klass) static void gimp_memsize_entry_init (GimpMemsizeEntry *entry) { - gtk_box_set_spacing (GTK_BOX (entry), 2); + gtk_box_set_spacing (GTK_BOX (entry), 4); entry->value = 0; entry->lower = 0; @@ -240,7 +240,7 @@ gulong gimp_memsize_entry_get_value (GimpMemsizeEntry *entry) { g_return_val_if_fail (GIMP_IS_MEMSIZE_ENTRY (entry), 0); - + return entry->value; } diff --git a/tools/pdbgen/pdb/gimprc.pdb b/tools/pdbgen/pdb/gimprc.pdb index 946e571874..d3757c58fc 100644 --- a/tools/pdbgen/pdb/gimprc.pdb +++ b/tools/pdbgen/pdb/gimprc.pdb @@ -148,10 +148,10 @@ sub get_default_comment { ); %invoke = ( - headers => [ qw("config/gimpcoreconfig.h") ], + headers => [ qw("config/gimpcoreconfig.h" "core/gimptemplate.h") ], code => <<'CODE' { - comment = g_strdup (gimp->config->default_comment); + comment = g_strdup (gimp->config->default_image->comment); success = TRUE; } CODE