diff --git a/ChangeLog b/ChangeLog index 32168c06e..07d8b026a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,8 @@ Version 0.3.2 (under dev!) string_is_command_char and string_input_for_buffer in plugin and script API * core: add new option weechat.look.read_marker_always_show * core: use arguments for infolist "nicklist" to return only one nick or group +* gui: refresh screen when exiting WeeChat (to display messages printed after + /quit) * gui: fix bug with global history, reset pointer to last entry after each user input (bug #28754) * gui: fix bug with bar background after text with background color (bug #28157) diff --git a/po/cs.po b/po/cs.po index 16f1988ea..6ddb1382f 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-19 13:59+0100\n" +"POT-Creation-Date: 2010-03-20 17:06+0100\n" "PO-Revision-Date: 2010-03-05 10:43+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -5448,6 +5448,10 @@ msgstr "Plugin \"%s\" odebrán" msgid "%sError: plugin \"%s\" not found" msgstr "%sChyba: plugin \"%s\" nenalezen" +#, fuzzy +msgid "Plugins unloaded" +msgstr "Načtené pluginy:" + msgid "Actions (letter+enter):" msgstr "Akce (písmeno+enter):" @@ -5872,6 +5876,10 @@ msgstr " napsal \"%s\", licence: %s" msgid " (none)" msgstr " (žádný)" +#, fuzzy, c-format +msgid "%s: scripts unloaded" +msgstr "%s: skript \"%s\" odebrán" + #, c-format msgid "" "%s%s: unable to call function \"%s\", script is not initialized (script: %s)" diff --git a/po/de.po b/po/de.po index 11eaa2409..85b0b00a2 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-19 13:59+0100\n" +"POT-Creation-Date: 2010-03-20 17:06+0100\n" "PO-Revision-Date: 2010-03-04 10:19+0100\n" "Last-Translator: Nils G \n" "Language-Team: weechat-dev \n" @@ -5645,6 +5645,10 @@ msgstr "Erweiterung \"%s\" wurde deinstalliert" msgid "%sError: plugin \"%s\" not found" msgstr "%sFehler: Die Erweiterung \"%s\" wurde nicht gefunden" +#, fuzzy +msgid "Plugins unloaded" +msgstr "Installierte Erweiterungen:" + msgid "Actions (letter+enter):" msgstr "Aktion (Zeichen+Enter):" @@ -6076,6 +6080,10 @@ msgstr " geschrieben von \"%s\", Lizenz: %s" msgid " (none)" msgstr " (keine)" +#, fuzzy, c-format +msgid "%s: scripts unloaded" +msgstr "%s: Das Skript \"%s\" wurde deinstalliert" + #, c-format msgid "" "%s%s: unable to call function \"%s\", script is not initialized (script: %s)" diff --git a/po/es.po b/po/es.po index 44a385fdb..2af97c45c 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-19 13:59+0100\n" +"POT-Creation-Date: 2010-03-20 17:06+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -5508,6 +5508,10 @@ msgstr "Plugin \"%s\" descargado" msgid "%sError: plugin \"%s\" not found" msgstr "%sError: plugin \"%s\" no encontrado" +#, fuzzy +msgid "Plugins unloaded" +msgstr "Plugins cargados:" + msgid "Actions (letter+enter):" msgstr "Acciones (letra+enter)" @@ -5940,6 +5944,10 @@ msgstr " escrito por \"%s\", licencia: %s" msgid " (none)" msgstr " (ninguno)" +#, fuzzy, c-format +msgid "%s: scripts unloaded" +msgstr "%s: script \"%s\" descargado" + #, c-format msgid "" "%s%s: unable to call function \"%s\", script is not initialized (script: %s)" diff --git a/po/fr.po b/po/fr.po index be7ef7ac2..be3942d35 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-19 13:59+0100\n" -"PO-Revision-Date: 2010-03-14 16:44+0100\n" +"POT-Creation-Date: 2010-03-20 17:06+0100\n" +"PO-Revision-Date: 2010-03-20 16:33+0100\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -5571,6 +5571,9 @@ msgstr "Extension \"%s\" déchargée" msgid "%sError: plugin \"%s\" not found" msgstr "%sErreur: extension \"%s\" non trouvée" +msgid "Plugins unloaded" +msgstr "Extensions déchargées" + msgid "Actions (letter+enter):" msgstr "Actions (lettre+entrée):" @@ -6004,6 +6007,10 @@ msgstr " écrit par \"%s\", licence: %s" msgid " (none)" msgstr " (aucun)" +#, c-format +msgid "%s: scripts unloaded" +msgstr "%s: scripts déchargés" + #, c-format msgid "" "%s%s: unable to call function \"%s\", script is not initialized (script: %s)" diff --git a/po/hu.po b/po/hu.po index d2a6addc1..ca4a600ca 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-19 13:59+0100\n" +"POT-Creation-Date: 2010-03-20 17:06+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -5310,6 +5310,10 @@ msgstr "A \"%s\" modul eltávolítva.\n" msgid "%sError: plugin \"%s\" not found" msgstr "%s a \"%s\" modul nem található\n" +#, fuzzy +msgid "Plugins unloaded" +msgstr "Betöltött modulok:\n" + msgid "Actions (letter+enter):" msgstr "" @@ -5735,6 +5739,10 @@ msgstr "" msgid " (none)" msgstr "(ismeretlen)" +#, fuzzy, c-format +msgid "%s: scripts unloaded" +msgstr "A \"%s\" modul eltávolítva.\n" + #, fuzzy, c-format msgid "" "%s%s: unable to call function \"%s\", script is not initialized (script: %s)" diff --git a/po/it.po b/po/it.po index 31ecfc1c3..35313c680 100644 --- a/po/it.po +++ b/po/it.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Weechat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-19 13:59+0100\n" +"POT-Creation-Date: 2010-03-20 17:06+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -5499,6 +5499,10 @@ msgstr "Plugin \"%s\" disattivato" msgid "%sError: plugin \"%s\" not found" msgstr "%sErrore: plugin \"%s\" non trovato" +#, fuzzy +msgid "Plugins unloaded" +msgstr "Plugin caricati:" + msgid "Actions (letter+enter):" msgstr "Azioni (lettera+invio)" @@ -5927,6 +5931,10 @@ msgstr " scritto da \"%s\", licenza: %s" msgid " (none)" msgstr " (nessuno)" +#, fuzzy, c-format +msgid "%s: scripts unloaded" +msgstr "%s: script \"%s\" disattivato" + #, c-format msgid "" "%s%s: unable to call function \"%s\", script is not initialized (script: %s)" diff --git a/po/pl.po b/po/pl.po index ec8e2a35e..71d04f166 100644 --- a/po/pl.po +++ b/po/pl.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-19 13:59+0100\n" +"POT-Creation-Date: 2010-03-20 17:06+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Krzysztof Koroscik \n" "Language-Team: Polish\n" @@ -5489,6 +5489,10 @@ msgstr "Wtyczka \"%s\" wyładowana" msgid "%sError: plugin \"%s\" not found" msgstr "%sBłąd: nie znaleziono wtyczki \"%s\"" +#, fuzzy +msgid "Plugins unloaded" +msgstr "Załadowane pluginy:" + msgid "Actions (letter+enter):" msgstr "Akcje (litera+enter)" @@ -5916,6 +5920,10 @@ msgstr " napisane przez \"%s\", licencja: %s" msgid " (none)" msgstr "(żaden)" +#, fuzzy, c-format +msgid "%s: scripts unloaded" +msgstr "%s: skrypt \"%s\" wyładowano" + #, c-format msgid "" "%s%s: unable to call function \"%s\", script is not initialized (script: %s)" diff --git a/po/ru.po b/po/ru.po index e599e9fb2..1e492d567 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-03-19 13:59+0100\n" +"POT-Creation-Date: 2010-03-20 17:06+0100\n" "PO-Revision-Date: 2010-02-23 10:43+0100\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -5313,6 +5313,10 @@ msgstr "Plugin \"%s\" выгружен.\n" msgid "%sError: plugin \"%s\" not found" msgstr "%s plugin \"%s\" не найден\n" +#, fuzzy +msgid "Plugins unloaded" +msgstr "Загруженные plugin'ы\n" + msgid "Actions (letter+enter):" msgstr "" @@ -5738,6 +5742,10 @@ msgstr "" msgid " (none)" msgstr "(неизвестен)" +#, fuzzy, c-format +msgid "%s: scripts unloaded" +msgstr "Plugin \"%s\" выгружен.\n" + #, fuzzy, c-format msgid "" "%s%s: unable to call function \"%s\", script is not initialized (script: %s)" diff --git a/po/weechat.pot b/po/weechat.pot index a191ed5d4..f9b85835e 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: 2010-03-19 13:59+0100\n" +"POT-Creation-Date: 2010-03-20 17:06+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -4604,6 +4604,9 @@ msgstr "" msgid "%sError: plugin \"%s\" not found" msgstr "" +msgid "Plugins unloaded" +msgstr "" + msgid "Actions (letter+enter):" msgstr "" @@ -5006,6 +5009,10 @@ msgstr "" msgid " (none)" msgstr "" +#, c-format +msgid "%s: scripts unloaded" +msgstr "" + #, c-format msgid "" "%s%s: unable to call function \"%s\", script is not initialized (script: %s)" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 395f9c263..319ce8b74 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -3471,6 +3471,7 @@ command_upgrade (void *data, struct t_gui_buffer *buffer, exec_args[3] = strdup (weechat_home); weechat_quit = 1; + weechat_upgrading = 1; /* save layout, unload plugins, save config, then upgrade */ gui_layout_save_on_exit (); diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c index 44ba81ec5..46511ad87 100644 --- a/src/gui/curses/gui-curses-main.c +++ b/src/gui/curses/gui-curses-main.c @@ -349,6 +349,17 @@ gui_main_end (int clean_exit) { if (clean_exit) { + /* + * final refreshs, to see messages just before exiting + * (if we are upgrading, don't refresh anything!) + */ + if (!weechat_upgrading) + { + gui_main_refreshs (); + if (gui_window_refresh_needed) + gui_main_refreshs (); + } + /* remove bar items and bars */ gui_bar_item_end (); gui_bar_free_all (); diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 3da7322bc..b1a08fdef 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -1659,7 +1659,7 @@ gui_buffer_close (struct t_gui_buffer *buffer) ptr_window = ptr_window->next_window) { if (ptr_window->buffer == buffer) - ptr_window->buffer = NULL; + ptr_window->buffer = gui_buffers; } hook_signal_send ("buffer_closed", diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 5abf0eb88..6bd6d420b 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -840,9 +840,12 @@ plugin_unload (struct t_weechat_plugin *plugin) plugin_remove (plugin); - gui_chat_printf (NULL, - _("Plugin \"%s\" unloaded"), - (name) ? name : "???"); + if ((weechat_debug_core >= 1) || !plugin_quiet) + { + gui_chat_printf (NULL, + _("Plugin \"%s\" unloaded"), + (name) ? name : "???"); + } if (name) free (name); } @@ -875,10 +878,21 @@ plugin_unload_name (const char *name) void plugin_unload_all () { + int plugins_loaded; + + plugins_loaded = (weechat_plugins) ? 1 : 0; + + plugin_quiet = 1; while (weechat_plugins) { plugin_unload (last_weechat_plugin); } + plugin_quiet = 0; + + if (plugins_loaded) + { + gui_chat_printf (NULL, _("Plugins unloaded")); + } } /* diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c index f8c6469cf..1f69f36b7 100644 --- a/src/plugins/scripts/lua/weechat-lua.c +++ b/src/plugins/scripts/lua/weechat-lua.c @@ -305,9 +305,12 @@ weechat_lua_unload (struct t_plugin_script *script) char *lua_argv[1] = { NULL }; void *interpreter; - weechat_printf (NULL, - weechat_gettext ("%s: unloading script \"%s\""), - LUA_PLUGIN_NAME, script->name); + if ((weechat_lua_plugin->debug >= 1) || !lua_quiet) + { + weechat_printf (NULL, + weechat_gettext ("%s: unloading script \"%s\""), + LUA_PLUGIN_NAME, script->name); + } if (script->shutdown_func && script->shutdown_func[0]) { @@ -676,11 +679,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) int weechat_plugin_end (struct t_weechat_plugin *plugin) { - /* make C compiler happy */ - (void) plugin; - /* unload all scripts */ - weechat_lua_unload_all (); + lua_quiet = 1; + script_end (plugin, &lua_scripts, &weechat_lua_unload_all); + lua_quiet = 0; return WEECHAT_RC_OK; } diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c index 212b07cee..447d4717e 100644 --- a/src/plugins/scripts/perl/weechat-perl.c +++ b/src/plugins/scripts/perl/weechat-perl.c @@ -432,10 +432,13 @@ weechat_perl_unload (struct t_plugin_script *script) int *r; char *perl_argv[1] = { NULL }; void *interpreter; - - weechat_printf (NULL, - weechat_gettext ("%s: unloading script \"%s\""), - PERL_PLUGIN_NAME, script->name); + + if ((weechat_perl_plugin->debug >= 1) || !perl_quiet) + { + weechat_printf (NULL, + weechat_gettext ("%s: unloading script \"%s\""), + PERL_PLUGIN_NAME, script->name); + } #ifdef MULTIPLICITY PERL_SET_CONTEXT (script->interpreter); @@ -871,11 +874,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) int weechat_plugin_end (struct t_weechat_plugin *plugin) { - /* make C compiler happy */ - (void) plugin; - /* unload all scripts */ - weechat_perl_unload_all (); + perl_quiet = 1; + script_end (plugin, &perl_scripts, &weechat_perl_unload_all); + perl_quiet = 0; #ifndef MULTIPLICITY /* free perl intepreter */ diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c index e406de6b7..55e1be01e 100644 --- a/src/plugins/scripts/python/weechat-python.c +++ b/src/plugins/scripts/python/weechat-python.c @@ -537,9 +537,12 @@ weechat_python_unload (struct t_plugin_script *script) void *interpreter; PyThreadState *old_interpreter; - weechat_printf (NULL, - weechat_gettext ("%s: unloading script \"%s\""), - PYTHON_PLUGIN_NAME, script->name); + if ((weechat_python_plugin->debug >= 1) || !python_quiet) + { + weechat_printf (NULL, + weechat_gettext ("%s: unloading script \"%s\""), + PYTHON_PLUGIN_NAME, script->name); + } if (script->shutdown_func && script->shutdown_func[0]) { @@ -943,11 +946,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) int weechat_plugin_end (struct t_weechat_plugin *plugin) { - /* make C compiler happy */ - (void) plugin; - /* unload all scripts */ - weechat_python_unload_all (); + python_quiet = 1; + script_end (plugin, &python_scripts, &weechat_python_unload_all); + python_quiet = 0; /* free Python interpreter */ if (python_mainThreadState != NULL) diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c index fe4a1181a..9355dc8e8 100644 --- a/src/plugins/scripts/ruby/weechat-ruby.c +++ b/src/plugins/scripts/ruby/weechat-ruby.c @@ -592,9 +592,12 @@ weechat_ruby_unload (struct t_plugin_script *script) char *ruby_argv[1] = { NULL }; void *interpreter; - weechat_printf (NULL, - weechat_gettext ("%s: unloading script \"%s\""), - RUBY_PLUGIN_NAME, script->name); + if ((weechat_ruby_plugin->debug >= 1) || !ruby_quiet) + { + weechat_printf (NULL, + weechat_gettext ("%s: unloading script \"%s\""), + RUBY_PLUGIN_NAME, script->name); + } if (script->shutdown_func && script->shutdown_func[0]) { @@ -1063,11 +1066,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) int weechat_plugin_end (struct t_weechat_plugin *plugin) { - /* make C compiler happy */ - (void) plugin; - /* unload all scripts */ - weechat_ruby_unload_all (); + ruby_quiet = 1; + script_end (plugin, &ruby_scripts, &weechat_ruby_unload_all); + ruby_quiet = 0; ruby_cleanup (0); diff --git a/src/plugins/scripts/script.c b/src/plugins/scripts/script.c index 1afaa40b7..52658650b 100644 --- a/src/plugins/scripts/script.c +++ b/src/plugins/scripts/script.c @@ -172,7 +172,7 @@ script_upgrade_set_buffer_callbacks (struct t_weechat_plugin *weechat_plugin, } /* - * script_init: initialize script + * script_init: initialize script plugin */ void @@ -1238,6 +1238,28 @@ script_infolist_list_scripts (struct t_weechat_plugin *weechat_plugin, return NULL; } +/* + * script_end: end script plugin + */ + +void +script_end (struct t_weechat_plugin *weechat_plugin, + struct t_plugin_script **scripts, + void (*callback_unload_all)()) +{ + int scripts_loaded; + + scripts_loaded = (*scripts) ? 1 : 0; + + (void)(callback_unload_all) (); + + if (scripts_loaded) + { + weechat_printf (NULL, _("%s: scripts unloaded"), + weechat_plugin->name); + } +} + /* * script_print_log: print script infos in log (usually for crash dump) */ diff --git a/src/plugins/scripts/script.h b/src/plugins/scripts/script.h index 58a20e74c..702cb0f79 100644 --- a/src/plugins/scripts/script.h +++ b/src/plugins/scripts/script.h @@ -143,6 +143,9 @@ extern struct t_infolist *script_infolist_list_scripts (struct t_weechat_plugin struct t_plugin_script *scripts, void *pointer, const char *arguments); +extern void script_end (struct t_weechat_plugin *weechat_plugin, + struct t_plugin_script **scripts, + void (*callback_unload_all)()); extern void script_print_log (struct t_weechat_plugin *weechat_plugin, struct t_plugin_script *scripts); diff --git a/src/plugins/scripts/tcl/weechat-tcl.c b/src/plugins/scripts/tcl/weechat-tcl.c index 4a5a05666..cd2216b68 100644 --- a/src/plugins/scripts/tcl/weechat-tcl.c +++ b/src/plugins/scripts/tcl/weechat-tcl.c @@ -240,9 +240,12 @@ weechat_tcl_unload (struct t_plugin_script *script) Tcl_Interp* interp; void *pointer; - weechat_printf (NULL, - weechat_gettext ("%s: unloading script \"%s\""), - TCL_PLUGIN_NAME, script->name); + if ((weechat_tcl_plugin->debug >= 1) || !tcl_quiet) + { + weechat_printf (NULL, + weechat_gettext ("%s: unloading script \"%s\""), + TCL_PLUGIN_NAME, script->name); + } if (script->shutdown_func && script->shutdown_func[0]) { @@ -611,10 +614,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) int weechat_plugin_end (struct t_weechat_plugin *plugin) { - (void) plugin; - /* unload all scripts */ - weechat_tcl_unload_all (); + tcl_quiet = 1; + script_end (plugin, &tcl_scripts, &weechat_tcl_unload_all); + tcl_quiet = 0; return WEECHAT_RC_OK; }