Skip to content

Commit

Permalink
Players only appear once in the volume applet
Browse files Browse the repository at this point in the history
  • Loading branch information
glebihan committed Dec 21, 2011
1 parent c7e5534 commit 8a2232b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/ui/status/volume.js
Expand Up @@ -772,13 +772,16 @@ Indicator.prototype = {
this._availablePlayers = new Array();
let appsys = Cinnamon.AppSystem.get_default();
let allApps = appsys.get_all();
let listedDesktopFiles = new Array();
for (let y=0; y<allApps.length; y++) {
let app = allApps[y];
let entry = app.get_tree_entry();
let path = entry.get_desktop_file_path();
for (var p=0; p<compatible_players.length; p++) {
if (path.indexOf(compatible_players[p]+".desktop") != -1) {
this._availablePlayers.push(app)
let desktopFile = compatible_players[p]+".desktop";
if (path.indexOf(desktopFile) != -1 && listedDesktopFiles.indexOf(desktopFile) == -1) {
this._availablePlayers.push(app);
listedDesktopFiles.push(desktopFile);
}
}
}
Expand Down

0 comments on commit 8a2232b

Please sign in to comment.