1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 15:57:58 +01:00

redesing of the help page to be more like vim's help. :tab command like in vim.

the extension id has changed to a more readable string. any older versions of vimperator MUST be uninstalled, otherwise there will be 2 versions of the extension in the addons list.
This commit is contained in:
Viktor Kojouharov
2007-04-22 23:21:38 +00:00
parent d953650220
commit f7681aff1f
5 changed files with 391 additions and 260 deletions

View File

@@ -15,7 +15,7 @@ ZIP = zip
# find the vimperator chrome dir # find the vimperator chrome dir
FIREFOX_DEFAULT = $(wildcard ${HOME}/.mozilla/firefox/*.default) FIREFOX_DEFAULT = $(wildcard ${HOME}/.mozilla/firefox/*.default)
VIMPERATOR_CHROME = $(wildcard ${FIREFOX_DEFAULT}/extensions/{f9570b26-e246-4753-9b68-61aa95994237}/chrome/) VIMPERATOR_CHROME = $(wildcard ${FIREFOX_DEFAULT}/extensions/vimperator@mozdev.org/chrome/)
# specify V=1 on make line to see more verbose output # specify V=1 on make line to see more verbose output
Q=$(if ${V},,@) Q=$(if ${V},,@)

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,7 @@ var opt_fullscreen = false;
* format: * format:
* [ * [
* 0: [all names of this setting], * 0: [all names of this setting],
* 1: description, * 1: usage,
* 2: help text, * 2: help text,
* 3: set_function, * 3: set_function,
* 4: get_function, * 4: get_function,
@@ -28,7 +28,8 @@ var opt_fullscreen = false;
var g_settings = [/*{{{*/ var g_settings = [/*{{{*/
[ [
["activate"], ["activate"],
"Define when tabs are automatically activated", ["activate"],
"Define when tabs are automatically activated<br/>" +
"Not implemented yet", "Not implemented yet",
function(value) { set_pref("activate", value); }, function(value) { set_pref("activate", value); },
function() { return get_pref("activate"); }, function() { return get_pref("activate"); },
@@ -38,9 +39,9 @@ var g_settings = [/*{{{*/
null null
], ],
[ [
["beep"],
["beep"], ["beep"],
"Emit a pc speaker beep on certain errors", "Emit a pc speaker beep on certain errors",
null,
function(value) { set_pref("beep", value); }, function(value) { set_pref("beep", value); },
function() { return get_pref("beep"); }, function() { return get_pref("beep"); },
"boolean", "boolean",
@@ -50,7 +51,8 @@ var g_settings = [/*{{{*/
], ],
[ [
["complete", "cpt"], ["complete", "cpt"],
"Order and items which are completed at the :[tab]open prompt", ["complete", "cpt"],
"Order and items which are completed at the :[tab]open prompt<br/>" +
"Available items:<br>"+ "Available items:<br>"+
"<ul><li><b>s</b>: Search machines</li><li>"+ "<ul><li><b>s</b>: Search machines</li><li>"+
" <b>b</b>: Bookmarks</li><li>"+ " <b>b</b>: Bookmarks</li><li>"+
@@ -65,8 +67,8 @@ var g_settings = [/*{{{*/
], ],
[ [
["extendedhinttags", "eht"], ["extendedhinttags", "eht"],
"XPath string of hintable elements activated by ';'", ["extendedhinttags", "eht"],
null, "XPath string of hintable elements activated by ';'<br/>",
function(value) { set_pref("extendedhinttags", value); }, function(value) { set_pref("extendedhinttags", value); },
function() { return get_pref("extendedhinttags"); }, function() { return get_pref("extendedhinttags"); },
"string", "string",
@@ -75,9 +77,9 @@ var g_settings = [/*{{{*/
null null
], ],
[ [
["focusedhintstyle", "fhs"],
["focusedhintstyle", "fhs"], ["focusedhintstyle", "fhs"],
"CSS specification of focused hints appearance", "CSS specification of focused hints appearance",
null,
function(value) { set_pref("focusedhintstyle", value); }, function(value) { set_pref("focusedhintstyle", value); },
function() { return get_pref("focusedhintstyle"); }, function() { return get_pref("focusedhintstyle"); },
"string", "string",
@@ -86,9 +88,9 @@ var g_settings = [/*{{{*/
null null
], ],
[ [
["fullscreen", "fs"],
["fullscreen", "fs"], ["fullscreen", "fs"],
"Shows the current window fullscreen", "Shows the current window fullscreen",
null,
function(value) { opt_fullscreen = value; BrowserFullScreen(); }, function(value) { opt_fullscreen = value; BrowserFullScreen(); },
function() { return opt_fullscreen; }, function() { return opt_fullscreen; },
"boolean", "boolean",
@@ -98,7 +100,8 @@ var g_settings = [/*{{{*/
], ],
[ [
["guioptions", "go"], ["guioptions", "go"],
"Shows or hides the menu, toolbar and scrollbars", ["guioptions", "go"],
"Shows or hides the menu, toolbar and scrollbars<br/>" +
"Supported characters:<br><ul><li><b>m</b>: menubar</li><li><b>T</b>: toolbar<li><b>b</b>: bookmark bar</li><li><b>s</b>: original Firefox statusbar</ul>", "Supported characters:<br><ul><li><b>m</b>: menubar</li><li><b>T</b>: toolbar<li><b>b</b>: bookmark bar</li><li><b>s</b>: original Firefox statusbar</ul>",
function(value) { set_pref("guioptions", value); set_guioptions(value); }, function(value) { set_pref("guioptions", value); set_guioptions(value); },
function() { return get_pref("guioptions"); }, function() { return get_pref("guioptions"); },
@@ -108,9 +111,9 @@ var g_settings = [/*{{{*/
null null
], ],
[ [
["hintchars", "hc"],
["hintchars", "hc"], ["hintchars", "hc"],
"String of single characters which can be used to follow hints", "String of single characters which can be used to follow hints",
null,
function(value) { set_pref("hintchars", value); }, function(value) { set_pref("hintchars", value); },
function() { return get_pref("hintchars"); }, function() { return get_pref("hintchars"); },
"charlist", "charlist",
@@ -119,9 +122,9 @@ var g_settings = [/*{{{*/
null null
], ],
[ [
["hintstyle", "hs"],
["hintstyle", "hs"], ["hintstyle", "hs"],
"CSS specification of unfocused hints appearance", "CSS specification of unfocused hints appearance",
null,
function(value) { set_pref("hintstyle", value); }, function(value) { set_pref("hintstyle", value); },
function() { return get_pref("hintstyle"); }, function() { return get_pref("hintstyle"); },
"string", "string",
@@ -130,9 +133,9 @@ var g_settings = [/*{{{*/
null null
], ],
[ [
["hinttags"],
["hinttags"], ["hinttags"],
"XPath string of hintable elements activated by 'f'", "XPath string of hintable elements activated by 'f'",
null,
function(value) { set_pref("hinttags", value); }, function(value) { set_pref("hinttags", value); },
function() { return get_pref("hinttags"); }, function() { return get_pref("hinttags"); },
"string", "string",
@@ -142,7 +145,8 @@ var g_settings = [/*{{{*/
], ],
[ [
["maxhints", "mh"], ["maxhints", "mh"],
"Maximum of simultanously shown hints", ["maxhints", "mh"],
"Maximum of simultanously shown hints<br/>" +
"If you want to speed up display of hints, choose a smaller value", "If you want to speed up display of hints, choose a smaller value",
function(value) { set_pref("maxhints", value); }, function(value) { set_pref("maxhints", value); },
function() { return get_pref("maxhints"); }, function() { return get_pref("maxhints"); },
@@ -153,7 +157,8 @@ var g_settings = [/*{{{*/
], ],
[ [
["preload"], ["preload"],
"Speed up first time history/bookmark completion", ["preload"],
"Speed up first time history/bookmark completion<br/>" +
"History access can be quite slow for a large history. Vimperator maintains a cache to speed it up significantly on subsequent access.<br>"+ "History access can be quite slow for a large history. Vimperator maintains a cache to speed it up significantly on subsequent access.<br>"+
"In order to also speed up first time access, it is cached at startup, if this option is set (recommended).", "In order to also speed up first time access, it is cached at startup, if this option is set (recommended).",
function(value) { set_pref("preload", value); }, function(value) { set_pref("preload", value); },
@@ -165,7 +170,8 @@ var g_settings = [/*{{{*/
], ],
[ [
["previewheight", "pvh"], ["previewheight", "pvh"],
"Default height for preview window", ["previewheight", "pvh"],
"Default height for preview window<br/>" +
"Value must be between 1 and 50. If the value is too high, completions may cover the command-line. Close the preview window with <code class=command>:pclose</close>.", "Value must be between 1 and 50. If the value is too high, completions may cover the command-line. Close the preview window with <code class=command>:pclose</close>.",
function(value) { set_pref("previewheight", value); }, function(value) { set_pref("previewheight", value); },
function() { return get_pref("previewheight"); }, function() { return get_pref("previewheight"); },
@@ -175,9 +181,9 @@ var g_settings = [/*{{{*/
null null
], ],
[ [
["showmode", "smd"],
["showmode", "smd"], ["showmode", "smd"],
"Show the current mode in the command line", "Show the current mode in the command line",
null,
function(value) { set_pref("showmode", value); }, function(value) { set_pref("showmode", value); },
function() { return get_pref("showmode"); }, function() { return get_pref("showmode"); },
"boolean", "boolean",
@@ -187,7 +193,8 @@ var g_settings = [/*{{{*/
], ],
[ [
["showtabline", "stal"], ["showtabline", "stal"],
"Control when to show the tab bar of opened web pages", ["showtabline", "stal"],
"Control when to show the tab bar of opened web pages<br/>" +
"Available items:<br>"+ "Available items:<br>"+
"<ul><li><b>0</b>: Never show tab bar</li><li>"+ "<ul><li><b>0</b>: Never show tab bar</li><li>"+
" <b>1</b>: Show tab bar only if more than one tab is open</li><li>"+ " <b>1</b>: Show tab bar only if more than one tab is open</li><li>"+
@@ -202,7 +209,8 @@ var g_settings = [/*{{{*/
], ],
[ [
["usermode", "um"], ["usermode", "um"],
"Show current website with a minimal stylesheet to make it easily accessible", ["usermode", "um"],
"Show current website with a minimal stylesheet to make it easily accessible<br/>" +
"Note that this is a local setting for now, later it may be split into a global and <code style=command>:setlocal</code> part", "Note that this is a local setting for now, later it may be split into a global and <code style=command>:setlocal</code> part",
function(value) { opt_usermode = value; setStyleDisabled(value); }, function(value) { opt_usermode = value; setStyleDisabled(value); },
function() { return opt_usermode; }, function() { return opt_usermode; },
@@ -213,12 +221,13 @@ var g_settings = [/*{{{*/
], ],
[ [
["wildmode", "wim"], ["wildmode", "wim"],
"Define how command line completion works", ["wildmode", "wim"],
"Define how command line completion works<br/>" +
"Not implemented yet.", "Not implemented yet.",
function(value) { set_pref("wildmode", value); }, function(value) { set_pref("wildmode", value); },
function() { return get_pref("wildmode"); }, function() { return get_pref("wildmode"); },
"stringlist", "stringlist",
"menu", "full",
null, null,
null null
] ]

View File

@@ -537,7 +537,13 @@ function onCommandBarKeypress(evt)/*{{{*/
// unfocus command line first // unfocus command line first
add_to_command_history(command); add_to_command_history(command);
[prev_match, heredoc, end] = multiliner(command, prev_match, heredoc); try {
[prev_match, heredoc, end] = multiliner(command, prev_match, heredoc);
} catch(e) {
echoerr(e.name + ": " + e.message);
prev_match = new Array(5);
heredoc = '';
}
if (!end) if (!end)
command_line.value = ""; command_line.value = "";
} }

View File

@@ -2,26 +2,26 @@
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest"> <Description about="urn:mozilla:install-manifest">
<em:id>{f9570b26-e246-4753-9b68-61aa95994237}</em:id> <em:id>vimperator@mozdev.org</em:id>
<em:name>Vimperator</em:name> <em:name>Vimperator</em:name>
<em:version>0.3</em:version> <em:version>0.3</em:version>
<em:description>Make Firefox work like Vim</em:description> <em:description>Make Firefox work like Vim</em:description>
<em:creator>Martin Stubenschrott</em:creator> <em:creator>Martin Stubenschrott</em:creator>
<em:homepageURL>http://vimperator.mozdev.org</em:homepageURL> <em:homepageURL>http://vimperator.mozdev.org</em:homepageURL>
<em:updateURL>http://downloads.mozdev.org/vimperator/update.rdf</em:updateURL> <em:updateURL>http://downloads.mozdev.org/vimperator/update.rdf</em:updateURL>
<em:file> <em:file>
<Description about="urn:mozilla:extension:file:vimperator.jar"> <Description about="urn:mozilla:extension:file:vimperator.jar">
<em:package>content/vimperator/</em:package> <em:package>content/vimperator/</em:package>
</Description> </Description>
</em:file> </em:file>
<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>2.0</em:minVersion> <em:minVersion>2.0</em:minVersion>
<em:maxVersion>3.0</em:maxVersion> <em:maxVersion>3.0</em:maxVersion>
</Description> </Description>
</em:targetApplication> </em:targetApplication>
</Description> </Description>
</RDF> </RDF>