diff --git a/common/content/tabs.js b/common/content/tabs.js index 79abe0a6..1c4b24f8 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -961,24 +961,24 @@ var Tabs = Module("tabs", { options: function () { options.add(["showtabline", "stal"], "Define when the tab bar is visible", - "number", config.defaults["showtabline"], + "string", config.defaults["showtabline"], { setter: function (value) { - if (value == 0) + if (value === "never") tabs.tabStyle.enabled = true; else { - prefs.safeSet("browser.tabs.autoHide", value == 1, + prefs.safeSet("browser.tabs.autoHide", value === "multitab", "See 'showtabline' option."); tabs.tabStyle.enabled = false; } - if (value != 1 || !dactyl.has("Gecko2")) + if (value !== "multitab" || !dactyl.has("Gecko2")) config.tabStrip.collapsed = false; return value; }, completer: function (context) [ - ["0", "Never show tab bar"], - ["1", "Show tab bar only if more than one tab is open"], - ["2", "Always show tab bar"] + ["never", "Never show tab bar"], + ["multitab", "Show tab bar when there are multiple tabs"], + ["always", "Always show tab bar"] ] }); diff --git a/common/locale/en-US/options.xml b/common/locale/en-US/options.xml index dfa8480c..86b8e01e 100644 --- a/common/locale/en-US/options.xml +++ b/common/locale/en-US/options.xml @@ -1382,6 +1382,22 @@ 'stal' 'showtabline' 'showtabline' 'stal' + string + always + +

Define when the tab bar is visible.

+ +
+
always
Always show tab bar
+
multitab
Show tab bar when there are multiple tabs
+
never
Never show tab bar
+
+
+
+ + + + number 2 diff --git a/common/modules/base.jsm b/common/modules/base.jsm index 3b3472eb..bd4bd6b2 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -16,11 +16,15 @@ if (!JSMLoader) for each (let prop in Object.getOwnPropertyNames(global)) try { - if (!set.has(this.builtin, prop) && - [this, set].indexOf(Object.getOwnPropertyDescriptor(global, prop).value) < 0) - delete global[prop]; + if (!(prop in this.builtin) && + [this, set].indexOf(Object.getOwnPropertyDescriptor(global, prop).value) < 0 && + !global.__lookupGetter__(prop)) + global[prop] = null; + } + catch (e) { + dump("Deleting property " + prop + " on " + url + ":\n " + e + "\n"); + Components.utils.reportError(e); } - catch (e) {} Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader) diff --git a/pentadactyl/NEWS b/pentadactyl/NEWS index db003f7f..4cac10e1 100644 --- a/pentadactyl/NEWS +++ b/pentadactyl/NEWS @@ -102,7 +102,7 @@ a boolean. - 'mapleader' is now an option rather than a :let variable. - - 'showstatuslinks' is now a string option. + - 'showstatuslinks' and 'showtabline' are now string options. * IMPORTANT: Command script files now use the *.penta file extension. * IMPORTANT: Plugins are now loaded from the 'plugins/' directory in 'runtimepath' rather than 'plugin/'. diff --git a/pentadactyl/content/config.js b/pentadactyl/content/config.js index d2d8b832..f8ca97fa 100644 --- a/pentadactyl/content/config.js +++ b/pentadactyl/content/config.js @@ -6,7 +6,7 @@ // given in the LICENSE.txt file included with this file. "use strict"; -const Config = Module("config", ConfigBase, { +var Config = Module("config", ConfigBase, { name: "pentadactyl", appName: "Pentadactyl", idName: "PENTADACTYL", @@ -174,7 +174,7 @@ const Config = Module("config", ConfigBase, { defaults: { complete: "slf", guioptions: "bCrs", - showtabline: 2, + showtabline: "always", titlestring: "Pentadactyl" },