diff options
-rw-r--r-- | doc/de/autogen/user/script_commands.txt | 24 | ||||
-rw-r--r-- | doc/de/autogen/user/script_options.txt | 5 | ||||
-rw-r--r-- | doc/en/autogen/user/script_commands.txt | 24 | ||||
-rw-r--r-- | doc/en/autogen/user/script_options.txt | 5 | ||||
-rw-r--r-- | doc/fr/autogen/user/script_commands.txt | 24 | ||||
-rw-r--r-- | doc/fr/autogen/user/script_options.txt | 5 | ||||
-rw-r--r-- | doc/it/autogen/user/script_commands.txt | 24 | ||||
-rw-r--r-- | doc/it/autogen/user/script_options.txt | 5 | ||||
-rw-r--r-- | doc/ja/autogen/user/script_commands.txt | 24 | ||||
-rw-r--r-- | doc/ja/autogen/user/script_options.txt | 5 | ||||
-rw-r--r-- | po/cs.po | 37 | ||||
-rw-r--r-- | po/de.po | 37 | ||||
-rw-r--r-- | po/es.po | 37 | ||||
-rw-r--r-- | po/fr.po | 80 | ||||
-rw-r--r-- | po/hu.po | 37 | ||||
-rw-r--r-- | po/it.po | 37 | ||||
-rw-r--r-- | po/ja.po | 37 | ||||
-rw-r--r-- | po/pl.po | 37 | ||||
-rw-r--r-- | po/pt_BR.po | 37 | ||||
-rw-r--r-- | po/ru.po | 37 | ||||
-rw-r--r-- | po/weechat.pot | 37 | ||||
-rw-r--r-- | src/plugins/script/script-buffer.c | 81 | ||||
-rw-r--r-- | src/plugins/script/script-buffer.h | 1 | ||||
-rw-r--r-- | src/plugins/script/script-command.c | 24 | ||||
-rw-r--r-- | src/plugins/script/script-config.c | 25 | ||||
-rw-r--r-- | src/plugins/script/script-config.h | 1 |
26 files changed, 467 insertions, 260 deletions
diff --git a/doc/de/autogen/user/script_commands.txt b/doc/de/autogen/user/script_commands.txt index 2d0c7e47b..d74987f0a 100644 --- a/doc/de/autogen/user/script_commands.txt +++ b/doc/de/autogen/user/script_commands.txt @@ -34,19 +34,21 @@ On script buffer, the possible status for each script are: popular script Keys on script buffer: - alt+i install script - alt+r remove script - alt+l load script - alt+u unload script - alt+h (un)hold script + alt+i install script + alt+r remove script + alt+l load script + alt+L reload script + alt+u unload script + alt+h (un)hold script Input allowed on script buffer: - q close buffer - r refresh buffer - s:x,y sort buffer using keys x and y (see /help script.look.sort) - s: reset sort (use default sort) - word(s) filter scripts: search word(s) in scripts (description, tags, ...) - * remove filter + i/r/l/L/u/h action on script (same as keys above) + q close buffer + $ refresh buffer + s:x,y sort buffer using keys x and y (see /help script.look.sort) + s: reset sort (use default sort) + word(s) filter scripts: search word(s) in scripts (description, tags, ...) + * remove filter Examples: /script search url diff --git a/doc/de/autogen/user/script_options.txt b/doc/de/autogen/user/script_options.txt index f5f3ddb48..e3e5f75c1 100644 --- a/doc/de/autogen/user/script_options.txt +++ b/doc/de/autogen/user/script_options.txt @@ -143,6 +143,11 @@ ** Typ: boolesch ** Werte: on, off (Standardwert: `on`) +* [[option_script.look.use_keys]] *script.look.use_keys* +** Beschreibung: `use keys alt+X in script buffer to do actions on scripts (alt+i = install, alt+r = remove, ...); if disabled, only the input is allowed: i, r, ...` +** Typ: boolesch +** Werte: on, off (Standardwert: `on`) + * [[option_script.scripts.cache_expire]] *script.scripts.cache_expire* ** Beschreibung: `local cache expiration time, in minutes (-1 = never expires, 0 = always expire)` ** Typ: integer diff --git a/doc/en/autogen/user/script_commands.txt b/doc/en/autogen/user/script_commands.txt index 2d0c7e47b..d74987f0a 100644 --- a/doc/en/autogen/user/script_commands.txt +++ b/doc/en/autogen/user/script_commands.txt @@ -34,19 +34,21 @@ On script buffer, the possible status for each script are: popular script Keys on script buffer: - alt+i install script - alt+r remove script - alt+l load script - alt+u unload script - alt+h (un)hold script + alt+i install script + alt+r remove script + alt+l load script + alt+L reload script + alt+u unload script + alt+h (un)hold script Input allowed on script buffer: - q close buffer - r refresh buffer - s:x,y sort buffer using keys x and y (see /help script.look.sort) - s: reset sort (use default sort) - word(s) filter scripts: search word(s) in scripts (description, tags, ...) - * remove filter + i/r/l/L/u/h action on script (same as keys above) + q close buffer + $ refresh buffer + s:x,y sort buffer using keys x and y (see /help script.look.sort) + s: reset sort (use default sort) + word(s) filter scripts: search word(s) in scripts (description, tags, ...) + * remove filter Examples: /script search url diff --git a/doc/en/autogen/user/script_options.txt b/doc/en/autogen/user/script_options.txt index f5a61dd47..af08f7d34 100644 --- a/doc/en/autogen/user/script_options.txt +++ b/doc/en/autogen/user/script_options.txt @@ -143,6 +143,11 @@ ** type: boolean ** values: on, off (default value: `on`) +* [[option_script.look.use_keys]] *script.look.use_keys* +** description: `use keys alt+X in script buffer to do actions on scripts (alt+i = install, alt+r = remove, ...); if disabled, only the input is allowed: i, r, ...` +** type: boolean +** values: on, off (default value: `on`) + * [[option_script.scripts.cache_expire]] *script.scripts.cache_expire* ** description: `local cache expiration time, in minutes (-1 = never expires, 0 = always expire)` ** type: integer diff --git a/doc/fr/autogen/user/script_commands.txt b/doc/fr/autogen/user/script_commands.txt index bf6f63e6a..a7d3f19c6 100644 --- a/doc/fr/autogen/user/script_commands.txt +++ b/doc/fr/autogen/user/script_commands.txt @@ -34,19 +34,21 @@ Sur le tampon des scripts, les statuts pour chaque script sont : script populaire Les touches sur le tampon des scripts : - alt+i installer le script - alt+r supprimer le script - alt+l charger le script - alt+u décharger le script - alt+h (dé)figer le script + alt+i installer le script + alt+r supprimer le script + alt+l charger le script + alt+L recharger le script + alt+u décharger le script + alt+h (dé)figer le script Entrée autorisée sur le tampon des scripts : - q fermer le tampon - r rafraîchir le tampon - s:x,y trier le tampon en utilisant les clés x et y (voir /help script.look.sort) - s: réinitialiser le tri (utiliser le tri par défaut) - word(s) filtrer les scripts: recherche du/des mot(s) dans les scripts (description, étiquettes, ...) - * supprimer le filtre + i/r/l/L/u/h action sur le script (identique aux touches ci-dessus) + q fermer le tampon + $ rafraîchir le tampon + s:x,y trier le tampon en utilisant les clés x et y (voir /help script.look.sort) + s: réinitialiser le tri (utiliser le tri par défaut) + word(s) filtrer les scripts: recherche du/des mot(s) dans les scripts (description, étiquettes, ...) + * supprimer le filtre Exemples: /script search url diff --git a/doc/fr/autogen/user/script_options.txt b/doc/fr/autogen/user/script_options.txt index fc0ac1af6..cb77825d8 100644 --- a/doc/fr/autogen/user/script_options.txt +++ b/doc/fr/autogen/user/script_options.txt @@ -143,6 +143,11 @@ ** type: booléen ** valeurs: on, off (valeur par défaut: `on`) +* [[option_script.look.use_keys]] *script.look.use_keys* +** description: `utiliser les touches alt+X sur le tampon script pour effectuer les actions sur les scripts (alt+i = installed, alt+r = supprimer, ...); si désactivé, seule l'entrée est autorisée: i, r, ...` +** type: booléen +** valeurs: on, off (valeur par défaut: `on`) + * [[option_script.scripts.cache_expire]] *script.scripts.cache_expire* ** description: `temps d'expiration du cache local, en minutes (-1 = n'expire jamais, 0 = expire toujours)` ** type: entier diff --git a/doc/it/autogen/user/script_commands.txt b/doc/it/autogen/user/script_commands.txt index 2d0c7e47b..d74987f0a 100644 --- a/doc/it/autogen/user/script_commands.txt +++ b/doc/it/autogen/user/script_commands.txt @@ -34,19 +34,21 @@ On script buffer, the possible status for each script are: popular script Keys on script buffer: - alt+i install script - alt+r remove script - alt+l load script - alt+u unload script - alt+h (un)hold script + alt+i install script + alt+r remove script + alt+l load script + alt+L reload script + alt+u unload script + alt+h (un)hold script Input allowed on script buffer: - q close buffer - r refresh buffer - s:x,y sort buffer using keys x and y (see /help script.look.sort) - s: reset sort (use default sort) - word(s) filter scripts: search word(s) in scripts (description, tags, ...) - * remove filter + i/r/l/L/u/h action on script (same as keys above) + q close buffer + $ refresh buffer + s:x,y sort buffer using keys x and y (see /help script.look.sort) + s: reset sort (use default sort) + word(s) filter scripts: search word(s) in scripts (description, tags, ...) + * remove filter Examples: /script search url diff --git a/doc/it/autogen/user/script_options.txt b/doc/it/autogen/user/script_options.txt index 5baed43cd..3a3c5fd54 100644 --- a/doc/it/autogen/user/script_options.txt +++ b/doc/it/autogen/user/script_options.txt @@ -143,6 +143,11 @@ ** tipo: bool ** valori: on, off (valore predefinito: `on`) +* [[option_script.look.use_keys]] *script.look.use_keys* +** descrizione: `use keys alt+X in script buffer to do actions on scripts (alt+i = install, alt+r = remove, ...); if disabled, only the input is allowed: i, r, ...` +** tipo: bool +** valori: on, off (valore predefinito: `on`) + * [[option_script.scripts.cache_expire]] *script.scripts.cache_expire* ** descrizione: `local cache expiration time, in minutes (-1 = never expires, 0 = always expire)` ** tipo: intero diff --git a/doc/ja/autogen/user/script_commands.txt b/doc/ja/autogen/user/script_commands.txt index 2d0c7e47b..d74987f0a 100644 --- a/doc/ja/autogen/user/script_commands.txt +++ b/doc/ja/autogen/user/script_commands.txt @@ -34,19 +34,21 @@ On script buffer, the possible status for each script are: popular script Keys on script buffer: - alt+i install script - alt+r remove script - alt+l load script - alt+u unload script - alt+h (un)hold script + alt+i install script + alt+r remove script + alt+l load script + alt+L reload script + alt+u unload script + alt+h (un)hold script Input allowed on script buffer: - q close buffer - r refresh buffer - s:x,y sort buffer using keys x and y (see /help script.look.sort) - s: reset sort (use default sort) - word(s) filter scripts: search word(s) in scripts (description, tags, ...) - * remove filter + i/r/l/L/u/h action on script (same as keys above) + q close buffer + $ refresh buffer + s:x,y sort buffer using keys x and y (see /help script.look.sort) + s: reset sort (use default sort) + word(s) filter scripts: search word(s) in scripts (description, tags, ...) + * remove filter Examples: /script search url diff --git a/doc/ja/autogen/user/script_options.txt b/doc/ja/autogen/user/script_options.txt index 21a1de21f..cd220ce80 100644 --- a/doc/ja/autogen/user/script_options.txt +++ b/doc/ja/autogen/user/script_options.txt @@ -143,6 +143,11 @@ ** タイプ: ブール ** 値: on, off (デフォルト値: `on`) +* [[option_script.look.use_keys]] *script.look.use_keys* +** 説明: `use keys alt+X in script buffer to do actions on scripts (alt+i = install, alt+r = remove, ...); if disabled, only the input is allowed: i, r, ...` +** タイプ: ブール +** 値: on, off (デフォルト値: `on`) + * [[option_script.scripts.cache_expire]] *script.scripts.cache_expire* ** 説明: `local cache expiration time, in minutes (-1 = never expires, 0 = always expire)` ** タイプ: 整数 @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-18 08:57+0200\n" +"POT-Creation-Date: 2012-08-18 11:40+0200\n" "PO-Revision-Date: 2012-08-16 12:01+0200\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8309,9 +8309,9 @@ msgstr "" #, c-format msgid "" -"%d/%d scripts (filter: %s) | Sort: %s | alt+i=install r=remove l=load " -"u=unload h=(un)hold d=show detail | Input: 'q'=close 'r'=refresh 's:x," -"y'=sort 'words'=filter '*'=reset filter" +"%d/%d scripts (filter: %s) | Sort: %s | Alt+key/input: i=install r=remove " +"l=load L=reload u=unload h=(un)hold d=show detail | Input: q=close $=refresh " +"s:x,y=sort words=filter *=reset filter" msgstr "" msgid "Scripts" @@ -8356,20 +8356,22 @@ msgid "" " popular script\n" "\n" "Keys on script buffer:\n" -" alt+i install script\n" -" alt+r remove script\n" -" alt+l load script\n" -" alt+u unload script\n" -" alt+h (un)hold script\n" +" alt+i install script\n" +" alt+r remove script\n" +" alt+l load script\n" +" alt+L reload script\n" +" alt+u unload script\n" +" alt+h (un)hold script\n" "\n" "Input allowed on script buffer:\n" -" q close buffer\n" -" r refresh buffer\n" -" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" -" s: reset sort (use default sort)\n" -" word(s) filter scripts: search word(s) in scripts (description, " +" i/r/l/L/u/h action on script (same as keys above)\n" +" q close buffer\n" +" $ refresh buffer\n" +" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" +" s: reset sort (use default sort)\n" +" word(s) filter scripts: search word(s) in scripts (description, " "tags, ...)\n" -" * remove filter\n" +" * remove filter\n" "\n" "Examples:\n" " /script search url\n" @@ -8415,6 +8417,11 @@ msgid "" "language, otherwise english version is used)" msgstr "" +msgid "" +"use keys alt+X in script buffer to do actions on scripts (alt+i = install, " +"alt+r = remove, ...); if disabled, only the input is allowed: i, r, ..." +msgstr "" + #, fuzzy msgid "color for status \"popular\" (\"*\")" msgstr "barva textu pro čas (stavový řádek)" @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-18 08:57+0200\n" +"POT-Creation-Date: 2012-08-18 11:40+0200\n" "PO-Revision-Date: 2012-08-16 12:01+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <weechatter@arcor.de>\n" @@ -8883,9 +8883,9 @@ msgstr "" #, c-format msgid "" -"%d/%d scripts (filter: %s) | Sort: %s | alt+i=install r=remove l=load " -"u=unload h=(un)hold d=show detail | Input: 'q'=close 'r'=refresh 's:x," -"y'=sort 'words'=filter '*'=reset filter" +"%d/%d scripts (filter: %s) | Sort: %s | Alt+key/input: i=install r=remove " +"l=load L=reload u=unload h=(un)hold d=show detail | Input: q=close $=refresh " +"s:x,y=sort words=filter *=reset filter" msgstr "" msgid "Scripts" @@ -8930,20 +8930,22 @@ msgid "" " popular script\n" "\n" "Keys on script buffer:\n" -" alt+i install script\n" -" alt+r remove script\n" -" alt+l load script\n" -" alt+u unload script\n" -" alt+h (un)hold script\n" +" alt+i install script\n" +" alt+r remove script\n" +" alt+l load script\n" +" alt+L reload script\n" +" alt+u unload script\n" +" alt+h (un)hold script\n" "\n" "Input allowed on script buffer:\n" -" q close buffer\n" -" r refresh buffer\n" -" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" -" s: reset sort (use default sort)\n" -" word(s) filter scripts: search word(s) in scripts (description, " +" i/r/l/L/u/h action on script (same as keys above)\n" +" q close buffer\n" +" $ refresh buffer\n" +" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" +" s: reset sort (use default sort)\n" +" word(s) filter scripts: search word(s) in scripts (description, " "tags, ...)\n" -" * remove filter\n" +" * remove filter\n" "\n" "Examples:\n" " /script search url\n" @@ -8989,6 +8991,11 @@ msgid "" "language, otherwise english version is used)" msgstr "" +msgid "" +"use keys alt+X in script buffer to do actions on scripts (alt+i = install, " +"alt+r = remove, ...); if disabled, only the input is allowed: i, r, ..." +msgstr "" + #, fuzzy msgid "color for status \"popular\" (\"*\")" msgstr "Textfarbe für die Uhrzeit (Statusbar)" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-18 08:57+0200\n" +"POT-Creation-Date: 2012-08-18 11:40+0200\n" "PO-Revision-Date: 2012-08-16 12:01+0200\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8582,9 +8582,9 @@ msgstr "" #, c-format msgid "" -"%d/%d scripts (filter: %s) | Sort: %s | alt+i=install r=remove l=load " -"u=unload h=(un)hold d=show detail | Input: 'q'=close 'r'=refresh 's:x," -"y'=sort 'words'=filter '*'=reset filter" +"%d/%d scripts (filter: %s) | Sort: %s | Alt+key/input: i=install r=remove " +"l=load L=reload u=unload h=(un)hold d=show detail | Input: q=close $=refresh " +"s:x,y=sort words=filter *=reset filter" msgstr "" msgid "Scripts" @@ -8629,20 +8629,22 @@ msgid "" " popular script\n" "\n" "Keys on script buffer:\n" -" alt+i install script\n" -" alt+r remove script\n" -" alt+l load script\n" -" alt+u unload script\n" -" alt+h (un)hold script\n" +" alt+i install script\n" +" alt+r remove script\n" +" alt+l load script\n" +" alt+L reload script\n" +" alt+u unload script\n" +" alt+h (un)hold script\n" "\n" "Input allowed on script buffer:\n" -" q close buffer\n" -" r refresh buffer\n" -" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" -" s: reset sort (use default sort)\n" -" word(s) filter scripts: search word(s) in scripts (description, " +" i/r/l/L/u/h action on script (same as keys above)\n" +" q close buffer\n" +" $ refresh buffer\n" +" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" +" s: reset sort (use default sort)\n" +" word(s) filter scripts: search word(s) in scripts (description, " "tags, ...)\n" -" * remove filter\n" +" * remove filter\n" "\n" "Examples:\n" " /script search url\n" @@ -8688,6 +8690,11 @@ msgid "" "language, otherwise english version is used)" msgstr "" +msgid "" +"use keys alt+X in script buffer to do actions on scripts (alt+i = install, " +"alt+r = remove, ...); if disabled, only the input is allowed: i, r, ..." +msgstr "" + #, fuzzy msgid "color for status \"popular\" (\"*\")" msgstr "color para el texto de la hora (en la barra de estado)" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-18 08:57+0200\n" -"PO-Revision-Date: 2012-08-18 08:57+0200\n" +"POT-Creation-Date: 2012-08-18 11:40+0200\n" +"PO-Revision-Date: 2012-08-18 11:40+0200\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: French\n" @@ -8655,13 +8655,13 @@ msgstr "alt+d=retour à la liste" #, c-format msgid "" -"%d/%d scripts (filter: %s) | Sort: %s | alt+i=install r=remove l=load " -"u=unload h=(un)hold d=show detail | Input: 'q'=close 'r'=refresh 's:x," -"y'=sort 'words'=filter '*'=reset filter" +"%d/%d scripts (filter: %s) | Sort: %s | Alt+key/input: i=install r=remove " +"l=load L=reload u=unload h=(un)hold d=show detail | Input: q=close $=refresh " +"s:x,y=sort words=filter *=reset filter" msgstr "" -"%d/%d scripts (filtre: %s) | Tri: %s | alt+i=installer r=supprimer l=charger " -"u=décharger h=(dé)figer d=afficher détail | Entrée: 'q'=fermer " -"'r'=rafraîchir 's:x,y'=trier 'words'=filtrer '*'=réinit filtre" +"%d/%d scripts (filtre: %s) | Tri: %s | Alt+touche/entrée: i=installer " +"r=supprimer l=charger L=recharger u=décharger h=(dé)figer d=afficher détail " +"| Entrée: q=fermer r=rafraîchir s:x,y=trier words=filtrer *=réinit filtre" msgid "Scripts" msgstr "Scripts" @@ -8707,20 +8707,22 @@ msgid "" " popular script\n" "\n" "Keys on script buffer:\n" -" alt+i install script\n" -" alt+r remove script\n" -" alt+l load script\n" -" alt+u unload script\n" -" alt+h (un)hold script\n" +" alt+i install script\n" +" alt+r remove script\n" +" alt+l load script\n" +" alt+L reload script\n" +" alt+u unload script\n" +" alt+h (un)hold script\n" "\n" "Input allowed on script buffer:\n" -" q close buffer\n" -" r refresh buffer\n" -" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" -" s: reset sort (use default sort)\n" -" word(s) filter scripts: search word(s) in scripts (description, " +" i/r/l/L/u/h action on script (same as keys above)\n" +" q close buffer\n" +" $ refresh buffer\n" +" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" +" s: reset sort (use default sort)\n" +" word(s) filter scripts: search word(s) in scripts (description, " "tags, ...)\n" -" * remove filter\n" +" * remove filter\n" "\n" "Examples:\n" " /script search url\n" @@ -8758,21 +8760,23 @@ msgstr "" " script populaire\n" "\n" "Les touches sur le tampon des scripts :\n" -" alt+i installer le script\n" -" alt+r supprimer le script\n" -" alt+l charger le script\n" -" alt+u décharger le script\n" -" alt+h (dé)figer le script\n" +" alt+i installer le script\n" +" alt+r supprimer le script\n" +" alt+l charger le script\n" +" alt+L recharger le script\n" +" alt+u décharger le script\n" +" alt+h (dé)figer le script\n" "\n" "Entrée autorisée sur le tampon des scripts :\n" -" q fermer le tampon\n" -" r rafraîchir le tampon\n" -" s:x,y trier le tampon en utilisant les clés x et y (voir /help script." -"look.sort)\n" -" s: réinitialiser le tri (utiliser le tri par défaut)\n" -" word(s) filtrer les scripts: recherche du/des mot(s) dans les scripts " +" i/r/l/L/u/h action sur le script (identique aux touches ci-dessus)\n" +" q fermer le tampon\n" +" $ rafraîchir le tampon\n" +" s:x,y trier le tampon en utilisant les clés x et y (voir /help " +"script.look.sort)\n" +" s: réinitialiser le tri (utiliser le tri par défaut)\n" +" word(s) filtrer les scripts: recherche du/des mot(s) dans les scripts " "(description, étiquettes, ...)\n" -" * supprimer le filtre\n" +" * supprimer le filtre\n" "\n" "Exemples:\n" " /script search url\n" @@ -8828,6 +8832,14 @@ msgstr "" "traduire la description des scripts (si une traduction est disponible dans " "votre langue, sinon la version anglaise est utilisée)" +msgid "" +"use keys alt+X in script buffer to do actions on scripts (alt+i = install, " +"alt+r = remove, ...); if disabled, only the input is allowed: i, r, ..." +msgstr "" +"utiliser les touches alt+X sur le tampon script pour effectuer les actions " +"sur les scripts (alt+i = installed, alt+r = supprimer, ...); si désactivé, " +"seule l'entrée est autorisée: i, r, ..." + msgid "color for status \"popular\" (\"*\")" msgstr "couleur du statut \"populaire\" (\"*\")" @@ -9398,5 +9410,11 @@ msgstr "Type" msgid "Constants" msgstr "Constantes" +#~ msgid "Alt-keys/input" +#~ msgstr "Alt+touche/entrée" + +#~ msgid "Input" +#~ msgstr "Entrée" + #~ msgid "%s: script \"%s\" held" #~ msgstr "%s: script \"%s\" figé" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-18 08:57+0200\n" +"POT-Creation-Date: 2012-08-18 11:40+0200\n" "PO-Revision-Date: 2012-08-16 12:01+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7790,9 +7790,9 @@ msgstr "" #, c-format msgid "" -"%d/%d scripts (filter: %s) | Sort: %s | alt+i=install r=remove l=load " -"u=unload h=(un)hold d=show detail | Input: 'q'=close 'r'=refresh 's:x," -"y'=sort 'words'=filter '*'=reset filter" +"%d/%d scripts (filter: %s) | Sort: %s | Alt+key/input: i=install r=remove " +"l=load L=reload u=unload h=(un)hold d=show detail | Input: q=close $=refresh " +"s:x,y=sort words=filter *=reset filter" msgstr "" msgid "Scripts" @@ -7837,20 +7837,22 @@ msgid "" " popular script\n" "\n" "Keys on script buffer:\n" -" alt+i install script\n" -" alt+r remove script\n" -" alt+l load script\n" -" alt+u unload script\n" -" alt+h (un)hold script\n" +" alt+i install script\n" +" alt+r remove script\n" +" alt+l load script\n" +" alt+L reload script\n" +" alt+u unload script\n" +" alt+h (un)hold script\n" "\n" "Input allowed on script buffer:\n" -" q close buffer\n" -" r refresh buffer\n" -" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" -" s: reset sort (use default sort)\n" -" word(s) filter scripts: search word(s) in scripts (description, " +" i/r/l/L/u/h action on script (same as keys above)\n" +" q close buffer\n" +" $ refresh buffer\n" +" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" +" s: reset sort (use default sort)\n" +" word(s) filter scripts: search word(s) in scripts (description, " "tags, ...)\n" -" * remove filter\n" +" * remove filter\n" "\n" "Examples:\n" " /script search url\n" @@ -7896,6 +7898,11 @@ msgid "" "language, otherwise english version is used)" msgstr "" +msgid "" +"use keys alt+X in script buffer to do actions on scripts (alt+i = install, " +"alt+r = remove, ...); if disabled, only the input is allowed: i, r, ..." +msgstr "" + #, fuzzy msgid "color for status \"popular\" (\"*\")" msgstr "státuszsor színe" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-18 08:57+0200\n" +"POT-Creation-Date: 2012-08-18 11:40+0200\n" "PO-Revision-Date: 2012-08-16 12:01+0200\n" "Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8572,9 +8572,9 @@ msgstr "" #, c-format msgid "" -"%d/%d scripts (filter: %s) | Sort: %s | alt+i=install r=remove l=load " -"u=unload h=(un)hold d=show detail | Input: 'q'=close 'r'=refresh 's:x," -"y'=sort 'words'=filter '*'=reset filter" +"%d/%d scripts (filter: %s) | Sort: %s | Alt+key/input: i=install r=remove " +"l=load L=reload u=unload h=(un)hold d=show detail | Input: q=close $=refresh " +"s:x,y=sort words=filter *=reset filter" msgstr "" msgid "Scripts" @@ -8619,20 +8619,22 @@ msgid "" " popular script\n" "\n" "Keys on script buffer:\n" -" alt+i install script\n" -" alt+r remove script\n" -" alt+l load script\n" -" alt+u unload script\n" -" alt+h (un)hold script\n" +" alt+i install script\n" +" alt+r remove script\n" +" alt+l load script\n" +" alt+L reload script\n" +" alt+u unload script\n" +" alt+h (un)hold script\n" "\n" "Input allowed on script buffer:\n" -" q close buffer\n" -" r refresh buffer\n" -" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" -" s: reset sort (use default sort)\n" -" word(s) filter scripts: search word(s) in scripts (description, " +" i/r/l/L/u/h action on script (same as keys above)\n" +" q close buffer\n" +" $ refresh buffer\n" +" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" +" s: reset sort (use default sort)\n" +" word(s) filter scripts: search word(s) in scripts (description, " "tags, ...)\n" -" * remove filter\n" +" * remove filter\n" "\n" "Examples:\n" " /script search url\n" @@ -8678,6 +8680,11 @@ msgid "" "language, otherwise english version is used)" msgstr "" +msgid "" +"use keys alt+X in script buffer to do actions on scripts (alt+i = install, " +"alt+r = remove, ...); if disabled, only the input is allowed: i, r, ..." +msgstr "" + #, fuzzy msgid "color for status \"popular\" (\"*\")" msgstr "colore del testo per l'ora (barra di stato)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-18 08:57+0200\n" +"POT-Creation-Date: 2012-08-18 11:40+0200\n" "PO-Revision-Date: 2012-08-16 12:01+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/WeeChat>\n" @@ -8371,9 +8371,9 @@ msgstr "" #, c-format msgid "" -"%d/%d scripts (filter: %s) | Sort: %s | alt+i=install r=remove l=load " -"u=unload h=(un)hold d=show detail | Input: 'q'=close 'r'=refresh 's:x," -"y'=sort 'words'=filter '*'=reset filter" +"%d/%d scripts (filter: %s) | Sort: %s | Alt+key/input: i=install r=remove " +"l=load L=reload u=unload h=(un)hold d=show detail | Input: q=close $=refresh " +"s:x,y=sort words=filter *=reset filter" msgstr "" msgid "Scripts" @@ -8418,20 +8418,22 @@ msgid "" " popular script\n" "\n" "Keys on script buffer:\n" -" alt+i install script\n" -" alt+r remove script\n" -" alt+l load script\n" -" alt+u unload script\n" -" alt+h (un)hold script\n" +" alt+i install script\n" +" alt+r remove script\n" +" alt+l load script\n" +" alt+L reload script\n" +" alt+u unload script\n" +" alt+h (un)hold script\n" "\n" "Input allowed on script buffer:\n" -" q close buffer\n" -" r refresh buffer\n" -" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" -" s: reset sort (use default sort)\n" -" word(s) filter scripts: search word(s) in scripts (description, " +" i/r/l/L/u/h action on script (same as keys above)\n" +" q close buffer\n" +" $ refresh buffer\n" +" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" +" s: reset sort (use default sort)\n" +" word(s) filter scripts: search word(s) in scripts (description, " "tags, ...)\n" -" * remove filter\n" +" * remove filter\n" "\n" "Examples:\n" " /script search url\n" @@ -8477,6 +8479,11 @@ msgid "" "language, otherwise english version is used)" msgstr "" +msgid "" +"use keys alt+X in script buffer to do actions on scripts (alt+i = install, " +"alt+r = remove, ...); if disabled, only the input is allowed: i, r, ..." +msgstr "" + #, fuzzy msgid "color for status \"popular\" (\"*\")" msgstr "時間のテキスト色 (ステータスバー)" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-18 08:57+0200\n" +"POT-Creation-Date: 2012-08-18 11:40+0200\n" "PO-Revision-Date: 2012-08-16 12:01+0200\n" "Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8505,9 +8505,9 @@ msgstr "" #, c-format msgid "" -"%d/%d scripts (filter: %s) | Sort: %s | alt+i=install r=remove l=load " -"u=unload h=(un)hold d=show detail | Input: 'q'=close 'r'=refresh 's:x," -"y'=sort 'words'=filter '*'=reset filter" +"%d/%d scripts (filter: %s) | Sort: %s | Alt+key/input: i=install r=remove " +"l=load L=reload u=unload h=(un)hold d=show detail | Input: q=close $=refresh " +"s:x,y=sort words=filter *=reset filter" msgstr "" msgid "Scripts" @@ -8552,20 +8552,22 @@ msgid "" " popular script\n" "\n" "Keys on script buffer:\n" -" alt+i install script\n" -" alt+r remove script\n" -" alt+l load script\n" -" alt+u unload script\n" -" alt+h (un)hold script\n" +" alt+i install script\n" +" alt+r remove script\n" +" alt+l load script\n" +" alt+L reload script\n" +" alt+u unload script\n" +" alt+h (un)hold script\n" "\n" "Input allowed on script buffer:\n" -" q close buffer\n" -" r refresh buffer\n" -" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" -" s: reset sort (use default sort)\n" -" word(s) filter scripts: search word(s) in scripts (description, " +" i/r/l/L/u/h action on script (same as keys above)\n" +" q close buffer\n" +" $ refresh buffer\n" +" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" +" s: reset sort (use default sort)\n" +" word(s) filter scripts: search word(s) in scripts (description, " "tags, ...)\n" -" * remove filter\n" +" * remove filter\n" "\n" "Examples:\n" " /script search url\n" @@ -8611,6 +8613,11 @@ msgid "" "language, otherwise english version is used)" msgstr "" +msgid "" +"use keys alt+X in script buffer to do actions on scripts (alt+i = install, " +"alt+r = remove, ...); if disabled, only the input is allowed: i, r, ..." +msgstr "" + #, fuzzy msgid "color for status \"popular\" (\"*\")" msgstr "kolor czasu (pasek statusu)" diff --git a/po/pt_BR.po b/po/pt_BR.po index 3dd5fee8f..e34e7c337 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-18 08:57+0200\n" +"POT-Creation-Date: 2012-08-18 11:40+0200\n" "PO-Revision-Date: 2012-08-16 12:02+0200\n" "Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7940,9 +7940,9 @@ msgstr "" #, c-format msgid "" -"%d/%d scripts (filter: %s) | Sort: %s | alt+i=install r=remove l=load " -"u=unload h=(un)hold d=show detail | Input: 'q'=close 'r'=refresh 's:x," -"y'=sort 'words'=filter '*'=reset filter" +"%d/%d scripts (filter: %s) | Sort: %s | Alt+key/input: i=install r=remove " +"l=load L=reload u=unload h=(un)hold d=show detail | Input: q=close $=refresh " +"s:x,y=sort words=filter *=reset filter" msgstr "" msgid "Scripts" @@ -7987,20 +7987,22 @@ msgid "" " popular script\n" "\n" "Keys on script buffer:\n" -" alt+i install script\n" -" alt+r remove script\n" -" alt+l load script\n" -" alt+u unload script\n" -" alt+h (un)hold script\n" +" alt+i install script\n" +" alt+r remove script\n" +" alt+l load script\n" +" alt+L reload script\n" +" alt+u unload script\n" +" alt+h (un)hold script\n" "\n" "Input allowed on script buffer:\n" -" q close buffer\n" -" r refresh buffer\n" -" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" -" s: reset sort (use default sort)\n" -" word(s) filter scripts: search word(s) in scripts (description, " +" i/r/l/L/u/h action on script (same as keys above)\n" +" q close buffer\n" +" $ refresh buffer\n" +" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" +" s: reset sort (use default sort)\n" +" word(s) filter scripts: search word(s) in scripts (description, " "tags, ...)\n" -" * remove filter\n" +" * remove filter\n" "\n" "Examples:\n" " /script search url\n" @@ -8046,6 +8048,11 @@ msgid "" "language, otherwise english version is used)" msgstr "" +msgid "" +"use keys alt+X in script buffer to do actions on scripts (alt+i = install, " +"alt+r = remove, ...); if disabled, only the input is allowed: i, r, ..." +msgstr "" + #, fuzzy msgid "color for status \"popular\" (\"*\")" msgstr "cor de texto para o tempo (barra de status)" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-18 08:57+0200\n" +"POT-Creation-Date: 2012-08-18 11:40+0200\n" "PO-Revision-Date: 2012-08-16 12:02+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7813,9 +7813,9 @@ msgstr "" #, c-format msgid "" -"%d/%d scripts (filter: %s) | Sort: %s | alt+i=install r=remove l=load " -"u=unload h=(un)hold d=show detail | Input: 'q'=close 'r'=refresh 's:x," -"y'=sort 'words'=filter '*'=reset filter" +"%d/%d scripts (filter: %s) | Sort: %s | Alt+key/input: i=install r=remove " +"l=load L=reload u=unload h=(un)hold d=show detail | Input: q=close $=refresh " +"s:x,y=sort words=filter *=reset filter" msgstr "" msgid "Scripts" @@ -7860,20 +7860,22 @@ msgid "" " popular script\n" "\n" "Keys on script buffer:\n" -" alt+i install script\n" -" alt+r remove script\n" -" alt+l load script\n" -" alt+u unload script\n" -" alt+h (un)hold script\n" +" alt+i install script\n" +" alt+r remove script\n" +" alt+l load script\n" +" alt+L reload script\n" +" alt+u unload script\n" +" alt+h (un)hold script\n" "\n" "Input allowed on script buffer:\n" -" q close buffer\n" -" r refresh buffer\n" -" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" -" s: reset sort (use default sort)\n" -" word(s) filter scripts: search word(s) in scripts (description, " +" i/r/l/L/u/h action on script (same as keys above)\n" +" q close buffer\n" +" $ refresh buffer\n" +" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" +" s: reset sort (use default sort)\n" +" word(s) filter scripts: search word(s) in scripts (description, " "tags, ...)\n" -" * remove filter\n" +" * remove filter\n" "\n" "Examples:\n" " /script search url\n" @@ -7919,6 +7921,11 @@ msgid "" "language, otherwise english version is used)" msgstr "" +msgid "" +"use keys alt+X in script buffer to do actions on scripts (alt+i = install, " +"alt+r = remove, ...); if disabled, only the input is allowed: i, r, ..." +msgstr "" + #, fuzzy msgid "color for status \"popular\" (\"*\")" msgstr "цвет строки состояния" diff --git a/po/weechat.pot b/po/weechat.pot index 4c3dd9017..e09db5793 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-08-18 08:57+0200\n" +"POT-Creation-Date: 2012-08-18 11:40+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -6867,9 +6867,9 @@ msgstr "" #, c-format msgid "" -"%d/%d scripts (filter: %s) | Sort: %s | alt+i=install r=remove l=load " -"u=unload h=(un)hold d=show detail | Input: 'q'=close 'r'=refresh 's:x," -"y'=sort 'words'=filter '*'=reset filter" +"%d/%d scripts (filter: %s) | Sort: %s | Alt+key/input: i=install r=remove " +"l=load L=reload u=unload h=(un)hold d=show detail | Input: q=close $=refresh " +"s:x,y=sort words=filter *=reset filter" msgstr "" msgid "Scripts" @@ -6913,20 +6913,22 @@ msgid "" " popular script\n" "\n" "Keys on script buffer:\n" -" alt+i install script\n" -" alt+r remove script\n" -" alt+l load script\n" -" alt+u unload script\n" -" alt+h (un)hold script\n" +" alt+i install script\n" +" alt+r remove script\n" +" alt+l load script\n" +" alt+L reload script\n" +" alt+u unload script\n" +" alt+h (un)hold script\n" "\n" "Input allowed on script buffer:\n" -" q close buffer\n" -" r refresh buffer\n" -" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" -" s: reset sort (use default sort)\n" -" word(s) filter scripts: search word(s) in scripts (description, " +" i/r/l/L/u/h action on script (same as keys above)\n" +" q close buffer\n" +" $ refresh buffer\n" +" s:x,y sort buffer using keys x and y (see /help script.look.sort)\n" +" s: reset sort (use default sort)\n" +" word(s) filter scripts: search word(s) in scripts (description, " "tags, ...)\n" -" * remove filter\n" +" * remove filter\n" "\n" "Examples:\n" " /script search url\n" @@ -6970,6 +6972,11 @@ msgid "" "language, otherwise english version is used)" msgstr "" +msgid "" +"use keys alt+X in script buffer to do actions on scripts (alt+i = install, " +"alt+r = remove, ...); if disabled, only the input is allowed: i, r, ..." +msgstr "" + msgid "color for status \"popular\" (\"*\")" msgstr "" diff --git a/src/plugins/script/script-buffer.c b/src/plugins/script/script-buffer.c index a46ee1770..3e4c501f6 100644 --- a/src/plugins/script/script-buffer.c +++ b/src/plugins/script/script-buffer.c @@ -509,9 +509,9 @@ script_buffer_refresh (int clear) { snprintf (str_title, sizeof (str_title), _("%d/%d scripts (filter: %s) | Sort: %s | " - "alt+i=install r=remove l=load u=unload h=(un)hold " - "d=show detail | Input: 'q'=close 'r'=refresh 's:x,y'=sort " - "'words'=filter '*'=reset filter"), + "Alt+key/input: i=install r=remove l=load L=reload " + "u=unload h=(un)hold d=show detail | Input: q=close " + "$=refresh s:x,y=sort words=filter *=reset filter"), script_repo_count_displayed, script_repo_count, (script_repo_filter) ? script_repo_filter : "*", @@ -701,16 +701,28 @@ int script_buffer_input_cb (void *data, struct t_gui_buffer *buffer, const char *input_data) { + char *actions[][2] = { { "l", "load" }, + { "u", "unload" }, + { "L", "reload" }, + { "i", "install" }, + { "r", "remove" }, + { "h", "hold" }, + { "d", "show" }, + { NULL, NULL } }; + char str_command[64]; + int i; + /* make C compiler happy */ (void) data; - (void) buffer; + /* close buffer */ if (strcmp (input_data, "q") == 0) { weechat_buffer_close (buffer); return WEECHAT_RC_OK; } + /* change sort keys on buffer */ if (strncmp (input_data, "s:", 2) == 0) { if (input_data[2]) @@ -720,7 +732,8 @@ script_buffer_input_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_OK; } - if (strcmp (input_data, "r") == 0) + /* refresh buffer */ + if (strcmp (input_data, "$") == 0) { script_get_loaded_scripts (); script_repo_remove_all (); @@ -729,6 +742,19 @@ script_buffer_input_cb (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_OK; } + /* execute action on a script */ + for (i = 0; actions[i][0]; i++) + { + if (strcmp (input_data, actions[i][0]) == 0) + { + snprintf (str_command, sizeof (str_command), + "/script %s", actions[i][1]); + weechat_command (buffer, str_command); + return WEECHAT_RC_OK; + } + } + + /* filter scripts with given text */ script_repo_filter_scripts (input_data); return WEECHAT_RC_OK; @@ -772,6 +798,42 @@ script_buffer_set_callbacks () } /* + * script_buffer_set_keys: set keys on script buffer + */ + +void +script_buffer_set_keys () +{ + char *keys[][2] = { { "meta-l", "load" }, + { "meta-u", "unload" }, + { "meta-L", "reload" }, + { "meta-i", "install" }, + { "meta-r", "remove" }, + { "meta-h", "hold" }, + { "meta-d", "show" }, + { NULL, NULL } }; + char str_key[64], str_command[64]; + int i; + + weechat_buffer_set (script_buffer, "key_bind_meta2-A", "/script up"); + weechat_buffer_set (script_buffer, "key_bind_meta2-B", "/script down"); + for (i = 0; keys[i][0]; i++) + { + if (weechat_config_boolean (script_config_look_use_keys)) + { + snprintf (str_key, sizeof (str_key), "key_bind_%s", keys[i][0]); + snprintf (str_command, sizeof (str_command), "/script %s", keys[i][1]); + weechat_buffer_set (script_buffer, str_key, str_command); + } + else + { + snprintf (str_key, sizeof (str_key), "key_unbind_%s", keys[i][0]); + weechat_buffer_set (script_buffer, str_key, ""); + } + } +} + +/* * script_buffer_open: open script buffer (to display list of scripts) */ @@ -790,14 +852,7 @@ script_buffer_open () weechat_buffer_set (script_buffer, "type", "free"); weechat_buffer_set (script_buffer, "title", _("Scripts")); - weechat_buffer_set (script_buffer, "key_bind_meta2-A", "/script up"); - weechat_buffer_set (script_buffer, "key_bind_meta2-B", "/script down"); - weechat_buffer_set (script_buffer, "key_bind_meta-l", "/script load"); - weechat_buffer_set (script_buffer, "key_bind_meta-u", "/script unload"); - weechat_buffer_set (script_buffer, "key_bind_meta-i", "/script install"); - weechat_buffer_set (script_buffer, "key_bind_meta-r", "/script remove"); - weechat_buffer_set (script_buffer, "key_bind_meta-h", "/script hold"); - weechat_buffer_set (script_buffer, "key_bind_meta-d", "/script show"); + script_buffer_set_keys (); weechat_buffer_set (script_buffer, "localvar_set_type", "script"); script_buffer_selected_line = 0; diff --git a/src/plugins/script/script-buffer.h b/src/plugins/script/script-buffer.h index a9a29d326..5f5b23fa7 100644 --- a/src/plugins/script/script-buffer.h +++ b/src/plugins/script/script-buffer.h @@ -39,6 +39,7 @@ extern int script_buffer_input_cb (void *data, struct t_gui_buffer *buffer, const char *input_data); extern int script_buffer_close_cb (void *data, struct t_gui_buffer *buffer); extern void script_buffer_set_callbacks (); +extern void script_buffer_set_keys (); extern void script_buffer_open (); #endif /* __WEECHAT_SCRIPT_BUFFER_H */ diff --git a/src/plugins/script/script-command.c b/src/plugins/script/script-command.c index 0ef3fd245..c1e369415 100644 --- a/src/plugins/script/script-command.c +++ b/src/plugins/script/script-command.c @@ -256,20 +256,22 @@ script_command_init () " | installed\n" " popular script\n\n" "Keys on script buffer:\n" - " alt+i install script\n" - " alt+r remove script\n" - " alt+l load script\n" - " alt+u unload script\n" - " alt+h (un)hold script\n\n" + " alt+i install script\n" + " alt+r remove script\n" + " alt+l load script\n" + " alt+L reload script\n" + " alt+u unload script\n" + " alt+h (un)hold script\n\n" "Input allowed on script buffer:\n" - " q close buffer\n" - " r refresh buffer\n" - " s:x,y sort buffer using keys x and y (see /help " + " i/r/l/L/u/h action on script (same as keys above)\n" + " q close buffer\n" + " $ refresh buffer\n" + " s:x,y sort buffer using keys x and y (see /help " "script.look.sort)\n" - " s: reset sort (use default sort)\n" - " word(s) filter scripts: search word(s) in " + " s: reset sort (use default sort)\n" + " word(s) filter scripts: search word(s) in " "scripts (description, tags, ...)\n" - " * remove filter\n\n" + " * remove filter\n\n" "Examples:\n" " /script search url\n" " /script install iset.pl buffers.pl\n" diff --git a/src/plugins/script/script-config.c b/src/plugins/script/script-config.c index 7de9d1440..a8300f1b9 100644 --- a/src/plugins/script/script-config.c +++ b/src/plugins/script/script-config.c @@ -42,6 +42,7 @@ struct t_config_section *script_config_section_scripts = NULL; struct t_config_option *script_config_look_columns; struct t_config_option *script_config_look_sort; struct t_config_option *script_config_look_translate_description; +struct t_config_option *script_config_look_use_keys; /* script config, color section */ @@ -192,6 +193,22 @@ script_config_reload_scripts_cb (void *data, struct t_config_option *option) } /* + * script_config_change_use_keys_cb: callback called when option "use_keys" is + * changed + */ + +void +script_config_change_use_keys_cb (void *data, struct t_config_option *option) +{ + /* make C compiler happy */ + (void) data; + (void) option; + + if (script_buffer) + script_buffer_set_keys (); +} + +/* * script_config_change_hold_cb: callback called when list of scripts to "hold" * is changed */ @@ -359,6 +376,14 @@ script_config_init () "your language, otherwise english version is used)"), NULL, 0, 0, "on", NULL, 0, NULL, NULL, &script_config_reload_scripts_cb, NULL, NULL, NULL); + script_config_look_use_keys = weechat_config_new_option ( + script_config_file, ptr_section, + "use_keys", "boolean", + N_("use keys alt+X in script buffer to do actions on scripts (alt+i = " + "install, alt+r = remove, ...); if disabled, only the input is " + "allowed: i, r, ..."), + NULL, 0, 0, "on", NULL, 0, + NULL, NULL, &script_config_change_use_keys_cb, NULL, NULL, NULL); /* color */ ptr_section = weechat_config_new_section (script_config_file, "color", diff --git a/src/plugins/script/script-config.h b/src/plugins/script/script-config.h index ca9f5aaf8..811684234 100644 --- a/src/plugins/script/script-config.h +++ b/src/plugins/script/script-config.h @@ -27,6 +27,7 @@ struct t_repo_script; extern struct t_config_option *script_config_look_columns; extern struct t_config_option *script_config_look_sort; extern struct t_config_option *script_config_look_translate_description; +extern struct t_config_option *script_config_look_use_keys; extern struct t_config_option *script_config_color_status_popular; extern struct t_config_option *script_config_color_status_installed; |