0
我需要一個腳本,只有當文件存在時纔會加載某些內容。想要隱藏這個程序,如果它沒有安裝,Pidgin。我現在有這個顯示文件;在Ubuntu中,檢查是否存在文件,然後...(不是服務器)
let icon = new St.Icon({icon_name: "pidgin", icon_size: ICON_SIZE, icon_type: St.IconType.FULLCOLOR});
this.filesystemItem = new MyPopupMenuItem(icon, _("Chat"));
this.menu.addMenuItem(this.filesystemItem);
this.filesystemItem.connect('activate', function(actor, event) {
Main.Util.spawnCommandLine("pidgin");
});
我只需要加載如果文件:/ usr/share/applications/Pidgin Internet Messenger.desktop存在。謝謝,麻煩您了。
沒了不起作用。請記住,這不是在Windows上。這是在Ubuntu上。 – user1239184 2012-02-29 02:05:37
將「雙引號添加到$文件名中,它應該, – Dan675 2012-02-29 02:15:47
仍然不會...... – user1239184 2012-03-01 00:21:56