summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2012-08-20 13:36:29 +0200
committerSebastien Helleu <flashcode@flashtux.org>2012-08-20 13:36:29 +0200
commit2944adc954c6dc3267ec8a8ac39334a0dc53b684 (patch)
treee7a2201c9ebba5d6b3f229fba6ea2117a93d987d
parent08228492e6a848d54226ef0a9d29368ba561fa29 (diff)
downloadweechat-2944adc954c6dc3267ec8a8ac39334a0dc53b684.zip
script: add focus info for mouse on script buffer, add two default mouse bindings: left button = select line, right button = install/remove script
-rw-r--r--doc/de/autogen/user/script_commands.txt5
-rw-r--r--doc/de/weechat_user.de.txt4
-rw-r--r--doc/en/autogen/user/script_commands.txt5
-rw-r--r--doc/en/weechat_user.en.txt2
-rw-r--r--doc/fr/autogen/user/script_commands.txt11
-rw-r--r--doc/fr/weechat_user.fr.txt2
-rw-r--r--doc/it/autogen/user/script_commands.txt5
-rw-r--r--doc/it/weechat_user.it.txt4
-rw-r--r--doc/ja/autogen/user/script_commands.txt5
-rw-r--r--doc/ja/weechat_user.ja.txt4
-rw-r--r--po/cs.po10
-rw-r--r--po/de.po10
-rw-r--r--po/es.po10
-rw-r--r--po/fr.po26
-rw-r--r--po/hu.po10
-rw-r--r--po/it.po10
-rw-r--r--po/ja.po10
-rw-r--r--po/pl.po10
-rw-r--r--po/pt_BR.po10
-rw-r--r--po/ru.po10
-rw-r--r--po/weechat.pot10
-rw-r--r--src/gui/curses/gui-curses-key.c2
-rw-r--r--src/plugins/script/script-action.c65
-rw-r--r--src/plugins/script/script-buffer.c18
-rw-r--r--src/plugins/script/script-command.c48
-rw-r--r--src/plugins/script/script.c79
26 files changed, 329 insertions, 56 deletions
diff --git a/doc/de/autogen/user/script_commands.txt b/doc/de/autogen/user/script_commands.txt
index d74987f0a..11133d35b 100644
--- a/doc/de/autogen/user/script_commands.txt
+++ b/doc/de/autogen/user/script_commands.txt
@@ -50,6 +50,11 @@ Input allowed on script buffer:
word(s) filter scripts: search word(s) in scripts (description, tags, ...)
* remove filter
+Mouse actions on script buffer:
+ wheel scroll list
+ left button select script
+ right button install/remove script
+
Examples:
/script search url
/script install iset.pl buffers.pl
diff --git a/doc/de/weechat_user.de.txt b/doc/de/weechat_user.de.txt
index f2c5026e7..641e06189 100644
--- a/doc/de/weechat_user.de.txt
+++ b/doc/de/weechat_user.de.txt
@@ -777,7 +777,7 @@ Tasten für "mouse"-Kontext
Diese Tasten werden im Kontext "mouse" verwendet, wenn eine Mausfunktion genutzt worden ist.
-// TRANSLATION MISSING (4)
+// TRANSLATION MISSING (6)
[width="100%",cols="^.^3,^.^3,^.^3,.^10,.^8l",options="header"]
|========================================
| Maustaste ^(1)^ | Mausgeste | Bereich | Beschreibung | Befehl
@@ -786,6 +786,8 @@ Diese Tasten werden im Kontext "mouse" verwendet, wenn eine Mausfunktion genutzt
| ◾◽◽ | rechts | Chat | zum nächsten Buffer springen | /window ${_window_number};/buffer +1
| ◾◽◽ | links(lang) | Chat | Switch to first buffer | /window ${_window_number};/buffer 1
| ◾◽◽ | rechts(lang) | Chat | wechselt zum letzten Buffer | /window ${_window_number};/input jump_last_buffer
+| ◾◽◽ | - | chat (script buffer) | Select line in script buffer | /script go ${_chat_line_y}
+| ◽◽◾ | - | chat (script buffer) | Install/remove script | /script go ${_chat_line_y};/script installremove ${script_name_with_extension}
| ⇑ | - | Chat | einige Zeilen im Verlaufsspeicher des Buffer nach oben blättern | /window scroll_up -window ${_window_number}
| ⇓ | - | Chat | einige Zeilen im Verlaufsspeicher des Buffer nach unten blättern | /window scroll_down -window ${_window_number}
| ⇑ | - | chat (script buffer) | Move 5 lines up in script buffer | /script up 5
diff --git a/doc/en/autogen/user/script_commands.txt b/doc/en/autogen/user/script_commands.txt
index d74987f0a..11133d35b 100644
--- a/doc/en/autogen/user/script_commands.txt
+++ b/doc/en/autogen/user/script_commands.txt
@@ -50,6 +50,11 @@ Input allowed on script buffer:
word(s) filter scripts: search word(s) in scripts (description, tags, ...)
* remove filter
+Mouse actions on script buffer:
+ wheel scroll list
+ left button select script
+ right button install/remove script
+
Examples:
/script search url
/script install iset.pl buffers.pl
diff --git a/doc/en/weechat_user.en.txt b/doc/en/weechat_user.en.txt
index 3cd416a7f..7405ba99a 100644
--- a/doc/en/weechat_user.en.txt
+++ b/doc/en/weechat_user.en.txt
@@ -776,6 +776,8 @@ These keys are used in context "mouse", namely when a mouse event occurs.
| ◾◽◽ | right | chat | Switch to next buffer | /window ${_window_number};/buffer +1
| ◾◽◽ | left (long) | chat | Switch to first buffer | /window ${_window_number};/buffer 1
| ◾◽◽ | right (long) | chat | Switch to last buffer | /window ${_window_number};/input jump_last_buffer
+| ◾◽◽ | - | chat (script buffer) | Select line in script buffer | /script go ${_chat_line_y}
+| ◽◽◾ | - | chat (script buffer) | Install/remove script | /script go ${_chat_line_y};/script installremove ${script_name_with_extension}
| ⇑ | - | chat | Scroll up a few lines in buffer history | /window scroll_up -window ${_window_number}
| ⇓ | - | chat | Scroll down a few lines in buffer history | /window scroll_down -window ${_window_number}
| ⇑ | - | chat (script buffer) | Move 5 lines up in script buffer | /script up 5
diff --git a/doc/fr/autogen/user/script_commands.txt b/doc/fr/autogen/user/script_commands.txt
index a7d3f19c6..1f6610802 100644
--- a/doc/fr/autogen/user/script_commands.txt
+++ b/doc/fr/autogen/user/script_commands.txt
@@ -23,7 +23,7 @@
Sans paramètre, cette commande ouvre un tampon avec la liste des scripts.
-Sur le tampon des scripts, les statuts pour chaque script sont :
+Sur le tampon des scripts, les statuts pour chaque script sont:
* i a H r N
| | | | | |
| | | | | obsolète (nouvelle version disponible)
@@ -33,7 +33,7 @@ Sur le tampon des scripts, les statuts pour chaque script sont :
| installé
script populaire
-Les touches sur le tampon des scripts :
+Les touches sur le tampon des scripts:
alt+i installer le script
alt+r supprimer le script
alt+l charger le script
@@ -41,7 +41,7 @@ Les touches sur le tampon des scripts :
alt+u décharger le script
alt+h (dé)figer le script
-Entrée autorisée sur le tampon des scripts :
+Entrée autorisée sur le tampon des scripts:
i/r/l/L/u/h action sur le script (identique aux touches ci-dessus)
q fermer le tampon
$ rafraîchir le tampon
@@ -50,6 +50,11 @@ Entrée autorisée sur le tampon des scripts :
word(s) filtrer les scripts: recherche du/des mot(s) dans les scripts (description, étiquettes, ...)
* supprimer le filtre
+Actions de la souris sur le tampon des scripts:
+ roulette faire défiler la liste
+ bouton gauche sélectionner le script
+ bouton droit installer/supprimer le script
+
Exemples:
/script search url
/script install iset.pl buffers.pl
diff --git a/doc/fr/weechat_user.fr.txt b/doc/fr/weechat_user.fr.txt
index d94f6e957..907559dd2 100644
--- a/doc/fr/weechat_user.fr.txt
+++ b/doc/fr/weechat_user.fr.txt
@@ -791,6 +791,8 @@ Ces touches sont utilisées dans le contexte "mouse", c'est-à-dire lorsqu'un
| ◾◽◽ | right | chat | Aller au tampon suivant | /window ${_window_number};/buffer +1
| ◾◽◽ | left (long) | chat | Aller au premier tampon | /window ${_window_number};/buffer 1
| ◾◽◽ | right (long) | chat | Aller au dernier tampon | /window ${_window_number};/input jump_last_buffer
+| ◾◽◽ | - | chat (tampon script) | Sélectionner la ligne dans le tampon script | /script go ${_chat_line_y}
+| ◽◽◾ | - | chat (tampon script) | Installer/supprimer un script | /script go ${_chat_line_y};/script installremove ${script_name_with_extension}
| ⇑ | - | chat | Monter de quelques lignes dans l'historique du tampon | /window scroll_up -window ${_window_number}
| ⇓ | - | chat | Descendre de quelques lignes dans l'historique du tampon | /window scroll_down -window ${_window_number}
| ⇑ | - | chat (tampon script) | Monter de 5 lignes dans le tampon script | /script up 5
diff --git a/doc/it/autogen/user/script_commands.txt b/doc/it/autogen/user/script_commands.txt
index d74987f0a..11133d35b 100644
--- a/doc/it/autogen/user/script_commands.txt
+++ b/doc/it/autogen/user/script_commands.txt
@@ -50,6 +50,11 @@ Input allowed on script buffer:
word(s) filter scripts: search word(s) in scripts (description, tags, ...)
* remove filter
+Mouse actions on script buffer:
+ wheel scroll list
+ left button select script
+ right button install/remove script
+
Examples:
/script search url
/script install iset.pl buffers.pl
diff --git a/doc/it/weechat_user.it.txt b/doc/it/weechat_user.it.txt
index 3259ca925..e9fc4cba8 100644
--- a/doc/it/weechat_user.it.txt
+++ b/doc/it/weechat_user.it.txt
@@ -786,7 +786,7 @@ Tasti per il contesto "mouse"
Questi tasti sono usati nel contesto "mouse", ovvero quando si verifica un
evento del mouse.
-// TRANSLATION MISSING (4)
+// TRANSLATION MISSING (6)
[width="100%",cols="^.^3,^.^3,^.^3,.^10,.^8l",options="header"]
|========================================
| Tasto ^(1)^ | Azione | Zona | Descrizione | Comando
@@ -795,6 +795,8 @@ evento del mouse.
| ◾◽◽ | destra | chat | Passa al buffer successivo | /window ${_window_number};/buffer +1
| ◾◽◽ | sinistra (lungo) | chat | Switch to first buffer | /window ${_window_number};/buffer 1
| ◾◽◽ | destra (lungo) | chat | Passa all'ultimo buffer | /window ${_window_number};/input jump_last_buffer
+| ◾◽◽ | - | chat (script buffer) | Select line in script buffer | /script go ${_chat_line_y}
+| ◽◽◾ | - | chat (script buffer) | Install/remove script | /script go ${_chat_line_y};/script installremove ${script_name_with_extension}
| ⇑ | - | chat | Scorre di qualche riga in alto nella cronologia del buffer | /window scroll_up -window ${_window_number}
| ⇓ | - | chat | Scorre di qualche riga in basso nella cronologia del buffer | /window scroll_down -window ${_window_number}
| ⇑ | - | chat (script buffer) | Move 5 lines up in script buffer | /script up 5
diff --git a/doc/ja/autogen/user/script_commands.txt b/doc/ja/autogen/user/script_commands.txt
index d74987f0a..11133d35b 100644
--- a/doc/ja/autogen/user/script_commands.txt
+++ b/doc/ja/autogen/user/script_commands.txt
@@ -50,6 +50,11 @@ Input allowed on script buffer:
word(s) filter scripts: search word(s) in scripts (description, tags, ...)
* remove filter
+Mouse actions on script buffer:
+ wheel scroll list
+ left button select script
+ right button install/remove script
+
Examples:
/script search url
/script install iset.pl buffers.pl
diff --git a/doc/ja/weechat_user.ja.txt b/doc/ja/weechat_user.ja.txt
index 12d8d498c..549d57cb2 100644
--- a/doc/ja/weechat_user.ja.txt
+++ b/doc/ja/weechat_user.ja.txt
@@ -743,7 +743,7 @@ irc サーバ "freenode" に含まれる全てのバッファに対して設定
以下のキーは "マウス" モード (マウスイベントが発生したとき) でのみ有効です。
-// TRANSLATION MISSING (4)
+// TRANSLATION MISSING (6)
[width="100%",cols="^.^3,^.^3,^.^3,.^10,.^8l",options="header"]
|========================================
| ボタン^(1)^ | ジェスチャー| エリア| 説明 | コマンド
@@ -752,6 +752,8 @@ irc サーバ "freenode" に含まれる全てのバッファに対して設定
| ◾◽◽ | 右 | チャット | 次のバッファに移動 | /window ${_window_number};/buffer +1
| ◾◽◽ | 左 (長く) | チャット | 最初のバッファに移動 | /window ${_window_number};/buffer 1
| ◾◽◽ | 右 (長く) | チャット | 最後のバッファに移動 | /window ${_window_number};/input jump_last_buffer
+| ◾◽◽ | - | chat (script buffer) | Select line in script buffer | /script go ${_chat_line_y}
+| ◽◽◾ | - | chat (script buffer) | Install/remove script | /script go ${_chat_line_y};/script installremove ${script_name_with_extension}
| ⇑ | - | チャット | バッファ履歴を上方向にスクロール | /window scroll_up -window ${_window_number}
| ⇓ | - | チャット | バッファ履歴を下方向にスクロール | /window scroll_down -window ${_window_number}
| ⇑ | - | chat (script buffer) | Move 5 lines up in script buffer | /script up 5
diff --git a/po/cs.po b/po/cs.po
index f4c98fc40..3bb93a703 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -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 11:40+0200\n"
+"POT-Creation-Date: 2012-08-20 13:33+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"
@@ -8311,7 +8311,8 @@ msgstr ""
msgid ""
"%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"
+"s:x,y=sort words=filter *=reset filter | Mouse: left=select right=install/"
+"remove"
msgstr ""
msgid "Scripts"
@@ -8373,6 +8374,11 @@ msgid ""
"tags, ...)\n"
" * remove filter\n"
"\n"
+"Mouse actions on script buffer:\n"
+" wheel scroll list\n"
+" left button select script\n"
+" right button install/remove script\n"
+"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
diff --git a/po/de.po b/po/de.po
index 30252567b..f3cf7d69c 100644
--- a/po/de.po
+++ b/po/de.po
@@ -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 11:40+0200\n"
+"POT-Creation-Date: 2012-08-20 13:33+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"
@@ -8885,7 +8885,8 @@ msgstr ""
msgid ""
"%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"
+"s:x,y=sort words=filter *=reset filter | Mouse: left=select right=install/"
+"remove"
msgstr ""
msgid "Scripts"
@@ -8947,6 +8948,11 @@ msgid ""
"tags, ...)\n"
" * remove filter\n"
"\n"
+"Mouse actions on script buffer:\n"
+" wheel scroll list\n"
+" left button select script\n"
+" right button install/remove script\n"
+"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
diff --git a/po/es.po b/po/es.po
index 40b581acd..d540c5e36 100644
--- a/po/es.po
+++ b/po/es.po
@@ -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 11:40+0200\n"
+"POT-Creation-Date: 2012-08-20 13:33+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"
@@ -8584,7 +8584,8 @@ msgstr ""
msgid ""
"%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"
+"s:x,y=sort words=filter *=reset filter | Mouse: left=select right=install/"
+"remove"
msgstr ""
msgid "Scripts"
@@ -8646,6 +8647,11 @@ msgid ""
"tags, ...)\n"
" * remove filter\n"
"\n"
+"Mouse actions on script buffer:\n"
+" wheel scroll list\n"
+" left button select script\n"
+" right button install/remove script\n"
+"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
diff --git a/po/fr.po b/po/fr.po
index 9b6d9ede8..f5689f166 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -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-20 08:57+0200\n"
-"PO-Revision-Date: 2012-08-20 09:44+0200\n"
+"POT-Creation-Date: 2012-08-20 13:33+0200\n"
+"PO-Revision-Date: 2012-08-20 13:33+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@@ -8657,11 +8657,13 @@ msgstr "alt+d=retour à la liste"
msgid ""
"%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"
+"s:x,y=sort words=filter *=reset filter | Mouse: left=select right=install/"
+"remove"
msgstr ""
"%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 $=rafraîchir s:x,y=trier words=filtrer *=réinit filtre"
+"| Entrée: q=fermer $=rafraîchir s:x,y=trier words=filtrer *=réinit filtre | "
+"Souris: gauche=sélectionner droit=installer/supprimer"
msgid "Scripts"
msgstr "Scripts"
@@ -8724,6 +8726,11 @@ msgid ""
"tags, ...)\n"
" * remove filter\n"
"\n"
+"Mouse actions on script buffer:\n"
+" wheel scroll list\n"
+" left button select script\n"
+" right button install/remove script\n"
+"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
@@ -8749,7 +8756,7 @@ msgstr ""
"\n"
"Sans paramètre, cette commande ouvre un tampon avec la liste des scripts.\n"
"\n"
-"Sur le tampon des scripts, les statuts pour chaque script sont :\n"
+"Sur le tampon des scripts, les statuts pour chaque script sont:\n"
" * i a H r N\n"
" | | | | | |\n"
" | | | | | obsolète (nouvelle version disponible)\n"
@@ -8759,7 +8766,7 @@ msgstr ""
" | installé\n"
" script populaire\n"
"\n"
-"Les touches sur le tampon des scripts :\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"
@@ -8767,7 +8774,7 @@ msgstr ""
" 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"
+"Entrée autorisée sur le tampon des scripts:\n"
" 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"
@@ -8778,6 +8785,11 @@ msgstr ""
"(description, étiquettes, ...)\n"
" * supprimer le filtre\n"
"\n"
+"Actions de la souris sur le tampon des scripts:\n"
+" roulette faire défiler la liste\n"
+" bouton gauche sélectionner le script\n"
+" bouton droit installer/supprimer le script\n"
+"\n"
"Exemples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
diff --git a/po/hu.po b/po/hu.po
index f08320d63..a664d8c8c 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -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 11:40+0200\n"
+"POT-Creation-Date: 2012-08-20 13:33+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"
@@ -7792,7 +7792,8 @@ msgstr ""
msgid ""
"%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"
+"s:x,y=sort words=filter *=reset filter | Mouse: left=select right=install/"
+"remove"
msgstr ""
msgid "Scripts"
@@ -7854,6 +7855,11 @@ msgid ""
"tags, ...)\n"
" * remove filter\n"
"\n"
+"Mouse actions on script buffer:\n"
+" wheel scroll list\n"
+" left button select script\n"
+" right button install/remove script\n"
+"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
diff --git a/po/it.po b/po/it.po
index dd7502768..adf94702a 100644
--- a/po/it.po
+++ b/po/it.po
@@ -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 11:40+0200\n"
+"POT-Creation-Date: 2012-08-20 13:33+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"
@@ -8574,7 +8574,8 @@ msgstr ""
msgid ""
"%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"
+"s:x,y=sort words=filter *=reset filter | Mouse: left=select right=install/"
+"remove"
msgstr ""
msgid "Scripts"
@@ -8636,6 +8637,11 @@ msgid ""
"tags, ...)\n"
" * remove filter\n"
"\n"
+"Mouse actions on script buffer:\n"
+" wheel scroll list\n"
+" left button select script\n"
+" right button install/remove script\n"
+"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
diff --git a/po/ja.po b/po/ja.po
index 0a9985982..23137ccc6 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -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 11:40+0200\n"
+"POT-Creation-Date: 2012-08-20 13:33+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"
@@ -8373,7 +8373,8 @@ msgstr ""
msgid ""
"%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"
+"s:x,y=sort words=filter *=reset filter | Mouse: left=select right=install/"
+"remove"
msgstr ""
msgid "Scripts"
@@ -8435,6 +8436,11 @@ msgid ""
"tags, ...)\n"
" * remove filter\n"
"\n"
+"Mouse actions on script buffer:\n"
+" wheel scroll list\n"
+" left button select script\n"
+" right button install/remove script\n"
+"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
diff --git a/po/pl.po b/po/pl.po
index cd0e52d42..941b7baa7 100644
--- a/po/pl.po
+++ b/po/pl.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 11:40+0200\n"
+"POT-Creation-Date: 2012-08-20 13:33+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"
@@ -8507,7 +8507,8 @@ msgstr ""
msgid ""
"%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"
+"s:x,y=sort words=filter *=reset filter | Mouse: left=select right=install/"
+"remove"
msgstr ""
msgid "Scripts"
@@ -8569,6 +8570,11 @@ msgid ""
"tags, ...)\n"
" * remove filter\n"
"\n"
+"Mouse actions on script buffer:\n"
+" wheel scroll list\n"
+" left button select script\n"
+" right button install/remove script\n"
+"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index e34e7c337..e3a109ee6 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 11:40+0200\n"
+"POT-Creation-Date: 2012-08-20 13:33+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"
@@ -7942,7 +7942,8 @@ msgstr ""
msgid ""
"%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"
+"s:x,y=sort words=filter *=reset filter | Mouse: left=select right=install/"
+"remove"
msgstr ""
msgid "Scripts"
@@ -8004,6 +8005,11 @@ msgid ""
"tags, ...)\n"
" * remove filter\n"
"\n"
+"Mouse actions on script buffer:\n"
+" wheel scroll list\n"
+" left button select script\n"
+" right button install/remove script\n"
+"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
diff --git a/po/ru.po b/po/ru.po
index ae6ecef45..7afc27c5c 100644
--- a/po/ru.po
+++ b/po/ru.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 11:40+0200\n"
+"POT-Creation-Date: 2012-08-20 13:33+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"
@@ -7815,7 +7815,8 @@ msgstr ""
msgid ""
"%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"
+"s:x,y=sort words=filter *=reset filter | Mouse: left=select right=install/"
+"remove"
msgstr ""
msgid "Scripts"
@@ -7877,6 +7878,11 @@ msgid ""
"tags, ...)\n"
" * remove filter\n"
"\n"
+"Mouse actions on script buffer:\n"
+" wheel scroll list\n"
+" left button select script\n"
+" right button install/remove script\n"
+"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
diff --git a/po/weechat.pot b/po/weechat.pot
index e09db5793..bc3dd3186 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 11:40+0200\n"
+"POT-Creation-Date: 2012-08-20 13:33+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"
@@ -6869,7 +6869,8 @@ msgstr ""
msgid ""
"%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"
+"s:x,y=sort words=filter *=reset filter | Mouse: left=select right=install/"
+"remove"
msgstr ""
msgid "Scripts"
@@ -6930,6 +6931,11 @@ msgid ""
"tags, ...)\n"
" * remove filter\n"
"\n"
+"Mouse actions on script buffer:\n"
+" wheel scroll list\n"
+" left button select script\n"
+" right button install/remove script\n"
+"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
diff --git a/src/gui/curses/gui-curses-key.c b/src/gui/curses/gui-curses-key.c
index cf32ff746..50a04c4c9 100644
--- a/src/gui/curses/gui-curses-key.c
+++ b/src/gui/curses/gui-curses-key.c
@@ -260,6 +260,8 @@ gui_key_default_bindings (int context)
{
/* mouse events on chat area */
BIND("@chat:button1", "/window ${_window_number}");
+ BIND("@chat(script.scripts):button1", "/script go ${_chat_line_y}");
+ BIND("@chat(script.scripts):button2", "/script go ${_chat_line_y};/script installremove ${script_name_with_extension}");
BIND("@chat:button1-gesture-left", "/window ${_window_number};/buffer -1");
BIND("@chat:button1-gesture-right", "/window ${_window_number};/buffer +1");
BIND("@chat:button1-gesture-left-long", "/window ${_window_number};/buffer 1");
diff --git a/src/plugins/script/script-action.c b/src/plugins/script/script-action.c
index 14797e481..096d05762 100644
--- a/src/plugins/script/script-action.c
+++ b/src/plugins/script/script-action.c
@@ -471,7 +471,7 @@ script_action_install ()
*/
void
-script_action_remove (const char *name)
+script_action_remove (const char *name, int quiet)
{
struct t_repo_script *ptr_script;
char str_signal[256];
@@ -481,15 +481,21 @@ script_action_remove (const char *name)
{
if (!(ptr_script->status & SCRIPT_STATUS_INSTALLED))
{
- weechat_printf (NULL,
- _("%s: script \"%s\" is not installed"),
- SCRIPT_PLUGIN_NAME, name);
+ if (!quiet)
+ {
+ weechat_printf (NULL,
+ _("%s: script \"%s\" is not installed"),
+ SCRIPT_PLUGIN_NAME, name);
+ }
}
else if (ptr_script->status & SCRIPT_STATUS_HELD)
{
- weechat_printf (NULL,
- _("%s: script \"%s\" is held"),
- SCRIPT_PLUGIN_NAME, name);
+ if (!quiet)
+ {
+ weechat_printf (NULL,
+ _("%s: script \"%s\" is held"),
+ SCRIPT_PLUGIN_NAME, name);
+ }
}
else
{
@@ -503,9 +509,12 @@ script_action_remove (const char *name)
}
else
{
- weechat_printf (NULL,
- _("%s: script \"%s\" not found"),
- SCRIPT_PLUGIN_NAME, name);
+ if (!quiet)
+ {
+ weechat_printf (NULL,
+ _("%s: script \"%s\" not found"),
+ SCRIPT_PLUGIN_NAME, name);
+ }
}
}
@@ -714,8 +723,42 @@ script_action_run ()
{
for (j = 1; j < argc; j++)
{
- script_action_remove (argv[j]);
+ script_action_remove (argv[j], quiet);
+ }
+ }
+ else if (weechat_strcasecmp (argv[0], "installremove") == 0)
+ {
+ script_found = 0;
+ for (j = 1; j < argc; j++)
+ {
+ ptr_script = script_repo_search_by_name_ext (argv[j]);
+ if (ptr_script)
+ {
+ if (ptr_script->status & SCRIPT_STATUS_HELD)
+ {
+ weechat_printf (NULL,
+ _("%s: script \"%s\" is held"),
+ SCRIPT_PLUGIN_NAME, argv[j]);
+ }
+ else if (ptr_script->status & SCRIPT_STATUS_INSTALLED)
+ {
+ script_action_remove (argv[j], quiet);
+ }
+ else
+ {
+ script_found++;
+ ptr_script->install_order = script_found;
+ }
+ }
+ else
+ {
+ weechat_printf (NULL,
+ _("%s: script \"%s\" not found"),
+ SCRIPT_PLUGIN_NAME, argv[j]);
+ }
}
+ if (script_found)
+ script_action_install ();
}
else if (weechat_strcasecmp (argv[0], "hold") == 0)
{
diff --git a/src/plugins/script/script-buffer.c b/src/plugins/script/script-buffer.c
index 3e4c501f6..8f9e95fd2 100644
--- a/src/plugins/script/script-buffer.c
+++ b/src/plugins/script/script-buffer.c
@@ -511,7 +511,8 @@ script_buffer_refresh (int clear)
_("%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"),
+ "$=refresh s:x,y=sort words=filter *=reset filter | "
+ "Mouse: left=select right=install/remove"),
script_repo_count_displayed,
script_repo_count,
(script_repo_filter) ? script_repo_filter : "*",
@@ -549,13 +550,16 @@ script_buffer_set_current_line (int line)
{
int old_line;
- old_line = script_buffer_selected_line;
- script_buffer_selected_line = line;
+ if ((line >= 0) && (line < script_repo_count_displayed))
+ {
+ old_line = script_buffer_selected_line;
+ script_buffer_selected_line = line;
- script_buffer_display_line_script (old_line,
- script_repo_search_displayed_by_number (old_line));
- script_buffer_display_line_script (script_buffer_selected_line,
- script_repo_search_displayed_by_number (script_buffer_selected_line));
+ script_buffer_display_line_script (old_line,
+ script_repo_search_displayed_by_number (old_line));
+ script_buffer_display_line_script (script_buffer_selected_line,
+ script_repo_search_displayed_by_number (script_buffer_selected_line));
+ }
}
/*
diff --git a/src/plugins/script/script-command.c b/src/plugins/script/script-command.c
index c1e369415..822de2a74 100644
--- a/src/plugins/script/script-command.c
+++ b/src/plugins/script/script-command.c
@@ -40,15 +40,34 @@
void
script_command_action (struct t_gui_buffer *buffer, const char *action,
- const char *action_with_args, int need_repository)
+ const char *arguments, int need_repository)
{
struct t_repo_script *ptr_script;
char str_action[4096];
+ long value;
+ char *error;
- if (action_with_args)
+ if (arguments)
{
/* action with arguments on command line */
- script_action_schedule (action_with_args, need_repository, 0);
+ error = NULL;
+ value = strtol (arguments, &error, 10);
+ if (error && !error[0])
+ {
+ ptr_script = script_repo_search_displayed_by_number (value);
+ if (ptr_script)
+ {
+ snprintf (str_action, sizeof (str_action),
+ "%s %s", action, ptr_script->name_with_extension);
+ script_action_schedule (str_action, need_repository, 0);
+ }
+ }
+ else
+ {
+ snprintf (str_action, sizeof (str_action),
+ "%s %s", action, arguments);
+ script_action_schedule (str_action, need_repository, 0);
+ }
}
else if (script_buffer && (buffer == script_buffer))
{
@@ -102,6 +121,20 @@ script_command_script (void *data, struct t_gui_buffer *buffer, int argc,
return WEECHAT_RC_OK;
}
+ if (weechat_strcasecmp (argv[1], "go") == 0)
+ {
+ if ((argc > 2) && script_buffer && !script_buffer_detail_script)
+ {
+ error = NULL;
+ value = strtol (argv[2], &error, 10);
+ if (error && !error[0])
+ {
+ script_buffer_set_current_line (value);
+ }
+ }
+ return WEECHAT_RC_OK;
+ }
+
if (weechat_strcasecmp (argv[1], "search") == 0)
{
if (repo_scripts)
@@ -124,19 +157,20 @@ script_command_script (void *data, struct t_gui_buffer *buffer, int argc,
{
script_command_action (buffer,
argv[1],
- (argc > 2) ? argv_eol[1] : NULL,
+ (argc > 2) ? argv_eol[2] : NULL,
0);
return WEECHAT_RC_OK;
}
if ((weechat_strcasecmp (argv[1], "install") == 0)
|| (weechat_strcasecmp (argv[1], "remove") == 0)
+ || (weechat_strcasecmp (argv[1], "installremove") == 0)
|| (weechat_strcasecmp (argv[1], "hold") == 0)
|| (weechat_strcasecmp (argv[1], "show") == 0))
{
script_command_action (buffer,
argv[1],
- (argc > 2) ? argv_eol[1] : NULL,
+ (argc > 2) ? argv_eol[2] : NULL,
1);
return WEECHAT_RC_OK;
}
@@ -272,6 +306,10 @@ script_command_init ()
" word(s) filter scripts: search word(s) in "
"scripts (description, tags, ...)\n"
" * remove filter\n\n"
+ "Mouse actions on script buffer:\n"
+ " wheel scroll list\n"
+ " left button select script\n"
+ " right button install/remove script\n\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
diff --git a/src/plugins/script/script.c b/src/plugins/script/script.c
index a52f9d670..ea2f3dfc6 100644
--- a/src/plugins/script/script.c
+++ b/src/plugins/script/script.c
@@ -222,6 +222,83 @@ script_signal_script_cb (void *data, const char *signal, const char *type_data,
}
/*
+ * script_focus_chat_cb: callback called when a mouse action occurs in chat area
+ */
+
+struct t_hashtable *
+script_focus_chat_cb (void *data, struct t_hashtable *info)
+{
+ const char *buffer;
+ int rc;
+ long unsigned int value;
+ struct t_gui_buffer *ptr_buffer;
+ long x;
+ char *error, str_date[64];
+ struct t_repo_script *ptr_script;
+ struct tm *tm;
+
+ /* make C compiler happy */
+ (void) data;
+
+ if (!script_buffer)
+ return info;
+
+ buffer = weechat_hashtable_get (info, "_buffer");
+ if (!buffer)
+ return info;
+
+ rc = sscanf (buffer, "%lx", &value);
+ if ((rc == EOF) || (rc == 0))
+ return info;
+
+ ptr_buffer = (struct t_gui_buffer *)value;
+
+ if (!ptr_buffer || (ptr_buffer != script_buffer))
+ return info;
+
+ if (script_buffer_detail_script)
+ ptr_script = script_buffer_detail_script;
+ else
+ {
+ error = NULL;
+ x = strtol (weechat_hashtable_get (info, "_chat_line_y"), &error, 10);
+ if (!error || error[0])
+ return info;
+
+ if (x < 0)
+ return info;
+
+ ptr_script = script_repo_search_displayed_by_number (x);
+ if (!ptr_script)
+ return info;
+ }
+
+ weechat_hashtable_set (info, "script_name", ptr_script->name);
+ weechat_hashtable_set (info, "script_name_with_extension", ptr_script->name_with_extension);
+ weechat_hashtable_set (info, "script_language", script_language[ptr_script->language]);
+ weechat_hashtable_set (info, "script_author",ptr_script->author);
+ weechat_hashtable_set (info, "script_mail", ptr_script->mail);
+ weechat_hashtable_set (info, "script_version", ptr_script->version);
+ weechat_hashtable_set (info, "script_license", ptr_script->license);
+ weechat_hashtable_set (info, "script_description", ptr_script->description);
+ weechat_hashtable_set (info, "script_tags", ptr_script->tags);
+ weechat_hashtable_set (info, "script_requirements", ptr_script->requirements);
+ weechat_hashtable_set (info, "script_min_weechat", ptr_script->min_weechat);
+ weechat_hashtable_set (info, "script_max_weechat", ptr_script->max_weechat);
+ weechat_hashtable_set (info, "script_md5sum", ptr_script->md5sum);
+ weechat_hashtable_set (info, "script_url", ptr_script->url);
+ tm = localtime (&ptr_script->date_added);
+ strftime (str_date, sizeof (str_date), "%Y-%m-%d %H:%M:%S", tm);
+ weechat_hashtable_set (info, "script_date_added", str_date);
+ tm = localtime (&ptr_script->date_updated);
+ strftime (str_date, sizeof (str_date), "%Y-%m-%d %H:%M:%S", tm);
+ weechat_hashtable_set (info, "script_date_updated", str_date);
+ weechat_hashtable_set (info, "script_version_loaded", ptr_script->version_loaded);
+
+ return info;
+}
+
+/*
* weechat_plugin_init: initialize script plugin
*/
@@ -252,6 +329,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_hook_signal ("window_scrolled", &script_buffer_window_scrolled_cb, NULL);
weechat_hook_signal ("*_script_*", &script_signal_script_cb, NULL);
+ weechat_hook_focus ("chat", &script_focus_chat_cb, NULL);
+
if (script_repo_file_exists ())
{
if (!script_repo_file_is_uptodate ())