Commit 9f85ee00 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

s/save/export/g, s/load/import/g, removed button tooltip members.

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.


svn path=/trunk/; revision=25752
parent 4aaf1c47
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.
2008-05-22 Michael Natterer <mitch@gimp.org>
* app/tools/gimpfreeselecttool.c: delete trailing whitespace.
......
......@@ -122,23 +122,21 @@ gimp_brightness_contrast_tool_class_init (GimpBrightnessContrastToolClass *klass
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;
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;
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->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
......
......@@ -106,21 +106,19 @@ gimp_color_balance_tool_class_init (GimpColorBalanceToolClass *klass)
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->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;
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
......
......@@ -101,20 +101,18 @@ gimp_colorize_tool_class_init (GimpColorizeToolClass *klass)
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->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;
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
......
......@@ -94,10 +94,10 @@ static GeglNode * gimp_curves_tool_get_operation (GimpImageMapTool *image_m
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 @@ gimp_curves_tool_class_init (GimpCurvesToolClass *klass)
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;
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;
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->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_load = gimp_curves_tool_settings_load;
im_tool_class->settings_save = gimp_curves_tool_settings_save;
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 @@ gimp_curves_tool_reset (GimpImageMapTool *image_map_tool)
}
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 @@ gimp_curves_tool_settings_load (GimpImageMapTool *image_map_tool,
}
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;
......
......@@ -88,18 +88,16 @@ gimp_desaturate_tool_class_init (GimpDesaturateToolClass *klass)
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
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;
tool_class->initialize = gimp_desaturate_tool_initialize;
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
......
......@@ -114,21 +114,19 @@ gimp_hue_saturation_tool_class_init (GimpHueSaturationToolClass *klass)
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->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;
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
......
......@@ -68,9 +68,9 @@ static gboolean gimp_image_map_tool_menu_press (GtkWidget *widget,
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_settings_dialog (GimpImageMapTool *im_tool,
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 @@ gimp_image_map_tool_add_settings_gui (GimpImageMapTool *image_map_tool)
GtkWidget *combo;
GtkWidget *button;
GtkWidget *arrow;
GtkWidget *item;
klass = GIMP_IMAGE_MAP_TOOL_GET_CLASS (image_map_tool);
......@@ -112,7 +135,7 @@ gimp_image_map_tool_add_settings_gui (GimpImageMapTool *image_map_tool)
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 @@ gimp_image_map_tool_add_settings_gui (GimpImageMapTool *image_map_tool)
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 @@ gimp_image_map_tool_add_settings_gui (GimpImageMapTool *image_map_tool)
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);
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->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->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->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);
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 @@ 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)
gimp_image_map_tool_real_settings_import (GimpImageMapTool *tool,
const gchar *filename,
GError **error)
{
gboolean success;
......@@ -242,9 +255,9 @@ gimp_image_map_tool_real_settings_load (GimpImageMapTool *tool,
}
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 @@ gimp_image_map_tool_favorite_activate (GtkWidget *widget,
}
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 @@ settings_dialog_response (GtkWidget *dialog,
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 @@ gimp_image_map_tool_settings_dialog (GimpImageMapTool *tool,
}
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 @@ gimp_image_map_tool_settings_dialog (GimpImageMapTool *tool,
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 @@ gimp_image_map_tool_favorite_callback (GtkWidget *query_box,
}
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 @@ gimp_image_map_tool_settings_load (GimpImageMapTool *tool,
}
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);
......
......@@ -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__ */
......@@ -146,28 +146,26 @@ gimp_image_map_tool_class_init (GimpImageMapToolClass *klass)
parent_class = g_type_class_peek_parent (klass);
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;
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->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 @@ gimp_image_map_tool_init (GimpImageMapTool *image_map_tool)
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 @@ gimp_image_map_tool_finalize (GObject *object)
image_map_tool->shell = NULL;
image_map_tool->main_vbox = NULL;
image_map_tool->favorites_menu = NULL;