[gtk+] tests: Ignore deprecation warnings
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] tests: Ignore deprecation warnings
- Date: Wed, 26 Jun 2013 13:56:46 +0000 (UTC)
commit 427d4195a1ff448d6e605e78b12a23328e64ceb9
Author: Benjamin Otte <otte redhat com>
Date: Wed Jun 26 15:50:32 2013 +0200
tests: Ignore deprecation warnings
tests/testbuttons.c | 2 ++
tests/testgtk.c | 10 +++++++++-
tests/testimage.c | 2 ++
3 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/tests/testbuttons.c b/tests/testbuttons.c
index c5b1d4f..8fbe22e 100644
--- a/tests/testbuttons.c
+++ b/tests/testbuttons.c
@@ -36,7 +36,9 @@ int main (int argc, char *argv[])
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (box), hbox);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
button = gtk_button_new_from_stock (GTK_STOCK_SAVE);
+ G_GNUC_END_IGNORE_DEPRECATIONS;
gtk_container_add (GTK_CONTAINER (hbox), button);
g_object_get (button,
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 777a23e..db14da7 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -662,6 +662,7 @@ create_buttons (GtkWidget *widget)
gtk_container_set_border_width (GTK_CONTAINER (grid), 10);
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[1] = gtk_button_new_with_mnemonic ("_button2");
button[2] = gtk_button_new_with_mnemonic ("_button3");
@@ -671,6 +672,7 @@ create_buttons (GtkWidget *widget)
button[6] = gtk_button_new_with_label ("button7");
button[7] = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
button[8] = gtk_button_new_with_label ("button9");
+ G_GNUC_END_IGNORE_DEPRECATIONS;
for (i = 0; i < 9; i++)
{
@@ -1292,7 +1294,11 @@ create_toolbar (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (toolitem), entry);
}
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
{
GtkWidget *icon;
@@ -3301,7 +3307,9 @@ create_menus (GtkWidget *widget)
menu = create_menu (screen, 1, 5);
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);
+ G_GNUC_END_IGNORE_DEPRECATIONS;
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
gtk_widget_show (menuitem);
diff --git a/tests/testimage.c b/tests/testimage.c
index e185961..27f7327 100644
--- a/tests/testimage.c
+++ b/tests/testimage.c
@@ -151,8 +151,10 @@ main (int argc, char **argv)
label = gtk_label_new ("GTK_IMAGE_STOCK");
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);
gtk_grid_attach (GTK_GRID (grid), image, 1, 2, 1, 1);
+ G_GNUC_END_IGNORE_DEPRECATIONS;
label = gtk_label_new ("GTK_IMAGE_ICON_SET");
gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]