Commit 95931214 authored by Michael Natterer's avatar Michael Natterer 😴

app, libgimpwidgets: return visible widgets from all gimp_prop_foo_new()

and remove a gazillion gtk_widget_show() all over the place, some
places need a gtk_widget_hide() now, and I'm pretty sure I broke at
least one thing in all those files...
parent 1099aea7
......@@ -96,7 +96,6 @@ keyboard_shortcuts_dialog_new (Gimp *gimp)
button = gimp_prop_check_button_new (G_OBJECT (gimp->config), "save-accels",
_("S_ave keyboard shortcuts on exit"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
return dialog;
}
......
......@@ -130,10 +130,7 @@ prefs_check_button_add (GObject *config,
button = gimp_prop_check_button_new (config, property_name, label);
if (button)
{
gtk_box_pack_start (vbox, button, FALSE, FALSE, 0);
gtk_widget_show (button);
}
gtk_box_pack_start (vbox, button, FALSE, FALSE, 0);
return button;
}
......@@ -151,7 +148,7 @@ prefs_check_button_add_with_icon (GObject *config,
GtkWidget *image;
button = gimp_prop_check_button_new (config, property_name, label);
if (!button)
if (! button)
return NULL;
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
......@@ -169,7 +166,6 @@ prefs_check_button_add_with_icon (GObject *config,
gtk_widget_show (image);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
gtk_widget_show (button);
if (group)
gtk_size_group_add_widget (group, image);
......@@ -357,10 +353,7 @@ prefs_language_combo_box_add (GObject *config,
GtkWidget *combo = gimp_prop_language_combo_box_new (config, property_name);
if (combo)
{
gtk_box_pack_start (vbox, combo, FALSE, FALSE, 0);
gtk_widget_show (combo);
}
gtk_box_pack_start (vbox, combo, FALSE, FALSE, 0);
return combo;
}
......
......@@ -1351,7 +1351,6 @@ prefs_dialog_new (Gimp *gimp,
_("_Try to use the system monitor "
"profile"));
gtk_grid_attach (GTK_GRID (grid), button, 1, row, 1, 1);
gtk_widget_show (button);
row++;
prefs_enum_combo_box_add (color_config,
......@@ -1363,7 +1362,6 @@ prefs_dialog_new (Gimp *gimp,
"display-use-black-point-compensation",
_("Use _black point compensation"));
gtk_grid_attach (GTK_GRID (grid), button, 1, row, 1, 1);
gtk_widget_show (button);
row++;
prefs_boolean_combo_box_add (color_config,
......@@ -1398,7 +1396,6 @@ prefs_dialog_new (Gimp *gimp,
"simulation-use-black-point-compensation",
_("Use black _point compensation"));
gtk_grid_attach (GTK_GRID (grid), button, 1, row, 1, 1);
gtk_widget_show (button);
row++;
prefs_boolean_combo_box_add (color_config,
......@@ -1416,7 +1413,6 @@ prefs_dialog_new (Gimp *gimp,
button = gimp_prop_check_button_new (color_config, "simulation-gamut-check",
_("Mar_k out of gamut colors"));
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
gtk_widget_show (button);
button = gimp_prop_color_button_new (color_config, "out-of-gamut-color",
_("Select Warning Color"),
......@@ -1424,7 +1420,6 @@ prefs_dialog_new (Gimp *gimp,
PREFS_COLOR_BUTTON_HEIGHT,
GIMP_COLOR_AREA_FLAT);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
gimp_color_panel_set_context (GIMP_COLOR_PANEL (button),
gimp_get_user_context (gimp));
......@@ -2686,7 +2681,6 @@ prefs_dialog_new (Gimp *gimp,
gtk_widget_set_halign (hbox, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 24);
gtk_widget_show (entry);
gtk_widget_set_sensitive (entry, ! display_config->monitor_res_from_gdk);
group = NULL;
......@@ -2986,7 +2980,6 @@ prefs_dialog_new (Gimp *gimp,
entry = gimp_prop_entry_new (object, formats[format].property_name, 0);
gtk_box_pack_start (GTK_BOX (vbox2), entry, FALSE, FALSE, 0);
gtk_widget_show (entry);
scrolled_win = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
......@@ -3325,7 +3318,6 @@ prefs_dialog_new (Gimp *gimp,
paths[i].writable_property_name,
gettext (paths[i].fs_label));
gtk_box_pack_start (GTK_BOX (vbox), editor, TRUE, TRUE, 0);
gtk_widget_show (editor);
}
}
......
......@@ -243,7 +243,6 @@ stroke_dialog_new (GimpItem *item,
"emulate-brush-dynamics",
_("_Emulate brush dynamics"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
}
return dialog;
......
......@@ -336,7 +336,6 @@ gimp_cursor_view_init (GimpCursorView *view)
toggle = gimp_prop_check_button_new (G_OBJECT (view), "sample-merged",
_("_Sample Merged"));
gtk_box_pack_start (GTK_BOX (view), toggle, FALSE, FALSE, 0);
gtk_widget_show (toggle);
}
static void
......
......@@ -71,17 +71,14 @@ _gimp_prop_gui_new_channel_mixer (GObject *config,
scale = gimp_prop_widget_new (config, "rr-gain",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
scale = gimp_prop_widget_new (config, "rg-gain",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
scale = gimp_prop_widget_new (config, "rb-gain",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
frame = gimp_frame_new (_("Green channel"));
......@@ -95,17 +92,14 @@ _gimp_prop_gui_new_channel_mixer (GObject *config,
scale = gimp_prop_widget_new (config, "gr-gain",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
scale = gimp_prop_widget_new (config, "gg-gain",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
scale = gimp_prop_widget_new (config, "gb-gain",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
frame = gimp_frame_new (_("Blue channel"));
......@@ -119,23 +113,19 @@ _gimp_prop_gui_new_channel_mixer (GObject *config,
scale = gimp_prop_widget_new (config, "br-gain",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
scale = gimp_prop_widget_new (config, "bg-gain",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
scale = gimp_prop_widget_new (config, "bb-gain",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
checkbox = gimp_prop_widget_new (config, "preserve-luminosity",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (main_vbox), checkbox, FALSE, FALSE, 0);
gtk_widget_show (checkbox);
return main_vbox;
}
......@@ -61,7 +61,6 @@ create_levels_scale (GObject *config,
gimp_prop_widget_set_factor (scale, 100.0, 0.0, 0.0, 1);
gtk_widget_set_hexpand (scale, TRUE);
gtk_grid_attach (GTK_GRID (grid), scale, 1, col, 1, 1);
gtk_widget_show (scale);
label = gtk_label_new (right);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
......@@ -97,7 +96,6 @@ _gimp_prop_gui_new_color_balance (GObject *config,
_("Select Range to Adjust"),
0, 0);
gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
frame = gimp_frame_new (_("Adjust Color Levels"));
gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
......@@ -142,7 +140,6 @@ _gimp_prop_gui_new_color_balance (GObject *config,
"preserve-luminosity",
_("Preserve _luminosity"));
gtk_box_pack_end (GTK_BOX (main_vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
return main_vbox;
}
......@@ -109,13 +109,11 @@ gimp_prop_angle_range_box_new (GObject *config,
1.0, 15.0, 2);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (scale), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
scale = gimp_prop_spin_scale_new (config, beta_property_name, NULL,
1.0, 15.0, 2);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (scale), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
......@@ -125,7 +123,6 @@ gimp_prop_angle_range_box_new (GObject *config,
button = gimp_prop_check_button_new (config, clockwise_property_name,
_("Clockwise"));
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
gtk_widget_show (button);
invert_button = gtk_button_new_with_label (_("Invert Range"));
gtk_box_pack_start (GTK_BOX (hbox), invert_button, TRUE, TRUE, 0);
......@@ -140,7 +137,6 @@ gimp_prop_angle_range_box_new (GObject *config,
beta_property_name,
clockwise_property_name);
gtk_box_pack_start (GTK_BOX (main_hbox), dial, FALSE, FALSE, 0);
gtk_widget_show (dial);
g_signal_connect (invert_button, "clicked",
G_CALLBACK (invert_segment_clicked),
......@@ -173,18 +169,17 @@ gimp_prop_polar_box_new (GObject *config,
1.0, 15.0, 2);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (scale), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
scale = gimp_prop_spin_scale_new (config, radius_property_name, NULL,
1.0, 15.0, 2);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
polar = gimp_prop_polar_new (config,
angle_property_name,
radius_property_name);
gtk_box_pack_start (GTK_BOX (main_hbox), polar, FALSE, FALSE, 0);
gtk_widget_show (polar);
gtk_widget_show (main_hbox);
return main_hbox;
}
......@@ -220,7 +215,6 @@ _gimp_prop_gui_new_color_rotate (GObject *config,
param_specs[2]->name,
param_specs[0]->name);
gtk_container_add (GTK_CONTAINER (frame), box);
gtk_widget_show (box);
frame = gimp_frame_new (_("Destination Range"));
gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
......@@ -231,7 +225,6 @@ _gimp_prop_gui_new_color_rotate (GObject *config,
param_specs[5]->name,
param_specs[3]->name);
gtk_container_add (GTK_CONTAINER (frame), box);
gtk_widget_show (box);
frame = gimp_frame_new (_("Gray Handling"));
gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
......@@ -248,13 +241,11 @@ _gimp_prop_gui_new_color_rotate (GObject *config,
create_controller_func,
creator);
gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0);
gtk_widget_show (box);
box = gimp_prop_polar_box_new (config,
param_specs[8]->name,
param_specs[9]->name);
gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0);
gtk_widget_show (box);
return main_vbox;
}
......@@ -90,7 +90,6 @@ _gimp_prop_gui_new_color_to_alpha (GObject *config,
area, context, create_picker_func, NULL,
creator);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
......@@ -99,7 +98,6 @@ _gimp_prop_gui_new_color_to_alpha (GObject *config,
scale = gimp_prop_widget_new (config, "transparency-threshold",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (hbox), scale, TRUE, TRUE, 0);
gtk_widget_show (scale);
if (create_picker_func)
{
......@@ -121,7 +119,6 @@ _gimp_prop_gui_new_color_to_alpha (GObject *config,
scale = gimp_prop_widget_new (config, "opacity-threshold",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (hbox), scale, TRUE, TRUE, 0);
gtk_widget_show (scale);
if (create_picker_func)
{
......
......@@ -179,7 +179,6 @@ _gimp_prop_gui_new_convolution_matrix (GObject *config,
1.0, 10.0, 2);
gtk_entry_set_width_chars (GTK_ENTRY (spin), 8);
gtk_grid_attach (GTK_GRID (grid), spin, y, x, 1, 1);
gtk_widget_show (spin);
}
}
......@@ -269,12 +268,10 @@ _gimp_prop_gui_new_convolution_matrix (GObject *config,
scale = gimp_prop_widget_new (config, "divisor",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (hbox), scale, TRUE, TRUE, 0);
gtk_widget_show (scale);
scale = gimp_prop_widget_new (config, "offset",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (hbox), scale, TRUE, TRUE, 0);
gtk_widget_show (scale);
/* rest of the properties */
......@@ -290,7 +287,6 @@ _gimp_prop_gui_new_convolution_matrix (GObject *config,
create_controller_func,
creator);
gtk_box_pack_start (GTK_BOX (hbox), vbox2, TRUE, TRUE, 0);
gtk_widget_show (vbox2);
vbox2 = _gimp_prop_gui_new_generic (config,
param_specs + 31,
......@@ -300,7 +296,6 @@ _gimp_prop_gui_new_convolution_matrix (GObject *config,
create_controller_func,
creator);
gtk_box_pack_start (GTK_BOX (hbox), vbox2, TRUE, TRUE, 0);
gtk_widget_show (vbox2);
return main_vbox;
}
......@@ -66,7 +66,6 @@ _gimp_prop_gui_new_diffraction_patterns (GObject *config,
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox,
gtk_label_new (_("Frequencies")));
gtk_widget_show (vbox);
vbox = _gimp_prop_gui_new_generic (config,
param_specs + 3, 3,
......@@ -77,7 +76,6 @@ _gimp_prop_gui_new_diffraction_patterns (GObject *config,
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox,
gtk_label_new (_("Contours")));
gtk_widget_show (vbox);
vbox = _gimp_prop_gui_new_generic (config,
param_specs + 6, 3,
......@@ -88,7 +86,6 @@ _gimp_prop_gui_new_diffraction_patterns (GObject *config,
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox,
gtk_label_new (_("Sharp Edges")));
gtk_widget_show (vbox);
vbox = _gimp_prop_gui_new_generic (config,
param_specs + 9, 3,
......@@ -99,7 +96,6 @@ _gimp_prop_gui_new_diffraction_patterns (GObject *config,
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox,
gtk_label_new (_("Other Options")));
gtk_widget_show (vbox);
return notebook;
}
......@@ -266,6 +266,8 @@ _gimp_prop_gui_new_generic (GObject *config,
g_object_set_data_full (G_OBJECT (main_vbox), "chains", chains,
(GDestroyNotify) g_list_free);
gtk_widget_show (main_vbox);
return main_vbox;
}
......
......@@ -226,7 +226,6 @@ _gimp_prop_gui_new_hue_saturation (GObject *config,
_("_Overlap"), 0.01, 0.1, 0);
gimp_prop_widget_set_factor (scale, 100.0, 0.0, 0.0, 1);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
frame = gimp_frame_new (_("Adjust Selected Color"));
gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
......@@ -241,21 +240,18 @@ _gimp_prop_gui_new_hue_saturation (GObject *config,
_("_Hue"), 1.0 / 180.0, 15.0 / 180.0, 0);
gimp_prop_widget_set_factor (scale, 180.0, 0.0, 0.0, 1);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
/* Create the lightness scale widget */
scale = gimp_prop_spin_scale_new (config, "lightness",
_("_Lightness"), 0.01, 0.1, 0);
gimp_prop_widget_set_factor (scale, 100.0, 0.0, 0.0, 1);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
/* Create the saturation scale widget */
scale = gimp_prop_spin_scale_new (config, "saturation",
_("_Saturation"), 0.01, 0.1, 0);
gimp_prop_widget_set_factor (scale, 100.0, 0.0, 0.0, 1);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
......
......@@ -70,12 +70,10 @@ _gimp_prop_gui_new_shadows_highlights (GObject *config,
scale = gimp_prop_widget_new (config, "shadows",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
scale = gimp_prop_widget_new (config, "shadows-ccorrect",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
frame = gimp_frame_new (_("Highlights"));
gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
......@@ -88,12 +86,10 @@ _gimp_prop_gui_new_shadows_highlights (GObject *config,
scale = gimp_prop_widget_new (config, "highlights",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
scale = gimp_prop_widget_new (config, "highlights-ccorrect",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
frame = gimp_frame_new (_("Common"));
gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
......@@ -106,17 +102,14 @@ _gimp_prop_gui_new_shadows_highlights (GObject *config,
scale = gimp_prop_widget_new (config, "whitepoint",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
scale = gimp_prop_widget_new (config, "radius",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
scale = gimp_prop_widget_new (config, "compress",
area, context, NULL, NULL, NULL, &label);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
return main_vbox;
}
......@@ -433,6 +433,8 @@ gimp_prop_widget_new_from_pspec (GObject *config,
gimp_prop_config_notify (config, NULL, widget);
}
gtk_widget_show (widget);
return widget;
}
......@@ -550,6 +552,8 @@ gimp_prop_gui_new (GObject *config,
NULL);
}
gtk_widget_show (gui);
return gui;
}
......
......@@ -134,17 +134,14 @@ gimp_airbrush_options_gui (GimpToolOptions *tool_options)
button = gimp_prop_check_button_new (config, "motion-only", NULL);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
scale = gimp_prop_spin_scale_new (config, "rate", NULL,
1.0, 10.0, 1);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
scale = gimp_prop_spin_scale_new (config, "flow", NULL,
1.0, 10.0, 1);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
return vbox;
}
......@@ -291,7 +291,6 @@ gimp_align_options_gui (GimpToolOptions *tool_options)
gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Relative to"));
g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_box_pack_start (GTK_BOX (align_vbox), combo, FALSE, FALSE, 0);
gtk_widget_show (combo);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (align_vbox), hbox, FALSE, FALSE, 0);
......@@ -384,7 +383,6 @@ gimp_align_options_gui (GimpToolOptions *tool_options)
spinbutton = gimp_prop_spin_button_new (config, "offset-x",
1, 20, 0);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_widget_show (spinbutton);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (align_vbox), hbox, FALSE, FALSE, 0);
......@@ -397,7 +395,6 @@ gimp_align_options_gui (GimpToolOptions *tool_options)
spinbutton = gimp_prop_spin_button_new (config, "offset-y",
1, 20, 0);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_widget_show (spinbutton);
return vbox;
}
......@@ -276,7 +276,6 @@ gimp_brightness_contrast_tool_dialog (GimpFilterTool *filter_tool)
scale = gimp_prop_spin_scale_new (filter_tool->config, "brightness",
_("_Brightness"), 0.01, 0.1, 3);
gtk_box_pack_start (GTK_BOX (main_vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
bc_tool->brightness_scale = scale;
......@@ -284,7 +283,6 @@ gimp_brightness_contrast_tool_dialog (GimpFilterTool *filter_tool)
scale = gimp_prop_spin_scale_new (filter_tool->config, "contrast",
_("_Contrast"), 0.01, 0.1, 3);
gtk_box_pack_start (GTK_BOX (main_vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
bc_tool->contrast_scale = scale;
......
......@@ -408,10 +408,8 @@ gimp_bucket_fill_options_gui (GimpToolOptions *tool_options)
str = g_strdup_printf (_("Fill Type (%s)"),
gimp_get_mod_string (toggle_mask)),
frame = gimp_prop_enum_radio_frame_new (config, "fill-mode", str, 0, 0);
g_free (str);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
g_free (str);
hbox = gimp_prop_pattern_box_new (NULL, GIMP_CONTEXT (tool_options),
NULL, 2,
......@@ -423,10 +421,8 @@ gimp_bucket_fill_options_gui (GimpToolOptions *tool_options)
str = g_strdup_printf (_("Affected Area (%s)"),
gimp_get_mod_string (extend_mask));
frame = gimp_prop_enum_radio_frame_new (config, "fill-area", str, 0, 0);
g_free (str);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
g_free (str);
/* Similar color frame */
frame = gimp_frame_new (_("Finding Similar Colors"));
......@@ -441,36 +437,30 @@ gimp_bucket_fill_options_gui (GimpToolOptions *tool_options)
/* the fill transparent areas toggle */
widget = gimp_prop_check_button_new (config, "fill-transparent", NULL);
gtk_box_pack_start (GTK_BOX (box2), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
/* the sample merged toggle */
widget = gimp_prop_check_button_new (config, "sample-merged", NULL);
gtk_box_pack_start (GTK_BOX (box2), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
/* the diagonal neighbors toggle */
widget = gimp_prop_check_button_new (config, "diagonal-neighbors", NULL);
gtk_box_pack_start (GTK_BOX (box2), widget, FALSE, FALSE, 0);
options->priv->diagonal_neighbors_checkbox = widget;
gtk_widget_show (widget);
/* the antialias toggle */
widget = gimp_prop_check_button_new (config, "antialias", NULL);
gtk_box_pack_start (GTK_BOX (box2), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
/* the threshold scale */
scale = gimp_prop_spin_scale_new (config, "threshold", NULL,
1.0, 16.0, 1);
gtk_box_pack_start (GTK_BOX (box2), scale, FALSE, FALSE, 0);
options->priv->threshold_scale = scale;
gtk_widget_show (scale);
/* the fill criterion combo */
combo = gimp_prop_enum_combo_box_new (config, "fill-criterion", 0, 0);
gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Fill by"));
gtk_box_pack_start (GTK_BOX (box2), combo, FALSE, FALSE, 0);
gtk_widget_show (combo);
/* Line art frame */
frame = gimp_frame_new (NULL);
......@@ -505,12 +495,10 @@ gimp_bucket_fill_options_gui (GimpToolOptions *tool_options)
combo = gimp_prop_enum_combo_box_new (config, "line-art-source", 0, 0);
gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Source"));
gtk_box_pack_start (GTK_BOX (box2), combo, FALSE, FALSE, 0);
gtk_widget_show (combo);
/* the fill transparent areas toggle */
widget = gimp_prop_check_button_new (config, "fill-transparent", NULL);
gtk_box_pack_start (GTK_BOX (box2), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
/* Line Art: feather radius scale */
scale = gimp_prop_spin_scale_new (config, "feather-radius", NULL,
......@@ -519,25 +507,21 @@ gimp_bucket_fill_options_gui (GimpToolOptions *tool_options)
frame = gimp_prop_expanding_frame_new (config, "feather", NULL,
scale, NULL);
gtk_box_pack_start (GTK_BOX (box2), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
/* Line Art: max growing size */
scale = gimp_prop_spin_scale_new (config, "line-art-max-grow", NULL,
1, 5, 0);
gtk_box_pack_start (GTK_BOX (box2), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
/* Line Art: stroke threshold */
scale = gimp_prop_spin_scale_new (config, "line-art-threshold", NULL,
0.05, 0.1, 2);
gtk_box_pack_start (GTK_BOX (box2), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
/* Line Art: max gap length */
scale = gimp_prop_spin_scale_new (config, "line-art-max-gap-length", NULL,
1, 5, 0);
gtk_box_pack_start (GTK_BOX (box2), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
gimp_bucket_fill_options_update_area (options);
......
......@@ -143,11 +143,9 @@ gimp_cage_options_gui (GimpToolOptions *tool_options)
mode = gimp_prop_enum_radio_box_new (config, "cage-mode", 0, 0);
gtk_box_pack_start (GTK_BOX (vbox), mode, FALSE, FALSE, 0);
gtk_widget_show (mode);
button = gimp_prop_check_button_new (config, "fill-plain-color", NULL);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
return vbox;
}
......@@ -70,7 +70,6 @@ gimp_clone_options_gui (GimpToolOptions *tool_options)
gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Source"));
g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_frame_set_label_widget (GTK_FRAME (frame), combo);
gtk_widget_show (combo);
source_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (frame), source_vbox);
......@@ -102,7 +101,6 @@ gimp_clone_options_gui (GimpToolOptions *tool_options)
gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Alignment"));
g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_box_pack_start (GTK_BOX (vbox), combo, TRUE, TRUE, 0);
gtk_widget_show (combo);
return vbox;
}
......@@ -159,7 +159,6 @@ gimp_color_options_gui (GimpToolOptions *tool_options)
frame = gimp_prop_expanding_frame_new (config, "sample-average", NULL,
scale, NULL);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
return vbox;
}
......@@ -190,25 +190,20 @@ gimp_color_picker_options_gui (GimpToolOptions *tool_options)
/* the sample merged toggle button */
button = gimp_prop_check_button_new (config, "sample-merged", NULL);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
/* the pick FG/BG frame */
str = g_strdup_printf (_("Pick Target (%s)"),
gimp_get_mod_string (toggle_mask));
frame = gimp_prop_enum_radio_frame_new (config, "pick-target", str, -1, -1);