don't call the virtual function if there is no dialog.

2006-05-23  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptransformtool.c (gimp_transform_tool_dialog_update):
	don't call the virtual function if there is no dialog.

	(gimp_transform_tool_recalc): show the dialog here after updating it.

	* app/tools/gimpperspectivetool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c (dialog_update): don't show it here.
This commit is contained in:
Michael Natterer 2006-05-23 09:23:33 +00:00 committed by Michael Natterer
parent 4a9a80548a
commit 5b4660a326
6 changed files with 17 additions and 9 deletions

View File

@ -1,3 +1,15 @@
2006-05-23 Michael Natterer <mitch@gimp.org>
* app/tools/gimptransformtool.c (gimp_transform_tool_dialog_update):
don't call the virtual function if there is no dialog.
(gimp_transform_tool_recalc): show the dialog here after updating it.
* app/tools/gimpperspectivetool.c
* app/tools/gimprotatetool.c
* app/tools/gimpscaletool.c
* app/tools/gimpsheartool.c (dialog_update): don't show it here.
2006-05-22 Michael Natterer <mitch@gimp.org>
* app/tools/gimppainttool.c (gimp_paint_tool_control): remove

View File

@ -150,8 +150,6 @@ gimp_perspective_tool_dialog_update (GimpTransformTool *tr_tool)
gtk_label_set_text (GTK_LABEL (perspective->label[y][x]), buf);
}
gtk_widget_show (tr_tool->dialog);
}
static void

View File

@ -189,8 +189,6 @@ gimp_rotate_tool_dialog_update (GimpTransformTool *tr_tool)
g_signal_handlers_unblock_by_func (rotate->sizeentry,
rotate_center_changed,
tr_tool);
gtk_widget_show (tr_tool->dialog);
}
static void

View File

@ -128,8 +128,6 @@ gimp_scale_tool_dialog_update (GimpTransformTool *tr_tool)
"height", height,
"keep-aspect", options->constrain,
NULL);
gtk_widget_show (tr_tool->dialog);
}
static void

View File

@ -162,8 +162,6 @@ gimp_shear_tool_dialog_update (GimpTransformTool *tr_tool)
tr_tool->trans_info[XSHEAR]);
gtk_adjustment_set_value (GTK_ADJUSTMENT (shear->y_adj),
tr_tool->trans_info[YSHEAR]);
gtk_widget_show (tr_tool->dialog);
}
static void

View File

@ -815,7 +815,8 @@ gimp_transform_tool_draw (GimpDrawTool *draw_tool)
static void
gimp_transform_tool_dialog_update (GimpTransformTool *tr_tool)
{
if (GIMP_TRANSFORM_TOOL_GET_CLASS (tr_tool)->dialog_update)
if (tr_tool->dialog &&
GIMP_TRANSFORM_TOOL_GET_CLASS (tr_tool)->dialog_update)
GIMP_TRANSFORM_TOOL_GET_CLASS (tr_tool)->dialog_update (tr_tool);
}
@ -1463,6 +1464,9 @@ gimp_transform_tool_recalc (GimpTransformTool *tr_tool,
gimp_transform_tool_transform_bounding_box (tr_tool);
gimp_transform_tool_dialog_update (tr_tool);
if (tr_tool->dialog)
gtk_widget_show (tr_tool->dialog);
}
static void