diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-11-09 15:55:11 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-11-09 15:55:11 +0100 |
commit | 18ff3064cf1f889ce050c2e18b5f827e4dd3de7f (patch) | |
tree | e37a35e4c001f5ee02432282e0fd3b5f630b76e1 | |
parent | ff62f3edff3f2685652b09bc91f37be1f5ce1b6c (diff) | |
download | weechat-18ff3064cf1f889ce050c2e18b5f827e4dd3de7f.zip |
core: add infos "term_width" and "term_height"
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | doc/de/autogen/plugin_api/infos.txt | 4 | ||||
-rw-r--r-- | doc/en/autogen/plugin_api/infos.txt | 4 | ||||
-rw-r--r-- | doc/fr/autogen/plugin_api/infos.txt | 4 | ||||
-rw-r--r-- | doc/it/autogen/plugin_api/infos.txt | 4 | ||||
-rw-r--r-- | doc/ja/autogen/plugin_api/infos.txt | 4 | ||||
-rw-r--r-- | po/cs.po | 8 | ||||
-rw-r--r-- | po/de.po | 8 | ||||
-rw-r--r-- | po/es.po | 8 | ||||
-rw-r--r-- | po/fr.po | 10 | ||||
-rw-r--r-- | po/hu.po | 8 | ||||
-rw-r--r-- | po/it.po | 8 | ||||
-rw-r--r-- | po/ja.po | 8 | ||||
-rw-r--r-- | po/pl.po | 8 | ||||
-rw-r--r-- | po/pt_BR.po | 8 | ||||
-rw-r--r-- | po/ru.po | 8 | ||||
-rw-r--r-- | po/tr.po | 8 | ||||
-rw-r--r-- | po/weechat.pot | 8 | ||||
-rw-r--r-- | src/plugins/plugin-api.c | 14 |
19 files changed, 120 insertions, 13 deletions
@@ -11,6 +11,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] == Version 0.4.3 (under dev) +* core: add infos "term_width" and "term_height" * core: add bar item "buffer_zoom", add signals "buffer_{zoomed|unzoomed}" (patch #8204) * core: create .conf file with default options only if the file does not exist diff --git a/doc/de/autogen/plugin_api/infos.txt b/doc/de/autogen/plugin_api/infos.txt index b3d8492ad..2785f50bb 100644 --- a/doc/de/autogen/plugin_api/infos.txt +++ b/doc/de/autogen/plugin_api/infos.txt @@ -42,6 +42,10 @@ | weechat | locale | Lokalisation welche für die übersetzten Nachrichten verwendet werden soll | - +| weechat | term_height | height of terminal | - + +| weechat | term_width | width of terminal | - + | weechat | version | WeeChat Version | - | weechat | version_git | WeeChat Git Version (Ausgabe des Befehls "git describe", ausschließlich für eine Entwicklerversion. Eine stabile Version gibt keine Information zurück) | - diff --git a/doc/en/autogen/plugin_api/infos.txt b/doc/en/autogen/plugin_api/infos.txt index edae6f78b..81aaee62d 100644 --- a/doc/en/autogen/plugin_api/infos.txt +++ b/doc/en/autogen/plugin_api/infos.txt @@ -42,6 +42,10 @@ | weechat | locale | locale used for translating messages | - +| weechat | term_height | height of terminal | - + +| weechat | term_width | width of terminal | - + | weechat | version | WeeChat version | - | weechat | version_git | WeeChat git version (output of command "git describe" for a development version only, empty for a stable release) | - diff --git a/doc/fr/autogen/plugin_api/infos.txt b/doc/fr/autogen/plugin_api/infos.txt index a377bb2a5..bf329af2d 100644 --- a/doc/fr/autogen/plugin_api/infos.txt +++ b/doc/fr/autogen/plugin_api/infos.txt @@ -42,6 +42,10 @@ | weechat | locale | locale utilisée pour la traduction des messages | - +| weechat | term_height | hauteur du terminal | - + +| weechat | term_width | largeur du terminal | - + | weechat | version | version de WeeChat | - | weechat | version_git | version git de WeeChat (sortie de la commande "git describe" pour une version de développement seulement, vide pour une version stable) | - diff --git a/doc/it/autogen/plugin_api/infos.txt b/doc/it/autogen/plugin_api/infos.txt index 315fd2f6b..e303a258a 100644 --- a/doc/it/autogen/plugin_api/infos.txt +++ b/doc/it/autogen/plugin_api/infos.txt @@ -42,6 +42,10 @@ | weechat | locale | locale usato per la traduzione dei messaggi | - +| weechat | term_height | height of terminal | - + +| weechat | term_width | width of terminal | - + | weechat | version | versione di WeeChat | - | weechat | version_git | Versione git di weechat (output del comando "git describe" solo per la versione di sviluppo, vuoto per una release stabile) | - diff --git a/doc/ja/autogen/plugin_api/infos.txt b/doc/ja/autogen/plugin_api/infos.txt index 94d384269..b0ae41a5f 100644 --- a/doc/ja/autogen/plugin_api/infos.txt +++ b/doc/ja/autogen/plugin_api/infos.txt @@ -42,6 +42,10 @@ | weechat | locale | 翻訳メッセージに利用するロケール | - +| weechat | term_height | height of terminal | - + +| weechat | term_width | width of terminal | - + | weechat | version | WeeChat のバージョン | - | weechat | version_git | WeeChat の git バージョン (開発バージョンではコマンド "git describe" の出力、安定版リリースでは空文字が出力されます) | - @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 15:21+0100\n" +"POT-Creation-Date: 2013-11-09 15:46+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7786,6 +7786,12 @@ msgstr "1 pokud jsou filtry povoleny" msgid "1 if cursor mode is enabled" msgstr "1 pokud jsou filtry povoleny" +msgid "width of terminal" +msgstr "" + +msgid "height of terminal" +msgstr "" + msgid "list of bars" msgstr "seznam polí" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 15:21+0100\n" +"POT-Creation-Date: 2013-11-09 15:46+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <weechatter@arcor.de>\n" @@ -8657,6 +8657,12 @@ msgstr "1, falls Filter aktiviert sind" msgid "1 if cursor mode is enabled" msgstr "1, falls Cursor-Modus aktiviert ist" +msgid "width of terminal" +msgstr "" + +msgid "height of terminal" +msgstr "" + msgid "list of bars" msgstr "Auflistung der Bars" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 15:21+0100\n" +"POT-Creation-Date: 2013-11-09 15:46+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8063,6 +8063,12 @@ msgstr "1 si los filtros están habilitados" msgid "1 if cursor mode is enabled" msgstr "1 si el modo cursor está activado" +msgid "width of terminal" +msgstr "" + +msgid "height of terminal" +msgstr "" + msgid "list of bars" msgstr "lista de barras" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 15:21+0100\n" -"PO-Revision-Date: 2013-11-09 15:21+0100\n" +"POT-Creation-Date: 2013-11-09 15:46+0100\n" +"PO-Revision-Date: 2013-11-09 15:47+0100\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -8420,6 +8420,12 @@ msgstr "1 si les filtres sont activés" msgid "1 if cursor mode is enabled" msgstr "1 si le mode curseur est activé" +msgid "width of terminal" +msgstr "largeur du terminal" + +msgid "height of terminal" +msgstr "hauteur du terminal" + msgid "list of bars" msgstr "liste des barres" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 15:21+0100\n" +"POT-Creation-Date: 2013-11-09 15:46+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7232,6 +7232,12 @@ msgstr "a felhasználók le lettek tiltva" msgid "1 if cursor mode is enabled" msgstr "a felhasználók le lettek tiltva" +msgid "width of terminal" +msgstr "" + +msgid "height of terminal" +msgstr "" + #, fuzzy msgid "list of bars" msgstr "Aliaszok listája:\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 15:21+0100\n" +"POT-Creation-Date: 2013-11-09 15:46+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8186,6 +8186,12 @@ msgstr "1 se i filtri sono abilitati" msgid "1 if cursor mode is enabled" msgstr "1 se la modalità cursore è abilitata" +msgid "width of terminal" +msgstr "" + +msgid "height of terminal" +msgstr "" + msgid "list of bars" msgstr "elenco delle barre" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 15:21+0100\n" +"POT-Creation-Date: 2013-11-09 15:46+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/WeeChat>\n" @@ -8093,6 +8093,12 @@ msgstr "フィルタが有効の場合 1" msgid "1 if cursor mode is enabled" msgstr "カーソルモードが有効の場合 1" +msgid "width of terminal" +msgstr "" + +msgid "height of terminal" +msgstr "" + msgid "list of bars" msgstr "バーのリスト" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 15:21+0100\n" +"POT-Creation-Date: 2013-11-09 15:46+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8256,6 +8256,12 @@ msgstr "1 jeśli filtry są aktywne" msgid "1 if cursor mode is enabled" msgstr "1 jeśli tryb kursora jest aktywny" +msgid "width of terminal" +msgstr "" + +msgid "height of terminal" +msgstr "" + msgid "list of bars" msgstr "lista pasków" diff --git a/po/pt_BR.po b/po/pt_BR.po index 070ffb8f7..4706b2ace 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 15:21+0100\n" +"POT-Creation-Date: 2013-11-09 15:46+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7459,6 +7459,12 @@ msgstr "1 se os filtros estão habilitados" msgid "1 if cursor mode is enabled" msgstr "1 se o modo cursor está habilitado" +msgid "width of terminal" +msgstr "" + +msgid "height of terminal" +msgstr "" + msgid "list of bars" msgstr "lista de barras" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 15:21+0100\n" +"POT-Creation-Date: 2013-11-09 15:46+0100\n" "PO-Revision-Date: 2013-11-09 10:18+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7261,6 +7261,12 @@ msgstr "команда users отключена" msgid "1 if cursor mode is enabled" msgstr "команда users отключена" +msgid "width of terminal" +msgstr "" + +msgid "height of terminal" +msgstr "" + #, fuzzy msgid "list of bars" msgstr "Список сокращений:\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 15:21+0100\n" +"POT-Creation-Date: 2013-11-09 15:46+0100\n" "PO-Revision-Date: 2013-11-09 10:13+0100\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6459,6 +6459,12 @@ msgstr "" msgid "1 if cursor mode is enabled" msgstr "" +msgid "width of terminal" +msgstr "" + +msgid "height of terminal" +msgstr "" + msgid "list of bars" msgstr "" diff --git a/po/weechat.pot b/po/weechat.pot index 8e204174c..0b864ad8f 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-11-09 15:21+0100\n" +"POT-Creation-Date: 2013-11-09 15:46+0100\n" "PO-Revision-Date: 2013-02-14 18:20+0100\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6421,6 +6421,12 @@ msgstr "" msgid "1 if cursor mode is enabled" msgstr "" +msgid "width of terminal" +msgstr "" + +msgid "height of terminal" +msgstr "" + msgid "list of bars" msgstr "" diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c index 8406a4e41..3790cf741 100644 --- a/src/plugins/plugin-api.c +++ b/src/plugins/plugin-api.c @@ -387,6 +387,16 @@ plugin_api_info_get_internal (void *data, const char *info_name, snprintf (value, sizeof (value), "%d", gui_cursor_mode); return value; } + else if (string_strcasecmp (info_name, "term_width") == 0) + { + snprintf (value, sizeof (value), "%d", gui_window_get_width ()); + return value; + } + else if (string_strcasecmp (info_name, "term_height") == 0) + { + snprintf (value, sizeof (value), "%d", gui_window_get_height ()); + return value; + } /* info not found */ return NULL; @@ -1127,6 +1137,10 @@ plugin_api_init () &plugin_api_info_get_internal, NULL); hook_info (NULL, "cursor_mode", N_("1 if cursor mode is enabled"), NULL, &plugin_api_info_get_internal, NULL); + hook_info (NULL, "term_width", N_("width of terminal"), NULL, + &plugin_api_info_get_internal, NULL); + hook_info (NULL, "term_height", N_("height of terminal"), NULL, + &plugin_api_info_get_internal, NULL); /* WeeChat core infolist hooks */ hook_infolist (NULL, "bar", N_("list of bars"), |