From a0bf3938f18c275fe585639db7ad9d945e462d94 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 9 Feb 2014 12:51:34 +0100 Subject: [PATCH] core: display a warning in case of inconsistency between the options weechat.look.save_{config|layout}_on_exit --- ChangeLog | 5 +++++ po/cs.po | 12 +++++++++--- po/de.po | 12 +++++++++--- po/es.po | 12 +++++++++--- po/fr.po | 19 +++++++++++++------ po/hu.po | 11 ++++++++--- po/it.po | 12 +++++++++--- po/ja.po | 12 +++++++++--- po/pl.po | 12 +++++++++--- po/pt_BR.po | 12 +++++++++--- po/ru.po | 11 ++++++++--- po/tr.po | 11 ++++++++--- po/weechat.pot | 11 ++++++++--- src/core/wee-config.c | 40 +++++++++++++++++++++++++++++++++++++--- 14 files changed, 150 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index dcc3d1e5e..3c0437ebb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,11 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] (file 'NEWS' in sources). +== Version 0.4.4 (under dev!) + +* core: display a warning in case of inconsistency between the options + weechat.look.save_{config|layout}_on_exit + == Version 0.4.3 (2014-02-09) * core: fix hotlist problems after apply of a layout (bug #41481) diff --git a/po/cs.po b/po/cs.po index 118d60356..a58e6e6d6 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-09 12:39+0100\n" +"POT-Creation-Date: 2014-02-09 12:43+0100\n" "PO-Revision-Date: 2014-01-29 14:09+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -2515,8 +2515,14 @@ msgid "names of secured data (file sec.conf, section data)" msgstr "" msgid "" -"Warning: you should now issue /save to write \"save_config_on_exit\" option " -"in configuration file" +"Warning: option weechat.look.save_config_on_exit is disabled, so the option " +"weechat.look.save_layout_on_exit is ignored" +msgstr "" + +#, fuzzy +msgid "" +"Warning: you should now issue /save to write option weechat.look." +"save_config_on_exit in configuration file" msgstr "" "Upozornění: mel by ste nyní provést /save pro zapsání volby " "\"save_config_on_exit\" do konfiguračního souboru" diff --git a/po/de.po b/po/de.po index 68d7ef698..053d97a5f 100644 --- a/po/de.po +++ b/po/de.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-09 12:39+0100\n" +"POT-Creation-Date: 2014-02-09 12:43+0100\n" "PO-Revision-Date: 2014-02-02 00:44+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -2898,8 +2898,14 @@ msgid "names of secured data (file sec.conf, section data)" msgstr "Namen der geschützten Daten (Datei sec.conf, section data)" msgid "" -"Warning: you should now issue /save to write \"save_config_on_exit\" option " -"in configuration file" +"Warning: option weechat.look.save_config_on_exit is disabled, so the option " +"weechat.look.save_layout_on_exit is ignored" +msgstr "" + +#, fuzzy +msgid "" +"Warning: you should now issue /save to write option weechat.look." +"save_config_on_exit in configuration file" msgstr "" "Warnung: Sie sollten jetzt /save ausführen, um die Option " "\"save_config_on_exit\" in die Konfigurationsdatei zu übernehmen" diff --git a/po/es.po b/po/es.po index 8eb39fcef..a9ec4e5d4 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-09 12:39+0100\n" +"POT-Creation-Date: 2014-02-09 12:43+0100\n" "PO-Revision-Date: 2014-01-29 14:11+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -2646,8 +2646,14 @@ msgid "names of secured data (file sec.conf, section data)" msgstr "" msgid "" -"Warning: you should now issue /save to write \"save_config_on_exit\" option " -"in configuration file" +"Warning: option weechat.look.save_config_on_exit is disabled, so the option " +"weechat.look.save_layout_on_exit is ignored" +msgstr "" + +#, fuzzy +msgid "" +"Warning: you should now issue /save to write option weechat.look." +"save_config_on_exit in configuration file" msgstr "" "Atención: ahora se debería ejecutar /save para guardar la opción " "\"save_config_on_exit\" en el archivo de configuración" diff --git a/po/fr.po b/po/fr.po index 81911444d..1af71d584 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-09 12:39+0100\n" -"PO-Revision-Date: 2014-02-09 12:39+0100\n" +"POT-Creation-Date: 2014-02-09 12:43+0100\n" +"PO-Revision-Date: 2014-02-09 12:45+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -2824,11 +2824,18 @@ msgid "names of secured data (file sec.conf, section data)" msgstr "noms de données sécurisées (fichier sec.conf, section data)" msgid "" -"Warning: you should now issue /save to write \"save_config_on_exit\" option " -"in configuration file" +"Warning: option weechat.look.save_config_on_exit is disabled, so the option " +"weechat.look.save_layout_on_exit is ignored" msgstr "" -"Attention: vous devriez taper /save maintenant pour écrire l'option " -"\"save_config_on_exit\" dans le fichier de configuration" +"Attention: l'option weechat.look.save_config_on_exit est désactivée, donc " +"l'option weechat.look.save_layout_on_exit est ignorée" + +msgid "" +"Warning: you should now issue /save to write option weechat.look." +"save_config_on_exit in configuration file" +msgstr "" +"Attention: vous devriez taper /save maintenant pour écrire l'option weechat." +"look.save_config_on_exit dans le fichier de configuration" msgid "" "WARNING: this option can cause serious display bugs, if you have such " diff --git a/po/hu.po b/po/hu.po index 73cd72ef7..57b98ed21 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-09 12:39+0100\n" +"POT-Creation-Date: 2014-02-09 12:43+0100\n" "PO-Revision-Date: 2014-01-06 10:16+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -2194,10 +2194,15 @@ msgstr "Aliaszok listája:\n" msgid "names of secured data (file sec.conf, section data)" msgstr "" +msgid "" +"Warning: option weechat.look.save_config_on_exit is disabled, so the option " +"weechat.look.save_layout_on_exit is ignored" +msgstr "" + #, fuzzy msgid "" -"Warning: you should now issue /save to write \"save_config_on_exit\" option " -"in configuration file" +"Warning: you should now issue /save to write option weechat.look." +"save_config_on_exit in configuration file" msgstr "" "%s most javasolt a /save parancs futtatása, hogy a \"save_on_exit\" (mentés " "kilépéskor) opció bekerüljön a konfigurációs fájlba.\n" diff --git a/po/it.po b/po/it.po index 8ba29dd0f..68b4a94fb 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-09 12:39+0100\n" +"POT-Creation-Date: 2014-02-09 12:43+0100\n" "PO-Revision-Date: 2014-01-29 14:12+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -2730,8 +2730,14 @@ msgid "names of secured data (file sec.conf, section data)" msgstr "nome dei dati sensibili (file sec.conf, sezione data)" msgid "" -"Warning: you should now issue /save to write \"save_config_on_exit\" option " -"in configuration file" +"Warning: option weechat.look.save_config_on_exit is disabled, so the option " +"weechat.look.save_layout_on_exit is ignored" +msgstr "" + +#, fuzzy +msgid "" +"Warning: you should now issue /save to write option weechat.look." +"save_config_on_exit in configuration file" msgstr "" "Attenzione: è necessario digitare /save per salvare l'opzione " "\"save_config_on_exit\" nel file di configurazione" diff --git a/po/ja.po b/po/ja.po index e172b24ca..570a66b8d 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-09 12:39+0100\n" +"POT-Creation-Date: 2014-02-09 12:43+0100\n" "PO-Revision-Date: 2014-01-30 11:25+0900\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -2752,8 +2752,14 @@ msgid "names of secured data (file sec.conf, section data)" msgstr "保護データの名前 (sec.conf ファイル、セクションデータ)" msgid "" -"Warning: you should now issue /save to write \"save_config_on_exit\" option " -"in configuration file" +"Warning: option weechat.look.save_config_on_exit is disabled, so the option " +"weechat.look.save_layout_on_exit is ignored" +msgstr "" + +#, fuzzy +msgid "" +"Warning: you should now issue /save to write option weechat.look." +"save_config_on_exit in configuration file" msgstr "" "警告: 設定ファイルに \"save_config_on_exit\" オプションを書き込むには、/save " "を使ってください" diff --git a/po/pl.po b/po/pl.po index 4e48b34e5..83b6358b0 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-09 12:39+0100\n" +"POT-Creation-Date: 2014-02-09 12:43+0100\n" "PO-Revision-Date: 2014-02-06 11:21+0100\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -2809,8 +2809,14 @@ msgid "names of secured data (file sec.conf, section data)" msgstr "nazwy zabezpieczonych danych (plik sec.conf, sekcja data)" msgid "" -"Warning: you should now issue /save to write \"save_config_on_exit\" option " -"in configuration file" +"Warning: option weechat.look.save_config_on_exit is disabled, so the option " +"weechat.look.save_layout_on_exit is ignored" +msgstr "" + +#, fuzzy +msgid "" +"Warning: you should now issue /save to write option weechat.look." +"save_config_on_exit in configuration file" msgstr "" "Ostrzeżenie: należy teraz wykonać /save , w celu zapisania opcji " "\"save_config_on_exit\" w pliku konfiguracyjnym" diff --git a/po/pt_BR.po b/po/pt_BR.po index f2184bcd4..6bea7ffac 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: 2014-02-09 12:39+0100\n" +"POT-Creation-Date: 2014-02-09 12:43+0100\n" "PO-Revision-Date: 2014-01-29 14:13+0100\n" "Last-Translator: Sergio Durigan Junior \n" "Language-Team: weechat-dev \n" @@ -2599,8 +2599,14 @@ msgid "names of secured data (file sec.conf, section data)" msgstr "" msgid "" -"Warning: you should now issue /save to write \"save_config_on_exit\" option " -"in configuration file" +"Warning: option weechat.look.save_config_on_exit is disabled, so the option " +"weechat.look.save_layout_on_exit is ignored" +msgstr "" + +#, fuzzy +msgid "" +"Warning: you should now issue /save to write option weechat.look." +"save_config_on_exit in configuration file" msgstr "" "Aviso: você deve usar /save para escrever a opção \"save_config_on_exit\" no " "arquivo de configuração" diff --git a/po/ru.po b/po/ru.po index dee567729..8f8c2b874 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-09 12:39+0100\n" +"POT-Creation-Date: 2014-02-09 12:43+0100\n" "PO-Revision-Date: 2014-01-06 10:17+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -2217,10 +2217,15 @@ msgstr "Список сокращений:\n" msgid "names of secured data (file sec.conf, section data)" msgstr "" +msgid "" +"Warning: option weechat.look.save_config_on_exit is disabled, so the option " +"weechat.look.save_layout_on_exit is ignored" +msgstr "" + #, fuzzy msgid "" -"Warning: you should now issue /save to write \"save_config_on_exit\" option " -"in configuration file" +"Warning: you should now issue /save to write option weechat.look." +"save_config_on_exit in configuration file" msgstr "" "%s вам следует набрать /save чтобы записать параметр \"save_on_exit\" в " "конфигурационный файл.\n" diff --git a/po/tr.po b/po/tr.po index 5432c3673..54e182a96 100644 --- a/po/tr.po +++ b/po/tr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-09 12:39+0100\n" +"POT-Creation-Date: 2014-02-09 12:43+0100\n" "PO-Revision-Date: 2014-01-06 10:17+0100\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -1965,8 +1965,13 @@ msgid "names of secured data (file sec.conf, section data)" msgstr "" msgid "" -"Warning: you should now issue /save to write \"save_config_on_exit\" option " -"in configuration file" +"Warning: option weechat.look.save_config_on_exit is disabled, so the option " +"weechat.look.save_layout_on_exit is ignored" +msgstr "" + +msgid "" +"Warning: you should now issue /save to write option weechat.look." +"save_config_on_exit in configuration file" msgstr "" msgid "" diff --git a/po/weechat.pot b/po/weechat.pot index 8affb2003..ea737235b 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: 2014-02-09 12:39+0100\n" +"POT-Creation-Date: 2014-02-09 12:43+0100\n" "PO-Revision-Date: 2013-02-14 18:20+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: weechat-dev \n" @@ -1967,8 +1967,13 @@ msgid "names of secured data (file sec.conf, section data)" msgstr "" msgid "" -"Warning: you should now issue /save to write \"save_config_on_exit\" option " -"in configuration file" +"Warning: option weechat.look.save_config_on_exit is disabled, so the option " +"weechat.look.save_layout_on_exit is ignored" +msgstr "" + +msgid "" +"Warning: you should now issue /save to write option weechat.look." +"save_config_on_exit in configuration file" msgstr "" msgid "" diff --git a/src/core/wee-config.c b/src/core/wee-config.c index b4fa19d9a..0b45ee981 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -300,6 +300,23 @@ config_change_sys_rlimit (void *data, struct t_config_option *option) util_setrlimit (); } +/* + * Callback for changes on options "weechat.look.save_{config|layout}_on_exit". + */ + +void +config_change_save_config_layout_on_exit () +{ + if (gui_init_ok && !CONFIG_BOOLEAN(config_look_save_config_on_exit) + && (CONFIG_INTEGER(config_look_save_layout_on_exit) != CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_NONE)) + { + gui_chat_printf (NULL, + _("Warning: option weechat.look.save_config_on_exit " + "is disabled, so the option " + "weechat.look.save_layout_on_exit is ignored")); + } +} + /* * Callback for changes on option "weechat.look.save_config_on_exit". */ @@ -315,9 +332,25 @@ config_change_save_config_on_exit (void *data, struct t_config_option *option) { gui_chat_printf (NULL, _("Warning: you should now issue /save to write " - "\"save_config_on_exit\" option in configuration " - "file")); + "option weechat.look.save_config_on_exit in " + "configuration file")); } + + config_change_save_config_layout_on_exit (); +} + +/* + * Callback for changes on option "weechat.look.save_layout_on_exit". + */ + +void +config_change_save_layout_on_exit (void *data, struct t_config_option *option) +{ + /* make C compiler happy */ + (void) data; + (void) option; + + config_change_save_config_layout_on_exit (); } /* @@ -2586,7 +2619,8 @@ config_weechat_init_options () weechat_config_file, ptr_section, "save_layout_on_exit", "integer", N_("save layout on exit (buffers, windows, or both)"), - "none|buffers|windows|all", 0, 0, "none", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); + "none|buffers|windows|all", 0, 0, "none", NULL, 0, NULL, NULL, + &config_change_save_layout_on_exit, NULL, NULL, NULL); config_look_scroll_amount = config_file_new_option ( weechat_config_file, ptr_section, "scroll_amount", "integer",