From 3d5d3e8eae60d26bbd88a159efc87e9789039211 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Sun, 30 Jun 2013 13:14:18 -0400 Subject: [PATCH] Fix a couple of deprecation warnings related to stock items --- perf/treeview.c | 54 ++++++++++++++++++++++++------------------------- tests/testgtk.c | 2 ++ 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/perf/treeview.c b/perf/treeview.c index 4c5c2d7999..60d1e42865 100644 --- a/perf/treeview.c +++ b/perf/treeview.c @@ -8,32 +8,32 @@ struct row_data { }; static const struct row_data row_data[] = { - { GTK_STOCK_NEW, "First", "Here bygynneth the Book of the tales of Caunterbury." }, - { GTK_STOCK_OPEN, "Second", "Whan that Aprille, with hise shoures soote," }, - { GTK_STOCK_ABOUT, "Third", "The droghte of March hath perced to the roote" }, - { GTK_STOCK_ADD, "Fourth", "And bathed every veyne in swich licour," }, - { GTK_STOCK_APPLY, "Fifth", "Of which vertu engendred is the flour;" }, - { GTK_STOCK_BOLD, "Sixth", "Whan Zephirus eek with his swete breeth" }, - { GTK_STOCK_CANCEL, "Seventh", "Inspired hath in every holt and heeth" }, - { GTK_STOCK_CDROM, "Eighth", "The tendre croppes, and the yonge sonne" }, - { GTK_STOCK_CLEAR, "Ninth", "Hath in the Ram his halfe cours yronne," }, - { GTK_STOCK_CLOSE, "Tenth", "And smale foweles maken melodye," }, - { GTK_STOCK_COLOR_PICKER, "Eleventh", "That slepen al the nyght with open eye-" }, - { GTK_STOCK_CONVERT, "Twelfth", "So priketh hem Nature in hir corages-" }, - { GTK_STOCK_CONNECT, "Thirteenth", "Thanne longen folk to goon on pilgrimages" }, - { GTK_STOCK_COPY, "Fourteenth", "And palmeres for to seken straunge strondes" }, - { GTK_STOCK_CUT, "Fifteenth", "To ferne halwes, kowthe in sondry londes;" }, - { GTK_STOCK_DELETE, "Sixteenth", "And specially, from every shires ende" }, - { GTK_STOCK_DIRECTORY, "Seventeenth", "Of Engelond, to Caunturbury they wende," }, - { GTK_STOCK_DISCONNECT, "Eighteenth", "The hooly blisful martir for the seke" }, - { GTK_STOCK_EDIT, "Nineteenth", "That hem hath holpen, whan that they were seeke." }, - { GTK_STOCK_EXECUTE, "Twentieth", "Bifil that in that seson, on a day," }, - { GTK_STOCK_FILE, "Twenty-first", "In Southwerk at the Tabard as I lay," }, - { GTK_STOCK_FIND, "Twenty-second", "Redy to wenden on my pilgrymage" }, - { GTK_STOCK_FIND_AND_REPLACE, "Twenty-third", "To Caunterbury, with ful devout corage," }, - { GTK_STOCK_FLOPPY, "Twenty-fourth", "At nyght were come into that hostelrye" }, - { GTK_STOCK_FULLSCREEN, "Twenty-fifth", "Wel nyne and twenty in a compaignye" }, - { GTK_STOCK_GOTO_BOTTOM, "Twenty-sixth", "Of sondry folk, by aventure yfalle" }, + { "document-new", "First", "Here bygynneth the Book of the tales of Caunterbury." }, + { "document-open", "Second", "Whan that Aprille, with hise shoures soote," }, + { "help-about", "Third", "The droghte of March hath perced to the roote" }, + { "list-add", "Fourth", "And bathed every veyne in swich licour," }, + { "go-top", "Fifth", "Of which vertu engendred is the flour;" }, + { "format-text-bold", "Sixth", "Whan Zephirus eek with his swete breeth" }, + { "go-first", "Seventh", "Inspired hath in every holt and heeth" }, + { "media-optical", "Eighth", "The tendre croppes, and the yonge sonne" }, + { "edit-clear", "Ninth", "Hath in the Ram his halfe cours yronne," }, + { "window-close", "Tenth", "And smale foweles maken melodye," }, + { "go-last", "Eleventh", "That slepen al the nyght with open eye-" }, + { "go-previous", "Twelfth", "So priketh hem Nature in hir corages-" }, + { "go-down", "Thirteenth", "Thanne longen folk to goon on pilgrimages" }, + { "edit-copy", "Fourteenth", "And palmeres for to seken straunge strondes" }, + { "edit-cut", "Fifteenth", "To ferne halwes, kowthe in sondry londes;" }, + { "edit-delete", "Sixteenth", "And specially, from every shires ende" }, + { "folder", "Seventeenth", "Of Engelond, to Caunturbury they wende," }, + { "go-next", "Eighteenth", "The hooly blisful martir for the seke" }, + { "go-up", "Nineteenth", "That hem hath holpen, whan that they were seeke." }, + { "system-run", "Twentieth", "Bifil that in that seson, on a day," }, + { "text-x-generic", "Twenty-first", "In Southwerk at the Tabard as I lay," }, + { "edit-find", "Twenty-second", "Redy to wenden on my pilgrymage" }, + { "edit-find-replace", "Twenty-third", "To Caunterbury, with ful devout corage," }, + { "media-floppy", "Twenty-fourth", "At nyght were come into that hostelrye" }, + { "view-fullscreen", "Twenty-fifth", "Wel nyne and twenty in a compaignye" }, + { "go-bottom", "Twenty-sixth", "Of sondry folk, by aventure yfalle" }, }; static GtkTreeModel * @@ -79,7 +79,7 @@ tree_view_new (void) column = gtk_tree_view_column_new_with_attributes ("Icon", gtk_cell_renderer_pixbuf_new (), - "stock-id", 0, + "icon-name", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column); diff --git a/tests/testgtk.c b/tests/testgtk.c index c73c84af8c..16b496ac1d 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -1216,6 +1216,7 @@ set_toolbar_disable (GtkWidget *widget, g_object_set (settings, "gtk-enable-tooltips", FALSE, NULL); } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS; static GtkActionEntry create_toolbar_items[] = { { NULL, GTK_STOCK_NEW, NULL, NULL, "Stock icon: New", G_CALLBACK (set_toolbar_small_stock) }, @@ -1254,6 +1255,7 @@ static GtkActionEntry create_toolbar_items[] = { { NULL, NULL, "Bar", NULL, "Bar tooltip", NULL }, }; +G_GNUC_END_IGNORE_DEPRECATIONS; static void create_toolbar (GtkWidget *widget) -- GitLab