app: remove another bunch of one-line GtkTables
This commit is contained in:
@ -82,7 +82,8 @@ image_new_dialog_new (GimpContext *context)
|
|||||||
{
|
{
|
||||||
ImageNewDialog *dialog;
|
ImageNewDialog *dialog;
|
||||||
GtkWidget *main_vbox;
|
GtkWidget *main_vbox;
|
||||||
GtkWidget *table;
|
GtkWidget *hbox;
|
||||||
|
GtkWidget *label;
|
||||||
GimpSizeEntry *entry;
|
GimpSizeEntry *entry;
|
||||||
|
|
||||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||||
@ -126,10 +127,14 @@ image_new_dialog_new (GimpContext *context)
|
|||||||
main_vbox, TRUE, TRUE, 0);
|
main_vbox, TRUE, TRUE, 0);
|
||||||
gtk_widget_show (main_vbox);
|
gtk_widget_show (main_vbox);
|
||||||
|
|
||||||
table = gtk_table_new (1, 2, FALSE);
|
/* The template combo */
|
||||||
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||||
gtk_box_pack_start (GTK_BOX (main_vbox), table, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (hbox);
|
||||||
|
|
||||||
|
label = gtk_label_new_with_mnemonic (_("_Template:"));
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||||
|
gtk_widget_show (label);
|
||||||
|
|
||||||
dialog->combo = g_object_new (GIMP_TYPE_CONTAINER_COMBO_BOX,
|
dialog->combo = g_object_new (GIMP_TYPE_CONTAINER_COMBO_BOX,
|
||||||
"container", context->gimp->templates,
|
"container", context->gimp->templates,
|
||||||
@ -139,10 +144,10 @@ image_new_dialog_new (GimpContext *context)
|
|||||||
"ellipsize", PANGO_ELLIPSIZE_NONE,
|
"ellipsize", PANGO_ELLIPSIZE_NONE,
|
||||||
"focus-on-click", FALSE,
|
"focus-on-click", FALSE,
|
||||||
NULL);
|
NULL);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox), dialog->combo, TRUE, TRUE, 0);
|
||||||
|
gtk_widget_show (dialog->combo);
|
||||||
|
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->combo);
|
||||||
_("_Template:"), 0.0, 0.5,
|
|
||||||
dialog->combo, 1, TRUE);
|
|
||||||
|
|
||||||
g_signal_connect (dialog->context, "template-changed",
|
g_signal_connect (dialog->context, "template-changed",
|
||||||
G_CALLBACK (image_new_template_changed),
|
G_CALLBACK (image_new_template_changed),
|
||||||
|
@ -102,8 +102,8 @@ gimp_clone_options_gui (GimpToolOptions *tool_options)
|
|||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *table;
|
|
||||||
GtkWidget *combo;
|
GtkWidget *combo;
|
||||||
|
GtkWidget *label;
|
||||||
|
|
||||||
frame = gimp_prop_enum_radio_frame_new (config, "clone-type",
|
frame = gimp_prop_enum_radio_frame_new (config, "clone-type",
|
||||||
_("Source"), 0, 0);
|
_("Source"), 0, 0);
|
||||||
@ -121,15 +121,17 @@ gimp_clone_options_gui (GimpToolOptions *tool_options)
|
|||||||
gimp_enum_radio_frame_add (GTK_FRAME (frame), hbox,
|
gimp_enum_radio_frame_add (GTK_FRAME (frame), hbox,
|
||||||
GIMP_PATTERN_CLONE, TRUE);
|
GIMP_PATTERN_CLONE, TRUE);
|
||||||
|
|
||||||
table = gtk_table_new (1, 2, FALSE);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||||
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
gtk_widget_show (hbox);
|
||||||
gtk_widget_show (table);
|
|
||||||
|
label = gtk_label_new (_("Alignment:"));
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||||
|
gtk_widget_show (label);
|
||||||
|
|
||||||
combo = gimp_prop_enum_combo_box_new (config, "align-mode", 0, 0);
|
combo = gimp_prop_enum_combo_box_new (config, "align-mode", 0, 0);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
|
||||||
_("Alignment:"), 0.0, 0.5,
|
gtk_widget_show (combo);
|
||||||
combo, 1, FALSE);
|
|
||||||
|
|
||||||
return vbox;
|
return vbox;
|
||||||
}
|
}
|
||||||
|
@ -91,25 +91,28 @@ gimp_heal_options_gui (GimpToolOptions *tool_options)
|
|||||||
GObject *config = G_OBJECT (tool_options);
|
GObject *config = G_OBJECT (tool_options);
|
||||||
GtkWidget *vbox = gimp_paint_options_gui (tool_options);
|
GtkWidget *vbox = gimp_paint_options_gui (tool_options);
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
GtkWidget *table;
|
GtkWidget *hbox;
|
||||||
|
GtkWidget *label;
|
||||||
GtkWidget *combo;
|
GtkWidget *combo;
|
||||||
|
|
||||||
/* create and attach the sample merged checkbox */
|
/* the sample merged checkbox */
|
||||||
button = gimp_prop_check_button_new (config, "sample-merged",
|
button = gimp_prop_check_button_new (config, "sample-merged",
|
||||||
_("Sample merged"));
|
_("Sample merged"));
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
|
|
||||||
/* create and attach the alignment options to a table */
|
/* the alignment combo */
|
||||||
table = gtk_table_new (1, 2, FALSE);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||||
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
gtk_widget_show (hbox);
|
||||||
gtk_widget_show (table);
|
|
||||||
|
label = gtk_label_new (_("Alignment:"));
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||||
|
gtk_widget_show (label);
|
||||||
|
|
||||||
combo = gimp_prop_enum_combo_box_new (config, "align-mode", 0, 0);
|
combo = gimp_prop_enum_combo_box_new (config, "align-mode", 0, 0);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
|
||||||
_("Alignment:"), 0.0, 0.5,
|
gtk_widget_show (combo);
|
||||||
combo, 1, FALSE);
|
|
||||||
|
|
||||||
return vbox;
|
return vbox;
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,7 @@ dynamics_options_gui (GimpPaintOptions *paint_options,
|
|||||||
GObject *config = G_OBJECT (paint_options);
|
GObject *config = G_OBJECT (paint_options);
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
GtkWidget *inner_frame;
|
GtkWidget *inner_frame;
|
||||||
GtkWidget *table;
|
GtkWidget *label;
|
||||||
GtkWidget *scale;
|
GtkWidget *scale;
|
||||||
GtkWidget *menu;
|
GtkWidget *menu;
|
||||||
GtkWidget *combo;
|
GtkWidget *combo;
|
||||||
@ -318,15 +318,17 @@ dynamics_options_gui (GimpPaintOptions *paint_options,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* the repeat type */
|
/* the repeat type */
|
||||||
table = gtk_table_new (1, 2, FALSE);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||||
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
|
gtk_box_pack_start (GTK_BOX (inner_vbox), hbox, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (inner_vbox), table, FALSE, FALSE, 0);
|
gtk_widget_show (hbox);
|
||||||
gtk_widget_show (table);
|
|
||||||
|
label = gtk_label_new (_("Repeat:"));
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||||
|
gtk_widget_show (label);
|
||||||
|
|
||||||
combo = gimp_prop_enum_combo_box_new (config, "fade-repeat", 0, 0);
|
combo = gimp_prop_enum_combo_box_new (config, "fade-repeat", 0, 0);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
|
||||||
_("Repeat:"), 0.0, 0.5,
|
gtk_widget_show (combo);
|
||||||
combo, 1, FALSE);
|
|
||||||
|
|
||||||
checkbox = gimp_prop_check_button_new (config, "fade-reverse",
|
checkbox = gimp_prop_check_button_new (config, "fade-reverse",
|
||||||
_("Reverse"));
|
_("Reverse"));
|
||||||
|
@ -881,7 +881,7 @@ gimp_perspective_clone_options_gui (GimpToolOptions *tool_options)
|
|||||||
GtkWidget *mode;
|
GtkWidget *mode;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *table;
|
GtkWidget *label;
|
||||||
GtkWidget *combo;
|
GtkWidget *combo;
|
||||||
|
|
||||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||||
@ -911,15 +911,17 @@ gimp_perspective_clone_options_gui (GimpToolOptions *tool_options)
|
|||||||
gimp_enum_radio_frame_add (GTK_FRAME (frame), hbox,
|
gimp_enum_radio_frame_add (GTK_FRAME (frame), hbox,
|
||||||
GIMP_PATTERN_CLONE, TRUE);
|
GIMP_PATTERN_CLONE, TRUE);
|
||||||
|
|
||||||
table = gtk_table_new (1, 2, FALSE);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||||
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
gtk_widget_show (hbox);
|
||||||
gtk_widget_show (table);
|
|
||||||
|
label = gtk_label_new (_("Alignment:"));
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||||
|
gtk_widget_show (label);
|
||||||
|
|
||||||
combo = gimp_prop_enum_combo_box_new (config, "align-mode", 0, 0);
|
combo = gimp_prop_enum_combo_box_new (config, "align-mode", 0, 0);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
|
||||||
_("Alignment:"), 0.0, 0.5,
|
gtk_widget_show (combo);
|
||||||
combo, 1, FALSE);
|
|
||||||
|
|
||||||
return vbox;
|
return vbox;
|
||||||
}
|
}
|
||||||
|
@ -194,8 +194,9 @@ gimp_region_select_options_gui (GimpToolOptions *tool_options)
|
|||||||
GObject *config = G_OBJECT (tool_options);
|
GObject *config = G_OBJECT (tool_options);
|
||||||
GtkWidget *vbox = gimp_selection_options_gui (tool_options);
|
GtkWidget *vbox = gimp_selection_options_gui (tool_options);
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
GtkWidget *table;
|
|
||||||
GtkWidget *scale;
|
GtkWidget *scale;
|
||||||
|
GtkWidget *hbox;
|
||||||
|
GtkWidget *label;
|
||||||
GtkWidget *combo;
|
GtkWidget *combo;
|
||||||
|
|
||||||
/* the select transparent areas toggle */
|
/* the select transparent areas toggle */
|
||||||
@ -218,16 +219,17 @@ gimp_region_select_options_gui (GimpToolOptions *tool_options)
|
|||||||
gtk_widget_show (scale);
|
gtk_widget_show (scale);
|
||||||
|
|
||||||
/* the select criterion combo */
|
/* the select criterion combo */
|
||||||
table = gtk_table_new (1, 3, FALSE);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||||
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||||
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
|
gtk_widget_show (hbox);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
|
||||||
gtk_widget_show (table);
|
label = gtk_label_new (_("Select by:"));
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||||
|
gtk_widget_show (label);
|
||||||
|
|
||||||
combo = gimp_prop_enum_combo_box_new (config, "select-criterion", 0, 0);
|
combo = gimp_prop_enum_combo_box_new (config, "select-criterion", 0, 0);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
|
gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
|
||||||
_("Select by:"), 0.0, 0.5,
|
gtk_widget_show (combo);
|
||||||
combo, 2, FALSE);
|
|
||||||
|
|
||||||
return vbox;
|
return vbox;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user