Remove tray menu on restartApplication() (close #10)
This commit is contained in:
parent
d31303ff19
commit
673b8fba4f
@ -41,6 +41,7 @@ function shadeColor2(color, percent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function restartApplication() {
|
function restartApplication() {
|
||||||
|
removeTrayMenu();
|
||||||
window.location = "index.html";
|
window.location = "index.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,10 @@ var setTrayMenu = function (items) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var removeTrayMenu = function () {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function initCordova() {
|
function initCordova() {
|
||||||
platform_type = "cordova";
|
platform_type = "cordova";
|
||||||
|
|
||||||
@ -78,6 +82,11 @@ function initNW() {
|
|||||||
icon: 'www/img/logo_64.png'
|
icon: 'www/img/logo_64.png'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
removeTrayMenu = function () {
|
||||||
|
nw_tray.remove();
|
||||||
|
nw_tray = null;
|
||||||
|
}
|
||||||
|
|
||||||
setTrayMenu = function (items) {
|
setTrayMenu = function (items) {
|
||||||
var menu = new nw.Menu();
|
var menu = new nw.Menu();
|
||||||
menu.append(new nw.MenuItem({
|
menu.append(new nw.MenuItem({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user