Commit 3b857894 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

do not unset focus-on-map for all tool dialogs.

2006-02-15  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimptooldialog.c: do not unset focus-on-map for all
	tool dialogs.

	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpmeasuretool.c: explicitely do it here instead.
parent f8ea501c
2006-02-15 Sven Neumann <sven@gimp.org>
* app/widgets/gimptooldialog.c: do not unset focus-on-map for all
tool dialogs.
* app/tools/gimpcolorpickertool.c
* app/tools/gimpmeasuretool.c: explicitely do it here instead.
2006-02-15 Sven Neumann <sven@gimp.org>
* app/dialogs/info-dialog.c: unset focus-on-map for info dialogs.
......
......@@ -357,6 +357,8 @@ gimp_color_picker_tool_info_create (GimpColorPickerTool *picker_tool)
NULL);
gtk_window_set_focus_on_map (GTK_WINDOW (picker_tool->dialog), FALSE);
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (picker_tool->dialog),
GIMP_VIEWABLE (tool->drawable));
......
......@@ -219,7 +219,6 @@ gimp_image_map_tool_initialize (GimpTool *tool,
GTK_RESPONSE_CANCEL,
-1);
g_signal_connect_object (shell, "response",
G_CALLBACK (gimp_image_map_tool_response),
G_OBJECT (image_map_tool), 0);
......
......@@ -788,16 +788,23 @@ gimp_measure_tool_dialog_update (GimpMeasureTool *mtool,
{
g_snprintf (format, sizeof (format), "%%.%df",
_gimp_unit_get_digits (image->gimp, shell->unit));
/* Distance */
g_snprintf (buf, sizeof (buf), "%.1f", pixel_distance);
gtk_label_set_text (GTK_LABEL (mtool->distance_label[0]), buf);
if (shell->unit != GIMP_UNIT_PIXEL)
{
g_snprintf (buf, sizeof (buf), format, unit_distance);
gtk_label_set_text (GTK_LABEL (mtool->distance_label[1]), buf);
gtk_label_set_text (GTK_LABEL (mtool->unit_label[0]),
_gimp_unit_get_plural (image->gimp, shell->unit));
}
else
{
gtk_label_set_text (GTK_LABEL (mtool->distance_label[1]), " ");
gtk_label_set_text (GTK_LABEL (mtool->unit_label[0]), " ");
}
/* Angle */
g_snprintf (buf, sizeof (buf), "%.2f", pixel_angle);
......@@ -820,21 +827,37 @@ gimp_measure_tool_dialog_update (GimpMeasureTool *mtool,
g_snprintf (buf, sizeof (buf), "%d", pixel_width);
gtk_label_set_text (GTK_LABEL (mtool->width_label[0]), buf);
if (shell->unit != GIMP_UNIT_PIXEL)
{
g_snprintf (buf, sizeof (buf), format, unit_width);
gtk_label_set_text (GTK_LABEL (mtool->width_label[1]), buf);
gtk_label_set_text (GTK_LABEL (mtool->unit_label[2]),
_gimp_unit_get_plural (image->gimp, shell->unit));
}
else
{
gtk_label_set_text (GTK_LABEL (mtool->width_label[1]), " ");
gtk_label_set_text (GTK_LABEL (mtool->unit_label[2]), " ");
}
/* Height */
g_snprintf (buf, sizeof (buf), "%d", pixel_height);
gtk_label_set_text (GTK_LABEL (mtool->height_label[0]), buf);
/* Height */
if (shell->unit != GIMP_UNIT_PIXEL)
{
g_snprintf (buf, sizeof (buf), format, unit_height);
gtk_label_set_text (GTK_LABEL (mtool->height_label[1]), buf);
gtk_label_set_text (GTK_LABEL (mtool->unit_label[3]),
_gimp_unit_get_plural (image->gimp, shell->unit));
}
else
{
gtk_label_set_text (GTK_LABEL (mtool->height_label[1]), " ");
gtk_label_set_text (GTK_LABEL (mtool->unit_label[3]), " ");
}
if (GTK_WIDGET_VISIBLE (mtool->dialog))
gdk_window_show (mtool->dialog->window);
......@@ -859,6 +882,8 @@ gimp_measure_tool_dialog_new (GimpMeasureTool *mtool)
NULL);
gtk_window_set_focus_on_map (GTK_WINDOW (dialog), FALSE);
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy),
NULL);
......
......@@ -87,7 +87,6 @@ gimp_tool_dialog_new (GimpToolInfo *tool_info,
"stock-id", stock_id,
"description", desc ? desc : tool_info->help,
"parent", parent,
"focus-on-map", FALSE,
NULL);
va_start (args, desc);
......
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