From 11fea041f691549e2bbc7770804d1d5e27a12849 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Thu, 7 Apr 2005 17:10:05 +0000 Subject: [PATCH] app/config/gimpcoreconfig.c app/config/gimpguiconfig.c need to free the 2005-04-07 Sven Neumann * app/config/gimpcoreconfig.c * app/config/gimpguiconfig.c * app/config/gimppluginconfig.c: need to free the return value of gimp_config_build_foo_path() now that gimp_param_spec_path() is sane and doesn't take ownership of the passed string any longer. * plug-ins/FractalExplorer/Dialogs.c * plug-ins/gfig/gfig-dialog.c * plug-ins/gflare/gflare.c * plug-ins/gimpressionist/utils.c: use gimp_config_build_data_path(). * plug-ins/Lighting/lighting_ui.c * plug-ins/common/CML_explorer.c * plug-ins/common/channel_mixer.c * plug-ins/common/curve_bend.c * plug-ins/common/gqbist.c * plug-ins/common/spheredesigner.c * plug-ins/flame/flame.c * plug-ins/gimpressionist/brush.c * plug-ins/ifscompose/ifscompose.c * plug-ins/imagemap/imap_browse.c * plug-ins/imagemap/imap_file.c * plug-ins/print/gimp_main_window.c: set alternative button order on file-chooser dialogs (as well as default response where missing). --- ChangeLog | 27 ++++++++++++ app/config/gimpcoreconfig.c | 71 ++++++++++++++++++------------ app/config/gimpguiconfig.c | 6 ++- app/config/gimppluginconfig.c | 26 ++++++----- plug-ins/FractalExplorer/Dialogs.c | 35 ++++++++------- plug-ins/Lighting/lighting_ui.c | 12 +++++ plug-ins/common/CML_explorer.c | 10 +++++ plug-ins/common/channel_mixer.c | 10 +++++ plug-ins/common/curve_bend.c | 8 ++++ plug-ins/common/gqbist.c | 10 +++++ plug-ins/common/spheredesigner.c | 5 +++ plug-ins/flame/flame.c | 5 +++ plug-ins/gfig/gfig-dialog.c | 29 +++++++----- plug-ins/gflare/gflare.c | 16 +++---- plug-ins/gimpressionist/brush.c | 7 +++ plug-ins/gimpressionist/utils.c | 43 +++++++----------- plug-ins/ifscompose/ifscompose.c | 10 +++++ plug-ins/imagemap/imap_browse.c | 6 +++ plug-ins/imagemap/imap_file.c | 10 +++++ plug-ins/print/gimp_main_window.c | 12 +++++ 20 files changed, 257 insertions(+), 101 deletions(-) diff --git a/ChangeLog b/ChangeLog index cbf3569587..70af0af8ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,30 @@ +2005-04-07 Sven Neumann + + * app/config/gimpcoreconfig.c + * app/config/gimpguiconfig.c + * app/config/gimppluginconfig.c: need to free the return value of + gimp_config_build_foo_path() now that gimp_param_spec_path() is + sane and doesn't take ownership of the passed string any longer. + + * plug-ins/FractalExplorer/Dialogs.c + * plug-ins/gfig/gfig-dialog.c + * plug-ins/gflare/gflare.c + * plug-ins/gimpressionist/utils.c: use gimp_config_build_data_path(). + + * plug-ins/Lighting/lighting_ui.c + * plug-ins/common/CML_explorer.c + * plug-ins/common/channel_mixer.c + * plug-ins/common/curve_bend.c + * plug-ins/common/gqbist.c + * plug-ins/common/spheredesigner.c + * plug-ins/flame/flame.c + * plug-ins/gimpressionist/brush.c + * plug-ins/ifscompose/ifscompose.c + * plug-ins/imagemap/imap_browse.c + * plug-ins/imagemap/imap_file.c + * plug-ins/print/gimp_main_window.c: set alternative button order + on file-chooser dialogs (as well as default response where missing). + 2005-04-07 Sven Neumann * docs/gimp.1.in: fixed typos and improved explanation of parasiterc. diff --git a/app/config/gimpcoreconfig.c b/app/config/gimpcoreconfig.c index 32118b54e3..6016cbe798 100644 --- a/app/config/gimpcoreconfig.c +++ b/app/config/gimpcoreconfig.c @@ -145,6 +145,7 @@ static void gimp_core_config_class_init (GimpCoreConfigClass *klass) { GObjectClass *object_class; + gchar *path; parent_class = g_type_class_peek_parent (klass); @@ -160,81 +161,95 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass) GIMP_TYPE_INTERPOLATION_TYPE, GIMP_INTERPOLATION_LINEAR, 0); + path = gimp_config_build_plug_in_path ("plug-ins"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PLUG_IN_PATH, "plug-in-path", PLUG_IN_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_plug_in_path ("plug-ins"), + GIMP_CONFIG_PATH_DIR_LIST, path, GIMP_CONFIG_PARAM_RESTART); + g_free (path); + path = gimp_config_build_plug_in_path ("modules"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_MODULE_PATH, "module-path", MODULE_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_plug_in_path ("modules"), + GIMP_CONFIG_PATH_DIR_LIST, path, GIMP_CONFIG_PARAM_RESTART); + g_free (path); + path = gimp_config_build_plug_in_path ("interpreters"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_INTERPRETER_PATH, "interpreter-path", INTERPRETER_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_plug_in_path ("interpreters"), + GIMP_CONFIG_PATH_DIR_LIST, path, GIMP_CONFIG_PARAM_RESTART); + g_free (path); + path = gimp_config_build_plug_in_path ("environ"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_ENVIRON_PATH, "environ-path", ENVIRON_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_plug_in_path ("environ"), + GIMP_CONFIG_PATH_DIR_LIST, path, GIMP_CONFIG_PARAM_RESTART); + g_free (path); + path = gimp_config_build_data_path ("brushes"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_BRUSH_PATH, "brush-path", BRUSH_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_data_path ("brushes"), + GIMP_CONFIG_PATH_DIR_LIST, path, GIMP_CONFIG_PARAM_RESTART); + g_free (path); + path = gimp_config_build_writable_path ("brushes"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_BRUSH_PATH_WRITABLE, "brush-path-writable", BRUSH_PATH_WRITABLE_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_writable_path ("brushes"), + GIMP_CONFIG_PATH_DIR_LIST, path, GIMP_CONFIG_PARAM_RESTART); + g_free (path); + path = gimp_config_build_data_path ("patterns"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PATTERN_PATH, "pattern-path", PATTERN_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_data_path ("patterns"), + GIMP_CONFIG_PATH_DIR_LIST, path, GIMP_CONFIG_PARAM_RESTART); + g_free (path); + path = gimp_config_build_writable_path ("patterns"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PATTERN_PATH_WRITABLE, "pattern-path-writable", PATTERN_PATH_WRITABLE_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_writable_path ("patterns"), + GIMP_CONFIG_PATH_DIR_LIST, path, GIMP_CONFIG_PARAM_RESTART); + g_free (path); + path = gimp_config_build_data_path ("palettes"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PALETTE_PATH, "palette-path", PALETTE_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_data_path ("palettes"), + GIMP_CONFIG_PATH_DIR_LIST, path, GIMP_CONFIG_PARAM_RESTART); + g_free (path); + path = gimp_config_build_writable_path ("palettes"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PALETTE_PATH_WRITABLE, "palette-path-writable", PALETTE_PATH_WRITABLE_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_writable_path ("palettes"), + GIMP_CONFIG_PATH_DIR_LIST, path, GIMP_CONFIG_PARAM_RESTART); + g_free (path); + path = gimp_config_build_data_path ("gradients"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_GRADIENT_PATH, "gradient-path", GRADIENT_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_data_path ("gradients"), + GIMP_CONFIG_PATH_DIR_LIST, path, GIMP_CONFIG_PARAM_RESTART); + g_free (path); + path = gimp_config_build_writable_path ("gradients"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_GRADIENT_PATH_WRITABLE, "gradient-path-writable", GRADIENT_PATH_WRITABLE_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_writable_path ("gradients"), + GIMP_CONFIG_PATH_DIR_LIST, path, GIMP_CONFIG_PARAM_RESTART); + g_free (path); + path = gimp_config_build_data_path ("fonts"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_FONT_PATH, "font-path", FONT_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_data_path ("fonts"), + GIMP_CONFIG_PATH_DIR_LIST, path, 0); + g_free (path); + path = gimp_config_build_writable_path ("fonts"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_FONT_PATH_WRITABLE, "font-path-writable", FONT_PATH_WRITABLE_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_writable_path ("fonts"), + GIMP_CONFIG_PATH_DIR_LIST, path, GIMP_CONFIG_PARAM_RESTART); + g_free (path); GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_BRUSH, "default-brush", DEFAULT_BRUSH_BLURB, DEFAULT_BRUSH, diff --git a/app/config/gimpguiconfig.c b/app/config/gimpguiconfig.c index 36e9b780e9..8730c2aa19 100644 --- a/app/config/gimpguiconfig.c +++ b/app/config/gimpguiconfig.c @@ -125,6 +125,7 @@ static void gimp_gui_config_class_init (GimpGuiConfigClass *klass) { GObjectClass *object_class; + gchar *path; parent_class = g_type_class_peek_parent (klass); @@ -219,11 +220,12 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass) TOOLBOX_IMAGE_AREA_BLURB, FALSE, 0); + path = gimp_config_build_data_path ("themes"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_THEME_PATH, "theme-path", THEME_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_data_path ("themes"), + GIMP_CONFIG_PATH_DIR_LIST, path, GIMP_CONFIG_PARAM_RESTART); + g_free (path); GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_THEME, "theme", THEME_BLURB, DEFAULT_THEME, diff --git a/app/config/gimppluginconfig.c b/app/config/gimppluginconfig.c index 3e388f187c..58e2ebf250 100644 --- a/app/config/gimppluginconfig.c +++ b/app/config/gimppluginconfig.c @@ -88,6 +88,7 @@ static void gimp_plugin_config_class_init (GimpPluginConfigClass *klass) { GObjectClass *object_class; + gchar *path; parent_class = g_type_class_peek_parent (klass); @@ -97,39 +98,44 @@ gimp_plugin_config_class_init (GimpPluginConfigClass *klass) object_class->set_property = gimp_plugin_config_set_property; object_class->get_property = gimp_plugin_config_get_property; + path = gimp_config_build_data_path ("fractalexplorer"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_FRACTALEXPLORER_PATH, "fractalexplorer-path", FRACTALEXPLORER_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_data_path ("fractalexplorer"), + GIMP_CONFIG_PATH_DIR_LIST, path, 0); + g_free (path); + path = gimp_config_build_data_path ("gfig"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_GFIG_PATH, "gfig-path", GFIG_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_data_path ("gfig"), + GIMP_CONFIG_PATH_DIR_LIST, path, 0); + g_free (path); + path = gimp_config_build_data_path ("gflare"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_GFLARE_PATH, "gflare-path", GFLARE_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_data_path ("gflare"), + GIMP_CONFIG_PATH_DIR_LIST, path, 0); + g_free (path); + path = gimp_config_build_data_path ("gimpressionist"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_GIMPRESSIONIST_PATH, "gimpressionist-path", GIMPRESSIONIST_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_data_path ("gimpressionist"), + GIMP_CONFIG_PATH_DIR_LIST, path, 0); + g_free (path); + path = gimp_config_build_data_path ("scripts"); GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_SCRIPT_FU_PATH, "script-fu-path", SCRIPT_FU_PATH_BLURB, - GIMP_CONFIG_PATH_DIR_LIST, - gimp_config_build_data_path ("scripts"), + GIMP_CONFIG_PATH_DIR_LIST, path, 0); + g_free (path); } static void diff --git a/plug-ins/FractalExplorer/Dialogs.c b/plug-ins/FractalExplorer/Dialogs.c index f96bf3429d..ddb55c97f2 100644 --- a/plug-ins/FractalExplorer/Dialogs.c +++ b/plug-ins/FractalExplorer/Dialogs.c @@ -28,6 +28,8 @@ #include #include +#include + #include "FractalExplorer.h" #include "Dialogs.h" @@ -532,17 +534,9 @@ explorer_dialog (void) } else { - gchar *gimprc = gimp_personal_rc_file ("gimprc"); - gchar *full_path; - gchar *esc_path; - - full_path = g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, - "fractalexplorer", - G_SEARCHPATH_SEPARATOR_S, - "${gimp_data_dir}", G_DIR_SEPARATOR_S, - "fractalexplorer", - NULL); - esc_path = g_strescape (full_path, NULL); + gchar *gimprc = gimp_personal_rc_file ("gimprc"); + gchar *full_path = gimp_config_build_data_path ("fractalexplorer"); + gchar *esc_path = g_strescape (full_path, NULL); g_free (full_path); g_message (_("No %s in gimprc:\n" @@ -550,7 +544,8 @@ explorer_dialog (void) "(%s \"%s\")\n" "to your %s file."), "fractalexplorer-path", - "fractalexplorer-path", esc_path, gimprc); + "fractalexplorer-path", + esc_path, gimp_filename_to_utf8 (gimprc)); g_free (gimprc); g_free (esc_path); @@ -1647,9 +1642,9 @@ logo_preview_size_allocate (GtkWidget *preview) temp2 += 3; } } - gimp_preview_area_draw (GIMP_PREVIEW_AREA (preview), 0, 0, - logo_width, logo_height, GIMP_RGB_IMAGE, - temp, logo_width * 3); + gimp_preview_area_draw (GIMP_PREVIEW_AREA (preview), 0, 0, + logo_width, logo_height, GIMP_RGB_IMAGE, + temp, logo_width * 3); g_free (temp); } @@ -1899,6 +1894,11 @@ create_load_file_chooser (GtkWidget *widget, gtk_dialog_set_default_response (GTK_DIALOG (window), GTK_RESPONSE_OK); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (window), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window); @@ -1930,6 +1930,11 @@ create_save_file_chooser (GtkWidget *widget, gtk_dialog_set_default_response (GTK_DIALOG (window), GTK_RESPONSE_OK); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (window), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window); diff --git a/plug-ins/Lighting/lighting_ui.c b/plug-ins/Lighting/lighting_ui.c index e2c0116ff6..674da66b19 100644 --- a/plug-ins/Lighting/lighting_ui.c +++ b/plug-ins/Lighting/lighting_ui.c @@ -1092,6 +1092,13 @@ save_lighting_preset (GtkWidget *widget, NULL); + gtk_dialog_set_default_response (GTK_DIALOG (window), GTK_RESPONSE_OK); + + gtk_dialog_set_alternative_button_order (GTK_DIALOG (window), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window); @@ -1229,6 +1236,11 @@ load_lighting_preset (GtkWidget *widget, gtk_dialog_set_default_response (GTK_DIALOG (window), GTK_RESPONSE_OK); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (window), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window); diff --git a/plug-ins/common/CML_explorer.c b/plug-ins/common/CML_explorer.c index 7870733ffb..c8d77379ab 100644 --- a/plug-ins/common/CML_explorer.c +++ b/plug-ins/common/CML_explorer.c @@ -1958,6 +1958,11 @@ CML_save_to_file_callback (GtkWidget *widget, NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); g_signal_connect (dialog, "response", @@ -2130,6 +2135,11 @@ CML_load_from_file_callback (GtkWidget *widget, NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); g_signal_connect (dialog, "response", diff --git a/plug-ins/common/channel_mixer.c b/plug-ins/common/channel_mixer.c index faaa1f8182..9e75b8125c 100644 --- a/plug-ins/common/channel_mixer.c +++ b/plug-ins/common/channel_mixer.c @@ -882,6 +882,11 @@ cm_load_file_callback (GtkWidget *widget, NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); g_signal_connect (dialog, "response", @@ -1004,6 +1009,11 @@ cm_save_file_callback (GtkWidget *widget, NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); g_signal_connect (dialog, "response", diff --git a/plug-ins/common/curve_bend.c b/plug-ins/common/curve_bend.c index b8ce1bfbde..bd7aeea586 100644 --- a/plug-ins/common/curve_bend.c +++ b/plug-ins/common/curve_bend.c @@ -2057,6 +2057,14 @@ bender_load_callback (GtkWidget *w, NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (cd->filechooser), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + + gtk_dialog_set_default_response (GTK_DIALOG (cd->filechooser), + GTK_RESPONSE_OK); + g_signal_connect (cd->filechooser, "response", G_CALLBACK (p_points_load_from_file_response), cd); diff --git a/plug-ins/common/gqbist.c b/plug-ins/common/gqbist.c index 1adcef41c9..088d689f2a 100644 --- a/plug-ins/common/gqbist.c +++ b/plug-ins/common/gqbist.c @@ -696,6 +696,11 @@ dialog_load (GtkWidget *widget, NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), qbist_info.path); @@ -734,6 +739,11 @@ dialog_save (GtkWidget *widget, NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), qbist_info.path); diff --git a/plug-ins/common/spheredesigner.c b/plug-ins/common/spheredesigner.c index e0f5f7e833..cd4c08ec49 100644 --- a/plug-ins/common/spheredesigner.c +++ b/plug-ins/common/spheredesigner.c @@ -2182,6 +2182,11 @@ fileselect (GtkFileChooserAction action, NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); g_signal_connect (dialog, "destroy", diff --git a/plug-ins/flame/flame.c b/plug-ins/flame/flame.c index e1c521aaee..3a84422f00 100644 --- a/plug-ins/flame/flame.c +++ b/plug-ins/flame/flame.c @@ -478,6 +478,11 @@ make_file_dlg (const gchar *title, NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (file_dlg), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + g_object_add_weak_pointer (G_OBJECT (file_dlg), (gpointer) &file_dlg); gtk_dialog_set_default_response (GTK_DIALOG (file_dlg), GTK_RESPONSE_OK); diff --git a/plug-ins/gfig/gfig-dialog.c b/plug-ins/gfig/gfig-dialog.c index 8a8a67e270..84973b7534 100644 --- a/plug-ins/gfig/gfig-dialog.c +++ b/plug-ins/gfig/gfig-dialog.c @@ -41,6 +41,8 @@ #include #include +#include + #include "libgimp/stdplugins-intl.h" #include "gfig.h" @@ -245,7 +247,8 @@ gfig_dialog (void) } else { - newlayer = gimp_layer_new (gfig_context->image_id, "GFig", img_width, img_height, + newlayer = gimp_layer_new (gfig_context->image_id, "GFig", + img_width, img_height, GIMP_RGBA_IMAGE, 100., GIMP_NORMAL_MODE); gimp_drawable_fill (newlayer, GIMP_TRANSPARENT_FILL); gimp_image_add_layer (gfig_context->image_id, newlayer, -1); @@ -266,15 +269,9 @@ gfig_dialog (void) } else { - gchar *gimprc = gimp_personal_rc_file ("gimprc"); - gchar *full_path; - gchar *esc_path; - - full_path = g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, "gfig", - G_SEARCHPATH_SEPARATOR_S, - "${gimp_data_dir}", G_DIR_SEPARATOR_S, "gfig", - NULL); - esc_path = g_strescape (full_path, NULL); + gchar *gimprc = gimp_personal_rc_file ("gimprc"); + gchar *full_path = gimp_config_build_data_path ("gfig"); + gchar *esc_path = g_strescape (full_path, NULL); g_free (full_path); g_message (_("No %s in gimprc:\n" @@ -649,6 +646,11 @@ gfig_load_action_callback (GtkAction *action, NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); g_object_add_weak_pointer (G_OBJECT (dialog), (gpointer) &dialog); @@ -693,6 +695,13 @@ gfig_save_action_callback (GtkAction *action, NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); + g_object_add_weak_pointer (G_OBJECT (dialog), (gpointer) &dialog); /* FIXME: GFigObj should be a GObject and g_signal_connect_object() diff --git a/plug-ins/gflare/gflare.c b/plug-ins/gflare/gflare.c index 05847ec73b..1f70be965c 100644 --- a/plug-ins/gflare/gflare.c +++ b/plug-ins/gflare/gflare.c @@ -46,6 +46,7 @@ #include #include +#include #include #include @@ -880,22 +881,17 @@ plugin_run (const gchar *name, } else { - gchar *gimprc = gimp_personal_rc_file ("gimprc"); - gchar *full_path; - gchar *esc_path; - - full_path = g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, "gflare", - G_SEARCHPATH_SEPARATOR_S, - "${gimp_data_dir}", G_DIR_SEPARATOR_S, "gflare", - NULL); - esc_path = g_strescape (full_path, NULL); + gchar *gimprc = gimp_personal_rc_file ("gimprc"); + gchar *full_path = gimp_config_build_data_path ("gflare"); + gchar *esc_path = g_strescape (full_path, NULL); g_free (full_path); g_message (_("No %s in gimprc:\n" "You need to add an entry like\n" "(%s \"%s\")\n" "to your %s file."), - "gflare-path", "gflare-path", esc_path, gimprc); + "gflare-path", "gflare-path", + esc_path, gimp_filename_to_utf8 (gimprc)); g_free (gimprc); g_free (esc_path); diff --git a/plug-ins/gimpressionist/brush.c b/plug-ins/gimpressionist/brush.c index 41d4fe105e..e3b020d312 100644 --- a/plug-ins/gimpressionist/brush.c +++ b/plug-ins/gimpressionist/brush.c @@ -241,6 +241,13 @@ savebrush (GtkWidget *wg, NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); + path = g_build_filename ((gchar *)thispath->data, "Brushes", NULL); gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), path); diff --git a/plug-ins/gimpressionist/utils.c b/plug-ins/gimpressionist/utils.c index b5505c2e12..c7e2e1bc54 100644 --- a/plug-ins/gimpressionist/utils.c +++ b/plug-ins/gimpressionist/utils.c @@ -8,12 +8,14 @@ #include +#include #include #include "gimpressionist.h" #include "libgimp/stdplugins-intl.h" + /* Mathematical Utilities */ double @@ -102,17 +104,11 @@ static GList *parsepath_cached_path = NULL; GList * parsepath (void) { - gchar *gimpdatasubdir, *defaultpath, *rc_path, *path; + gchar *rc_path, *path; if (parsepath_cached_path) return parsepath_cached_path; - gimpdatasubdir = g_build_filename (gimp_data_directory (), - "gimpressionist", NULL); - - defaultpath = g_build_filename (gimp_directory (), - "gimpressionist", gimpdatasubdir, NULL); - path = gimp_gimprc_query ("gimpressionist-path"); if (path) { @@ -121,27 +117,22 @@ parsepath (void) } else { - if (!g_file_test (gimpdatasubdir, G_FILE_TEST_IS_DIR)) - { - /* No gimpressionist-path parameter, - and the default doesn't exist */ - gchar *path = g_strconcat ("${gimp_dir}", - G_DIR_SEPARATOR_S, - "gimpressionist", - G_SEARCHPATH_SEPARATOR_S, - "${gimp_data_dir}", - G_DIR_SEPARATOR_S, - "gimpressionist", - NULL); + gchar *gimprc = gimp_personal_rc_file ("gimprc"); + gchar *full_path = gimp_config_build_data_path ("gimpressionist"); + gchar *esc_path = g_strescape (full_path, NULL); - /* don't translate the gimprc entry */ - g_message (_("It is highly recommended to add\n" - " (gimpressionist-path \"%s\")\n" - "(or similar) to your gimprc file."), path); - g_free (path); - } + g_message (_("No %s in gimprc:\n" + "You need to add an entry like\n" + "(%s \"%s\")\n" + "to your %s file."), + "gflare-path", "gflare-path", + esc_path, gimp_filename_to_utf8 (gimprc)); - rc_path = g_strdup (defaultpath); + g_free (gimprc); + g_free (esc_path); + + rc_path = gimp_config_path_expand (full_path, TRUE, NULL); + g_free (full_path); } parsepath_cached_path = gimp_path_parse (rc_path, 16, FALSE, NULL); diff --git a/plug-ins/ifscompose/ifscompose.c b/plug-ins/ifscompose/ifscompose.c index eca8c8f06e..86f2d66c64 100644 --- a/plug-ins/ifscompose/ifscompose.c +++ b/plug-ins/ifscompose/ifscompose.c @@ -2545,6 +2545,11 @@ ifs_compose_save (GtkWidget *parent) NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); g_signal_connect (dialog, "destroy", @@ -2575,6 +2580,11 @@ ifs_compose_load (GtkWidget *parent) NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); g_signal_connect (dialog, "destroy", diff --git a/plug-ins/imagemap/imap_browse.c b/plug-ins/imagemap/imap_browse.c index 6d534d220e..ceece9a09f 100644 --- a/plug-ins/imagemap/imap_browse.c +++ b/plug-ins/imagemap/imap_browse.c @@ -74,6 +74,12 @@ browse_cb (GtkWidget *widget, GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL); + + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); g_signal_connect (dialog, "destroy", diff --git a/plug-ins/imagemap/imap_file.c b/plug-ins/imagemap/imap_file.c index 5998bc5f3b..88bfa68fe9 100644 --- a/plug-ins/imagemap/imap_file.c +++ b/plug-ins/imagemap/imap_file.c @@ -74,6 +74,11 @@ do_file_open_dialog (void) NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); g_signal_connect (dialog, "destroy", @@ -171,6 +176,11 @@ do_file_save_as_dialog (void) NULL); + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); g_signal_connect (dialog, "destroy", diff --git a/plug-ins/print/gimp_main_window.c b/plug-ins/print/gimp_main_window.c index 1518b37040..6fc43d8234 100644 --- a/plug-ins/print/gimp_main_window.c +++ b/plug-ins/print/gimp_main_window.c @@ -794,6 +794,12 @@ create_printer_dialog (void) GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + + gtk_dialog_set_alternative_button_order (GTK_DIALOG (ppd_browser), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (ppd_browser), GTK_RESPONSE_OK); g_signal_connect (ppd_browser, "response", @@ -1496,6 +1502,12 @@ gimp_create_main_window (void) GTK_STOCK_PRINT, GTK_RESPONSE_OK, NULL); + + gtk_dialog_set_alternative_button_order (GTK_DIALOG (file_browser), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + gtk_dialog_set_default_response (GTK_DIALOG (file_browser), GTK_RESPONSE_OK); g_signal_connect (file_browser, "response",