[goffice] GOActionComboStack: tiny step away from stock icons.



commit 9be4e28f839449f86a01ee198125229bf5d76bd9
Author: Morten Welinder <terra gnome org>
Date:   Thu Dec 25 10:54:19 2014 -0500

    GOActionComboStack: tiny step away from stock icons.

 ChangeLog                           |    5 +++++
 goffice/gtk/go-action-combo-stack.c |    5 +----
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1132ebf..166657c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-25  Morten Welinder  <terra gnome org>
+
+       * goffice/gtk/go-action-combo-stack.c (cb_reconfig): Simplify
+       using gtk_action_create_icon which also handled named icons.
+
 2014-12-15  Morten Welinder  <terra gnome org>
 
        * plugins/plot_distrib/gog-histogram.c
diff --git a/goffice/gtk/go-action-combo-stack.c b/goffice/gtk/go-action-combo-stack.c
index 82b3e98..63239d9 100644
--- a/goffice/gtk/go-action-combo-stack.c
+++ b/goffice/gtk/go-action-combo-stack.c
@@ -268,7 +268,6 @@ cb_reconfig (GOToolComboStack *tool, GtkAction *a)
 {
        GtkIconSize size = gtk_tool_item_get_icon_size (GTK_TOOL_ITEM (tool));
        GtkReliefStyle relief = gtk_tool_item_get_relief_style (GTK_TOOL_ITEM (tool));
-       char *stock_id;
        GtkWidget *image;
        GtkWidget *child;
 
@@ -276,9 +275,7 @@ cb_reconfig (GOToolComboStack *tool, GtkAction *a)
        if (child)
                gtk_container_remove (GTK_CONTAINER (tool->combo->button), child);
 
-       g_object_get (G_OBJECT (a), "stock-id", &stock_id, NULL);
-       image = gtk_image_new_from_stock (stock_id, size);
-       g_free (stock_id);
+       image = gtk_action_create_icon (a, size);
        gtk_widget_show (image);
        gtk_container_add (GTK_CONTAINER (tool->combo->button), image);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]