aboutsummaryrefslogtreecommitdiff
path: root/src/familiar-players-db.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-10-15 13:59:45 +0100
committerConor Curran <conor.curran@canonical.com>2010-10-15 13:59:45 +0100
commit2d40c713f6d5fab70c952e757d0690c7dad63d2d (patch)
tree52afc42e2d6a857675ed4d4eec753afb75d995b5 /src/familiar-players-db.vala
parente2792ab0a1dfd8ca0c96b59b675fa09e8cd0e5d7 (diff)
downloadayatana-indicator-sound-2d40c713f6d5fab70c952e757d0690c7dad63d2d.tar.gz
ayatana-indicator-sound-2d40c713f6d5fab70c952e757d0690c7dad63d2d.tar.bz2
ayatana-indicator-sound-2d40c713f6d5fab70c952e757d0690c7dad63d2d.zip
updates done for now
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 894447c..76cc2f1 100644
--- a/src/familiar-players-db.vala
+++ b/src/familiar-players-db.vala
@@ -153,5 +153,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