diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | doc/de/autogen/plugin_api/hdata.txt | 11 | ||||
-rw-r--r-- | doc/en/autogen/plugin_api/hdata.txt | 11 | ||||
-rw-r--r-- | doc/fr/autogen/plugin_api/hdata.txt | 11 | ||||
-rw-r--r-- | doc/it/autogen/plugin_api/hdata.txt | 11 | ||||
-rw-r--r-- | po/cs.po | 5 | ||||
-rw-r--r-- | po/de.po | 5 | ||||
-rw-r--r-- | po/es.po | 5 | ||||
-rw-r--r-- | po/fr.po | 7 | ||||
-rw-r--r-- | po/hu.po | 5 | ||||
-rw-r--r-- | po/it.po | 5 | ||||
-rw-r--r-- | po/ja.po | 5 | ||||
-rw-r--r-- | po/pl.po | 5 | ||||
-rw-r--r-- | po/pt_BR.po | 5 | ||||
-rw-r--r-- | po/ru.po | 5 | ||||
-rw-r--r-- | po/weechat.pot | 5 | ||||
-rw-r--r-- | src/gui/gui-hotlist.c | 29 | ||||
-rw-r--r-- | src/gui/gui-hotlist.h | 3 | ||||
-rw-r--r-- | src/plugins/plugin-api.c | 2 |
19 files changed, 124 insertions, 12 deletions
@@ -9,6 +9,7 @@ Version 0.3.9 (under dev!) * core: scroll to bottom of window after reaching first or last highlight with keys alt+"p" / alt+"n" +* core: add hdata "hotlist" * core: add support of arrays in hdata variables * core: add command line option "-r" (or "--run-command") to run command(s) after startup of WeeChat diff --git a/doc/de/autogen/plugin_api/hdata.txt b/doc/de/autogen/plugin_api/hdata.txt index f406d200d..a5235d4dc 100644 --- a/doc/de/autogen/plugin_api/hdata.txt +++ b/doc/de/autogen/plugin_api/hdata.txt @@ -405,6 +405,17 @@ 'prev_history' (pointer, hdata: 'history') | - +| weechat | hotlist | hotlist | + 'priority' (integer) + + 'creation_time.tv_sec' (time) + + 'creation_time.tv_usec' (long) + + 'buffer' (pointer) + + 'count' (integer, array_size: '4') + + 'prev_hotlist' (pointer, hdata: 'hotlist') + + 'next_hotlist' (pointer, hdata: 'hotlist') | + 'gui_hotlist' + + 'last_gui_hotlist' + | weechat | input_undo | Struktur der Rücknahmen für die Befehlszeile | 'data' (string) + 'pos' (integer) + diff --git a/doc/en/autogen/plugin_api/hdata.txt b/doc/en/autogen/plugin_api/hdata.txt index 31683b417..92cd55129 100644 --- a/doc/en/autogen/plugin_api/hdata.txt +++ b/doc/en/autogen/plugin_api/hdata.txt @@ -405,6 +405,17 @@ 'prev_history' (pointer, hdata: 'history') | - +| weechat | hotlist | hotlist | + 'priority' (integer) + + 'creation_time.tv_sec' (time) + + 'creation_time.tv_usec' (long) + + 'buffer' (pointer) + + 'count' (integer, array_size: '4') + + 'prev_hotlist' (pointer, hdata: 'hotlist') + + 'next_hotlist' (pointer, hdata: 'hotlist') | + 'gui_hotlist' + + 'last_gui_hotlist' + | weechat | input_undo | structure with undo for input line | 'data' (string) + 'pos' (integer) + diff --git a/doc/fr/autogen/plugin_api/hdata.txt b/doc/fr/autogen/plugin_api/hdata.txt index 93c39dbca..a7ce609ba 100644 --- a/doc/fr/autogen/plugin_api/hdata.txt +++ b/doc/fr/autogen/plugin_api/hdata.txt @@ -405,6 +405,17 @@ 'prev_history' (pointer, hdata: 'history') | - +| weechat | hotlist | hotlist | + 'priority' (integer) + + 'creation_time.tv_sec' (time) + + 'creation_time.tv_usec' (long) + + 'buffer' (pointer) + + 'count' (integer, array_size: '4') + + 'prev_hotlist' (pointer, hdata: 'hotlist') + + 'next_hotlist' (pointer, hdata: 'hotlist') | + 'gui_hotlist' + + 'last_gui_hotlist' + | weechat | input_undo | structure avec le "undo" pour la ligne de commande | 'data' (string) + 'pos' (integer) + diff --git a/doc/it/autogen/plugin_api/hdata.txt b/doc/it/autogen/plugin_api/hdata.txt index c7daeb518..ec0325cee 100644 --- a/doc/it/autogen/plugin_api/hdata.txt +++ b/doc/it/autogen/plugin_api/hdata.txt @@ -405,6 +405,17 @@ 'prev_history' (pointer, hdata: 'history') | - +| weechat | hotlist | hotlist | + 'priority' (integer) + + 'creation_time.tv_sec' (time) + + 'creation_time.tv_usec' (long) + + 'buffer' (pointer) + + 'count' (integer, array_size: '4') + + 'prev_hotlist' (pointer, hdata: 'hotlist') + + 'next_hotlist' (pointer, hdata: 'hotlist') | + 'gui_hotlist' + + 'last_gui_hotlist' + | weechat | input_undo | struttura con "undo"per la riga di input | 'data' (string) + 'pos' (integer) + @@ -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-07-15 09:18+0200\n" +"POT-Creation-Date: 2012-07-21 17:23+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7249,6 +7249,9 @@ msgstr "" msgid "history of commands in buffer" msgstr "historie příkazů" +msgid "hotlist" +msgstr "" + #, fuzzy msgid "structure with undo for input line" msgstr "funkce pro příkazovou řádku" @@ -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-07-15 09:18+0200\n" +"POT-Creation-Date: 2012-07-21 17:23+0200\n" "PO-Revision-Date: 2012-06-30 14:28+0100\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <weechatter@arcor.de>\n" @@ -7764,6 +7764,9 @@ msgstr "Filter" msgid "history of commands in buffer" msgstr "Verlaufspeicher von Befehlen in einem Buffer" +msgid "hotlist" +msgstr "" + msgid "structure with undo for input line" msgstr "Struktur der Rücknahmen für die Befehlszeile" @@ -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-07-15 09:18+0200\n" +"POT-Creation-Date: 2012-07-21 17:23+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7509,6 +7509,9 @@ msgstr "filtro" msgid "history of commands in buffer" msgstr "historial de comandos en el buffer" +msgid "hotlist" +msgstr "" + msgid "structure with undo for input line" msgstr "estructura con deshacer para la línea de entrada" @@ -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-07-15 23:10+0200\n" -"PO-Revision-Date: 2012-07-16 09:30+0200\n" +"POT-Creation-Date: 2012-07-21 17:23+0200\n" +"PO-Revision-Date: 2012-07-21 17:23+0200\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: French\n" @@ -7563,6 +7563,9 @@ msgstr "filtre" msgid "history of commands in buffer" msgstr "historique des commandes dans le tampon" +msgid "hotlist" +msgstr "hotlist" + msgid "structure with undo for input line" msgstr "structure avec le \"undo\" pour la ligne de commande" @@ -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-07-15 09:18+0200\n" +"POT-Creation-Date: 2012-07-21 17:23+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6769,6 +6769,9 @@ msgstr "" msgid "history of commands in buffer" msgstr "%s belső parancsok:\n" +msgid "hotlist" +msgstr "" + #, fuzzy msgid "structure with undo for input line" msgstr "szöveg beillesztése a parancssorba" @@ -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-07-15 09:18+0200\n" +"POT-Creation-Date: 2012-07-21 17:23+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7494,6 +7494,9 @@ msgstr "filtro" msgid "history of commands in buffer" msgstr "cronologia dei comandi nel buffer" +msgid "hotlist" +msgstr "" + msgid "structure with undo for input line" msgstr "struttura con \"undo\"per la riga di input" @@ -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-07-15 09:18+0200\n" +"POT-Creation-Date: 2012-07-21 17:23+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/WeeChat>\n" @@ -7303,6 +7303,9 @@ msgstr "フィルタ" msgid "history of commands in buffer" msgstr "バッファのコマンド履歴" +msgid "hotlist" +msgstr "" + msgid "structure with undo for input line" 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-07-15 09:18+0200\n" +"POT-Creation-Date: 2012-07-21 17:23+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7438,6 +7438,9 @@ msgstr "filtr" msgid "history of commands in buffer" msgstr "historia komend w buforze" +msgid "hotlist" +msgstr "" + msgid "structure with undo for input line" msgstr "struktura z cofnięciem dla linii komend" diff --git a/po/pt_BR.po b/po/pt_BR.po index 79da7383f..64a6c071a 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-07-15 09:18+0200\n" +"POT-Creation-Date: 2012-07-21 17:23+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6917,6 +6917,9 @@ msgstr "filtro" msgid "history of commands in buffer" msgstr "histórico de comandos no buffer" +msgid "hotlist" +msgstr "" + msgid "structure with undo for input line" msgstr "estrutura com desfazer para linha de entrada" @@ -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-07-15 09:18+0200\n" +"POT-Creation-Date: 2012-07-21 17:23+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6793,6 +6793,9 @@ msgstr "" msgid "history of commands in buffer" msgstr "Внутренние команды %s:\n" +msgid "hotlist" +msgstr "" + #, fuzzy msgid "structure with undo for input line" msgstr "вставить строку в поле ввода" diff --git a/po/weechat.pot b/po/weechat.pot index 938e8be7b..110dd870b 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-07-15 09:18+0200\n" +"POT-Creation-Date: 2012-07-21 17:23+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" @@ -5923,6 +5923,9 @@ msgstr "" msgid "history of commands in buffer" msgstr "" +msgid "hotlist" +msgstr "" + msgid "structure with undo for input line" msgstr "" diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c index 921712602..0b4a9ac5a 100644 --- a/src/gui/gui-hotlist.c +++ b/src/gui/gui-hotlist.c @@ -32,6 +32,7 @@ #include "../core/weechat.h" #include "../core/wee-config.h" #include "../core/wee-hashtable.h" +#include "../core/wee-hdata.h" #include "../core/wee-hook.h" #include "../core/wee-infolist.h" #include "../core/wee-log.h" @@ -461,6 +462,34 @@ gui_hotlist_remove_buffer (struct t_gui_buffer *buffer) } /* + * gui_hotlist_hdata_hotlist_cb: return hdata for hotlist + */ + +struct t_hdata * +gui_hotlist_hdata_hotlist_cb (void *data, const char *hdata_name) +{ + struct t_hdata *hdata; + + /* make C compiler happy */ + (void) data; + + hdata = hdata_new (NULL, hdata_name, "prev_hotlist", "next_hotlist"); + if (hdata) + { + HDATA_VAR(struct t_gui_hotlist, priority, INTEGER, NULL, NULL); + HDATA_VAR(struct t_gui_hotlist, creation_time.tv_sec, TIME, NULL, NULL); + HDATA_VAR(struct t_gui_hotlist, creation_time.tv_usec, LONG, NULL, NULL); + HDATA_VAR(struct t_gui_hotlist, buffer, POINTER, NULL, NULL); + HDATA_VAR(struct t_gui_hotlist, count, INTEGER, GUI_HOTLIST_NUM_PRIORITIES_STR, NULL); + HDATA_VAR(struct t_gui_hotlist, prev_hotlist, POINTER, NULL, hdata_name); + HDATA_VAR(struct t_gui_hotlist, next_hotlist, POINTER, NULL, hdata_name); + HDATA_LIST(gui_hotlist); + HDATA_LIST(last_gui_hotlist); + } + return hdata; +} + +/* * gui_hotlist_add_to_infolist: add a hotlist in an infolist * return 1 if ok, 0 if error */ diff --git a/src/gui/gui-hotlist.h b/src/gui/gui-hotlist.h index cb6c72154..be5dda252 100644 --- a/src/gui/gui-hotlist.h +++ b/src/gui/gui-hotlist.h @@ -29,6 +29,7 @@ enum t_gui_hotlist_priority /* number of priorities */ GUI_HOTLIST_NUM_PRIORITIES, }; +#define GUI_HOTLIST_NUM_PRIORITIES_STR "4" #define GUI_HOTLIST_MIN 0 #define GUI_HOTLIST_MAX (GUI_HOTLIST_NUM_PRIORITIES - 1) @@ -59,6 +60,8 @@ extern struct t_gui_hotlist *gui_hotlist_add (struct t_gui_buffer *buffer, extern void gui_hotlist_resort (); extern void gui_hotlist_clear (); extern void gui_hotlist_remove_buffer (struct t_gui_buffer *buffer); +extern struct t_hdata *gui_hotlist_hdata_hotlist_cb (void *data, + const char *hdata_name); extern int gui_hotlist_add_to_infolist (struct t_infolist *infolist, struct t_gui_hotlist *hotlist); extern void gui_hotlist_print_log (); diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c index 5987bfca9..be44d329d 100644 --- a/src/plugins/plugin-api.c +++ b/src/plugins/plugin-api.c @@ -1129,6 +1129,8 @@ plugin_api_init () &gui_filter_hdata_filter_cb, NULL); hook_hdata (NULL, "history", N_("history of commands in buffer"), &gui_history_hdata_history_cb, NULL); + hook_hdata (NULL, "hotlist", N_("hotlist"), + &gui_hotlist_hdata_hotlist_cb, NULL); hook_hdata (NULL, "input_undo", N_("structure with undo for input line"), &gui_buffer_hdata_input_undo_cb, NULL); hook_hdata (NULL, "key", N_("a key (keyboard shortcut)"), |