diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2007-05-08 03:48:22 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-05-08 03:48:22 +0800 |
commit | c7010d43264dafca66ff65540c5d6666f1c66e2a (patch) | |
tree | b9913e0042b112a9e97eeb7b00521459a568b58c /libempathy-gtk/gossip-presence-chooser.c | |
parent | 6e542b100fd2efcfb7b8a3b58bf173fed1e3e494 (diff) | |
download | gsoc2013-empathy-c7010d43264dafca66ff65540c5d6666f1c66e2a.tar gsoc2013-empathy-c7010d43264dafca66ff65540c5d6666f1c66e2a.tar.gz gsoc2013-empathy-c7010d43264dafca66ff65540c5d6666f1c66e2a.tar.bz2 gsoc2013-empathy-c7010d43264dafca66ff65540c5d6666f1c66e2a.tar.lz gsoc2013-empathy-c7010d43264dafca66ff65540c5d6666f1c66e2a.tar.xz gsoc2013-empathy-c7010d43264dafca66ff65540c5d6666f1c66e2a.tar.zst gsoc2013-empathy-c7010d43264dafca66ff65540c5d6666f1c66e2a.zip |
[darcs-to-svn @ Use icon-name API instead of stock icons and update tango icons]
svn path=/trunk/; revision=32
Diffstat (limited to 'libempathy-gtk/gossip-presence-chooser.c')
-rw-r--r-- | libempathy-gtk/gossip-presence-chooser.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/libempathy-gtk/gossip-presence-chooser.c b/libempathy-gtk/gossip-presence-chooser.c index e540c8a4e..46b275456 100644 --- a/libempathy-gtk/gossip-presence-chooser.c +++ b/libempathy-gtk/gossip-presence-chooser.c @@ -34,7 +34,7 @@ #include <libempathy/empathy-marshal.h> #include "gossip-ui-utils.h" -#include "gossip-stock.h" +#include "empathy-images.h" #include "gossip-presence-chooser.h" #include "gossip-status-presets.h" @@ -321,7 +321,6 @@ presence_chooser_show_dialog (GossipPresenceChooser *chooser, GtkWidget *combo; GtkWidget *entry; GtkWidget *checkbutton; - GdkPixbuf *pixbuf; const gchar *default_status; priv = GET_PRIV (chooser); @@ -355,9 +354,9 @@ presence_chooser_show_dialog (GossipPresenceChooser *chooser, G_CALLBACK (presence_chooser_dialog_response_cb), chooser); - pixbuf = gossip_pixbuf_for_presence_state (state); - gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf); - g_object_unref (pixbuf); + gtk_image_set_from_icon_name (GTK_IMAGE (image), + gossip_icon_name_for_presence_state (state), + GTK_ICON_SIZE_MENU); if (!store[state]) { GList *presets, *l; @@ -486,10 +485,10 @@ presence_chooser_menu_add_item (GossipPresenceChooser *chooser, { GtkWidget *item; GtkWidget *image; - const gchar *stock; + const gchar *icon_name; item = gtk_image_menu_item_new_with_label (str); - stock = gossip_stock_for_state (state); + icon_name = gossip_icon_name_for_presence_state (state); if (custom) { g_signal_connect ( @@ -505,7 +504,7 @@ presence_chooser_menu_add_item (GossipPresenceChooser *chooser, chooser); } - image = gtk_image_new_from_stock (stock, GTK_ICON_SIZE_MENU); + image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); @@ -943,7 +942,6 @@ presence_chooser_flash_timeout_cb (GossipPresenceChooser *chooser) { GossipPresenceChooserPriv *priv; McPresence state; - GdkPixbuf *pixbuf; static gboolean on = FALSE; priv = GET_PRIV (chooser); @@ -954,9 +952,9 @@ presence_chooser_flash_timeout_cb (GossipPresenceChooser *chooser) state = priv->flash_state_2; } - pixbuf = gossip_pixbuf_for_presence_state (state); - gtk_image_set_from_pixbuf (GTK_IMAGE (priv->image), pixbuf); - g_object_unref (pixbuf); + gtk_image_set_from_icon_name (GTK_IMAGE (priv->image), + gossip_icon_name_for_presence_state (state), + GTK_ICON_SIZE_MENU); on = !on; @@ -991,7 +989,6 @@ gossip_presence_chooser_flash_stop (GossipPresenceChooser *chooser, McPresence state) { GossipPresenceChooserPriv *priv; - GdkPixbuf *pixbuf; g_return_if_fail (GOSSIP_IS_PRESENCE_CHOOSER (chooser)); @@ -1002,9 +999,9 @@ gossip_presence_chooser_flash_stop (GossipPresenceChooser *chooser, priv->flash_timeout_id = 0; } - pixbuf = gossip_pixbuf_for_presence_state (state); - gtk_image_set_from_pixbuf (GTK_IMAGE (priv->image), pixbuf); - g_object_unref (pixbuf); + gtk_image_set_from_icon_name (GTK_IMAGE (priv->image), + gossip_icon_name_for_presence_state (state), + GTK_ICON_SIZE_MENU); priv->last_state = state; } |