[gnome-control-center] sound: Add get_gicon() function to GvcMixerCard



commit e5e7080e4e8e4e8dc5662216d9e5daa9b04bef66
Author: Conor Curran <conor curran canonical com>
Date:   Wed Jul 4 15:26:52 2012 +0200

    sound: Add get_gicon() function to GvcMixerCard
    
    https://bugzilla.gnome.org/show_bug.cgi?id=674831

 panels/sound/gvc-mixer-card.c |   18 ++++++++++++++++++
 panels/sound/gvc-mixer-card.h |    2 ++
 2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/panels/sound/gvc-mixer-card.c b/panels/sound/gvc-mixer-card.c
index 04509b1..887220c 100644
--- a/panels/sound/gvc-mixer-card.c
+++ b/panels/sound/gvc-mixer-card.c
@@ -319,6 +319,24 @@ gvc_mixer_card_set_profiles (GvcMixerCard *card,
 }
 
 /**
+ * gvc_mixer_card_get_gicon:
+ *
+ * @card:
+ *
+ * Return value: (transfer full) (element-type GIcon):
+ */
+GIcon *
+gvc_mixer_card_get_gicon (GvcMixerCard *card)
+{
+        g_return_val_if_fail (GVC_IS_MIXER_CARD (card), NULL);
+
+        if (card->priv->icon_name == NULL)
+                return NULL;
+
+        return g_themed_icon_new_with_default_fallbacks (card->priv->icon_name);
+}
+
+/**
  * gvc_mixer_card_set_ports:
  * @profiles: (transfer full) (element-type GvcMixerCardPort):
  */
diff --git a/panels/sound/gvc-mixer-card.h b/panels/sound/gvc-mixer-card.h
index 7eb10d7..f115a5c 100644
--- a/panels/sound/gvc-mixer-card.h
+++ b/panels/sound/gvc-mixer-card.h
@@ -23,6 +23,7 @@
 #define __GVC_MIXER_CARD_H
 
 #include <glib-object.h>
+#include <gio/gio.h>
 
 G_BEGIN_DECLS
 
@@ -78,6 +79,7 @@ const GList *         gvc_mixer_card_get_profiles      (GvcMixerCard *card);
 const GList *         gvc_mixer_card_get_ports         (GvcMixerCard *card);
 gboolean              gvc_mixer_card_change_profile    (GvcMixerCard *card,
                                                         const char *profile);
+GIcon *               gvc_mixer_card_get_gicon         (GvcMixerCard *card);
 
 /* private */
 gboolean              gvc_mixer_card_set_name          (GvcMixerCard *card,



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