aboutsummaryrefslogtreecommitdiff
path: root/src/familiar-players-db.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-11-05 18:15:22 +0000
committerConor Curran <conor.curran@canonical.com>2010-11-05 18:15:22 +0000
commit0c9af5cd3155b11816d0ecf9ff6f48f4ecc4b940 (patch)
tree4f2fb85e858b0e57613149ee01f1f47f3ea97107 /src/familiar-players-db.vala
parenta01af1b6d6f42775e9e436d802913c061b51278e (diff)
parentdd80c00e460cf1857eb8a76b62e2058b49f62d88 (diff)
downloadayatana-indicator-sound-0c9af5cd3155b11816d0ecf9ff6f48f4ecc4b940.tar.gz
ayatana-indicator-sound-0c9af5cd3155b11816d0ecf9ff6f48f4ecc4b940.tar.bz2
ayatana-indicator-sound-0c9af5cd3155b11816d0ecf9ff6f48f4ecc4b940.zip
merged the initial UI work for nattyA
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