mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 12:26:40 +02:00
core: use arguments for infolist "window" to return only one window by number
This commit is contained in:
@@ -47,6 +47,7 @@ Version 0.3.6 (under dev!)
|
||||
* core: add options "infolists", "hdata" and "tags" for command /debug
|
||||
* core: add horizontal scrolling for buffers with free content (command
|
||||
/window scroll_horiz) (task #11112)
|
||||
* api: use arguments for infolist "window" to return only one window by number
|
||||
* api: add info "cursor_mode"
|
||||
* api: add new functions hook_focus, hdata_new, hdata_new_var, hdata_new_list,
|
||||
hdata_get, hdata_get_var_offset, hdata_get_var_type,
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
| weechat | plugin | Auflistung der Erweiterungen | Pointer der Erweiterung (optional) | Name einer Erweiterung (darf mit einem "*" als Platzhalter beginnen oder enden) (optional)
|
||||
|
||||
| weechat | window | Auflistung der Windows | Fenster Pointer (optional) | Fenstername (darf mit einem "*" als Platzhalter beginnen oder enden) (optional)
|
||||
| weechat | window | Auflistung der Windows | Fenster Pointer (optional) | "current" for current window or a window number (optional)
|
||||
|
||||
| xfer | xfer | Transfer-Liste | Transfer-Pointer (optional) | -
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
| weechat | plugin | list of plugins | plugin pointer (optional) | plugin name (can start or end with "*" as wildcard) (optional)
|
||||
|
||||
| weechat | window | list of windows | window pointer (optional) | window name (can start or end with "*" as wildcard) (optional)
|
||||
| weechat | window | list of windows | window pointer (optional) | "current" for current window or a window number (optional)
|
||||
|
||||
| xfer | xfer | list of xfer | xfer pointer (optional) | -
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
| weechat | plugin | liste des extensions | pointeur vers l'extension (optionnel) | nom d'extension (peut démarrer ou se terminer par "*" comme joker) (optionnel)
|
||||
|
||||
| weechat | window | liste des fenêtres | pointeur vers la fenêtre (optionnel) | nom de fenêtre (peut démarrer ou se terminer par "*" comme joker) (optionnel)
|
||||
| weechat | window | liste des fenêtres | pointeur vers la fenêtre (optionnel) | "current" pour la fenêtre courante ou un numéro de fenêtre (optionnel)
|
||||
|
||||
| xfer | xfer | liste des xfer | pointeur vers le xfer (optionnel) | -
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
| weechat | plugin | elenco dei plugin | puntatore al plugin (opzionale) | nome plugin (può iniziare o terminare con "*" come carattere jolly) (opzionale)
|
||||
|
||||
| weechat | window | elenco delle finestre | puntatore alla finestra (opzionale) | nome finestra (può iniziare o terminare con "*" come carattere jolly) (opzionale)
|
||||
| weechat | window | elenco delle finestre | puntatore alla finestra (opzionale) | "current" for current window or a window number (optional)
|
||||
|
||||
| xfer | xfer | lista di xfer | puntatore a xfer (opzionale) | -
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.6-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:19+0200\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:27+0200\n"
|
||||
"PO-Revision-Date: 2011-07-05 15:37+0200\n"
|
||||
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -6790,9 +6790,8 @@ msgstr "seznam oken"
|
||||
msgid "window pointer (optional)"
|
||||
msgstr "ukazatel okna (volitelné)"
|
||||
|
||||
msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
msgid "\"current\" for current window or a window number (optional)"
|
||||
msgstr ""
|
||||
"jméno okna (může začínat nebo končit \"*\" jako zástupným znakem) (volitelné)"
|
||||
|
||||
msgid "bar"
|
||||
msgstr ""
|
||||
@@ -7951,6 +7950,11 @@ msgstr ""
|
||||
msgid "Lists"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
#~ msgstr ""
|
||||
#~ "jméno okna (může začínat nebo končit \"*\" jako zástupným znakem) "
|
||||
#~ "(volitelné)"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "channel: channel for ban\n"
|
||||
#~ " nick: user or host to ban"
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.6-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:19+0200\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:27+0200\n"
|
||||
"PO-Revision-Date: 2011-07-14 20:53+0100\n"
|
||||
"Last-Translator: Nils Görs\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -7099,10 +7099,8 @@ msgstr "Auflistung der Windows"
|
||||
msgid "window pointer (optional)"
|
||||
msgstr "Fenster Pointer (optional)"
|
||||
|
||||
msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
msgid "\"current\" for current window or a window number (optional)"
|
||||
msgstr ""
|
||||
"Fenstername (darf mit einem \"*\" als Platzhalter beginnen oder enden) "
|
||||
"(optional)"
|
||||
|
||||
msgid "bar"
|
||||
msgstr "Bar"
|
||||
@@ -8280,6 +8278,11 @@ msgstr "Variablen"
|
||||
msgid "Lists"
|
||||
msgstr "Listen"
|
||||
|
||||
#~ msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
#~ msgstr ""
|
||||
#~ "Fenstername (darf mit einem \"*\" als Platzhalter beginnen oder enden) "
|
||||
#~ "(optional)"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "channel: channel for ban\n"
|
||||
#~ " nick: user or host to ban"
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.6-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:19+0200\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:27+0200\n"
|
||||
"PO-Revision-Date: 2011-07-05 15:37+0200\n"
|
||||
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -6896,10 +6896,8 @@ msgstr "lista de ventanas"
|
||||
msgid "window pointer (optional)"
|
||||
msgstr "puntero de la ventana (opcional)"
|
||||
|
||||
msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
msgid "\"current\" for current window or a window number (optional)"
|
||||
msgstr ""
|
||||
"nombre de la ventana (puede empezar o terminar con \"*\" como comodín) "
|
||||
"(opcional)"
|
||||
|
||||
msgid "bar"
|
||||
msgstr ""
|
||||
@@ -8081,6 +8079,11 @@ msgstr ""
|
||||
msgid "Lists"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
#~ msgstr ""
|
||||
#~ "nombre de la ventana (puede empezar o terminar con \"*\" como comodín) "
|
||||
#~ "(opcional)"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "channel: channel for ban\n"
|
||||
#~ " nick: user or host to ban"
|
||||
|
||||
@@ -21,8 +21,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.6-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:19+0200\n"
|
||||
"PO-Revision-Date: 2011-08-08 11:20+0200\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:27+0200\n"
|
||||
"PO-Revision-Date: 2011-08-08 11:28+0200\n"
|
||||
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: French\n"
|
||||
@@ -7004,10 +7004,9 @@ msgstr "liste des fenêtres"
|
||||
msgid "window pointer (optional)"
|
||||
msgstr "pointeur vers la fenêtre (optionnel)"
|
||||
|
||||
msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
msgid "\"current\" for current window or a window number (optional)"
|
||||
msgstr ""
|
||||
"nom de fenêtre (peut démarrer ou se terminer par \"*\" comme joker) "
|
||||
"(optionnel)"
|
||||
"\"current\" pour la fenêtre courante ou un numéro de fenêtre (optionnel)"
|
||||
|
||||
msgid "bar"
|
||||
msgstr "barre"
|
||||
@@ -8178,6 +8177,11 @@ msgstr "Variables"
|
||||
msgid "Lists"
|
||||
msgstr "Listes"
|
||||
|
||||
#~ msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
#~ msgstr ""
|
||||
#~ "nom de fenêtre (peut démarrer ou se terminer par \"*\" comme joker) "
|
||||
#~ "(optionnel)"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "channel: channel for ban\n"
|
||||
#~ " nick: user or host to ban"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.6-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:19+0200\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:27+0200\n"
|
||||
"PO-Revision-Date: 2011-05-15 10:51+0200\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -6349,7 +6349,7 @@ msgstr "Mellőzések listája:\n"
|
||||
msgid "window pointer (optional)"
|
||||
msgstr ""
|
||||
|
||||
msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
msgid "\"current\" for current window or a window number (optional)"
|
||||
msgstr ""
|
||||
|
||||
msgid "bar"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.6-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:19+0200\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:27+0200\n"
|
||||
"PO-Revision-Date: 2011-07-16 11:32+0200\n"
|
||||
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -6909,10 +6909,8 @@ msgstr "elenco delle finestre"
|
||||
msgid "window pointer (optional)"
|
||||
msgstr "puntatore alla finestra (opzionale)"
|
||||
|
||||
msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
msgid "\"current\" for current window or a window number (optional)"
|
||||
msgstr ""
|
||||
"nome finestra (può iniziare o terminare con \"*\" come carattere jolly) "
|
||||
"(opzionale)"
|
||||
|
||||
msgid "bar"
|
||||
msgstr "barra"
|
||||
@@ -8066,6 +8064,11 @@ msgstr "Variabili"
|
||||
msgid "Lists"
|
||||
msgstr "Liste"
|
||||
|
||||
#~ msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
#~ msgstr ""
|
||||
#~ "nome finestra (può iniziare o terminare con \"*\" come carattere jolly) "
|
||||
#~ "(opzionale)"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "channel: channel for ban\n"
|
||||
#~ " nick: user or host to ban"
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.6-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:19+0200\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:27+0200\n"
|
||||
"PO-Revision-Date: 2011-07-05 15:38+0200\n"
|
||||
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -6824,8 +6824,8 @@ msgstr "lista okien"
|
||||
msgid "window pointer (optional)"
|
||||
msgstr "wskaźnik okna (opcjonalne)"
|
||||
|
||||
msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
msgstr "nazwa okna (może się zaczynać lub kończyć \"*\") (opcjonalne)"
|
||||
msgid "\"current\" for current window or a window number (optional)"
|
||||
msgstr ""
|
||||
|
||||
msgid "bar"
|
||||
msgstr ""
|
||||
@@ -7985,6 +7985,9 @@ msgstr ""
|
||||
msgid "Lists"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
#~ msgstr "nazwa okna (może się zaczynać lub kończyć \"*\") (opcjonalne)"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "channel: channel for ban\n"
|
||||
#~ " nick: user or host to ban"
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.6-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:19+0200\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:27+0200\n"
|
||||
"PO-Revision-Date: 2011-05-15 10:52+0200\n"
|
||||
"Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -6163,7 +6163,7 @@ msgstr ""
|
||||
msgid "window pointer (optional)"
|
||||
msgstr ""
|
||||
|
||||
msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
msgid "\"current\" for current window or a window number (optional)"
|
||||
msgstr ""
|
||||
|
||||
msgid "bar"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.6-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:19+0200\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:27+0200\n"
|
||||
"PO-Revision-Date: 2011-05-15 10:52+0200\n"
|
||||
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -6364,7 +6364,7 @@ msgstr "Список игнорирования:\n"
|
||||
msgid "window pointer (optional)"
|
||||
msgstr ""
|
||||
|
||||
msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
msgid "\"current\" for current window or a window number (optional)"
|
||||
msgstr ""
|
||||
|
||||
msgid "bar"
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:19+0200\n"
|
||||
"POT-Creation-Date: 2011-08-08 11:27+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"
|
||||
@@ -5538,7 +5538,7 @@ msgstr ""
|
||||
msgid "window pointer (optional)"
|
||||
msgstr ""
|
||||
|
||||
msgid "window name (can start or end with \"*\" as wildcard) (optional)"
|
||||
msgid "\"current\" for current window or a window number (optional)"
|
||||
msgstr ""
|
||||
|
||||
msgid "bar"
|
||||
|
||||
@@ -400,7 +400,8 @@ plugin_api_infolist_get_internal (void *data, const char *infolist_name,
|
||||
struct t_gui_key *ptr_key;
|
||||
struct t_weechat_plugin *ptr_plugin;
|
||||
char buffer_full_name[1024];
|
||||
int context;
|
||||
int context, number;
|
||||
char *error;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
@@ -796,16 +797,36 @@ plugin_api_infolist_get_internal (void *data, const char *infolist_name,
|
||||
{
|
||||
if (arguments && arguments[0])
|
||||
{
|
||||
if ((string_strcasecmp (arguments, "current") == 0)
|
||||
&& gui_current_window)
|
||||
if ((string_strcasecmp (arguments, "current") == 0))
|
||||
{
|
||||
if (!gui_window_add_to_infolist (ptr_infolist,
|
||||
gui_current_window))
|
||||
if (gui_current_window)
|
||||
{
|
||||
infolist_free (ptr_infolist);
|
||||
return NULL;
|
||||
if (!gui_window_add_to_infolist (ptr_infolist,
|
||||
gui_current_window))
|
||||
{
|
||||
infolist_free (ptr_infolist);
|
||||
return NULL;
|
||||
}
|
||||
return ptr_infolist;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
/* check if argument is a window number */
|
||||
error = NULL;
|
||||
number = (int)strtol (arguments, &error, 10);
|
||||
if (error && !error[0])
|
||||
{
|
||||
ptr_window = gui_window_search_by_number (number);
|
||||
if (ptr_window)
|
||||
{
|
||||
if (!gui_window_add_to_infolist (ptr_infolist,
|
||||
ptr_window))
|
||||
{
|
||||
infolist_free (ptr_infolist);
|
||||
return NULL;
|
||||
}
|
||||
return ptr_infolist;
|
||||
}
|
||||
return ptr_infolist;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -1065,7 +1086,7 @@ plugin_api_init ()
|
||||
&plugin_api_infolist_get_internal, NULL);
|
||||
hook_infolist (NULL, "window", N_("list of windows"),
|
||||
N_("window pointer (optional)"),
|
||||
N_("window name (can start or end with \"*\" as wildcard) (optional)"),
|
||||
N_("\"current\" for current window or a window number (optional)"),
|
||||
&plugin_api_infolist_get_internal, NULL);
|
||||
|
||||
/* WeeChat core hdata */
|
||||
|
||||
Reference in New Issue
Block a user