Commit 445d6bfc authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

app/widgets/Makefile.am added a simple utility function

2003-10-20  Sven Neumann  <sven@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/gimptooldialog.[ch]: added a simple utility function
	gimp_tool_dialog_new() that creates a GimpVieawableDialog based on
	GimpToolInfo and registers it with the toplevel dialog factory.

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphistogramtool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpimagemaptool.[ch]
	* app/tools/gimplevelstool.c
	* app/tools/gimpmeasuretool.c: use the new functionality; removed
	the shell_identifier since it can be created from the tool name.

	* app/tools/gimpperspectivetool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptransformtool.[ch]: removed the shell_identifier
	here as well. Should also be ported to gimp_tool_dialog_new().

	* NEWS: removed stuff that isn't new at all.
parent 1d6fa989
2003-10-20 Sven Neumann <sven@gimp.org>
* app/widgets/Makefile.am
* app/widgets/gimptooldialog.[ch]: added a simple utility function
gimp_tool_dialog_new() that creates a GimpVieawableDialog based on
GimpToolInfo and registers it with the toplevel dialog factory.
* app/tools/gimpbrightnesscontrasttool.c
* app/tools/gimpcolorbalancetool.c
* app/tools/gimpcolorizetool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpcurvestool.c
* app/tools/gimphistogramtool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimpimagemaptool.[ch]
* app/tools/gimplevelstool.c
* app/tools/gimpmeasuretool.c: use the new functionality; removed
the shell_identifier since it can be created from the tool name.
* app/tools/gimpperspectivetool.c
* app/tools/gimpposterizetool.c
* app/tools/gimprotatetool.c
* app/tools/gimpscaletool.c
* app/tools/gimpsheartool.c
* app/tools/gimpthresholdtool.c
* app/tools/gimptransformtool.[ch]: removed the shell_identifier
here as well. Should also be ported to gimp_tool_dialog_new().
* NEWS: removed stuff that isn't new at all.
2003-10-20 Dave Neary <bolsh@gimp.org>
 
* NEWS: Updated the NEWS file.
......@@ -15,10 +15,7 @@ Overview of Changes in GIMP 1.3.22
- Auto-scrolling for DND in list views [Mitch]
- Refresh rendering of paint strokes more often [Mitch]
- Refactored handling of modifier keys for tools [Mitch]
- Allow editing of image templates [Sven]
- Changed the redo shortcut to Ctrl-Y [Sven]
- Display real-world units and pixels in the measure tool info
window [Sven]
- Lots of bug fixes
Other contributors:
......
......@@ -142,12 +142,9 @@ gimp_brightness_contrast_tool_class_init (GimpBrightnessContrastToolClass *klass
static void
gimp_brightness_contrast_tool_init (GimpBrightnessContrastTool *bc_tool)
{
GimpImageMapTool *image_map_tool;
GimpImageMapTool *image_map_tool = GIMP_IMAGE_MAP_TOOL (bc_tool);
image_map_tool = GIMP_IMAGE_MAP_TOOL (bc_tool);
image_map_tool->shell_identifier = "gimp-brightness-contrast-tool-dialog";
image_map_tool->shell_desc = _("Adjust Brightness and Contrast");
image_map_tool->shell_desc = _("Adjust Brightness and Contrast");
bc_tool->brightness = 0.0;
bc_tool->contrast = 0.0;
......
......@@ -121,7 +121,7 @@ gimp_color_balance_tool_get_type (void)
};
tool_type = g_type_register_static (GIMP_TYPE_IMAGE_MAP_TOOL,
"GimpColorBalanceTool",
"GimpColorBalanceTool",
&tool_info, 0);
}
......@@ -153,12 +153,9 @@ gimp_color_balance_tool_class_init (GimpColorBalanceToolClass *klass)
static void
gimp_color_balance_tool_init (GimpColorBalanceTool *cb_tool)
{
GimpImageMapTool *image_map_tool;
GimpImageMapTool *image_map_tool = GIMP_IMAGE_MAP_TOOL (cb_tool);
image_map_tool = GIMP_IMAGE_MAP_TOOL (cb_tool);
image_map_tool->shell_identifier = "gimp-color-balance-tool-dialog";
image_map_tool->shell_desc = _("Adjust Color Balance");
image_map_tool->shell_desc = _("Adjust Color Balance");
cb_tool->color_balance = g_new0 (ColorBalance, 1);
cb_tool->transfer_mode = GIMP_MIDTONES;
......@@ -303,21 +300,21 @@ gimp_color_balance_tool_dialog (GimpImageMapTool *image_map_tool)
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
cb_tool->cyan_red_adj =
cb_tool->cyan_red_adj =
create_levels_scale (_("Cyan"), _("Red"), table, 0);
g_signal_connect (cb_tool->cyan_red_adj, "value_changed",
G_CALLBACK (color_balance_cr_adjustment_update),
cb_tool);
cb_tool->magenta_green_adj =
cb_tool->magenta_green_adj =
create_levels_scale (_("Magenta"), _("Green"), table, 1);
g_signal_connect (cb_tool->magenta_green_adj, "value_changed",
G_CALLBACK (color_balance_mg_adjustment_update),
cb_tool);
cb_tool->yellow_blue_adj =
cb_tool->yellow_blue_adj =
create_levels_scale (_("Yellow"), _("Blue"), table, 2);
g_signal_connect (cb_tool->yellow_blue_adj, "value_changed",
......
......@@ -156,12 +156,9 @@ gimp_colorize_tool_class_init (GimpColorizeToolClass *klass)
static void
gimp_colorize_tool_init (GimpColorizeTool *col_tool)
{
GimpImageMapTool *image_map_tool;
GimpImageMapTool *image_map_tool = GIMP_IMAGE_MAP_TOOL (col_tool);
image_map_tool = GIMP_IMAGE_MAP_TOOL (col_tool);
image_map_tool->shell_identifier = "gimp-colorize-tool-dialog";
image_map_tool->shell_desc = _("Colorize the Image");
image_map_tool->shell_desc = _("Colorize the Image");
col_tool->colorize = g_new0 (Colorize, 1);
......
......@@ -31,9 +31,9 @@
#include "core/gimptoolinfo.h"
#include "widgets/gimpcolorframe.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimppaletteeditor.h"
#include "widgets/gimptooldialog.h"
#include "widgets/gimpviewabledialog.h"
#include "display/gimpdisplay.h"
......@@ -307,19 +307,17 @@ gimp_color_picker_tool_info_create (GimpColorPickerTool *picker_tool)
g_return_if_fail (tool->drawable != NULL);
picker_tool->dialog =
gimp_viewable_dialog_new (GIMP_VIEWABLE (tool->drawable),
_("Color Picker"), "color_picker",
GIMP_STOCK_TOOL_COLOR_PICKER,
_("Color Picker Information"),
gimp_standard_help_func,
tool->tool_info->help_id,
picker_tool->dialog = gimp_tool_dialog_new (tool->tool_info,
_("Color Picker Information"),
GTK_STOCK_CLOSE,
gimp_color_picker_tool_info_close,
tool, NULL, NULL, TRUE, TRUE,
GTK_STOCK_CLOSE,
gimp_color_picker_tool_info_close,
tool, NULL, NULL, TRUE, TRUE,
NULL);
NULL);
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (picker_tool->dialog),
GIMP_VIEWABLE (tool->drawable));
hbox = gtk_hbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
......@@ -357,10 +355,6 @@ gimp_color_picker_tool_info_create (GimpColorPickerTool *picker_tool)
gtk_drag_dest_unset (picker_tool->color_area);
gtk_container_add (GTK_CONTAINER (frame), picker_tool->color_area);
gtk_widget_show (picker_tool->color_area);
gimp_dialog_factory_add_foreign (gimp_dialog_factory_from_name ("toplevel"),
"gimp-color-picker-tool-dialog",
picker_tool->dialog);
}
static void
......
......@@ -226,13 +226,10 @@ gimp_curves_tool_class_init (GimpCurvesToolClass *klass)
static void
gimp_curves_tool_init (GimpCurvesTool *c_tool)
{
GimpImageMapTool *image_map_tool;
GimpImageMapTool *image_map_tool = GIMP_IMAGE_MAP_TOOL (c_tool);
gint i;
image_map_tool = GIMP_IMAGE_MAP_TOOL (c_tool);
image_map_tool->shell_identifier = "gimp-curves-tool-dialog";
image_map_tool->shell_desc = _("Adjust Color Curves");
image_map_tool->shell_desc = _("Adjust Color Curves");
c_tool->curves = g_new0 (Curves, 1);
c_tool->lut = gimp_lut_new ();
......
......@@ -36,11 +36,11 @@
#include "core/gimptoolinfo.h"
#include "widgets/gimpenummenu.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimphistogrambox.h"
#include "widgets/gimphistogramview.h"
#include "widgets/gimppropwidgets.h"
#include "widgets/gimptooldialog.h"
#include "widgets/gimpviewabledialog.h"
#include "display/gimpdisplay.h"
......@@ -323,7 +323,6 @@ histogram_tool_dialog_new (GimpToolInfo *tool_info)
GtkWidget *table;
GtkWidget *label;
GtkWidget *menu;
const gchar *stock_id;
gint i;
gint x, y;
......@@ -340,21 +339,14 @@ histogram_tool_dialog_new (GimpToolInfo *tool_info)
htd = g_new0 (HistogramToolDialog, 1);
htd->hist = gimp_histogram_new (GIMP_BASE_CONFIG (tool_info->gimp->config));
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
/* The shell and main vbox */
htd->shell =
gimp_viewable_dialog_new (NULL,
tool_info->blurb,
GIMP_OBJECT (tool_info)->name,
stock_id,
_("View Image Histogram"),
gimp_standard_help_func, tool_info->help_id,
htd->shell = gimp_tool_dialog_new (tool_info,
_("View Image Histogram"),
GTK_STOCK_CLOSE, histogram_tool_close_callback,
htd, NULL, NULL, TRUE, TRUE,
GTK_STOCK_CLOSE, histogram_tool_close_callback,
htd, NULL, NULL, TRUE, TRUE,
NULL);
NULL);
vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
......@@ -432,10 +424,6 @@ histogram_tool_dialog_new (GimpToolInfo *tool_info)
gtk_widget_show (htd->info_labels[i]);
}
gimp_dialog_factory_add_foreign (gimp_dialog_factory_from_name ("toplevel"),
"gimp-histogram-tool-dialog",
htd->shell);
return htd;
}
......
......@@ -170,12 +170,9 @@ gimp_hue_saturation_tool_class_init (GimpHueSaturationToolClass *klass)
static void
gimp_hue_saturation_tool_init (GimpHueSaturationTool *hs_tool)
{
GimpImageMapTool *image_map_tool;
GimpImageMapTool *image_map_tool = GIMP_IMAGE_MAP_TOOL (hs_tool);
image_map_tool = GIMP_IMAGE_MAP_TOOL (hs_tool);
image_map_tool->shell_identifier = "gimp-hue-saturation-tool-dialog";
image_map_tool->shell_desc = _("Adjust Hue / Lightness / Saturation");
image_map_tool->shell_desc = _("Adjust Hue / Lightness / Saturation");
hs_tool->hue_saturation = g_new0 (HueSaturation, 1);
hs_tool->hue_partition = GIMP_ALL_HUES;
......
......@@ -30,8 +30,8 @@
#include "core/gimpimagemap.h"
#include "core/gimptoolinfo.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpitemfactory.h"
#include "widgets/gimptooldialog.h"
#include "widgets/gimpviewabledialog.h"
#include "display/gimpdisplay.h"
......@@ -146,14 +146,13 @@ gimp_image_map_tool_init (GimpImageMapTool *image_map_tool)
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
gimp_tool_control_set_preserve (tool->control, FALSE);
image_map_tool->drawable = NULL;
image_map_tool->image_map = NULL;
image_map_tool->preview = TRUE;
image_map_tool->drawable = NULL;
image_map_tool->image_map = NULL;
image_map_tool->preview = TRUE;
image_map_tool->shell_identifier = NULL;
image_map_tool->shell_desc = NULL;
image_map_tool->shell = NULL;
image_map_tool->main_vbox = NULL;
image_map_tool->shell_desc = NULL;
image_map_tool->shell = NULL;
image_map_tool->main_vbox = NULL;
}
void
......@@ -217,27 +216,21 @@ gimp_image_map_tool_initialize (GimpTool *tool,
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
image_map_tool->shell = shell =
gimp_viewable_dialog_new (NULL,
tool_info->blurb,
GIMP_OBJECT (tool_info)->name,
stock_id,
image_map_tool->shell_desc,
gimp_standard_help_func,
tool_info->help_id,
gimp_tool_dialog_new (tool_info, image_map_tool->shell_desc,
GIMP_STOCK_RESET,
gimp_image_map_tool_reset_clicked,
image_map_tool, NULL, NULL, FALSE, FALSE,
GIMP_STOCK_RESET,
gimp_image_map_tool_reset_clicked,
image_map_tool, NULL, NULL, FALSE, FALSE,
GTK_STOCK_CANCEL,
gimp_image_map_tool_cancel_clicked,
image_map_tool, NULL, NULL, FALSE, TRUE,
GTK_STOCK_CANCEL,
gimp_image_map_tool_cancel_clicked,
image_map_tool, NULL, NULL, FALSE, TRUE,
GTK_STOCK_OK,
gimp_image_map_tool_ok_clicked,
image_map_tool, NULL, NULL, TRUE, FALSE,
GTK_STOCK_OK,
gimp_image_map_tool_ok_clicked,
image_map_tool, NULL, NULL, TRUE, FALSE,
NULL);
NULL);
image_map_tool->main_vbox = vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
......@@ -259,17 +252,6 @@ gimp_image_map_tool_initialize (GimpTool *tool,
gimp_image_map_tool_dialog (image_map_tool);
gtk_widget_show (vbox);
if (image_map_tool->shell_identifier)
{
GimpDialogFactory *dialog_factory;
dialog_factory = gimp_dialog_factory_from_name ("toplevel");
gimp_dialog_factory_add_foreign (dialog_factory,
image_map_tool->shell_identifier,
image_map_tool->shell);
}
}
drawable = gimp_image_active_drawable (gdisp->gimage);
......
......@@ -43,7 +43,6 @@ struct _GimpImageMapTool
gboolean preview;
/* the dialog */
const gchar *shell_identifier;
const gchar *shell_desc;
GtkWidget *shell;
......
......@@ -228,12 +228,9 @@ gimp_levels_tool_class_init (GimpLevelsToolClass *klass)
static void
gimp_levels_tool_init (GimpLevelsTool *l_tool)
{
GimpImageMapTool *image_map_tool;
GimpImageMapTool *image_map_tool = GIMP_IMAGE_MAP_TOOL (l_tool);
image_map_tool = GIMP_IMAGE_MAP_TOOL (l_tool);
image_map_tool->shell_identifier = "gimp-levels-tool-dialog";
image_map_tool->shell_desc = _("Adjust Color Levels");
image_map_tool->shell_desc = _("Adjust Color Levels");
l_tool->lut = gimp_lut_new ();
l_tool->levels = g_new0 (Levels, 1);
......
......@@ -37,8 +37,8 @@
#include "core/gimpimage-unit.h"
#include "core/gimptoolinfo.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimptooldialog.h"
#include "widgets/gimpviewabledialog.h"
#include "display/gimpdisplay.h"
......@@ -111,7 +111,7 @@ gimp_measure_tool_register (GimpToolRegisterCallback callback,
0,
"gimp-measure-tool",
_("Measure"),
_("Measure angles and lengths"),
_("Measure distances and angles"),
N_("/Tools/_Measure"), NULL,
NULL, GIMP_HELP_TOOL_MEASURE,
GIMP_STOCK_TOOL_MEASURE,
......@@ -827,25 +827,19 @@ gimp_measure_tool_dialog_update (GimpMeasureTool *mtool,
static GtkWidget *
gimp_measure_tool_dialog_new (GimpMeasureTool *mtool)
{
GimpToolInfo *tool_info = GIMP_TOOL (mtool)->tool_info;
GtkWidget *dialog;
GtkWidget *hbox;
GtkWidget *table;
GtkWidget *label;
const gchar *stock_id;
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
dialog = gimp_tool_dialog_new (GIMP_TOOL (mtool)->tool_info,
_("Measure Distances and Angles"),
dialog = gimp_viewable_dialog_new (NULL,
tool_info->blurb,
GIMP_OBJECT (tool_info)->name,
stock_id,
_("Measure Distances and Angles"),
gimp_standard_help_func,
tool_info->help_id,
NULL);
GTK_STOCK_CLOSE,
gtk_widget_destroy, NULL,
1, NULL, TRUE, TRUE,
gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_UTILITY);
NULL);
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox);
......@@ -909,17 +903,5 @@ gimp_measure_tool_dialog_new (GimpMeasureTool *mtool)
gtk_table_attach_defaults (GTK_TABLE (table), label, 4, 5, 1, 2);
gtk_widget_show (label);
gimp_dialog_create_action_area (GIMP_DIALOG (dialog),
GTK_STOCK_CLOSE,
gtk_widget_destroy, NULL,
1, NULL, TRUE, TRUE,
NULL);
gimp_dialog_factory_add_foreign (gimp_dialog_factory_from_name ("toplevel"),
"gimp-measure-tool-dialog",
dialog);
return dialog;
}
......@@ -134,18 +134,14 @@ gimp_perspective_tool_class_init (GimpPerspectiveToolClass *klass)
static void
gimp_perspective_tool_init (GimpPerspectiveTool *perspective_tool)
{
GimpTool *tool;
GimpTransformTool *tr_tool;
tool = GIMP_TOOL (perspective_tool);
tr_tool = GIMP_TRANSFORM_TOOL (perspective_tool);
GimpTool *tool = GIMP_TOOL (perspective_tool);
GimpTransformTool *tr_tool = GIMP_TRANSFORM_TOOL (perspective_tool);
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_PERSPECTIVE_TOOL_CURSOR);
tr_tool->shell_identifier = "gimp-perspective-tool-dialog";
tr_tool->shell_desc = _("Perspective Transform Information");
tr_tool->progress_text = _("Perspective...");
tr_tool->shell_desc = _("Perspective Transform Information");
tr_tool->progress_text = _("Perspective...");
}
static void
......
......@@ -135,12 +135,9 @@ gimp_posterize_tool_class_init (GimpPosterizeToolClass *klass)
static void
gimp_posterize_tool_init (GimpPosterizeTool *posterize_tool)
{
GimpImageMapTool *image_map_tool;
GimpImageMapTool *image_map_tool = GIMP_IMAGE_MAP_TOOL (posterize_tool);
image_map_tool = GIMP_IMAGE_MAP_TOOL (posterize_tool);
image_map_tool->shell_identifier = "gimp-posterize-tool-dialog";
image_map_tool->shell_desc = _("Posterize (Reduce Number of Colors)");
image_map_tool->shell_desc = _("Posterize (Reduce Number of Colors)");
posterize_tool->levels = POSTERIZE_DEFAULT_LEVELS;
posterize_tool->lut = gimp_lut_new ();
......
......@@ -157,17 +157,13 @@ gimp_rotate_tool_class_init (GimpRotateToolClass *klass)
static void
gimp_rotate_tool_init (GimpRotateTool *rotate_tool)
{
GimpTool *tool;
GimpTransformTool *tr_tool;
tool = GIMP_TOOL (rotate_tool);
tr_tool = GIMP_TRANSFORM_TOOL (rotate_tool);
GimpTool *tool = GIMP_TOOL (rotate_tool);
GimpTransformTool *tr_tool = GIMP_TRANSFORM_TOOL (rotate_tool);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_ROTATE_TOOL_CURSOR);
tr_tool->shell_identifier = "gimp-rotate-tool-dialog";
tr_tool->shell_desc = _("Rotation Information");
tr_tool->progress_text = _("Rotating...");
tr_tool->shell_desc = _("Rotation Information");
tr_tool->progress_text = _("Rotating...");
}
static void
......
......@@ -153,17 +153,13 @@ gimp_scale_tool_class_init (GimpScaleToolClass *klass)
static void
gimp_scale_tool_init (GimpScaleTool *scale_tool)
{
GimpTool *tool;
GimpTransformTool *tr_tool;
tool = GIMP_TOOL (scale_tool);
tr_tool = GIMP_TRANSFORM_TOOL (scale_tool);
GimpTool *tool = GIMP_TOOL (scale_tool);
GimpTransformTool *tr_tool = GIMP_TRANSFORM_TOOL (scale_tool);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_RESIZE_TOOL_CURSOR);
tr_tool->shell_identifier = "gimp-scale-tool-dialog";
tr_tool->shell_desc = _("Scaling Information");
tr_tool->progress_text = _("Scaling...");
tr_tool->shell_desc = _("Scaling Information");
tr_tool->progress_text = _("Scaling...");
}
static void
......
......@@ -151,18 +151,14 @@ gimp_shear_tool_class_init (GimpShearToolClass *klass)
static void
gimp_shear_tool_init (GimpShearTool *shear_tool)
{
GimpTool *tool;
GimpTransformTool *tr_tool;
tool = GIMP_TOOL (shear_tool);
tr_tool = GIMP_TRANSFORM_TOOL (shear_tool);
GimpTool *tool = GIMP_TOOL (shear_tool);
GimpTransformTool *tr_tool = GIMP_TRANSFORM_TOOL (shear_tool);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_SHEAR_TOOL_CURSOR);
tr_tool->use_center = FALSE;
tr_tool->shell_identifier = "gimp-shear-tool-dialog";
tr_tool->shell_desc = _("Shearing Information");
tr_tool->progress_text = _("Shearing...");
tr_tool->use_center = FALSE;
tr_tool->shell_desc = _("Shearing Information");
tr_tool->progress_text = _("Shearing...");
}
static void
......
......@@ -150,12 +150,9 @@ gimp_threshold_tool_class_init (GimpThresholdToolClass *klass)
static void
gimp_threshold_tool_init (GimpThresholdTool *t_tool)
{
GimpImageMapTool *image_map_tool;
GimpImageMapTool *image_map_tool = GIMP_IMAGE_MAP_TOOL (t_tool);
image_map_tool = GIMP_IMAGE_MAP_TOOL (t_tool);
image_map_tool->shell_identifier = "gimp-threshold-tool-dialog";
image_map_tool->shell_desc = _("Apply Threshold");
image_map_tool->shell_desc = _("Apply Threshold");
t_tool->threshold = g_new0 (Threshold, 1);
t_tool->hist = NULL;
......
......@@ -1260,52 +1260,50 @@ gimp_transform_tool_grid_recalc (GimpTransformTool *tr_tool)
static void
gimp_transform_tool_dialog (GimpTransformTool *tr_tool)
{
if (GIMP_TRANSFORM_TOOL_GET_CLASS (tr_tool)->dialog)
{
GimpToolInfo *tool_info;
const gchar *stock_id;
GimpToolInfo *tool_info;
const gchar *stock_id;
gchar *identifier;
tool_info = GIMP_TOOL (tr_tool)->tool_info;
if (! GIMP_TRANSFORM_TOOL_GET_CLASS (tr_tool)->dialog)
return;
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
tool_info = GIMP_TOOL (tr_tool)->tool_info;
tr_tool->info_dialog =
info_dialog_new (NULL,
tool_info->blurb,
GIMP_OBJECT (tool_info)->name,
stock_id,
tr_tool->shell_desc,
gimp_standard_help_func, tool_info->help_id);
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
gimp_dialog_create_action_area (GIMP_DIALOG (tr_tool->info_dialog->shell),
tr_tool->info_dialog = info_dialog_new (NULL,
tool_info->blurb,
GIMP_OBJECT (tool_info)->name,
stock_id,
tr_tool->shell_desc,
gimp_standard_help_func,
tool_info->help_id);
GIMP_STOCK_RESET,
transform_reset_callback,