summaryrefslogtreecommitdiff
path: root/gtk/gtkaction.c
diff options
context:
space:
mode:
authorWilliam Jon McCann <william.jon.mccann@gmail.com>2013-06-24 23:47:52 -0400
committerWilliam Jon McCann <william.jon.mccann@gmail.com>2013-06-25 19:05:32 -0400
commit424e1d0059c94d25e0d631dd671ae886ea6fe546 (patch)
tree2b5e027cdd8d5c9ca547f8587d036c57af90685e /gtk/gtkaction.c
parent0091fc3543dfe904d192076d2e1d7079affbadb6 (diff)
downloadgtk+-424e1d0059c94d25e0d631dd671ae886ea6fe546.tar.gz
Start deprecating some GtkStock API
Diffstat (limited to 'gtk/gtkaction.c')
-rw-r--r--gtk/gtkaction.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c
index 6bb0ae9d7b..06138cbbf2 100644
--- a/gtk/gtkaction.c
+++ b/gtk/gtkaction.c
@@ -884,17 +884,23 @@ gtk_action_unblock_activate (GtkAction *action)
GtkWidget *
gtk_action_create_icon (GtkAction *action, GtkIconSize icon_size)
{
+ GtkWidget *widget = NULL;
+
g_return_val_if_fail (GTK_IS_ACTION (action), NULL);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+
if (action->private_data->stock_id &&
gtk_icon_factory_lookup_default (action->private_data->stock_id))
- return gtk_image_new_from_stock (action->private_data->stock_id, icon_size);
+ widget = gtk_image_new_from_stock (action->private_data->stock_id, icon_size);
else if (action->private_data->gicon)
- return gtk_image_new_from_gicon (action->private_data->gicon, icon_size);
+ widget = gtk_image_new_from_gicon (action->private_data->gicon, icon_size);
else if (action->private_data->icon_name)
- return gtk_image_new_from_icon_name (action->private_data->icon_name, icon_size);
- else
- return NULL;
+ widget = gtk_image_new_from_icon_name (action->private_data->icon_name, icon_size);
+
+ G_GNUC_END_IGNORE_DEPRECATIONS;
+
+ return widget;
}
/**