Skip to content

Commit

Permalink
Possibility to add launchers (but appsys is not getting refreshed, so…
Browse files Browse the repository at this point in the history
… still need to restart cinnamon for the launcher to appear)
  • Loading branch information
glebihan committed Dec 22, 2011
1 parent 232dc4c commit ae8ed66
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions js/ui/panelLaunchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ AddLauncherDialog.prototype = {
},

_saveNewLauncher: function(name, command, description, icon){
let desktopEntry = "[Desktop Entry]\nName="+name+"\nExec="+command+"\n";
let desktopEntry = "[Desktop Entry]\nName="+name+"\nExec="+command+"\nType=Application\n";
if (description) desktopEntry += "Description="+description+"\n";
if (icon) desktopEntry += "Icon="+icon+"\n";

Expand All @@ -206,7 +206,7 @@ AddLauncherDialog.prototype = {
let fp = file.create(0, null);
fp.write(desktopEntry, null);
fp.close(null);
return file.get_path();
return 'cinnamon-custom-launcher-'+i+'.desktop';
},

open: function(timestamp) {
Expand Down Expand Up @@ -251,10 +251,7 @@ PanelLaunchersBox.prototype = {
let appSys = Cinnamon.AppSystem.get_default();
let apps = new Array();
for (var i in desktopFiles){
let app;
if (desktopFiles[i][0]=='/') app = appSys.lookup_app_for_path(desktopFiles[i]);
else app = appSys.lookup_app(desktopFiles[i]);
global.log(desktopFiles[i]+":"+app);
let app = appSys.lookup_app(desktopFiles[i]);
if (app) apps.push(app);
}
return apps;
Expand Down

0 comments on commit ae8ed66

Please sign in to comment.