зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1134166 - Restart toolbox if selected app re-opens. r=ochameau
This commit is contained in:
Родитель
eff6c05870
Коммит
bd15455765
|
@ -179,13 +179,18 @@ let UI = {
|
||||||
UI.updateCommands();
|
UI.updateCommands();
|
||||||
UI.updateProjectButton();
|
UI.updateProjectButton();
|
||||||
UI.openProject();
|
UI.openProject();
|
||||||
UI.autoStartProject();
|
yield UI.autoStartProject();
|
||||||
|
UI.autoOpenToolbox();
|
||||||
UI.saveLastSelectedProject();
|
UI.saveLastSelectedProject();
|
||||||
projectList.update();
|
projectList.update();
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
case "project-stopped":
|
|
||||||
case "project-started":
|
case "project-started":
|
||||||
|
this.updateCommands();
|
||||||
|
projectList.update();
|
||||||
|
UI.autoOpenToolbox();
|
||||||
|
break;
|
||||||
|
case "project-stopped":
|
||||||
case "runtime-global-actors":
|
case "runtime-global-actors":
|
||||||
this.updateCommands();
|
this.updateCommands();
|
||||||
projectList.update();
|
projectList.update();
|
||||||
|
@ -657,7 +662,7 @@ let UI = {
|
||||||
}, console.error);
|
}, console.error);
|
||||||
},
|
},
|
||||||
|
|
||||||
autoStartProject: function() {
|
autoStartProject: Task.async(function*() {
|
||||||
let project = AppManager.selectedProject;
|
let project = AppManager.selectedProject;
|
||||||
|
|
||||||
if (!project) {
|
if (!project) {
|
||||||
|
@ -669,15 +674,27 @@ let UI = {
|
||||||
return; // For something that is not an editable app, we're done.
|
return; // For something that is not an editable app, we're done.
|
||||||
}
|
}
|
||||||
|
|
||||||
Task.spawn(function() {
|
// Do not force opening apps that are already running, as they may have
|
||||||
// Do not force opening apps that are already running, as they may have
|
// some activity being opened and don't want to dismiss them.
|
||||||
// some activity being opened and don't want to dismiss them.
|
if (project.type == "runtimeApp" && !AppManager.isProjectRunning()) {
|
||||||
if (project.type == "runtimeApp" && !AppManager.isProjectRunning()) {
|
yield UI.busyUntil(AppManager.launchRuntimeApp(), "running app");
|
||||||
yield UI.busyUntil(AppManager.launchRuntimeApp(), "running app");
|
}
|
||||||
}
|
}),
|
||||||
yield UI.createToolbox();
|
|
||||||
});
|
autoOpenToolbox: Task.async(function*() {
|
||||||
},
|
let project = AppManager.selectedProject;
|
||||||
|
|
||||||
|
if (!project) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!(project.type == "runtimeApp" ||
|
||||||
|
project.type == "mainProcess" ||
|
||||||
|
project.type == "tab")) {
|
||||||
|
return; // For something that is not an editable app, we're done.
|
||||||
|
}
|
||||||
|
|
||||||
|
yield UI.createToolbox();
|
||||||
|
}),
|
||||||
|
|
||||||
importAndSelectApp: Task.async(function* (source) {
|
importAndSelectApp: Task.async(function* (source) {
|
||||||
let isPackaged = !!source.path;
|
let isPackaged = !!source.path;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче