gimp r25752 - in trunk: . app/tools
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25752 - in trunk: . app/tools
- Date: Thu, 22 May 2008 11:00:50 +0000 (UTC)
Author: mitch
Date: Thu May 22 11:00:50 2008
New Revision: 25752
URL: http://svn.gnome.org/viewvc/gimp?rev=25752&view=rev
Log:
2008-05-22 Michael Natterer <mitch gimp org>
* app/tools/gimpimagemaptool.[ch]: s/save/export/g,
s/load/import/g, removed button tooltip members.
* app/tools/gimpimagemaptool-settings.[ch]
* app/tools/gimpbrightnesscontrasttool.c
* app/tools/gimpcolorbalancetool.c
* app/tools/gimpcolorizetool.c
* app/tools/gimpcurvestool.c
* app/tools/gimpdesaturatetool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimplevelstool.c
* app/tools/gimpposterizetool.c
* app/tools/gimpthresholdtool.c: changed accordingly.
* app/tools/gimpimagemaptool-settings.c: clean up menu item creation.
Modified:
trunk/ChangeLog
trunk/app/tools/gimpbrightnesscontrasttool.c
trunk/app/tools/gimpcolorbalancetool.c
trunk/app/tools/gimpcolorizetool.c
trunk/app/tools/gimpcurvestool.c
trunk/app/tools/gimpdesaturatetool.c
trunk/app/tools/gimphuesaturationtool.c
trunk/app/tools/gimpimagemaptool-settings.c
trunk/app/tools/gimpimagemaptool-settings.h
trunk/app/tools/gimpimagemaptool.c
trunk/app/tools/gimpimagemaptool.h
trunk/app/tools/gimplevelstool.c
trunk/app/tools/gimpposterizetool.c
trunk/app/tools/gimpthresholdtool.c
Modified: trunk/app/tools/gimpbrightnesscontrasttool.c
==============================================================================
--- trunk/app/tools/gimpbrightnesscontrasttool.c (original)
+++ trunk/app/tools/gimpbrightnesscontrasttool.c Thu May 22 11:00:50 2008
@@ -122,23 +122,21 @@
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
- object_class->finalize = gimp_brightness_contrast_tool_finalize;
+ object_class->finalize = gimp_brightness_contrast_tool_finalize;
- tool_class->initialize = gimp_brightness_contrast_tool_initialize;
- tool_class->button_press = gimp_brightness_contrast_tool_button_press;
- tool_class->button_release = gimp_brightness_contrast_tool_button_release;
- tool_class->motion = gimp_brightness_contrast_tool_motion;
-
- im_tool_class->shell_desc = _("Adjust Brightness and Contrast");
- im_tool_class->settings_name = "brightness-contrast";
- im_tool_class->load_dialog_title = _("Load Brightness-Contrast settings");
- im_tool_class->load_button_tip = _("Load brightness-contrast settings from file");
- im_tool_class->save_dialog_title = _("Save Brightness-Contrast settings");
- im_tool_class->save_button_tip = _("Save brightness-contrast settings to file");
-
- im_tool_class->get_operation = gimp_brightness_contrast_tool_get_operation;
- im_tool_class->map = gimp_brightness_contrast_tool_map;
- im_tool_class->dialog = gimp_brightness_contrast_tool_dialog;
+ tool_class->initialize = gimp_brightness_contrast_tool_initialize;
+ tool_class->button_press = gimp_brightness_contrast_tool_button_press;
+ tool_class->button_release = gimp_brightness_contrast_tool_button_release;
+ tool_class->motion = gimp_brightness_contrast_tool_motion;
+
+ im_tool_class->shell_desc = _("Adjust Brightness and Contrast");
+ im_tool_class->settings_name = "brightness-contrast";
+ im_tool_class->import_dialog_title = _("Import Brightness-Contrast settings");
+ im_tool_class->export_dialog_title = _("Export Brightness-Contrast settings");
+
+ im_tool_class->get_operation = gimp_brightness_contrast_tool_get_operation;
+ im_tool_class->map = gimp_brightness_contrast_tool_map;
+ im_tool_class->dialog = gimp_brightness_contrast_tool_dialog;
}
static void
Modified: trunk/app/tools/gimpcolorbalancetool.c
==============================================================================
--- trunk/app/tools/gimpcolorbalancetool.c (original)
+++ trunk/app/tools/gimpcolorbalancetool.c Thu May 22 11:00:50 2008
@@ -106,21 +106,19 @@
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
- object_class->finalize = gimp_color_balance_tool_finalize;
+ object_class->finalize = gimp_color_balance_tool_finalize;
- tool_class->initialize = gimp_color_balance_tool_initialize;
+ tool_class->initialize = gimp_color_balance_tool_initialize;
- im_tool_class->shell_desc = _("Adjust Color Balance");
- im_tool_class->settings_name = "color-balance";
- im_tool_class->load_dialog_title = _("Load Color Balance Settings");
- im_tool_class->load_button_tip = _("Load color balance settings from file");
- im_tool_class->save_dialog_title = _("Save Color Balance Settings");
- im_tool_class->save_button_tip = _("Save color balance settings to file");
-
- im_tool_class->get_operation = gimp_color_balance_tool_get_operation;
- im_tool_class->map = gimp_color_balance_tool_map;
- im_tool_class->dialog = gimp_color_balance_tool_dialog;
- im_tool_class->reset = gimp_color_balance_tool_reset;
+ im_tool_class->shell_desc = _("Adjust Color Balance");
+ im_tool_class->settings_name = "color-balance";
+ im_tool_class->import_dialog_title = _("Import Color Balance Settings");
+ im_tool_class->export_dialog_title = _("Export Color Balance Settings");
+
+ im_tool_class->get_operation = gimp_color_balance_tool_get_operation;
+ im_tool_class->map = gimp_color_balance_tool_map;
+ im_tool_class->dialog = gimp_color_balance_tool_dialog;
+ im_tool_class->reset = gimp_color_balance_tool_reset;
}
static void
Modified: trunk/app/tools/gimpcolorizetool.c
==============================================================================
--- trunk/app/tools/gimpcolorizetool.c (original)
+++ trunk/app/tools/gimpcolorizetool.c Thu May 22 11:00:50 2008
@@ -101,20 +101,18 @@
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
- object_class->finalize = gimp_colorize_tool_finalize;
+ object_class->finalize = gimp_colorize_tool_finalize;
- tool_class->initialize = gimp_colorize_tool_initialize;
+ tool_class->initialize = gimp_colorize_tool_initialize;
- im_tool_class->shell_desc = _("Colorize the Image");
- im_tool_class->settings_name = "colorize";
- im_tool_class->load_dialog_title = _("Load Colorize Settings");
- im_tool_class->load_button_tip = _("Load colorize settings from file");
- im_tool_class->save_dialog_title = _("Save Colorsize Settings");
- im_tool_class->save_button_tip = _("Save colorize settings to file");
-
- im_tool_class->get_operation = gimp_colorize_tool_get_operation;
- im_tool_class->map = gimp_colorize_tool_map;
- im_tool_class->dialog = gimp_colorize_tool_dialog;
+ im_tool_class->shell_desc = _("Colorize the Image");
+ im_tool_class->settings_name = "colorize";
+ im_tool_class->import_dialog_title = _("Import Colorize Settings");
+ im_tool_class->export_dialog_title = _("Export Colorsize Settings");
+
+ im_tool_class->get_operation = gimp_colorize_tool_get_operation;
+ im_tool_class->map = gimp_colorize_tool_map;
+ im_tool_class->dialog = gimp_colorize_tool_dialog;
}
static void
Modified: trunk/app/tools/gimpcurvestool.c
==============================================================================
--- trunk/app/tools/gimpcurvestool.c (original)
+++ trunk/app/tools/gimpcurvestool.c Thu May 22 11:00:50 2008
@@ -94,10 +94,10 @@
static void gimp_curves_tool_map (GimpImageMapTool *image_map_tool);
static void gimp_curves_tool_dialog (GimpImageMapTool *image_map_tool);
static void gimp_curves_tool_reset (GimpImageMapTool *image_map_tool);
-static gboolean gimp_curves_tool_settings_load (GimpImageMapTool *image_map_tool,
+static gboolean gimp_curves_tool_settings_import(GimpImageMapTool *image_map_tool,
const gchar *filename,
GError **error);
-static gboolean gimp_curves_tool_settings_save (GimpImageMapTool *image_map_tool,
+static gboolean gimp_curves_tool_settings_export(GimpImageMapTool *image_map_tool,
const gchar *filename,
GError **error);
@@ -152,28 +152,26 @@
GimpColorToolClass *color_tool_class = GIMP_COLOR_TOOL_CLASS (klass);
GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
- object_class->finalize = gimp_curves_tool_finalize;
+ object_class->finalize = gimp_curves_tool_finalize;
- tool_class->initialize = gimp_curves_tool_initialize;
- tool_class->button_release = gimp_curves_tool_button_release;
- tool_class->key_press = gimp_curves_tool_key_press;
- tool_class->oper_update = gimp_curves_tool_oper_update;
-
- color_tool_class->picked = gimp_curves_tool_color_picked;
-
- im_tool_class->shell_desc = _("Adjust Color Curves");
- im_tool_class->settings_name = "curves";
- im_tool_class->load_dialog_title = _("Load Curves");
- im_tool_class->load_button_tip = _("Load curves settings from file");
- im_tool_class->save_dialog_title = _("Save Curves");
- im_tool_class->save_button_tip = _("Save curves settings to file");
-
- im_tool_class->get_operation = gimp_curves_tool_get_operation;
- im_tool_class->map = gimp_curves_tool_map;
- im_tool_class->dialog = gimp_curves_tool_dialog;
- im_tool_class->reset = gimp_curves_tool_reset;
- im_tool_class->settings_load = gimp_curves_tool_settings_load;
- im_tool_class->settings_save = gimp_curves_tool_settings_save;
+ tool_class->initialize = gimp_curves_tool_initialize;
+ tool_class->button_release = gimp_curves_tool_button_release;
+ tool_class->key_press = gimp_curves_tool_key_press;
+ tool_class->oper_update = gimp_curves_tool_oper_update;
+
+ color_tool_class->picked = gimp_curves_tool_color_picked;
+
+ im_tool_class->shell_desc = _("Adjust Color Curves");
+ im_tool_class->settings_name = "curves";
+ im_tool_class->import_dialog_title = _("Import Curves");
+ im_tool_class->export_dialog_title = _("Export Curves");
+
+ im_tool_class->get_operation = gimp_curves_tool_get_operation;
+ im_tool_class->map = gimp_curves_tool_map;
+ im_tool_class->dialog = gimp_curves_tool_dialog;
+ im_tool_class->reset = gimp_curves_tool_reset;
+ im_tool_class->settings_import = gimp_curves_tool_settings_import;
+ im_tool_class->settings_export = gimp_curves_tool_settings_export;
}
static void
@@ -575,9 +573,9 @@
}
static gboolean
-gimp_curves_tool_settings_load (GimpImageMapTool *image_map_tool,
- const gchar *filename,
- GError **error)
+gimp_curves_tool_settings_import (GimpImageMapTool *image_map_tool,
+ const gchar *filename,
+ GError **error)
{
GimpCurvesTool *tool = GIMP_CURVES_TOOL (image_map_tool);
FILE *file;
@@ -602,9 +600,9 @@
}
static gboolean
-gimp_curves_tool_settings_save (GimpImageMapTool *image_map_tool,
- const gchar *filename,
- GError **error)
+gimp_curves_tool_settings_export (GimpImageMapTool *image_map_tool,
+ const gchar *filename,
+ GError **error)
{
GimpCurvesTool *tool = GIMP_CURVES_TOOL (image_map_tool);
FILE *file;
Modified: trunk/app/tools/gimpdesaturatetool.c
==============================================================================
--- trunk/app/tools/gimpdesaturatetool.c (original)
+++ trunk/app/tools/gimpdesaturatetool.c Thu May 22 11:00:50 2008
@@ -88,18 +88,16 @@
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
- tool_class->initialize = gimp_desaturate_tool_initialize;
+ tool_class->initialize = gimp_desaturate_tool_initialize;
- im_tool_class->shell_desc = _("Desaturate (Remove Colors)");
- im_tool_class->settings_name = "desaturate";
- im_tool_class->load_dialog_title = _("Load Desaturate Settings");
- im_tool_class->load_button_tip = _("Load desaturate settings from file");
- im_tool_class->save_dialog_title = _("Save Desaturate Settings");
- im_tool_class->save_button_tip = _("Save desaturate settings to file");
-
- im_tool_class->get_operation = gimp_desaturate_tool_get_operation;
- im_tool_class->map = gimp_desaturate_tool_map;
- im_tool_class->dialog = gimp_desaturate_tool_dialog;
+ im_tool_class->shell_desc = _("Desaturate (Remove Colors)");
+ im_tool_class->settings_name = "desaturate";
+ im_tool_class->import_dialog_title = _("Import Desaturate Settings");
+ im_tool_class->export_dialog_title = _("Export Desaturate Settings");
+
+ im_tool_class->get_operation = gimp_desaturate_tool_get_operation;
+ im_tool_class->map = gimp_desaturate_tool_map;
+ im_tool_class->dialog = gimp_desaturate_tool_dialog;
}
static void
Modified: trunk/app/tools/gimphuesaturationtool.c
==============================================================================
--- trunk/app/tools/gimphuesaturationtool.c (original)
+++ trunk/app/tools/gimphuesaturationtool.c Thu May 22 11:00:50 2008
@@ -114,21 +114,19 @@
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
- object_class->finalize = gimp_hue_saturation_tool_finalize;
+ object_class->finalize = gimp_hue_saturation_tool_finalize;
- tool_class->initialize = gimp_hue_saturation_tool_initialize;
+ tool_class->initialize = gimp_hue_saturation_tool_initialize;
- im_tool_class->shell_desc = _("Adjust Hue / Lightness / Saturation");
- im_tool_class->settings_name = "hue-saturation";
- im_tool_class->load_dialog_title = _("Load Hue-Saturation Settings");
- im_tool_class->load_button_tip = _("Load hue-saturation settings from file");
- im_tool_class->save_dialog_title = _("Save Hue-Saturation Settings");
- im_tool_class->save_button_tip = _("Save hue-saturation settings to file");
-
- im_tool_class->get_operation = gimp_hue_saturation_tool_get_operation;
- im_tool_class->map = gimp_hue_saturation_tool_map;
- im_tool_class->dialog = gimp_hue_saturation_tool_dialog;
- im_tool_class->reset = gimp_hue_saturation_tool_reset;
+ im_tool_class->shell_desc = _("Adjust Hue / Lightness / Saturation");
+ im_tool_class->settings_name = "hue-saturation";
+ im_tool_class->import_dialog_title = _("Import Hue-Saturation Settings");
+ im_tool_class->export_dialog_title = _("Export Hue-Saturation Settings");
+
+ im_tool_class->get_operation = gimp_hue_saturation_tool_get_operation;
+ im_tool_class->map = gimp_hue_saturation_tool_map;
+ im_tool_class->dialog = gimp_hue_saturation_tool_dialog;
+ im_tool_class->reset = gimp_hue_saturation_tool_reset;
}
static void
Modified: trunk/app/tools/gimpimagemaptool-settings.c
==============================================================================
--- trunk/app/tools/gimpimagemaptool-settings.c (original)
+++ trunk/app/tools/gimpimagemaptool-settings.c Thu May 22 11:00:50 2008
@@ -68,9 +68,9 @@
GimpImageMapTool *tool);
static void gimp_image_map_tool_favorite_activate (GtkWidget *widget,
GimpImageMapTool *tool);
-static void gimp_image_map_tool_load_activate (GtkWidget *widget,
+static void gimp_image_map_tool_import_activate (GtkWidget *widget,
GimpImageMapTool *tool);
-static void gimp_image_map_tool_save_activate (GtkWidget *widget,
+static void gimp_image_map_tool_export_activate (GtkWidget *widget,
GimpImageMapTool *tool);
static void gimp_image_map_tool_settings_dialog (GimpImageMapTool *im_tool,
@@ -80,14 +80,38 @@
static void gimp_image_map_tool_favorite_callback (GtkWidget *query_box,
const gchar *string,
gpointer data);
-static gboolean gimp_image_map_tool_settings_load (GimpImageMapTool *tool,
+static gboolean gimp_image_map_tool_settings_import(GimpImageMapTool *tool,
const gchar *filename);
-static gboolean gimp_image_map_tool_settings_save (GimpImageMapTool *tool,
+static gboolean gimp_image_map_tool_settings_export(GimpImageMapTool *tool,
const gchar *filename);
/* public functions */
+static GtkWidget *
+gimp_image_map_tool_menu_item_add (GimpImageMapTool *image_map_tool,
+ const gchar *stock_id,
+ const gchar *label,
+ GCallback callback)
+{
+ GtkWidget *item;
+ GtkWidget *image;
+
+ item = gtk_image_menu_item_new_with_mnemonic (label);
+ image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+
+ gtk_menu_shell_append (GTK_MENU_SHELL (image_map_tool->favorites_menu),
+ item);
+ gtk_widget_show (item);
+
+ g_signal_connect (item, "activate",
+ callback,
+ image_map_tool);
+
+ return item;
+}
+
gboolean
gimp_image_map_tool_add_settings_gui (GimpImageMapTool *image_map_tool)
{
@@ -98,7 +122,6 @@
GtkWidget *combo;
GtkWidget *button;
GtkWidget *arrow;
- GtkWidget *item;
klass = GIMP_IMAGE_MAP_TOOL_GET_CLASS (image_map_tool);
@@ -112,7 +135,7 @@
FALSE, FALSE, 0);
gtk_widget_show (hbox);
- label = gtk_label_new (_("Recent Settings:"));
+ label = gtk_label_new_with_mnemonic (_("Pre_sets:"));
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
@@ -125,6 +148,8 @@
gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
gtk_widget_show (combo);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
+
gimp_help_set_help_data (combo, _("Pick a setting from the list"),
NULL);
@@ -146,40 +171,28 @@
G_CALLBACK (gimp_image_map_tool_menu_press),
image_map_tool);
- /* The load/save hbox */
+ /* Favorites menu */
image_map_tool->favorites_menu = gtk_menu_new ();
gtk_menu_attach_to_widget (GTK_MENU (image_map_tool->favorites_menu),
button, NULL);
- item = gtk_image_menu_item_new_with_mnemonic (_("Save to _Favorites"));
- gtk_menu_shell_append (GTK_MENU_SHELL (image_map_tool->favorites_menu),
- item);
- gtk_widget_show (item);
-
- g_signal_connect (item, "activate",
- G_CALLBACK (gimp_image_map_tool_favorite_activate),
- image_map_tool);
-
- image_map_tool->load_item =
- gtk_image_menu_item_new_from_stock (GTK_STOCK_OPEN, NULL);
- gtk_menu_shell_append (GTK_MENU_SHELL (image_map_tool->favorites_menu),
- image_map_tool->load_item);
- gtk_widget_show (image_map_tool->load_item);
-
- g_signal_connect (image_map_tool->load_item, "activate",
- G_CALLBACK (gimp_image_map_tool_load_activate),
- image_map_tool);
-
- image_map_tool->save_item =
- gtk_image_menu_item_new_from_stock (GTK_STOCK_SAVE, NULL);
- gtk_menu_shell_append (GTK_MENU_SHELL (image_map_tool->favorites_menu),
- image_map_tool->save_item);
- gtk_widget_show (image_map_tool->save_item);
-
- g_signal_connect (image_map_tool->save_item, "activate",
- G_CALLBACK (gimp_image_map_tool_save_activate),
- image_map_tool);
+ gimp_image_map_tool_menu_item_add (image_map_tool,
+ GTK_STOCK_ADD,
+ _("Save Settings to _Favorites"),
+ G_CALLBACK (gimp_image_map_tool_favorite_activate));
+
+ image_map_tool->import_item =
+ gimp_image_map_tool_menu_item_add (image_map_tool,
+ GTK_STOCK_OPEN,
+ _("_Import Settings from File"),
+ G_CALLBACK (gimp_image_map_tool_import_activate));
+
+ image_map_tool->export_item =
+ gimp_image_map_tool_menu_item_add (image_map_tool,
+ GTK_STOCK_SAVE,
+ _("_Export Settings to File"),
+ G_CALLBACK (gimp_image_map_tool_export_activate));
return TRUE;
}
@@ -225,9 +238,9 @@
}
gboolean
-gimp_image_map_tool_real_settings_load (GimpImageMapTool *tool,
- const gchar *filename,
- GError **error)
+gimp_image_map_tool_real_settings_import (GimpImageMapTool *tool,
+ const gchar *filename,
+ GError **error)
{
gboolean success;
@@ -242,9 +255,9 @@
}
gboolean
-gimp_image_map_tool_real_settings_save (GimpImageMapTool *tool,
- const gchar *filename,
- GError **error)
+gimp_image_map_tool_real_settings_export (GimpImageMapTool *tool,
+ const gchar *filename,
+ GError **error)
{
GimpImageMapToolClass *klass = GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool);
gchar *header;
@@ -432,21 +445,21 @@
}
static void
-gimp_image_map_tool_load_activate (GtkWidget *widget,
- GimpImageMapTool *tool)
+gimp_image_map_tool_import_activate (GtkWidget *widget,
+ GimpImageMapTool *tool)
{
GimpImageMapToolClass *klass = GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool);
- gimp_image_map_tool_settings_dialog (tool, klass->load_dialog_title, FALSE);
+ gimp_image_map_tool_settings_dialog (tool, klass->import_dialog_title, FALSE);
}
static void
-gimp_image_map_tool_save_activate (GtkWidget *widget,
- GimpImageMapTool *tool)
+gimp_image_map_tool_export_activate (GtkWidget *widget,
+ GimpImageMapTool *tool)
{
GimpImageMapToolClass *klass = GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool);
- gimp_image_map_tool_settings_dialog (tool, klass->save_dialog_title, TRUE);
+ gimp_image_map_tool_settings_dialog (tool, klass->export_dialog_title, TRUE);
}
static void
@@ -465,17 +478,17 @@
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
if (save)
- gimp_image_map_tool_settings_save (tool, filename);
+ gimp_image_map_tool_settings_export (tool, filename);
else
- gimp_image_map_tool_settings_load (tool, filename);
+ gimp_image_map_tool_settings_import (tool, filename);
g_free (filename);
}
if (save)
- gtk_widget_set_sensitive (tool->load_item, TRUE);
+ gtk_widget_set_sensitive (tool->import_item, TRUE);
else
- gtk_widget_set_sensitive (tool->save_item, TRUE);
+ gtk_widget_set_sensitive (tool->export_item, TRUE);
gtk_widget_destroy (dialog);
}
@@ -501,9 +514,9 @@
}
if (save)
- gtk_widget_set_sensitive (tool->load_item, FALSE);
+ gtk_widget_set_sensitive (tool->import_item, FALSE);
else
- gtk_widget_set_sensitive (tool->save_item, FALSE);
+ gtk_widget_set_sensitive (tool->export_item, FALSE);
tool->settings_dialog =
gtk_file_chooser_dialog_new (title, GTK_WINDOW (tool->shell),
@@ -521,7 +534,7 @@
g_object_set_data (G_OBJECT (chooser), "save", GINT_TO_POINTER (save));
- gtk_window_set_role (GTK_WINDOW (chooser), "gimp-load-save-settings");
+ gtk_window_set_role (GTK_WINDOW (chooser), "gimp-import-export-settings");
gtk_window_set_position (GTK_WINDOW (chooser), GTK_WIN_POS_MOUSE);
g_object_add_weak_pointer (G_OBJECT (chooser),
@@ -584,15 +597,15 @@
}
static gboolean
-gimp_image_map_tool_settings_load (GimpImageMapTool *tool,
- const gchar *filename)
+gimp_image_map_tool_settings_import (GimpImageMapTool *tool,
+ const gchar *filename)
{
GimpImageMapToolClass *tool_class = GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool);
GError *error = NULL;
- g_return_val_if_fail (tool_class->settings_load != NULL, FALSE);
+ g_return_val_if_fail (tool_class->settings_import != NULL, FALSE);
- if (! tool_class->settings_load (tool, filename, &error))
+ if (! tool_class->settings_import (tool, filename, &error))
{
gimp_message (GIMP_TOOL (tool)->tool_info->gimp, G_OBJECT (tool->shell),
GIMP_MESSAGE_ERROR, error->message);
@@ -611,16 +624,16 @@
}
static gboolean
-gimp_image_map_tool_settings_save (GimpImageMapTool *tool,
- const gchar *filename)
+gimp_image_map_tool_settings_export (GimpImageMapTool *tool,
+ const gchar *filename)
{
GimpImageMapToolClass *tool_class = GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool);
GError *error = NULL;
gchar *display_name;
- g_return_val_if_fail (tool_class->settings_save != NULL, FALSE);
+ g_return_val_if_fail (tool_class->settings_export != NULL, FALSE);
- if (! tool_class->settings_save (tool, filename, &error))
+ if (! tool_class->settings_export (tool, filename, &error))
{
gimp_message (GIMP_TOOL (tool)->tool_info->gimp, G_OBJECT (tool->shell),
GIMP_MESSAGE_ERROR, error->message);
Modified: trunk/app/tools/gimpimagemaptool-settings.h
==============================================================================
--- trunk/app/tools/gimpimagemaptool-settings.h (original)
+++ trunk/app/tools/gimpimagemaptool-settings.h Thu May 22 11:00:50 2008
@@ -22,16 +22,16 @@
#define __GIMP_IMAGE_MAP_TOOL_SETTINGS_H__
-gboolean gimp_image_map_tool_add_settings_gui (GimpImageMapTool *image_map_tool);
+gboolean gimp_image_map_tool_add_settings_gui (GimpImageMapTool *image_map_tool);
-void gimp_image_map_tool_add_recent_settings (GimpImageMapTool *image_map_tool);
+void gimp_image_map_tool_add_recent_settings (GimpImageMapTool *image_map_tool);
-gboolean gimp_image_map_tool_real_settings_load (GimpImageMapTool *tool,
- const gchar *filename,
- GError **error);
-gboolean gimp_image_map_tool_real_settings_save (GimpImageMapTool *tool,
- const gchar *filename,
- GError **error);
+gboolean gimp_image_map_tool_real_settings_import (GimpImageMapTool *tool,
+ const gchar *filename,
+ GError **error);
+gboolean gimp_image_map_tool_real_settings_export (GimpImageMapTool *tool,
+ const gchar *filename,
+ GError **error);
#endif /* __GIMP_IMAGE_MAP_TOOL_SETTINGS_H__ */
Modified: trunk/app/tools/gimpimagemaptool.c
==============================================================================
--- trunk/app/tools/gimpimagemaptool.c (original)
+++ trunk/app/tools/gimpimagemaptool.c Thu May 22 11:00:50 2008
@@ -146,28 +146,26 @@
parent_class = g_type_class_peek_parent (klass);
- object_class->constructor = gimp_image_map_tool_constructor;
- object_class->finalize = gimp_image_map_tool_finalize;
+ object_class->constructor = gimp_image_map_tool_constructor;
+ object_class->finalize = gimp_image_map_tool_finalize;
- tool_class->initialize = gimp_image_map_tool_initialize;
- tool_class->control = gimp_image_map_tool_control;
- tool_class->key_press = gimp_image_map_tool_key_press;
-
- color_tool_class->pick = gimp_image_map_tool_pick_color;
-
- klass->shell_desc = NULL;
- klass->settings_name = NULL;
- klass->load_dialog_title = NULL;
- klass->load_button_tip = NULL;
- klass->save_dialog_title = NULL;
- klass->save_button_tip = NULL;
-
- klass->get_operation = NULL;
- klass->map = NULL;
- klass->dialog = NULL;
- klass->reset = NULL;
- klass->settings_load = gimp_image_map_tool_real_settings_load;
- klass->settings_save = gimp_image_map_tool_real_settings_save;
+ tool_class->initialize = gimp_image_map_tool_initialize;
+ tool_class->control = gimp_image_map_tool_control;
+ tool_class->key_press = gimp_image_map_tool_key_press;
+
+ color_tool_class->pick = gimp_image_map_tool_pick_color;
+
+ klass->shell_desc = NULL;
+ klass->settings_name = NULL;
+ klass->import_dialog_title = NULL;
+ klass->export_dialog_title = NULL;
+
+ klass->get_operation = NULL;
+ klass->map = NULL;
+ klass->dialog = NULL;
+ klass->reset = NULL;
+ klass->settings_import = gimp_image_map_tool_real_settings_import;
+ klass->settings_export = gimp_image_map_tool_real_settings_export;
}
static void
@@ -199,8 +197,8 @@
image_map_tool->shell = NULL;
image_map_tool->main_vbox = NULL;
image_map_tool->favorites_menu = NULL;
- image_map_tool->load_item = NULL;
- image_map_tool->save_item = NULL;
+ image_map_tool->import_item = NULL;
+ image_map_tool->export_item = NULL;
image_map_tool->settings_dialog = NULL;
}
@@ -248,8 +246,8 @@
image_map_tool->shell = NULL;
image_map_tool->main_vbox = NULL;
image_map_tool->favorites_menu = NULL;
- image_map_tool->load_item = NULL;
- image_map_tool->save_item = NULL;
+ image_map_tool->import_item = NULL;
+ image_map_tool->export_item = NULL;
}
G_OBJECT_CLASS (parent_class)->finalize (object);
Modified: trunk/app/tools/gimpimagemaptool.h
==============================================================================
--- trunk/app/tools/gimpimagemaptool.h (original)
+++ trunk/app/tools/gimpimagemaptool.h Thu May 22 11:00:50 2008
@@ -52,8 +52,8 @@
GtkWidget *shell;
GtkWidget *main_vbox;
GtkWidget *favorites_menu;
- GtkWidget *load_item;
- GtkWidget *save_item;
+ GtkWidget *import_item;
+ GtkWidget *export_item;
/* settings file dialog */
GtkWidget *settings_dialog;
@@ -65,26 +65,24 @@
const gchar *shell_desc;
const gchar *settings_name;
- const gchar *load_button_tip;
- const gchar *load_dialog_title;
- const gchar *save_button_tip;
- const gchar *save_dialog_title;
+ const gchar *import_dialog_title;
+ const gchar *export_dialog_title;
GimpContainer *recent_settings;
/* virtual functions */
- GeglNode * (* get_operation) (GimpImageMapTool *image_map_tool,
- GObject **config);
- void (* map) (GimpImageMapTool *image_map_tool);
- void (* dialog) (GimpImageMapTool *image_map_tool);
- void (* reset) (GimpImageMapTool *image_map_tool);
-
- gboolean (* settings_load) (GimpImageMapTool *image_map_tool,
- const gchar *filename,
- GError **error);
- gboolean (* settings_save) (GimpImageMapTool *image_map_tool,
- const gchar *filename,
- GError **error);
+ GeglNode * (* get_operation) (GimpImageMapTool *image_map_tool,
+ GObject **config);
+ void (* map) (GimpImageMapTool *image_map_tool);
+ void (* dialog) (GimpImageMapTool *image_map_tool);
+ void (* reset) (GimpImageMapTool *image_map_tool);
+
+ gboolean (* settings_import) (GimpImageMapTool *image_map_tool,
+ const gchar *filename,
+ GError **error);
+ gboolean (* settings_export) (GimpImageMapTool *image_map_tool,
+ const gchar *filename,
+ GError **error);
};
Modified: trunk/app/tools/gimplevelstool.c
==============================================================================
--- trunk/app/tools/gimplevelstool.c (original)
+++ trunk/app/tools/gimplevelstool.c Thu May 22 11:00:50 2008
@@ -87,10 +87,10 @@
static void gimp_levels_tool_dialog_unmap (GtkWidget *dialog,
GimpLevelsTool *tool);
static void gimp_levels_tool_reset (GimpImageMapTool *im_tool);
-static gboolean gimp_levels_tool_settings_load (GimpImageMapTool *im_tool,
+static gboolean gimp_levels_tool_settings_import(GimpImageMapTool *im_tool,
const gchar *filename,
GError **error);
-static gboolean gimp_levels_tool_settings_save (GimpImageMapTool *im_tool,
+static gboolean gimp_levels_tool_settings_export(GimpImageMapTool *im_tool,
const gchar *filename,
GError **error);
@@ -159,25 +159,23 @@
GimpColorToolClass *color_tool_class = GIMP_COLOR_TOOL_CLASS (klass);
GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
- object_class->finalize = gimp_levels_tool_finalize;
+ object_class->finalize = gimp_levels_tool_finalize;
- tool_class->initialize = gimp_levels_tool_initialize;
+ tool_class->initialize = gimp_levels_tool_initialize;
- color_tool_class->picked = gimp_levels_tool_color_picked;
+ color_tool_class->picked = gimp_levels_tool_color_picked;
- im_tool_class->shell_desc = _("Adjust Color Levels");
- im_tool_class->settings_name = "levels";
- im_tool_class->load_dialog_title = _("Load Levels");
- im_tool_class->load_button_tip = _("Load levels settings from file");
- im_tool_class->save_dialog_title = _("Save Levels");
- im_tool_class->save_button_tip = _("Save levels settings to file");
-
- im_tool_class->get_operation = gimp_levels_tool_get_operation;
- im_tool_class->map = gimp_levels_tool_map;
- im_tool_class->dialog = gimp_levels_tool_dialog;
- im_tool_class->reset = gimp_levels_tool_reset;
- im_tool_class->settings_load = gimp_levels_tool_settings_load;
- im_tool_class->settings_save = gimp_levels_tool_settings_save;
+ im_tool_class->shell_desc = _("Adjust Color Levels");
+ im_tool_class->settings_name = "levels";
+ im_tool_class->import_dialog_title = _("Import Levels");
+ im_tool_class->export_dialog_title = _("Export Levels");
+
+ im_tool_class->get_operation = gimp_levels_tool_get_operation;
+ im_tool_class->map = gimp_levels_tool_map;
+ im_tool_class->dialog = gimp_levels_tool_dialog;
+ im_tool_class->reset = gimp_levels_tool_reset;
+ im_tool_class->settings_import = gimp_levels_tool_settings_import;
+ im_tool_class->settings_export = gimp_levels_tool_settings_export;
}
static void
@@ -709,9 +707,9 @@
}
static gboolean
-gimp_levels_tool_settings_load (GimpImageMapTool *image_map_tool,
- const gchar *filename,
- GError **error)
+gimp_levels_tool_settings_import (GimpImageMapTool *image_map_tool,
+ const gchar *filename,
+ GError **error)
{
GimpLevelsTool *tool = GIMP_LEVELS_TOOL (image_map_tool);
FILE *file;
@@ -736,9 +734,9 @@
}
static gboolean
-gimp_levels_tool_settings_save (GimpImageMapTool *image_map_tool,
- const gchar *filename,
- GError **error)
+gimp_levels_tool_settings_export (GimpImageMapTool *image_map_tool,
+ const gchar *filename,
+ GError **error)
{
GimpLevelsTool *tool = GIMP_LEVELS_TOOL (image_map_tool);
FILE *file;
Modified: trunk/app/tools/gimpposterizetool.c
==============================================================================
--- trunk/app/tools/gimpposterizetool.c (original)
+++ trunk/app/tools/gimpposterizetool.c Thu May 22 11:00:50 2008
@@ -96,20 +96,18 @@
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
- object_class->finalize = gimp_posterize_tool_finalize;
+ object_class->finalize = gimp_posterize_tool_finalize;
- tool_class->initialize = gimp_posterize_tool_initialize;
+ tool_class->initialize = gimp_posterize_tool_initialize;
- im_tool_class->shell_desc = _("Posterize (Reduce Number of Colors)");
- im_tool_class->settings_name = "posterize";
- im_tool_class->load_dialog_title = _("Load Posterize Settings");
- im_tool_class->load_button_tip = _("Load posterize settings from file");
- im_tool_class->save_dialog_title = _("Save Posterize Settings");
- im_tool_class->save_button_tip = _("Save posterize settings to file");
-
- im_tool_class->get_operation = gimp_posterize_tool_get_operation;
- im_tool_class->map = gimp_posterize_tool_map;
- im_tool_class->dialog = gimp_posterize_tool_dialog;
+ im_tool_class->shell_desc = _("Posterize (Reduce Number of Colors)");
+ im_tool_class->settings_name = "posterize";
+ im_tool_class->import_dialog_title = _("Import Posterize Settings");
+ im_tool_class->export_dialog_title = _("Export Posterize Settings");
+
+ im_tool_class->get_operation = gimp_posterize_tool_get_operation;
+ im_tool_class->map = gimp_posterize_tool_map;
+ im_tool_class->dialog = gimp_posterize_tool_dialog;
}
static void
Modified: trunk/app/tools/gimpthresholdtool.c
==============================================================================
--- trunk/app/tools/gimpthresholdtool.c (original)
+++ trunk/app/tools/gimpthresholdtool.c Thu May 22 11:00:50 2008
@@ -102,20 +102,18 @@
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
- object_class->finalize = gimp_threshold_tool_finalize;
+ object_class->finalize = gimp_threshold_tool_finalize;
- tool_class->initialize = gimp_threshold_tool_initialize;
+ tool_class->initialize = gimp_threshold_tool_initialize;
- im_tool_class->shell_desc = _("Apply Threshold");
- im_tool_class->settings_name = "threshold";
- im_tool_class->load_dialog_title = _("Load Threshold Settings");
- im_tool_class->load_button_tip = _("Load threshold settings from file");
- im_tool_class->save_dialog_title = _("Save Threshold Settings");
- im_tool_class->save_button_tip = _("Save threshold settings to file");
-
- im_tool_class->get_operation = gimp_threshold_tool_get_operation;
- im_tool_class->map = gimp_threshold_tool_map;
- im_tool_class->dialog = gimp_threshold_tool_dialog;
+ im_tool_class->shell_desc = _("Apply Threshold");
+ im_tool_class->settings_name = "threshold";
+ im_tool_class->import_dialog_title = _("Import Threshold Settings");
+ im_tool_class->export_dialog_title = _("Export Threshold Settings");
+
+ im_tool_class->get_operation = gimp_threshold_tool_get_operation;
+ im_tool_class->map = gimp_threshold_tool_map;
+ im_tool_class->dialog = gimp_threshold_tool_dialog;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]