1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-01 23:02:27 +01:00

Make overlay.windows a set.

This commit is contained in:
Kris Maglione
2014-02-22 15:27:06 -08:00
parent 51eb03c376
commit 72626fd693
4 changed files with 14 additions and 8 deletions

View File

@@ -1209,7 +1209,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
* @property {[Window]} Returns an array of all the host application's
* open windows.
*/
get windows() [win for (win in iter(services.windowMediator.getEnumerator("navigator:browser"))) if (win.dactyl)],
get windows() [w for (w of overlay.windows)]
}, {
toolbarHidden: function hidden(elem) (elem.getAttribute("autohide") || elem.getAttribute("collapsed")) == "true"
@@ -1591,7 +1591,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
function (args) {
if (dactyl.has("tabs") && tabs.remove(tabs.getTab(), 1, false))
return;
else if (dactyl.windows.length > 1)
else if (dactyl.windows.size > 1)
window.close();
else
dactyl.quit(false, args.bang);