mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 04:07:58 +01:00
made guioptions handling generic. Updated minimum requirement to Firefox3 beta3
This commit is contained in:
@@ -33,7 +33,8 @@ vimperator.config = {
|
|||||||
// this widget is focused when focusContent() is called
|
// this widget is focused when focusContent() is called
|
||||||
get mainWidget() { return GetThreadTree(); },
|
get mainWidget() { return GetThreadTree(); },
|
||||||
dialogs: [],
|
dialogs: [],
|
||||||
features: ["mail", "hints"]
|
features: ["mail", "hints"],
|
||||||
|
guioptions: { m: ["mail-toolbar-menubar2"], T: ["mail-bar2"], f: ["folderPaneBox", "folderpane_splitter"], F: ["folderPaneHeader"] }
|
||||||
}
|
}
|
||||||
|
|
||||||
// vim: set fdm=marker sw=4 ts=4 et:
|
// vim: set fdm=marker sw=4 ts=4 et:
|
||||||
|
|||||||
@@ -200,22 +200,14 @@ vimperator.Options = function () //{{{
|
|||||||
// show/hide the menubar, toolbar and bookmarks toolbar
|
// show/hide the menubar, toolbar and bookmarks toolbar
|
||||||
function setGuiOptions(value)
|
function setGuiOptions(value)
|
||||||
{
|
{
|
||||||
// FIXME: when we release a vimperator with a Firefox3 requirement (no beta), remove the old ids
|
var guioptions = vimperator.config.guioptions || {};
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
document.getElementById("toolbar-menubar").collapsed = !/m/.test(value);
|
for (let option in guioptions)
|
||||||
|
guioptions[option].forEach( function(elem) {
|
||||||
// these the new ids for Firefox > 20080130
|
document.getElementById(elem).collapsed = (value.indexOf(option.toString()) < 0); });
|
||||||
document.getElementById("navigation-toolbar").collapsed = !/T/.test(value);
|
|
||||||
document.getElementById("personal-toolbar"). collapsed = !/b/.test(value);
|
|
||||||
}
|
|
||||||
catch (e)
|
|
||||||
{
|
|
||||||
// these two ids are for Firefox <= 20080130
|
|
||||||
document.getElementById("nav-bar"). collapsed = !/T/.test(value);
|
|
||||||
document.getElementById("PersonalToolbar").collapsed = !/b/.test(value);
|
|
||||||
// vimperator.log("setGuiOptions raised an exception");
|
|
||||||
}
|
}
|
||||||
|
catch (e) { }
|
||||||
|
|
||||||
guioptionsDone = true;
|
guioptionsDone = true;
|
||||||
}
|
}
|
||||||
@@ -516,7 +508,14 @@ vimperator.Options = function () //{{{
|
|||||||
shortHelp: "Show or hide the menu, toolbar and scrollbars",
|
shortHelp: "Show or hide the menu, toolbar and scrollbars",
|
||||||
setter: function (value) { setGuiOptions(value); },
|
setter: function (value) { setGuiOptions(value); },
|
||||||
defaultValue: "",
|
defaultValue: "",
|
||||||
validator: function (value) { return !/[^mTb]/.test(value); }
|
validator: function (value)
|
||||||
|
{
|
||||||
|
var regex = "[^";
|
||||||
|
for (let option in vimperator.config.guioptions)
|
||||||
|
regex += option.toString();
|
||||||
|
|
||||||
|
return !(new RegExp(regex + "]").test(value));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
optionManager.add(new vimperator.Option(["hinttimeout", "hto"], "number",
|
optionManager.add(new vimperator.Option(["hinttimeout", "hto"], "number",
|
||||||
|
|||||||
@@ -30,7 +30,8 @@ vimperator.config = {
|
|||||||
name: "Vimperator",
|
name: "Vimperator",
|
||||||
hostApplication: "Firefox",
|
hostApplication: "Firefox",
|
||||||
dialogs: [],
|
dialogs: [],
|
||||||
features: ["bookmarks", "history", "marks", "quickmarks", "hints", "tabs"]
|
features: ["bookmarks", "history", "marks", "quickmarks", "hints", "tabs"],
|
||||||
|
guioptions: { m: ["toolbar-menubar"], T: ["nav-bar"], b: ["PersonalToolbar"] }
|
||||||
}
|
}
|
||||||
|
|
||||||
// vim: set fdm=marker sw=4 ts=4 et:
|
// vim: set fdm=marker sw=4 ts=4 et:
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<Description about="urn:mozilla:install-manifest">
|
<Description about="urn:mozilla:install-manifest">
|
||||||
<em:id>vimperator@mozdev.org</em:id>
|
<em:id>vimperator@mozdev.org</em:id>
|
||||||
<em:name>Vimperator2</em:name>
|
<em:name>Vimperator</em:name>
|
||||||
<em:version>###VERSION###</em:version>
|
<em:version>###VERSION###</em:version>
|
||||||
<em:description>Make Firefox behave like Vim</em:description>
|
<em:description>Make Firefox behave like Vim</em:description>
|
||||||
<em:creator>Martin Stubenschrott</em:creator>
|
<em:creator>Martin Stubenschrott</em:creator>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<em:targetApplication>
|
<em:targetApplication>
|
||||||
<Description>
|
<Description>
|
||||||
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
|
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
|
||||||
<em:minVersion>3.0b1</em:minVersion>
|
<em:minVersion>3.0b3</em:minVersion>
|
||||||
<em:maxVersion>3.0.0.*</em:maxVersion>
|
<em:maxVersion>3.0.0.*</em:maxVersion>
|
||||||
</Description>
|
</Description>
|
||||||
</em:targetApplication>
|
</em:targetApplication>
|
||||||
|
|||||||
Reference in New Issue
Block a user