mirror of https://github.com/GNOME/gimp.git
don't use gtk_box_pack_start/end_defaults(), they got deprecated in GTK+
2008-07-21 Michael Natterer <mitch@gimp.org> * tools/widgets.c: don't use gtk_box_pack_start/end_defaults(), they got deprecated in GTK+ trunk. svn path=/trunk/; revision=26253
This commit is contained in:
parent
c4777516ba
commit
c3dcb54a80
|
@ -1,3 +1,8 @@
|
||||||
|
2008-07-21 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* tools/widgets.c: don't use gtk_box_pack_start/end_defaults(),
|
||||||
|
they got deprecated in GTK+ trunk.
|
||||||
|
|
||||||
2008-07-16 Sven Neumann <sven@gimp.org>
|
2008-07-16 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* libgimp/libgimp-sections.txt: added gimp_palette_get_colors()
|
* libgimp/libgimp-sections.txt: added gimp_palette_get_colors()
|
||||||
|
|
|
@ -168,7 +168,7 @@ create_browser (void)
|
||||||
gtk_box_pack_start (GTK_BOX (GIMP_BROWSER (browser)->left_vbox),
|
gtk_box_pack_start (GTK_BOX (GIMP_BROWSER (browser)->left_vbox),
|
||||||
gtk_label_new ("TreeView goes here"), TRUE, TRUE, 0);
|
gtk_label_new ("TreeView goes here"), TRUE, TRUE, 0);
|
||||||
gtk_container_add (GTK_CONTAINER (align), browser);
|
gtk_container_add (GTK_CONTAINER (align), browser);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Browser"), FALSE, FALSE, 0);
|
gtk_label_new ("Browser"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ create_chain_button (void)
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 6);
|
vbox = gtk_vbox_new (FALSE, 6);
|
||||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.8);
|
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.8);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
table = gtk_table_new (2, 5, FALSE);
|
table = gtk_table_new (2, 5, FALSE);
|
||||||
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
|
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
|
||||||
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
|
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
|
||||||
|
@ -231,7 +231,8 @@ create_chain_button (void)
|
||||||
gtk_table_attach (GTK_TABLE (table), chain, 4,5, 0,2,
|
gtk_table_attach (GTK_TABLE (table), chain, 4,5, 0,2,
|
||||||
GTK_SHRINK | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
|
GTK_SHRINK | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
|
||||||
|
|
||||||
gtk_box_pack_end_defaults (GTK_BOX (vbox), gtk_label_new ("Chain Button"));
|
gtk_box_pack_end (GTK_BOX (vbox), gtk_label_new ("Chain Button"),
|
||||||
|
TRUE, TRUE, 0);
|
||||||
|
|
||||||
return new_widget_info ("gimp-chain-button", vbox, MEDIUM);
|
return new_widget_info ("gimp-chain-button", vbox, MEDIUM);
|
||||||
}
|
}
|
||||||
|
@ -252,7 +253,7 @@ create_color_area (void)
|
||||||
gimp_color_area_set_draw_border (GIMP_COLOR_AREA (area), TRUE);
|
gimp_color_area_set_draw_border (GIMP_COLOR_AREA (area), TRUE);
|
||||||
gtk_widget_set_size_request (area, -1, 25);
|
gtk_widget_set_size_request (area, -1, 25);
|
||||||
gtk_container_add (GTK_CONTAINER (align), area);
|
gtk_container_add (GTK_CONTAINER (align), area);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Color Area"), FALSE, FALSE, 0);
|
gtk_label_new ("Color Area"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -275,7 +276,7 @@ create_color_button (void)
|
||||||
80, 20, &color,
|
80, 20, &color,
|
||||||
GIMP_COLOR_AREA_SMALL_CHECKS);
|
GIMP_COLOR_AREA_SMALL_CHECKS);
|
||||||
gtk_container_add (GTK_CONTAINER (align), button);
|
gtk_container_add (GTK_CONTAINER (align), button);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Color Button"), FALSE, FALSE, 0);
|
gtk_label_new ("Color Button"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -297,7 +298,7 @@ create_color_hex_entry (void)
|
||||||
entry = gimp_color_hex_entry_new ();
|
entry = gimp_color_hex_entry_new ();
|
||||||
gimp_color_hex_entry_set_color (GIMP_COLOR_HEX_ENTRY (entry), &color);
|
gimp_color_hex_entry_set_color (GIMP_COLOR_HEX_ENTRY (entry), &color);
|
||||||
gtk_container_add (GTK_CONTAINER (align), entry);
|
gtk_container_add (GTK_CONTAINER (align), entry);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Color Hex Entry"), FALSE, FALSE, 0);
|
gtk_label_new ("Color Hex Entry"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -318,7 +319,7 @@ create_color_profile_combo_box (void)
|
||||||
NULL, "sRGB");
|
NULL, "sRGB");
|
||||||
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
|
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
|
||||||
gtk_container_add (GTK_CONTAINER (align), combo);
|
gtk_container_add (GTK_CONTAINER (align), combo);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Color Profile Combo Box"),
|
gtk_label_new ("Color Profile Combo Box"),
|
||||||
FALSE, FALSE, 0);
|
FALSE, FALSE, 0);
|
||||||
|
@ -345,7 +346,7 @@ create_color_scale (void)
|
||||||
gimp_color_scale_set_color (GIMP_COLOR_SCALE (scale), &rgb, &hsv);
|
gimp_color_scale_set_color (GIMP_COLOR_SCALE (scale), &rgb, &hsv);
|
||||||
gtk_range_set_value (GTK_RANGE (scale), 40);
|
gtk_range_set_value (GTK_RANGE (scale), 40);
|
||||||
gtk_container_add (GTK_CONTAINER (align), scale);
|
gtk_container_add (GTK_CONTAINER (align), scale);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Color Scale"), FALSE, FALSE, 0);
|
gtk_label_new ("Color Scale"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -369,7 +370,7 @@ create_color_selection (void)
|
||||||
gimp_color_selection_set_color (GIMP_COLOR_SELECTION (selection), &color);
|
gimp_color_selection_set_color (GIMP_COLOR_SELECTION (selection), &color);
|
||||||
gtk_widget_set_size_request (selection, 400, -1);
|
gtk_widget_set_size_request (selection, 400, -1);
|
||||||
gtk_container_add (GTK_CONTAINER (align), selection);
|
gtk_container_add (GTK_CONTAINER (align), selection);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Color Selection"), FALSE, FALSE, 0);
|
gtk_label_new ("Color Selection"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -412,7 +413,7 @@ create_enum_combo_box (void)
|
||||||
combo = gimp_enum_combo_box_new (GIMP_TYPE_CHANNEL_TYPE);
|
combo = gimp_enum_combo_box_new (GIMP_TYPE_CHANNEL_TYPE);
|
||||||
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo), GIMP_BLUE_CHANNEL);
|
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo), GIMP_BLUE_CHANNEL);
|
||||||
gtk_container_add (GTK_CONTAINER (align), combo);
|
gtk_container_add (GTK_CONTAINER (align), combo);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Enum Combo Box"), FALSE, FALSE, 0);
|
gtk_label_new ("Enum Combo Box"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -430,7 +431,7 @@ create_enum_label (void)
|
||||||
align = gtk_alignment_new (0.5, 0.5, 0.5, 0.0);
|
align = gtk_alignment_new (0.5, 0.5, 0.5, 0.0);
|
||||||
label = gimp_enum_label_new (GIMP_TYPE_IMAGE_BASE_TYPE, GIMP_RGB);
|
label = gimp_enum_label_new (GIMP_TYPE_IMAGE_BASE_TYPE, GIMP_RGB);
|
||||||
gtk_container_add (GTK_CONTAINER (align), label);
|
gtk_container_add (GTK_CONTAINER (align), label);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Enum Label"), FALSE, FALSE, 0);
|
gtk_label_new ("Enum Label"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -450,7 +451,7 @@ create_file_entry (void)
|
||||||
"wilber.png",
|
"wilber.png",
|
||||||
FALSE, TRUE);
|
FALSE, TRUE);
|
||||||
gtk_container_add (GTK_CONTAINER (align), entry);
|
gtk_container_add (GTK_CONTAINER (align), entry);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("File Entry"), FALSE, FALSE, 0);
|
gtk_label_new ("File Entry"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -491,7 +492,7 @@ create_number_pair_entry (void)
|
||||||
entry = gimp_number_pair_entry_new (":/", TRUE, 0.001, GIMP_MAX_IMAGE_SIZE);
|
entry = gimp_number_pair_entry_new (":/", TRUE, 0.001, GIMP_MAX_IMAGE_SIZE);
|
||||||
gimp_number_pair_entry_set_values (GIMP_NUMBER_PAIR_ENTRY (entry), 4, 3);
|
gimp_number_pair_entry_set_values (GIMP_NUMBER_PAIR_ENTRY (entry), 4, 3);
|
||||||
gtk_container_add (GTK_CONTAINER (align), entry);
|
gtk_container_add (GTK_CONTAINER (align), entry);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Number Pair Entry"), FALSE, FALSE, 0);
|
gtk_label_new ("Number Pair Entry"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -517,7 +518,7 @@ create_int_combo_box (void)
|
||||||
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo), 1);
|
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo), 1);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (align), combo);
|
gtk_container_add (GTK_CONTAINER (align), combo);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Int Combo Box"), FALSE, FALSE, 0);
|
gtk_label_new ("Int Combo Box"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -536,7 +537,7 @@ create_memsize_entry (void)
|
||||||
entry = gimp_memsize_entry_new ((3 * 1024 + 512) * 1024,
|
entry = gimp_memsize_entry_new ((3 * 1024 + 512) * 1024,
|
||||||
0, 1024 * 1024 * 1024);
|
0, 1024 * 1024 * 1024);
|
||||||
gtk_container_add (GTK_CONTAINER (align), entry);
|
gtk_container_add (GTK_CONTAINER (align), entry);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Memsize Entry"), FALSE, FALSE, 0);
|
gtk_label_new ("Memsize Entry"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -560,7 +561,7 @@ create_offset_area (void)
|
||||||
gimp_offset_area_set_size (GIMP_OFFSET_AREA (area), 180, 160);
|
gimp_offset_area_set_size (GIMP_OFFSET_AREA (area), 180, 160);
|
||||||
gimp_offset_area_set_offsets (GIMP_OFFSET_AREA (area), 30, 30);
|
gimp_offset_area_set_offsets (GIMP_OFFSET_AREA (area), 30, 30);
|
||||||
gtk_container_add (GTK_CONTAINER (frame), area);
|
gtk_container_add (GTK_CONTAINER (frame), area);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Offset Area"), FALSE, FALSE, 0);
|
gtk_label_new ("Offset Area"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -579,7 +580,7 @@ create_page_selector (void)
|
||||||
gimp_page_selector_set_n_pages (GIMP_PAGE_SELECTOR (selector), 16);
|
gimp_page_selector_set_n_pages (GIMP_PAGE_SELECTOR (selector), 16);
|
||||||
gimp_page_selector_select_range (GIMP_PAGE_SELECTOR (selector),
|
gimp_page_selector_select_range (GIMP_PAGE_SELECTOR (selector),
|
||||||
"1,3,7-9,12-15");
|
"1,3,7-9,12-15");
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), selector);
|
gtk_box_pack_start (GTK_BOX (vbox), selector, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Page Selector"), FALSE, FALSE, 0);
|
gtk_label_new ("Page Selector"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -600,7 +601,7 @@ create_path_editor (void)
|
||||||
editor = gimp_path_editor_new ("Path Editor", path);
|
editor = gimp_path_editor_new ("Path Editor", path);
|
||||||
gtk_widget_set_size_request (editor, -1, 240);
|
gtk_widget_set_size_request (editor, -1, 240);
|
||||||
gtk_container_add (GTK_CONTAINER (align), editor);
|
gtk_container_add (GTK_CONTAINER (align), editor);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Path Editor"), FALSE, FALSE, 0);
|
gtk_label_new ("Path Editor"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -621,7 +622,7 @@ create_pick_button (void)
|
||||||
align = gtk_alignment_new (0.5, 0.5, 0.5, 1.0);
|
align = gtk_alignment_new (0.5, 0.5, 0.5, 1.0);
|
||||||
button = gimp_pick_button_new ();
|
button = gimp_pick_button_new ();
|
||||||
gtk_container_add (GTK_CONTAINER (align), button);
|
gtk_container_add (GTK_CONTAINER (align), button);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Pick Button"), FALSE, FALSE, 0);
|
gtk_label_new ("Pick Button"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -664,7 +665,7 @@ create_preview_area (void)
|
||||||
gdk_pixbuf_get_width (pixbuf),
|
gdk_pixbuf_get_width (pixbuf),
|
||||||
gdk_pixbuf_get_height (pixbuf));
|
gdk_pixbuf_get_height (pixbuf));
|
||||||
g_object_unref (pixbuf);
|
g_object_unref (pixbuf);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Preview Area"), FALSE, FALSE, 0);
|
gtk_label_new ("Preview Area"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -689,7 +690,7 @@ create_string_combo_box (void)
|
||||||
gimp_string_combo_box_set_active (GIMP_STRING_COMBO_BOX (combo), "Foo");
|
gimp_string_combo_box_set_active (GIMP_STRING_COMBO_BOX (combo), "Foo");
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (align), combo);
|
gtk_container_add (GTK_CONTAINER (align), combo);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("String Combo Box"), FALSE, FALSE, 0);
|
gtk_label_new ("String Combo Box"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
@ -707,7 +708,7 @@ create_unit_menu (void)
|
||||||
align = gtk_alignment_new (0.5, 0.5, 0.5, 0.0);
|
align = gtk_alignment_new (0.5, 0.5, 0.5, 0.0);
|
||||||
menu = gimp_unit_menu_new ("%p", GIMP_UNIT_MM, TRUE, FALSE, FALSE);
|
menu = gimp_unit_menu_new ("%p", GIMP_UNIT_MM, TRUE, FALSE, FALSE);
|
||||||
gtk_container_add (GTK_CONTAINER (align), menu);
|
gtk_container_add (GTK_CONTAINER (align), menu);
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), align);
|
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
gtk_label_new ("Unit Menu"), FALSE, FALSE, 0);
|
gtk_label_new ("Unit Menu"), FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue