diff options
author | William Jon McCann <william.jon.mccann@gmail.com> | 2013-06-27 17:51:38 -0400 |
---|---|---|
committer | William Jon McCann <william.jon.mccann@gmail.com> | 2013-06-27 17:51:38 -0400 |
commit | d741b7b87352db52eee4493cea8d45c9f9ee7342 (patch) | |
tree | b4723f31c1a3a622d042345d53a0ee207d05caec /gtk/gtkaction.c | |
parent | a02f2c42917a6bae8ef836a26f1afc54879fc96b (diff) | |
download | gtk+-d741b7b87352db52eee4493cea8d45c9f9ee7342.tar.gz |
Deprecate the gtk stock functions
Diffstat (limited to 'gtk/gtkaction.c')
-rw-r--r-- | gtk/gtkaction.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c index 71413bc117..73f71a9665 100644 --- a/gtk/gtkaction.c +++ b/gtk/gtkaction.c @@ -1274,9 +1274,13 @@ gtk_action_set_label (GtkAction *action, if (!action->private_data->label_set && action->private_data->stock_id) { GtkStockItem stock_item; - + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + if (gtk_stock_lookup (action->private_data->stock_id, &stock_item)) action->private_data->label = g_strdup (stock_item.label); + + G_GNUC_END_IGNORE_DEPRECATIONS; } g_object_notify (G_OBJECT (action), "label"); @@ -1514,13 +1518,17 @@ gtk_action_set_stock_id (GtkAction *action, if (!action->private_data->label_set) { GtkStockItem stock_item; - + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + if (action->private_data->stock_id && gtk_stock_lookup (action->private_data->stock_id, &stock_item)) gtk_action_set_label (action, stock_item.label); - else + else gtk_action_set_label (action, NULL); - + + G_GNUC_END_IGNORE_DEPRECATIONS; + action->private_data->label_set = FALSE; } } |