aboutsummaryrefslogtreecommitdiff
path: root/src/familiar-players-db.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-11-05 17:30:19 +0000
committerConor Curran <conor.curran@canonical.com>2010-11-05 17:30:19 +0000
commit1196f5060e633fac46b724844e1b6817c889145a (patch)
treea05786721729c1148566a896c6f642f176675f3a /src/familiar-players-db.vala
parenta01af1b6d6f42775e9e436d802913c061b51278e (diff)
parent2f409b95c5c1c0c7107f4503c01687b3a913780f (diff)
downloadayatana-indicator-sound-1196f5060e633fac46b724844e1b6817c889145a.tar.gz
ayatana-indicator-sound-1196f5060e633fac46b724844e1b6817c889145a.tar.bz2
ayatana-indicator-sound-1196f5060e633fac46b724844e1b6817c889145a.zip
Initial UI tweaks for natty
Diffstat (limited to 'src/familiar-players-db.vala')
-rw-r--r--src/familiar-players-db.vala22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/familiar-players-db.vala b/src/familiar-players-db.vala
index b8ce91c..af7d07f 100644
--- a/src/familiar-players-db.vala
+++ b/src/familiar-players-db.vala
@@ -159,5 +159,25 @@ public class FamiliarPlayersDB : GLib.Object
{
return this.players_DB.keys;
}
-
+
+ public static string? fetch_icon_name(string desktop_path)
+ {
+ KeyFile desktop_keyfile = new KeyFile ();
+ try{
+ desktop_keyfile.load_from_file (desktop_path, KeyFileFlags.NONE);
+ }
+ catch(GLib.FileError error){
+ warning("Error loading keyfile");
+ return null;
+ }
+ try{
+ return desktop_keyfile.get_string (KeyFileDesktop.GROUP,
+ KeyFileDesktop.KEY_ICON);
+ }
+ catch(GLib.KeyFileError error){
+ warning("Error trying to fetch the icon name from the keyfile");
+ return null;
+ }
+ }
+
} \ No newline at end of file