aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/gossip-stock.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2007-05-02 20:38:49 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-05-02 20:38:49 +0800
commit59f3e5480f8b20dcea7d7b19682a5c2f67260cdd (patch)
treef441f3eea5f7540923d2631ec27a4c3e2936decf /libempathy-gtk/gossip-stock.c
parent6e1d5d1bf7e4c1bbac9d1d76fe967acf0dc423d1 (diff)
downloadgsoc2013-empathy-59f3e5480f8b20dcea7d7b19682a5c2f67260cdd.tar
gsoc2013-empathy-59f3e5480f8b20dcea7d7b19682a5c2f67260cdd.tar.gz
gsoc2013-empathy-59f3e5480f8b20dcea7d7b19682a5c2f67260cdd.tar.bz2
gsoc2013-empathy-59f3e5480f8b20dcea7d7b19682a5c2f67260cdd.tar.lz
gsoc2013-empathy-59f3e5480f8b20dcea7d7b19682a5c2f67260cdd.tar.xz
gsoc2013-empathy-59f3e5480f8b20dcea7d7b19682a5c2f67260cdd.tar.zst
gsoc2013-empathy-59f3e5480f8b20dcea7d7b19682a5c2f67260cdd.zip
[darcs-to-svn @ Fix setting presence]
svn path=/trunk/; revision=23
Diffstat (limited to 'libempathy-gtk/gossip-stock.c')
-rw-r--r--libempathy-gtk/gossip-stock.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/libempathy-gtk/gossip-stock.c b/libempathy-gtk/gossip-stock.c
index f43949ee4..1490e65e7 100644
--- a/libempathy-gtk/gossip-stock.c
+++ b/libempathy-gtk/gossip-stock.c
@@ -103,3 +103,27 @@ gossip_stock_render (const gchar *stock,
return gtk_widget_render_icon (main_widget, stock, size, NULL);
}
+const gchar *
+gossip_stock_for_state (McPresence state)
+{
+ switch (state) {
+ case MC_PRESENCE_AVAILABLE:
+ return GOSSIP_STOCK_AVAILABLE;
+ case MC_PRESENCE_DO_NOT_DISTURB:
+ return GOSSIP_STOCK_BUSY;
+ case MC_PRESENCE_AWAY:
+ return GOSSIP_STOCK_AWAY;
+ case MC_PRESENCE_EXTENDED_AWAY:
+ return GOSSIP_STOCK_EXT_AWAY;
+ case MC_PRESENCE_HIDDEN:
+ case MC_PRESENCE_OFFLINE:
+ case MC_PRESENCE_UNSET:
+ return GOSSIP_STOCK_OFFLINE;
+ default:
+ g_assert_not_reached ();
+ }
+
+ return NULL;
+}
+
+