From 81558fe7cb2c0a7d00b93eae9baebc62b49ba28a Mon Sep 17 00:00:00 2001 From: flashcode Date: Mon, 28 Apr 2008 17:48:49 +0200 Subject: Send quit signal when terminal is lost (clean quit: disconnect from servers, ..) --- po/cs.po | 17 ++++++++++++----- po/de.po | 17 ++++++++++++----- po/es.po | 36 +++++++++++++++++++++--------------- po/fr.po | 18 +++++++++++++++--- po/hu.po | 17 ++++++++++++----- po/ru.po | 17 ++++++++++++----- po/weechat.pot | 12 +++++++++++- src/gui/curses/gui-curses-keyboard.c | 6 ++++++ src/gui/curses/gui-curses-main.c | 9 ++++++--- 9 files changed, 107 insertions(+), 42 deletions(-) diff --git a/po/cs.po b/po/cs.po index 71177540e..2109afd0b 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-04-27 20:32+0200\n" +"POT-Creation-Date: 2008-04-28 16:55+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -1687,6 +1687,17 @@ msgstr "Vyhledávání textu: " msgid " Paste %d lines ? [ctrl-Y] Yes [ctrl-N] No" msgstr " Vložit %d řádků ? [ctrl-Y] Ano [ctrl-N] Ne" +msgid "Terminal lost, exiting WeeChat..." +msgstr "" + +#, c-format +msgid "Signal %s received, exiting WeeChat..." +msgstr "" + +#, fuzzy +msgid "Signal SIGHUP received, reloading configuration files" +msgstr "%s selhalo uložení konfiguračního souboru\n" + msgid "Act: " msgstr "Aktivní: " @@ -5011,10 +5022,6 @@ msgstr "%s špatné parametry pro příkaz \"%s\"\n" #~ msgid "%sirc: configuration file reloaded" #~ msgstr "Konfigurační soubor uložen\n" -#, fuzzy -#~ msgid "%sirc: failed to reload configuration file" -#~ msgstr "%s selhalo uložení konfiguračního souboru\n" - #, fuzzy #~ msgid "%sirc: channel \"%s\" not found for \"%s\" command" #~ msgstr "%s kanál \"%s\" nebyl nalezen příkazem \"%s\"\n" diff --git a/po/de.po b/po/de.po index ff689c9cd..7c6b5da1f 100644 --- a/po/de.po +++ b/po/de.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-04-27 20:32+0200\n" +"POT-Creation-Date: 2008-04-28 16:55+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Thomas Schuetz \n" "Language-Team: weechat-dev \n" @@ -1687,6 +1687,17 @@ msgstr "Textsuche" msgid " Paste %d lines ? [ctrl-Y] Yes [ctrl-N] No" msgstr "" +msgid "Terminal lost, exiting WeeChat..." +msgstr "" + +#, c-format +msgid "Signal %s received, exiting WeeChat..." +msgstr "" + +#, fuzzy +msgid "Signal SIGHUP received, reloading configuration files" +msgstr "%s konnte die Konfigurationsdatei nicht sichern\n" + msgid "Act: " msgstr "Aktiv: " @@ -5010,10 +5021,6 @@ msgstr "%s fehlerhafte Argumente für der \"%s\"-Befehl\n" #~ msgid "%sirc: configuration file reloaded" #~ msgstr "Konfigurationsdatei gesichert\n" -#, fuzzy -#~ msgid "%sirc: failed to reload configuration file" -#~ msgstr "%s konnte die Konfigurationsdatei nicht sichern\n" - #, fuzzy #~ msgid "%sirc: channel \"%s\" not found for \"%s\" command" #~ msgstr "%s Channel \"%s\" für den \"%s\"-Befehl nicht gefunden\n" diff --git a/po/es.po b/po/es.po index 9a8af8458..92fca46fe 100644 --- a/po/es.po +++ b/po/es.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-04-27 20:32+0200\n" +"POT-Creation-Date: 2008-04-28 16:55+0200\n" "PO-Revision-Date: 2007-09-19 12:09+0200\n" "Last-Translator: Roberto González Cardenete \n" "Language-Team: weechat-dev \n" @@ -1111,8 +1111,8 @@ msgstr "marca de tiempo para la fecha mostrada cuando el día cambió" #, fuzzy msgid "use a marker (line or char) on buffers to show first unread line" msgstr "" -"usar un marcador en los servidores/canales para mostrar la primera línea " -"sin leer" +"usar un marcador en los servidores/canales para mostrar la primera línea sin " +"leer" #, c-format msgid "" @@ -1632,8 +1632,8 @@ msgid "" "support.\n" "Be careful, private info may be in these files.\n" msgstr "" -"Por favor, envía %s/%s, %s/%s y los mensajes de arriba a los " -"desarrolladores de Weechat para el soporte.\n" +"Por favor, envía %s/%s, %s/%s y los mensajes de arriba a los desarrolladores " +"de Weechat para el soporte.\n" "Sé cuidadoso, puede que haya información privada en estos ficheros.\n" #, c-format @@ -1671,6 +1671,17 @@ msgstr "" msgid " Paste %d lines ? [ctrl-Y] Yes [ctrl-N] No" msgstr "" +msgid "Terminal lost, exiting WeeChat..." +msgstr "" + +#, c-format +msgid "Signal %s received, exiting WeeChat..." +msgstr "" + +#, fuzzy +msgid "Signal SIGHUP received, reloading configuration files" +msgstr "%s falló al salvar el archivo de configuración\n" + msgid "Act: " msgstr "Act: " @@ -5012,10 +5023,6 @@ msgstr "%s argumentos incorrectos para el comando \"%s\"\n" #~ msgid "%sirc: configuration file reloaded" #~ msgstr "Archivo de configuración guardado\n" -#, fuzzy -#~ msgid "%sirc: failed to reload configuration file" -#~ msgstr "%s falló al salvar el archivo de configuración\n" - #, fuzzy #~ msgid "%sirc: channel \"%s\" not found for \"%s\" command" #~ msgstr "%s canal \"%s\" no encontrado para el comando \"%s\"\n" @@ -5164,8 +5171,8 @@ msgstr "%s argumentos incorrectos para el comando \"%s\"\n" #~ "maximum number of lines in history for one server/channel/private window " #~ "(0 = unlimited)" #~ msgstr "" -#~ "número máximo de líneas en el histórico para un servidor/canal/" -#~ "privado (0 = ilimitado)" +#~ "número máximo de líneas en el histórico para un servidor/canal/privado " +#~ "(0 = ilimitado)" #, fuzzy #~ msgid "log messages from plugins" @@ -5359,8 +5366,8 @@ msgstr "%s argumentos incorrectos para el comando \"%s\"\n" #~ "max size for aligning nick and other messages (should be >= to " #~ "look_align_size)" #~ msgstr "" -#~ "tamaño máximo para la alineación de nick y otros mensajes (debería " -#~ "ser >= a look_align_size)" +#~ "tamaño máximo para la alineación de nick y otros mensajes (debería ser " +#~ ">= a look_align_size)" #~ msgid "server name not found" #~ msgstr "nombre de servidor no encontrado" @@ -6175,8 +6182,7 @@ msgstr "%s argumentos incorrectos para el comando \"%s\"\n" #~ msgid "color for chan owner symbol (specific to unrealircd)" #~ msgstr "" -#~ "color para el símbolo de propietario de canal (especificado en " -#~ "unrealircd)" +#~ "color para el símbolo de propietario de canal (especificado en unrealircd)" #~ msgid "color for chan admin symbol" #~ msgstr "color para el símbolo de administrador de canal" diff --git a/po/fr.po b/po/fr.po index 2e472863c..1ec87e5b4 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-04-27 20:32+0200\n" -"PO-Revision-Date: 2008-04-27 20:33+0200\n" +"POT-Creation-Date: 2008-04-28 16:55+0200\n" +"PO-Revision-Date: 2008-04-28 16:55+0200\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -1130,7 +1130,9 @@ msgid "time format for date displayed when day changed" msgstr "format de date pour la date affichée quand le jour a changé" msgid "use a marker (line or char) on buffers to show first unread line" -msgstr "utiliser un marqueur (ligne ou caractère) sur les tampons pour montrer la première ligne non lue" +msgstr "" +"utiliser un marqueur (ligne ou caractère) sur les tampons pour montrer la " +"première ligne non lue" #, c-format msgid "" @@ -1622,6 +1624,16 @@ msgstr "Recherche texte: " msgid " Paste %d lines ? [ctrl-Y] Yes [ctrl-N] No" msgstr " Coller %d lignes ? [ctrl-Y] Oui [ctrl-N] Non" +msgid "Terminal lost, exiting WeeChat..." +msgstr "Terminal perdu, sortie de WeeChat..." + +#, c-format +msgid "Signal %s received, exiting WeeChat..." +msgstr "Signal %s reçu, sortie de WeeChat..." + +msgid "Signal SIGHUP received, reloading configuration files" +msgstr "Signal SIGHUP reçu, rechargement des fichiers de configuration" + msgid "Act: " msgstr "Act: " diff --git a/po/hu.po b/po/hu.po index c4630372f..a51cd9aa6 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-04-27 20:32+0200\n" +"POT-Creation-Date: 2008-04-28 16:55+0200\n" "PO-Revision-Date: 2007-10-10 18:07+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -1691,6 +1691,17 @@ msgstr "Szöveg keresése: " msgid " Paste %d lines ? [ctrl-Y] Yes [ctrl-N] No" msgstr " Beszúrható %d sor? [ctrl-Y] Igen [ctrl-N] Nem" +msgid "Terminal lost, exiting WeeChat..." +msgstr "" + +#, c-format +msgid "Signal %s received, exiting WeeChat..." +msgstr "" + +#, fuzzy +msgid "Signal SIGHUP received, reloading configuration files" +msgstr "%s nem sikerült a konfigurációs fájlt elmenteni\n" + msgid "Act: " msgstr "Akt: " @@ -5013,10 +5024,6 @@ msgstr "%s rossz argumentum a \"%s\" parancsnak\n" #~ msgid "%sirc: configuration file reloaded" #~ msgstr "Konfigurációs fájl elmentve\n" -#, fuzzy -#~ msgid "%sirc: failed to reload configuration file" -#~ msgstr "%s nem sikerült a konfigurációs fájlt elmenteni\n" - #, fuzzy #~ msgid "%sirc: channel \"%s\" not found for \"%s\" command" #~ msgstr "%s a \"%s\" szoba nem található a \"%s\" parancshoz\n" diff --git a/po/ru.po b/po/ru.po index 4121617c6..f1bda7e36 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-04-27 20:32+0200\n" +"POT-Creation-Date: 2008-04-28 16:55+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -1695,6 +1695,17 @@ msgstr "Поиск текста: " msgid " Paste %d lines ? [ctrl-Y] Yes [ctrl-N] No" msgstr " Вставить %d строк ? [ctrl-Y] Да [ctrl-N] Нет" +msgid "Terminal lost, exiting WeeChat..." +msgstr "" + +#, c-format +msgid "Signal %s received, exiting WeeChat..." +msgstr "" + +#, fuzzy +msgid "Signal SIGHUP received, reloading configuration files" +msgstr "%s не могу сохранить конфигурационный файл\n" + msgid "Act: " msgstr "Активны: " @@ -4995,10 +5006,6 @@ msgstr "%s некорректные аргументы команды \"%s\"\n" #~ msgid "%sirc: configuration file reloaded" #~ msgstr "Конфигурационный файл сохранён\n" -#, fuzzy -#~ msgid "%sirc: failed to reload configuration file" -#~ msgstr "%s не могу сохранить конфигурационный файл\n" - #, fuzzy #~ msgid "%sirc: channel \"%s\" not found for \"%s\" command" #~ msgstr "%s канал \"%s\" не найден для команды \"%s\"\n" diff --git a/po/weechat.pot b/po/weechat.pot index a57121ca8..ffcf794a1 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: 2008-04-27 20:32+0200\n" +"POT-Creation-Date: 2008-04-28 16:55+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1391,6 +1391,16 @@ msgstr "" msgid " Paste %d lines ? [ctrl-Y] Yes [ctrl-N] No" msgstr "" +msgid "Terminal lost, exiting WeeChat..." +msgstr "" + +#, c-format +msgid "Signal %s received, exiting WeeChat..." +msgstr "" + +msgid "Signal SIGHUP received, reloading configuration files" +msgstr "" + msgid "Act: " msgstr "" diff --git a/src/gui/curses/gui-curses-keyboard.c b/src/gui/curses/gui-curses-keyboard.c index 154fb2dbf..74131aa7a 100644 --- a/src/gui/curses/gui-curses-keyboard.c +++ b/src/gui/curses/gui-curses-keyboard.c @@ -30,6 +30,8 @@ #include "../../core/weechat.h" #include "../../core/wee-config.h" +#include "../../core/wee-hook.h" +#include "../../core/wee-log.h" #include "../../core/wee-utf8.h" #include "../../core/wee-string.h" #include "../../plugins/plugin.h" @@ -351,6 +353,8 @@ gui_keyboard_read_cb (void *data) if (ret == 0) { /* no data on stdin, terminal lost */ + log_printf (_("Terminal lost, exiting WeeChat...")); + hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL); quit_weechat = 1; return WEECHAT_RC_OK; } @@ -371,6 +375,8 @@ gui_keyboard_read_cb (void *data) if (ret == 0) { /* no data on stdin, terminal lost */ + log_printf (_("Terminal lost, exiting WeeChat...")); + hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL); quit_weechat = 1; return WEECHAT_RC_OK; } diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c index 2933ddec6..5a9976ca4 100644 --- a/src/gui/curses/gui-curses-main.c +++ b/src/gui/curses/gui-curses-main.c @@ -160,8 +160,9 @@ gui_main_init () void gui_main_signal_sigquit () { - log_printf (_("Signal %s received, quitting WeeChat..."), + log_printf (_("Signal %s received, exiting WeeChat..."), "SIGQUIT"); + hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL); quit_weechat = 1; } @@ -172,8 +173,9 @@ gui_main_signal_sigquit () void gui_main_signal_sigterm () { - log_printf (_("Signal %s received, quitting WeeChat..."), + log_printf (_("Signal %s received, exiting WeeChat..."), "SIGTERM"); + hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL); quit_weechat = 1; } @@ -184,7 +186,6 @@ gui_main_signal_sigterm () void gui_main_signal_sighup () { - log_printf (_("Signal SIGHUP received, reloading configuration files")); gui_reload_config = 1; } @@ -235,6 +236,8 @@ gui_main_loop () if (gui_reload_config) { gui_reload_config = 0; + log_printf (_("Signal SIGHUP received, reloading configuration " + "files")); command_reload (NULL, NULL, 0, NULL, NULL); } -- cgit v1.2.3