app/tools/gimppaintoptions-gui.c (fade_options_gui) (gradient_options_gui)

2005-03-08  Sven Neumann  <sven@gimp.org>

	* app/tools/gimppaintoptions-gui.c (fade_options_gui)
	(gradient_options_gui)
	* app/tools/gimpselectionoptions.c (gimp_selection_options_gui):
	call gimp_unit_menu_set_pixel_digits() after connecting up the
	spinbuttons and the unitmenu. Fixes initial display (bug #169066).
This commit is contained in:
Sven Neumann 2005-03-08 15:46:34 +00:00 committed by Sven Neumann
parent 243cdf5306
commit 856961cbec
3 changed files with 21 additions and 10 deletions

View File

@ -1,3 +1,11 @@
2005-03-08 Sven Neumann <sven@gimp.org>
* app/tools/gimppaintoptions-gui.c (fade_options_gui)
(gradient_options_gui)
* app/tools/gimpselectionoptions.c (gimp_selection_options_gui):
call gimp_unit_menu_set_pixel_digits() after connecting up the
spinbuttons and the unitmenu. Fixes initial display (bug #169066).
2005-03-08 Sven Neumann <sven@gimp.org>
* app/core/gimppalette.[ch]: renamed gimp_palette_[gs]et_n_columns

View File

@ -309,7 +309,7 @@ fade_options_gui (GimpFadeOptions *fade,
GtkWidget *table;
GtkWidget *spinbutton;
GtkWidget *button;
GtkWidget *unitmenu;
GtkWidget *menu;
if (g_type_is_a (tool_type, GIMP_TYPE_PAINTBRUSH_TOOL) ||
tool_type == GIMP_TYPE_CLONE_TOOL ||
@ -345,12 +345,13 @@ fade_options_gui (GimpFadeOptions *fade,
spinbutton, 1, FALSE);
/* the fade-out unitmenu */
unitmenu = gimp_prop_unit_menu_new (config, "fade-unit", "%a");
gtk_table_attach (GTK_TABLE (table), unitmenu, 2, 3, 0, 1,
menu = gimp_prop_unit_menu_new (config, "fade-unit", "%a");
gtk_table_attach (GTK_TABLE (table), menu, 2, 3, 0, 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (unitmenu);
gtk_widget_show (menu);
g_object_set_data (G_OBJECT (unitmenu), "set_digits", spinbutton);
g_object_set_data (G_OBJECT (menu), "set_digits", spinbutton);
gimp_unit_menu_set_pixel_digits (GIMP_UNIT_MENU (menu), 0);
}
return frame;
@ -367,7 +368,7 @@ gradient_options_gui (GimpGradientOptions *gradient,
GtkWidget *table;
GtkWidget *spinbutton;
GtkWidget *button;
GtkWidget *unitmenu;
GtkWidget *menu;
GtkWidget *combo;
if (g_type_is_a (tool_type, GIMP_TYPE_PAINTBRUSH_TOOL))
@ -415,12 +416,13 @@ gradient_options_gui (GimpGradientOptions *gradient,
spinbutton, 1, FALSE);
/* the gradient unitmenu */
unitmenu = gimp_prop_unit_menu_new (config, "gradient-unit", "%a");
gtk_table_attach (GTK_TABLE (table), unitmenu, 2, 3, 1, 2,
menu = gimp_prop_unit_menu_new (config, "gradient-unit", "%a");
gtk_table_attach (GTK_TABLE (table), menu, 2, 3, 1, 2,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (unitmenu);
gtk_widget_show (menu);
g_object_set_data (G_OBJECT (unitmenu), "set_digits", spinbutton);
g_object_set_data (G_OBJECT (menu), "set_digits", spinbutton);
gimp_unit_menu_set_pixel_digits (GIMP_UNIT_MENU (menu), 0);
/* the repeat type */
combo = gimp_prop_enum_combo_box_new (config, "gradient-repeat", 0, 0);

View File

@ -546,6 +546,7 @@ gimp_selection_options_gui (GimpToolOptions *tool_options)
g_object_set_data (G_OBJECT (menu), "set_digits", width_spinbutton);
g_object_set_data (G_OBJECT (width_spinbutton), "set_digits",
height_spinbutton);
gimp_unit_menu_set_pixel_digits (GIMP_UNIT_MENU (menu), 0);
gtk_widget_show (table);
}