Commit 427d4195 authored by Benjamin Otte's avatar Benjamin Otte

tests: Ignore deprecation warnings

parent 14c78ed6
...@@ -36,7 +36,9 @@ int main (int argc, char *argv[]) ...@@ -36,7 +36,9 @@ int main (int argc, char *argv[])
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (box), hbox); gtk_container_add (GTK_CONTAINER (box), hbox);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
button = gtk_button_new_from_stock (GTK_STOCK_SAVE); button = gtk_button_new_from_stock (GTK_STOCK_SAVE);
G_GNUC_END_IGNORE_DEPRECATIONS;
gtk_container_add (GTK_CONTAINER (hbox), button); gtk_container_add (GTK_CONTAINER (hbox), button);
g_object_get (button, g_object_get (button,
......
...@@ -662,6 +662,7 @@ create_buttons (GtkWidget *widget) ...@@ -662,6 +662,7 @@ create_buttons (GtkWidget *widget)
gtk_container_set_border_width (GTK_CONTAINER (grid), 10); gtk_container_set_border_width (GTK_CONTAINER (grid), 10);
gtk_box_pack_start (GTK_BOX (box1), grid, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (box1), grid, TRUE, TRUE, 0);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
button[0] = gtk_button_new_with_label ("button1"); button[0] = gtk_button_new_with_label ("button1");
button[1] = gtk_button_new_with_mnemonic ("_button2"); button[1] = gtk_button_new_with_mnemonic ("_button2");
button[2] = gtk_button_new_with_mnemonic ("_button3"); button[2] = gtk_button_new_with_mnemonic ("_button3");
...@@ -671,6 +672,7 @@ create_buttons (GtkWidget *widget) ...@@ -671,6 +672,7 @@ create_buttons (GtkWidget *widget)
button[6] = gtk_button_new_with_label ("button7"); button[6] = gtk_button_new_with_label ("button7");
button[7] = gtk_button_new_from_stock (GTK_STOCK_CLOSE); button[7] = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
button[8] = gtk_button_new_with_label ("button9"); button[8] = gtk_button_new_with_label ("button9");
G_GNUC_END_IGNORE_DEPRECATIONS;
for (i = 0; i < 9; i++) for (i = 0; i < 9; i++)
{ {
...@@ -1292,7 +1294,11 @@ create_toolbar (GtkWidget *widget) ...@@ -1292,7 +1294,11 @@ create_toolbar (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (toolitem), entry); gtk_container_add (GTK_CONTAINER (toolitem), entry);
} }
else if (create_toolbar_items[i].stock_id) else if (create_toolbar_items[i].stock_id)
toolitem = gtk_tool_button_new_from_stock (create_toolbar_items[i].stock_id); {
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
toolitem = gtk_tool_button_new_from_stock (create_toolbar_items[i].stock_id);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
else else
{ {
GtkWidget *icon; GtkWidget *icon;
...@@ -3301,7 +3307,9 @@ create_menus (GtkWidget *widget) ...@@ -3301,7 +3307,9 @@ create_menus (GtkWidget *widget)
menu = create_menu (screen, 1, 5); menu = create_menu (screen, 1, 5);
gtk_menu_set_accel_group (GTK_MENU (menu), accel_group); gtk_menu_set_accel_group (GTK_MENU (menu), accel_group);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_NEW, accel_group); menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_NEW, accel_group);
G_GNUC_END_IGNORE_DEPRECATIONS;
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
gtk_widget_show (menuitem); gtk_widget_show (menuitem);
......
...@@ -151,8 +151,10 @@ main (int argc, char **argv) ...@@ -151,8 +151,10 @@ main (int argc, char **argv)
label = gtk_label_new ("GTK_IMAGE_STOCK"); label = gtk_label_new ("GTK_IMAGE_STOCK");
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1); gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
image = gtk_image_new_from_stock (GTK_STOCK_REDO, GTK_ICON_SIZE_DIALOG); image = gtk_image_new_from_stock (GTK_STOCK_REDO, GTK_ICON_SIZE_DIALOG);
gtk_grid_attach (GTK_GRID (grid), image, 1, 2, 1, 1); gtk_grid_attach (GTK_GRID (grid), image, 1, 2, 1, 1);
G_GNUC_END_IGNORE_DEPRECATIONS;
label = gtk_label_new ("GTK_IMAGE_ICON_SET"); label = gtk_label_new ("GTK_IMAGE_ICON_SET");
gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1); gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1);
......
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