ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #02238
[Merge] lp:~cjcurran/indicator-sound/client-integration-bugs into lp:indicator-sound
Conor Curran has proposed merging lp:~cjcurran/indicator-sound/client-integration-bugs into lp:indicator-sound.
Requested reviews:
Indicator Applet Developers (indicator-applet-developers)
Related bugs:
#631883 menu only shows one offlined player
https://bugs.launchpad.net/bugs/631883
--
https://code.launchpad.net/~cjcurran/indicator-sound/client-integration-bugs/+merge/34755
Your team ayatana-commits is subscribed to branch lp:indicator-sound.
=== modified file 'src/familiar-players-db.vala'
--- src/familiar-players-db.vala 2010-07-14 22:36:29 +0000
+++ src/familiar-players-db.vala 2010-09-07 14:13:53 +0000
@@ -83,7 +83,7 @@
private bool load_data_from_key_file(){
try{
string[] desktops = this.key_file.get_string_list(GROUP_NAME,
- KEY_NAME);
+ KEY_NAME);
foreach(string s in desktops){
this.players_DB.set(s, true);
}
=== modified file 'src/music-player-bridge.vala'
--- src/music-player-bridge.vala 2010-08-11 19:04:04 +0000
+++ src/music-player-bridge.vala 2010-09-07 14:13:53 +0000
@@ -44,30 +44,26 @@
}
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;
- }
- break;
+ 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;
+ }
+ 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);
}
}
Follow ups