diff options
author | Sebastien Bacher <seb128@ubuntu.com> | 2010-09-08 12:32:06 +0200 |
---|---|---|
committer | Sebastien Bacher <seb128@ubuntu.com> | 2010-09-08 12:32:06 +0200 |
commit | e8dbd1c4501965be441fb99855dc5d2f52d549dd (patch) | |
tree | 351494f8a9e94c35280dbc584e8abf7c3f71eb8e /src/music-player-bridge.vala | |
parent | 0b25b8a95dfd8b8b6743f7a0a055be05dfea956b (diff) | |
parent | b347212eb1cb41fb9739a9873b0ff8eb8abb4b77 (diff) | |
download | ayatana-indicator-sound-e8dbd1c4501965be441fb99855dc5d2f52d549dd.tar.gz ayatana-indicator-sound-e8dbd1c4501965be441fb99855dc5d2f52d549dd.tar.bz2 ayatana-indicator-sound-e8dbd1c4501965be441fb99855dc5d2f52d549dd.zip |
* New upstream release fixing those issues
Diffstat (limited to 'src/music-player-bridge.vala')
-rw-r--r-- | src/music-player-bridge.vala | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/src/music-player-bridge.vala b/src/music-player-bridge.vala index daad42f..c677d15 100644 --- a/src/music-player-bridge.vala +++ b/src/music-player-bridge.vala @@ -44,30 +44,26 @@ public class MusicPlayerBridge : GLib.Object } private void try_to_add_inactive_familiar_clients(){ - // TODO handle multple players - just working with one right now - int count = 0; foreach(string app in this.playersDB.records()){ - if(count == 0){ - if(app == null){ - warning("App string in keyfile is null therefore moving on to next player"); - continue; - } - DesktopAppInfo info = new DesktopAppInfo.from_filename(app); - if(info == null){ - warning("Could not create a desktopappinfo instance from app: %s", app); - continue; - } - GLib.AppInfo app_info = info as GLib.AppInfo; - PlayerController ctrl = new PlayerController(this.root_menu, - app_info.get_name(), - calculate_menu_position(), - PlayerController.state.OFFLINE); - ctrl.set("app_info", app_info); - this.registered_clients.set(app_info.get_name().down().strip(), ctrl); - debug("Created a player controller for %s which was found in the cache file", app_info.get_name().down().strip()); - count += 1; + if(app == null){ + warning("App string in keyfile is null therefore moving on to next player"); + continue; + } + + debug("attempting to make an app info from %s", app); + + DesktopAppInfo info = new DesktopAppInfo.from_filename(app); + if(info == null){ + warning("Could not create a desktopappinfo instance from app: %s", app); + continue; } - break; + GLib.AppInfo app_info = info as GLib.AppInfo; + PlayerController ctrl = new PlayerController(this.root_menu, + app_info.get_name(), + calculate_menu_position(), + PlayerController.state.OFFLINE); + ctrl.set("app_info", app_info); + this.registered_clients.set(app_info.get_name().down().strip(), ctrl); } } |