[gnome-settings-daemon/gnome-3-8] media-keys: Adjust get_image_name_for_volume() to return a string



commit 3073d542ca069a15b805a8632148e45c3cd1f9c4
Author: Florian Müllner <fmuellner gnome org>
Date:   Sun Mar 3 11:15:12 2013 +0100

    media-keys: Adjust get_image_name_for_volume() to return a string
    
    The shell's OSD DBus interface expects serialized GIcons for the
    icons, e.g. the result of g_icon_to_string(). For GThemedIcons
    with exactly one name, this is guaranteed to be the icon name itself,
    so return that instead of a GIcon.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=695021

 plugins/media-keys/gsd-media-keys-manager.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 3781021..6f7a7af 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -385,10 +385,10 @@ ensure_grab_cancellable (GsdMediaKeysManager *manager)
         }
 }
 
-static GIcon *
-get_image_name_for_volume (gboolean is_mic,
-                           gboolean muted,
-                           int volume)
+static const char *
+get_icon_name_for_volume (gboolean is_mic,
+                          gboolean muted,
+                          int volume)
 {
         static const char *icon_names[] = {
                 "audio-volume-muted-symbolic",
@@ -419,9 +419,9 @@ get_image_name_for_volume (gboolean is_mic,
         }
 
        if (is_mic)
-               return g_themed_icon_new_with_default_fallbacks (mic_icon_names[n]);
+               return mic_icon_names[n];
        else
-               return g_themed_icon_new_with_default_fallbacks (icon_names[n]);
+               return icon_names[n];
 }
 
 static gboolean


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