diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-04-07 15:19:42 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-04-07 15:19:42 +0000 |
commit | fed4922b04d11818684a66ca28c7591dbb274adb (patch) | |
tree | e60fc090ac73f9a29d5afb1e7e476aaa26f53462 | |
parent | [w3m-dev 03843] cleanup macros (diff) | |
download | w3m-fed4922b04d11818684a66ca28c7591dbb274adb.tar.gz w3m-fed4922b04d11818684a66ca28c7591dbb274adb.zip |
[w3m-dev 03844] w3mhelp.cgi update
* scripts/w3mhelp-funcdesc.en.pl.in: add %menu_funcdesc
* scripts/w3mhelp-funcdesc.ja.pl.in: add %menu_funcdesc
update %title
* scripts/w3mhelp-funcname.pl.in: add %menu_funcname
add %menu_keyfunc
* scripts/w3mhelp.cgi.in: modified for menu
link to keymap
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | scripts/w3mhelp-funcdesc.en.pl.in | 19 | ||||
-rw-r--r-- | scripts/w3mhelp-funcdesc.ja.pl.in | 22 | ||||
-rw-r--r-- | scripts/w3mhelp-funcname.pl.in | 54 | ||||
-rw-r--r-- | scripts/w3mhelp.cgi.in | 81 |
5 files changed, 180 insertions, 9 deletions
@@ -1,3 +1,14 @@ +2003-04-08 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> + + * [w3m-dev 03844] w3mhelp.cgi update + * scripts/w3mhelp-funcdesc.en.pl.in: add %menu_funcdesc + * scripts/w3mhelp-funcdesc.ja.pl.in: add %menu_funcdesc + update %title + * scripts/w3mhelp-funcname.pl.in: add %menu_funcname + add %menu_keyfunc + * scripts/w3mhelp.cgi.in: modified for menu + link to keymap + 2003-04-07 Fumitoshi UKAI <ukai@debian.or.jp> * [w3m-dev 03843] cleanup macros @@ -7658,4 +7669,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.811 2003/04/06 16:27:53 ukai Exp $ +$Id: ChangeLog,v 1.812 2003/04/07 15:19:42 ukai Exp $ diff --git a/scripts/w3mhelp-funcdesc.en.pl.in b/scripts/w3mhelp-funcdesc.en.pl.in index 51d924c..924db7c 100644 --- a/scripts/w3mhelp-funcdesc.en.pl.in +++ b/scripts/w3mhelp-funcdesc.en.pl.in @@ -24,4 +24,23 @@ 'LINEEDIT:ACCEPT', 'Accept', ); +%menu_funcdesc = ( + 'MENU:SELECT', 'Select item', + 'MENU:CLOSE', 'Close menu', + 'MENU:CANCEL', 'Back', + 'MENU:DOWN', 'Move to next item', + 'MENU:UP', 'Move to previous item', + 'MENU:LINE_UP', 'Scroll up one item', + 'MENU:LINE_DOWN', 'Scroll down one item', + 'MENU:TOP', 'Go to top item', + 'MENU:LAST', 'Go to last item', + 'MENU:NEXT', 'Go to next page', + 'MENU:PREV', 'Go to previous page', + 'MENU:SEARCH_FORE', 'Search foreward', + 'MENU:SEARCH_BACK', 'Search backward', + 'MENU:SEARCH_NEXT', 'Search next regexp', + 'MENU:SEARCH_PREV', 'Search previous regexp', + 'MENU:SUSPEND', 'Suspend', +); + 1; diff --git a/scripts/w3mhelp-funcdesc.ja.pl.in b/scripts/w3mhelp-funcdesc.ja.pl.in index 71102b7..5dcfb3b 100644 --- a/scripts/w3mhelp-funcdesc.ja.pl.in +++ b/scripts/w3mhelp-funcdesc.ja.pl.in @@ -24,7 +24,27 @@ 'LINEEDIT:ACCEPT', '入力終了', ); +%menu_funcdesc = ( + 'MENU:SELECT', '項目を選択', + 'MENU:CLOSE', 'メニューを閉じる', + 'MENU:CANCEL', '戻る', + 'MENU:DOWN', '一つ下の項目へ', + 'MENU:UP', '一つ上の項目へ', + 'MENU:LINE_UP', '項目を下にスクロール', + 'MENU:LINE_DOWN', '項目を上にスクロール', + 'MENU:TOP', '先頭の項目へ', + 'MENU:LAST', '最後の項目へ', + 'MENU:NEXT', '次ページの項目へ', + 'MENU:PREV', '前ページの項目へ', + 'MENU:SEARCH_FORE', '項目を下に向かって検索', + 'MENU:SEARCH_BACK', '項目を上に向かって検索', + 'MENU:SEARCH_NEXT', '次の項目を検索', + 'MENU:SEARCH_PREV', '前の項目を検索', + 'MENU:SUSPEND', 'サスペンド', +); + %title = ( + "Show keymap file", 'keymap ファイルを見る', "Page/Cursor motion", 'ページ/カーソル移動', "Hyperlink operation", 'ハイパーリンク操作', "File/Stream operation", 'ファイル/ストリーム操作', @@ -36,7 +56,9 @@ "Dictionary look-up", '辞書検索', "Mark operation", 'マーク操作', "Miscellany", 'その他', + "User defined keymaps", 'ユーザ定義', "Line-edit mode", '行編集モード', + "Popup menu", 'メニュー', ); 1; diff --git a/scripts/w3mhelp-funcname.pl.in b/scripts/w3mhelp-funcname.pl.in index 084b691..659b7ed 100644 --- a/scripts/w3mhelp-funcname.pl.in +++ b/scripts/w3mhelp-funcname.pl.in @@ -22,6 +22,25 @@ 'LINEEDIT:ACCEPT', 'lineedit_accept', ); +%menu_funcname = ( + 'MENU:SELECT', 'menu_select', + 'MENU:CLOSE', 'menu_close', + 'MENU:CANCEL', 'menu_cancel', + 'MENU:DOWN', 'menu_down', + 'MENU:UP', 'menu_up', + 'MENU:LINE_UP', 'menu_line_up', + 'MENU:LINE_DOWN', 'menu_line_down', + 'MENU:TOP', 'menu_top', + 'MENU:LAST', 'menu_last', + 'MENU:NEXT', 'menu_next', + 'MENU:PREV', 'menu_prev', + 'MENU:SEARCH_FORE', 'menu_search_fore', + 'MENU:SEARCH_BACK', 'menu_search_back', + 'MENU:SEARCH_NEXT', 'menu_search_next', + 'MENU:SEARCH_PREV', 'menu_search_prev', + 'MENU:SUSPEND', 'menu_suspend', +); + %buf_keyfunc = ( 'k', 'BUF:PREV', 'C-p', 'BUF:PREV', @@ -48,4 +67,39 @@ 'RET', 'LINEEDIT:ACCEPT' ); +%menu_keyfunc = ( + 'RET', 'MENU:SELECT', + 'SPC', 'MENU:SELECT', + 'RIGHT', 'MENU:SELECT', + '^[[28~', 'MENU:CLOSE', + '^[[2~', 'MENU:CLOSE', + 'C-c', 'MENU:CLOSE', + 'C-h', 'MENU:CANCEL', + 'DEL', 'MENU:CANCEL', + 'LEFT', 'MENU:CANCEL', + 'C-n', 'MENU:DOWN', + 'j', 'MENU:DOWN', + 'DOWN', 'MENU:DOWN', + 'C-p', 'MENU:UP', + 'k', 'MENU:UP', + 'UP', 'MENU:UP', + 'K', 'MENU:LINE_UP', + 'J', 'MENU:LINE_DOWN', + 'C-a', 'MENU:TOP', + 'C-e', 'MENU:LAST', + 'C-f', 'MENU:NEXT', + 'C-v', 'MENU:NEXT', + '^[[6~', 'MENU:NEXT', + 'C-b', 'MENU:PREV', + 'ESC-v', 'MENU:PREV', + '^[[5~', 'MENU:PREV', + 'C-s', 'MENU:SEARCH_FORE', + '/', 'MENU:SEARCH_FORE', + 'C-r', 'MENU:SEARCH_BACK', + '?', 'MENU:SEARCH_BACK', + 'n', 'MENU:SEARCH_NEXT', + 'N', 'MENU:SEARCH_PREV', + 'C-z', 'MENU:SUSPEND', +); + 1; diff --git a/scripts/w3mhelp.cgi.in b/scripts/w3mhelp.cgi.in index 761c9a3..4fc311f 100644 --- a/scripts/w3mhelp.cgi.in +++ b/scripts/w3mhelp.cgi.in @@ -1,5 +1,5 @@ #!@PERL@ -# $Id: w3mhelp.cgi.in,v 1.24 2003/01/23 18:37:22 ukai Exp $ +# $Id: w3mhelp.cgi.in,v 1.25 2003/04/07 15:19:46 ukai Exp $ if ( $^O =~ /^(ms)?(dos|win(32|nt)?)/i ) { $CYGPATH = 1; @@ -66,14 +66,15 @@ if (-f $keymap) { local (%funckeydesc, $key, $fname, $desc); -%funcname = (%funcname, %buf_funcname, %lineedit_funcname); +%funcname = (%funcname, %buf_funcname, %lineedit_funcname, %menu_funcname); -%funcdesc = (%funcdesc, %buf_funcdesc, %lineedit_funcdesc); +%funcdesc = (%funcdesc, %buf_funcdesc, %lineedit_funcdesc, %menu_funcdesc); while (($fname, $desc) = each %funcdesc) { - $funckeydesc{$funcname{$fname}} = "$desc\n"; + $funckeydesc{$funcname{$fname}} = "$fname\n$desc\n"; } while (($key, $fname) = each %keyfunc) { + $keydata{$key} && next; $funckeydesc{$funcname{$fname}} .= "$key,"; } while (($key, $fname) = each %buf_keyfunc) { @@ -82,6 +83,9 @@ while (($key, $fname) = each %buf_keyfunc) { while (($key, $fname) = each %lineedit_keyfunc) { $funckeydesc{$funcname{$fname}} .= "$key,"; } +while (($key, $fname) = each %menu_keyfunc) { + $funckeydesc{$funcname{$fname}} .= "$key,"; +} print <<HEADING; Content-Type: text/html @@ -111,10 +115,18 @@ for $otherlang (@docdirs) { if ($d[1] ne $lang) { $d[1] =~ s/[^A-Za-z0-9_\$\.\-]/sprintf('%%%02X', ord($&))/ge; - print $script, $d[1], "\">$d[2] version</A><BR>\n"; + print $script, $d[1], "\">$d[2] version</A>\n"; } } +$keymap =~ s/[<>&]/$htmlesc{$&}/ge; +$head = "Show keymap file"; +if (defined($title{$head})) { + $head = $title{$head}; + $head =~ s/[<>&]/$htmlesc{$&}/ge; +} +print "<P><A HREF=\"$keymap\">$head</A>\n"; + &show_keymap("Page/Cursor motion", split(" ", "pgFore pgBack movR movL movD movU movR1 movL1 movD1 movU1 ldown1 lup1 @@ -157,15 +169,29 @@ for $otherlang (@docdirs) { msgs msToggle wrapToggle execCmd setAlarm setOpt setEnv defKey reinit execsh susp qquitfm quitfm")); +&show_keymap_data("User defined keymaps"); + +print "<BR>\n<HR WIDTH=80%>\n"; + &show_keymap("Buffer selection mode", split(" ", "buffer_next buffer_prev buffer_delete buffer_go")); +print "<BR>\n<HR WIDTH=80%>\n"; + &show_keymap("Line-edit mode", split(" ", "lineedit_forward lineedit_back lineedit_backspace lineedit_delete lineedit_kill_after lineedit_kill_before lineedit_top lineedit_bottom lineedit_prev lineedit_next lineedit_editor lineedit_complete lineedit_accept")); +print "<BR>\n<HR WIDTH=80%>\n"; + +&show_keymap("Popup menu", + split(" ", "menu_select menu_close menu_cancel menu_down menu_up + menu_line_up menu_line_down menu_top menu_last menu_next + menu_prev menu_search_fore menu_search_back menu_search_next + menu_search_prev menu_suspend")); + print <<PAGE; <HR> </BODY> @@ -183,12 +209,17 @@ sub load_keymap { s/^\s*keymap\s+// || next; s/^(\"(\\\"|[^\"])+\"|\'(\\\'|[^\'])+\'|\S+)\s+(\S+)\s*// || next; ($key, $fname) = ($1, $4); - ($data = $_) && next; + $data = $_; $fname =~ tr/a-z/A-Z/; defined($funcdesc{$fname}) || next; $key =~ s/^["'](.*)["']$/$1/; $key = &norm_key($key); $keyfunc{$key} = $fname; + if ($data) { + $keydata{$key} = $data; + } else { + delete $keydata{$key}; + } } } @@ -227,13 +258,47 @@ sub show_keymap { <table cellpadding=0> PAGE foreach $fid (@list) { - local ($desc, $keys) = split("\n", $funckeydesc{$fid}, 2); + local ($name, $desc, $keys) = split("\n", $funckeydesc{$fid}, 3); $keys =~ s/,$//; $keys = '<NOT ASSIGNED>' if ($keys eq ''); $keys =~ s/[<>&]/$htmlesc{$&}/ge; + if ($name =~ /:/) { + $name = ""; + } else { + $name =~ s/[<>&]/$htmlesc{$&}/ge; + $name = " (<b>$name</b>)"; + } $desc =~ s/[<>&]/$htmlesc{$&}/ge; print <<PAGE; -<TR><TD$attr>$keys<TD>$desc +<TR><TD$attr>$keys<TD><NOBR>$desc$name</NOBR> +PAGE + $attr = ""; + } + print "</table>\n"; +} + +sub show_keymap_data { + local($head, @list) = @_; + local($fid); + local($attr) = " WIDTH=140"; + + if (defined($title{$head})) { + $head = $title{$head}; + $head =~ s/[<>&]/$htmlesc{$&}/ge; + } + + print <<PAGE; +<H2>$head</H2> +<table cellpadding=0> +PAGE + foreach $keys (sort keys %keydata) { + $keys =~ s/[<>&]/$htmlesc{$&}/ge; + $name = $keyfunc{$keys}; + $data = $keydata{$keys}; + $name =~ s/[<>&]/$htmlesc{$&}/ge; + $data =~ s/[<>&]/$htmlesc{$&}/ge; + print <<PAGE; +<TR><TD$attr>$keys<TD>$name<TD><NOBR>$data</NOBR> PAGE $attr = ""; } |