Commit 6378e9fc authored by Michael Natterer's avatar Michael Natterer 😴

app: rename member GimpImageMapTool->shell to ->dialog

"shell" has confused me once too often today...
parent 41494522
......@@ -130,7 +130,7 @@ gimp_brightness_contrast_tool_class_init (GimpBrightnessContrastToolClass *klass
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->dialog_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");
......
......@@ -110,7 +110,7 @@ gimp_color_balance_tool_class_init (GimpColorBalanceToolClass *klass)
tool_class->initialize = gimp_color_balance_tool_initialize;
im_tool_class->shell_desc = _("Adjust Color Balance");
im_tool_class->dialog_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");
......
......@@ -106,7 +106,7 @@ gimp_colorize_tool_class_init (GimpColorizeToolClass *klass)
tool_class->initialize = gimp_colorize_tool_initialize;
im_tool_class->shell_desc = _("Colorize the Image");
im_tool_class->dialog_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 Colorize Settings");
......
......@@ -174,7 +174,7 @@ gimp_curves_tool_class_init (GimpCurvesToolClass *klass)
color_tool_class->picked = gimp_curves_tool_color_picked;
im_tool_class->shell_desc = _("Adjust Color Curves");
im_tool_class->dialog_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");
......
......@@ -90,7 +90,7 @@ gimp_desaturate_tool_class_init (GimpDesaturateToolClass *klass)
tool_class->initialize = gimp_desaturate_tool_initialize;
im_tool_class->shell_desc = _("Desaturate (Remove Colors)");
im_tool_class->dialog_desc = _("Desaturate (Remove Colors)");
im_tool_class->get_operation = gimp_desaturate_tool_get_operation;
im_tool_class->map = gimp_desaturate_tool_map;
......
......@@ -109,7 +109,7 @@ gimp_gegl_tool_class_init (GimpGeglToolClass *klass)
tool_class->initialize = gimp_gegl_tool_initialize;
im_tool_class->shell_desc = _("GEGL Operation");
im_tool_class->dialog_desc = _("GEGL Operation");
im_tool_class->get_operation = gimp_gegl_tool_get_operation;
im_tool_class->map = gimp_gegl_tool_map;
......
......@@ -118,7 +118,7 @@ gimp_hue_saturation_tool_class_init (GimpHueSaturationToolClass *klass)
tool_class->initialize = gimp_hue_saturation_tool_initialize;
im_tool_class->shell_desc = _("Adjust Hue / Lightness / Saturation");
im_tool_class->dialog_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");
......
......@@ -179,7 +179,7 @@ gimp_image_map_tool_settings_import (GimpSettingsBox *box,
if (! tool_class->settings_import (tool, filename, &error))
{
gimp_message_literal (GIMP_TOOL (tool)->tool_info->gimp,
G_OBJECT (tool->shell),
G_OBJECT (tool->dialog),
GIMP_MESSAGE_ERROR, error->message);
g_clear_error (&error);
......@@ -209,7 +209,7 @@ gimp_image_map_tool_settings_export (GimpSettingsBox *box,
if (! tool_class->settings_export (tool, filename, &error))
{
gimp_message_literal (GIMP_TOOL (tool)->tool_info->gimp,
G_OBJECT (tool->shell),
G_OBJECT (tool->dialog),
GIMP_MESSAGE_ERROR, error->message);
g_clear_error (&error);
......
......@@ -170,7 +170,7 @@ gimp_image_map_tool_class_init (GimpImageMapToolClass *klass)
color_tool_class->pick = gimp_image_map_tool_pick_color;
klass->shell_desc = NULL;
klass->dialog_desc = NULL;
klass->settings_name = NULL;
klass->import_dialog_title = NULL;
klass->export_dialog_title = NULL;
......@@ -210,7 +210,7 @@ gimp_image_map_tool_init (GimpImageMapTool *image_map_tool)
image_map_tool->default_config = NULL;
image_map_tool->image_map = NULL;
image_map_tool->shell = NULL;
image_map_tool->dialog = NULL;
image_map_tool->main_vbox = NULL;
image_map_tool->settings_box = NULL;
image_map_tool->label_group = NULL;
......@@ -255,7 +255,7 @@ gimp_image_map_tool_finalize (GObject *object)
image_map_tool->default_config = NULL;
}
if (image_map_tool->shell)
if (image_map_tool->dialog)
gimp_image_map_tool_dialog_destroy (image_map_tool);
G_OBJECT_CLASS (parent_class)->finalize (object);
......@@ -291,11 +291,11 @@ gimp_image_map_tool_initialize (GimpTool *tool,
/* set display so the dialog can be hidden on display destruction */
tool->display = display;
if (! image_map_tool->shell)
if (! image_map_tool->dialog)
{
GimpImageMapToolClass *klass;
GimpImageWindow *window;
GtkWidget *shell;
GtkWidget *dialog;
GtkWidget *vbox;
GtkWidget *toggle;
const gchar *stock_id;
......@@ -310,9 +310,9 @@ gimp_image_map_tool_initialize (GimpTool *tool,
if (image_map_tool->overlay)
{
image_map_tool->shell = shell =
image_map_tool->dialog = dialog =
gimp_overlay_dialog_new (tool_info,
klass->shell_desc,
klass->dialog_desc,
GIMP_STOCK_RESET, RESPONSE_RESET,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
......@@ -320,22 +320,22 @@ gimp_image_map_tool_initialize (GimpTool *tool,
NULL);
gtk_container_set_border_width (GTK_CONTAINER (shell), 6);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
gimp_overlay_box_add_child (GIMP_OVERLAY_BOX (display_shell->canvas),
shell, 1.0, 1.0);
dialog, 1.0, 1.0);
gimp_overlay_box_set_child_angle (GIMP_OVERLAY_BOX (display_shell->canvas),
shell, 0.0);
dialog, 0.0);
image_map_tool->main_vbox = vbox = gtk_vbox_new (FALSE, 6);
gtk_container_add (GTK_CONTAINER (shell), vbox);
gtk_container_add (GTK_CONTAINER (dialog), vbox);
}
else
{
image_map_tool->shell = shell =
image_map_tool->dialog = dialog =
gimp_tool_dialog_new (tool_info,
display_shell,
klass->shell_desc,
klass->dialog_desc,
GIMP_STOCK_RESET, RESPONSE_RESET,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
......@@ -343,7 +343,7 @@ gimp_image_map_tool_initialize (GimpTool *tool,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (shell),
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
......@@ -351,11 +351,11 @@ gimp_image_map_tool_initialize (GimpTool *tool,
image_map_tool->main_vbox = vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (shell))),
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox, TRUE, TRUE, 0);
}
g_signal_connect_object (shell, "response",
g_signal_connect_object (dialog, "response",
G_CALLBACK (gimp_image_map_tool_response),
G_OBJECT (image_map_tool), 0);
......@@ -381,24 +381,24 @@ gimp_image_map_tool_initialize (GimpTool *tool,
G_CALLBACK (gimp_image_map_tool_gegl_notify),
image_map_tool, 0);
}
else if (GIMP_IS_OVERLAY_DIALOG (image_map_tool->shell) &&
! gtk_widget_get_parent (image_map_tool->shell))
else if (GIMP_IS_OVERLAY_DIALOG (image_map_tool->dialog) &&
! gtk_widget_get_parent (image_map_tool->dialog))
{
gimp_overlay_box_add_child (GIMP_OVERLAY_BOX (display_shell->canvas),
image_map_tool->shell, 1.0, 1.0);
g_object_unref (image_map_tool->shell);
image_map_tool->dialog, 1.0, 1.0);
g_object_unref (image_map_tool->dialog);
}
if (! image_map_tool->overlay)
{
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (image_map_tool->shell),
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (image_map_tool->dialog),
GIMP_VIEWABLE (drawable),
GIMP_CONTEXT (tool_info->tool_options));
gimp_tool_dialog_set_shell (GIMP_TOOL_DIALOG (image_map_tool->shell),
gimp_tool_dialog_set_shell (GIMP_TOOL_DIALOG (image_map_tool->dialog),
display_shell);
}
gtk_widget_show (image_map_tool->shell);
gtk_widget_show (image_map_tool->dialog);
image_map_tool->drawable = drawable;
......@@ -421,8 +421,8 @@ gimp_image_map_tool_control (GimpTool *tool,
break;
case GIMP_TOOL_ACTION_HALT:
if (image_map_tool->shell)
gimp_image_map_tool_response (image_map_tool->shell,
if (image_map_tool->dialog)
gimp_image_map_tool_response (image_map_tool->dialog,
GTK_RESPONSE_CANCEL,
image_map_tool);
break;
......@@ -438,26 +438,26 @@ gimp_image_map_tool_key_press (GimpTool *tool,
{
GimpImageMapTool *image_map_tool = GIMP_IMAGE_MAP_TOOL (tool);
if (image_map_tool->shell && display == tool->display)
if (image_map_tool->dialog && display == tool->display)
{
switch (kevent->keyval)
{
case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
gimp_image_map_tool_response (image_map_tool->shell,
gimp_image_map_tool_response (image_map_tool->dialog,
GTK_RESPONSE_OK,
image_map_tool);
return TRUE;
case GDK_BackSpace:
gimp_image_map_tool_response (image_map_tool->shell,
gimp_image_map_tool_response (image_map_tool->dialog,
RESPONSE_RESET,
image_map_tool);
return TRUE;
case GDK_Escape:
gimp_image_map_tool_response (image_map_tool->shell,
gimp_image_map_tool_response (image_map_tool->dialog,
GTK_RESPONSE_CANCEL,
image_map_tool);
return TRUE;
......@@ -694,30 +694,30 @@ gimp_image_map_tool_response (GtkWidget *widget,
static void
gimp_image_map_tool_dialog_hide (GimpImageMapTool *image_map_tool)
{
GtkWidget *shell = image_map_tool->shell;
GtkWidget *dialog = image_map_tool->dialog;
if (GTK_IS_DIALOG (shell))
if (GTK_IS_DIALOG (dialog))
{
gimp_dialog_factory_hide_dialog (shell);
gimp_dialog_factory_hide_dialog (dialog);
}
else if (GIMP_IS_OVERLAY_DIALOG (shell))
else if (GIMP_IS_OVERLAY_DIALOG (dialog))
{
g_object_ref (shell);
gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (shell)),
shell);
g_object_ref (dialog);
gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (dialog)),
dialog);
}
}
static void
gimp_image_map_tool_dialog_destroy (GimpImageMapTool *image_map_tool)
{
if (GTK_IS_DIALOG (image_map_tool->shell) ||
gtk_widget_get_parent (image_map_tool->shell))
gtk_widget_destroy (image_map_tool->shell);
if (GTK_IS_DIALOG (image_map_tool->dialog) ||
gtk_widget_get_parent (image_map_tool->dialog))
gtk_widget_destroy (image_map_tool->dialog);
else
g_object_unref (image_map_tool->shell);
g_object_unref (image_map_tool->dialog);
image_map_tool->shell = NULL;
image_map_tool->dialog = NULL;
image_map_tool->main_vbox = NULL;
image_map_tool->settings_box = NULL;
image_map_tool->label_group = NULL;
......
......@@ -50,7 +50,7 @@ struct _GimpImageMapTool
/* dialog */
gboolean overlay;
GtkWidget *shell;
GtkWidget *dialog;
GtkWidget *main_vbox;
GtkWidget *settings_box;
GtkSizeGroup *label_group;
......@@ -60,7 +60,7 @@ struct _GimpImageMapToolClass
{
GimpColorToolClass parent_class;
const gchar *shell_desc;
const gchar *dialog_desc;
const gchar *settings_name;
const gchar *import_dialog_title;
const gchar *export_dialog_title;
......
......@@ -169,7 +169,7 @@ gimp_levels_tool_class_init (GimpLevelsToolClass *klass)
color_tool_class->picked = gimp_levels_tool_color_picked;
im_tool_class->shell_desc = _("Adjust Color Levels");
im_tool_class->dialog_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");
......@@ -678,7 +678,7 @@ gimp_levels_tool_dialog (GimpImageMapTool *image_map_tool)
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_signal_connect (image_map_tool->shell, "unmap",
g_signal_connect (image_map_tool->dialog, "unmap",
G_CALLBACK (gimp_levels_tool_dialog_unmap),
tool);
......
......@@ -100,7 +100,7 @@ gimp_posterize_tool_class_init (GimpPosterizeToolClass *klass)
tool_class->initialize = gimp_posterize_tool_initialize;
im_tool_class->shell_desc = _("Posterize (Reduce Number of Colors)");
im_tool_class->dialog_desc = _("Posterize (Reduce Number of Colors)");
im_tool_class->get_operation = gimp_posterize_tool_get_operation;
im_tool_class->map = gimp_posterize_tool_map;
......
......@@ -106,7 +106,7 @@ gimp_threshold_tool_class_init (GimpThresholdToolClass *klass)
tool_class->initialize = gimp_threshold_tool_initialize;
im_tool_class->shell_desc = _("Apply Threshold");
im_tool_class->dialog_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");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment