[gnome-dictionary] gdict: Remove GTK_STOCK_* usage



commit 66e8e5071ac5fa8d551803b859639565ac72332c
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Feb 23 12:47:29 2015 +0000

    gdict: Remove GTK_STOCK_* usage
    
    We're still allowing it from users of the API, but internally we don't
    use images from stock ids.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745022

 libgdict/gdict-database-chooser.c |    8 ++++----
 libgdict/gdict-defbox.c           |    9 +++------
 libgdict/gdict-source-chooser.c   |    3 +--
 libgdict/gdict-speller.c          |    3 +--
 libgdict/gdict-strategy-chooser.c |    6 ++----
 5 files changed, 11 insertions(+), 18 deletions(-)
---
diff --git a/libgdict/gdict-database-chooser.c b/libgdict/gdict-database-chooser.c
index 5479082..43b0ee1 100644
--- a/libgdict/gdict-database-chooser.c
+++ b/libgdict/gdict-database-chooser.c
@@ -367,8 +367,8 @@ gdict_database_chooser_constructor (GType                  type,
 
   priv->refresh_button = gtk_button_new ();
   gtk_button_set_image (GTK_BUTTON (priv->refresh_button),
-                       gtk_image_new_from_stock (GTK_STOCK_REFRESH,
-                                                 GTK_ICON_SIZE_SMALL_TOOLBAR));
+                       gtk_image_new_from_icon_name ("view-refresh",
+                                                      GTK_ICON_SIZE_SMALL_TOOLBAR));
   g_signal_connect (priv->refresh_button, "clicked",
                    G_CALLBACK (refresh_button_clicked_cb),
                    chooser);
@@ -379,8 +379,8 @@ gdict_database_chooser_constructor (GType                  type,
 
   priv->clear_button = gtk_button_new ();
   gtk_button_set_image (GTK_BUTTON (priv->clear_button),
-                       gtk_image_new_from_stock (GTK_STOCK_CLEAR,
-                                                 GTK_ICON_SIZE_SMALL_TOOLBAR));
+                       gtk_image_new_from_icon_name ("edit-clear",
+                                                      GTK_ICON_SIZE_SMALL_TOOLBAR));
   g_signal_connect (priv->clear_button, "clicked",
                    G_CALLBACK (clear_button_clicked_cb),
                    chooser);
diff --git a/libgdict/gdict-defbox.c b/libgdict/gdict-defbox.c
index 92b8cbd..12b5dc2 100644
--- a/libgdict/gdict-defbox.c
+++ b/libgdict/gdict-defbox.c
@@ -1301,8 +1301,7 @@ create_find_pane (GdictDefbox *defbox)
   button = gtk_button_new ();
   gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
   gtk_button_set_image (GTK_BUTTON (button),
-                        gtk_image_new_from_stock (GTK_STOCK_CLOSE,
-                                                  GTK_ICON_SIZE_BUTTON));
+                        gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_BUTTON));
   g_signal_connect (button, "clicked",
                     G_CALLBACK (close_button_clicked), defbox);
   gtk_box_pack_start (GTK_BOX (hbox1), button, FALSE, FALSE, 0);
@@ -1327,16 +1326,14 @@ create_find_pane (GdictDefbox *defbox)
 
   priv->find_prev = gtk_button_new_with_mnemonic (_("_Previous"));
   gtk_button_set_image (GTK_BUTTON (priv->find_prev),
-                       gtk_image_new_from_stock (GTK_STOCK_GO_BACK,
-                                                 GTK_ICON_SIZE_MENU));
+                       gtk_image_new_from_icon_name ("go-previous", GTK_ICON_SIZE_MENU));
   g_signal_connect (priv->find_prev, "clicked",
                    G_CALLBACK (find_prev_clicked_cb), defbox);
   gtk_box_pack_start (GTK_BOX (hbox1), priv->find_prev, FALSE, FALSE, 0);
 
   priv->find_next = gtk_button_new_with_mnemonic (_("_Next"));
   gtk_button_set_image (GTK_BUTTON (priv->find_next),
-                       gtk_image_new_from_stock (GTK_STOCK_GO_FORWARD,
-                                                 GTK_ICON_SIZE_MENU));
+                       gtk_image_new_from_icon_name ("go-next", GTK_ICON_SIZE_MENU));
   g_signal_connect (priv->find_next, "clicked",
                    G_CALLBACK (find_next_clicked_cb), defbox);
   gtk_box_pack_start (GTK_BOX (hbox1), priv->find_next, FALSE, FALSE, 0);
diff --git a/libgdict/gdict-source-chooser.c b/libgdict/gdict-source-chooser.c
index 8198f46..eab00ef 100644
--- a/libgdict/gdict-source-chooser.c
+++ b/libgdict/gdict-source-chooser.c
@@ -283,8 +283,7 @@ gdict_source_chooser_constructor (GType                  gtype,
 
   priv->refresh_button = gtk_button_new ();
   gtk_button_set_image (GTK_BUTTON (priv->refresh_button),
-                        gtk_image_new_from_stock (GTK_STOCK_REFRESH,
-                                                  GTK_ICON_SIZE_BUTTON));
+                        gtk_image_new_from_icon_name ("view-refresh", GTK_ICON_SIZE_BUTTON));
   g_signal_connect (priv->refresh_button,
                     "clicked", G_CALLBACK (refresh_button_clicked_cb),
                     chooser);
diff --git a/libgdict/gdict-speller.c b/libgdict/gdict-speller.c
index 845ddf1..721b3b4 100644
--- a/libgdict/gdict-speller.c
+++ b/libgdict/gdict-speller.c
@@ -341,8 +341,7 @@ gdict_speller_constructor (GType                  type,
 
   priv->clear_button = gtk_button_new ();
   gtk_button_set_image (GTK_BUTTON (priv->clear_button),
-                       gtk_image_new_from_stock (GTK_STOCK_CLEAR,
-                                                 GTK_ICON_SIZE_SMALL_TOOLBAR));
+                       gtk_image_new_from_stock ("edit-clear", GTK_ICON_SIZE_SMALL_TOOLBAR));
   g_signal_connect (priv->clear_button, "clicked",
                    G_CALLBACK (clear_button_clicked_cb),
                    speller);
diff --git a/libgdict/gdict-strategy-chooser.c b/libgdict/gdict-strategy-chooser.c
index 3f8c4b3..c2f9dbe 100644
--- a/libgdict/gdict-strategy-chooser.c
+++ b/libgdict/gdict-strategy-chooser.c
@@ -350,8 +350,7 @@ gdict_strategy_chooser_constructor (GType                  type,
 
   priv->refresh_button = gtk_button_new ();
   gtk_button_set_image (GTK_BUTTON (priv->refresh_button),
-                       gtk_image_new_from_stock (GTK_STOCK_REFRESH,
-                                                 GTK_ICON_SIZE_SMALL_TOOLBAR));
+                       gtk_image_new_from_icon_name ("view-refresh", GTK_ICON_SIZE_SMALL_TOOLBAR));
   g_signal_connect (priv->refresh_button, "clicked",
                    G_CALLBACK (refresh_button_clicked_cb),
                    chooser);
@@ -362,8 +361,7 @@ gdict_strategy_chooser_constructor (GType                  type,
 
   priv->clear_button = gtk_button_new ();
   gtk_button_set_image (GTK_BUTTON (priv->clear_button),
-                       gtk_image_new_from_stock (GTK_STOCK_CLEAR,
-                                                 GTK_ICON_SIZE_SMALL_TOOLBAR));
+                       gtk_image_new_from_icon_name ("edit-clear", GTK_ICON_SIZE_SMALL_TOOLBAR));
   g_signal_connect (priv->clear_button, "clicked",
                    G_CALLBACK (clear_button_clicked_cb),
                    chooser);


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