diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | doc/de/autogen/user/weechat_commands.txt | 2 | ||||
-rw-r--r-- | doc/en/autogen/user/weechat_commands.txt | 2 | ||||
-rw-r--r-- | doc/fr/autogen/user/weechat_commands.txt | 2 | ||||
-rw-r--r-- | doc/it/autogen/user/weechat_commands.txt | 2 | ||||
-rw-r--r-- | po/cs.po | 6 | ||||
-rw-r--r-- | po/de.po | 6 | ||||
-rw-r--r-- | po/es.po | 6 | ||||
-rw-r--r-- | po/fr.po | 12 | ||||
-rw-r--r-- | po/hu.po | 6 | ||||
-rw-r--r-- | po/it.po | 6 | ||||
-rw-r--r-- | po/pl.po | 6 | ||||
-rw-r--r-- | po/pt_BR.po | 6 | ||||
-rw-r--r-- | po/ru.po | 6 | ||||
-rw-r--r-- | po/weechat.pot | 6 | ||||
-rw-r--r-- | src/core/wee-command.c | 27 | ||||
-rw-r--r-- | src/gui/gui-buffer.c | 27 | ||||
-rw-r--r-- | src/gui/gui-buffer.h | 1 |
18 files changed, 84 insertions, 48 deletions
@@ -1,12 +1,13 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.3.6-dev, 2011-08-02 +v0.3.6-dev, 2011-08-04 Version 0.3.6 (under dev!) -------------------------- +* core: add option -all for command /buffer unmerge * core: fix crash when invalid UTF-8 chars are inserted in command line (bug #33471) * core: stop horizontal bar scroll at the end of content (for bars with diff --git a/doc/de/autogen/user/weechat_commands.txt b/doc/de/autogen/user/weechat_commands.txt index ff23877b2..46c46cb41 100644 --- a/doc/de/autogen/user/weechat_commands.txt +++ b/doc/de/autogen/user/weechat_commands.txt @@ -65,7 +65,7 @@ Examples: /buffer list clear [<number>|-merged|-all] move|merge <number> - unmerge [<number>] + unmerge [<number>|-all] close [<n1>[-<n2>]|<name>] notify <level> localvar diff --git a/doc/en/autogen/user/weechat_commands.txt b/doc/en/autogen/user/weechat_commands.txt index e57d18fbf..feac6a80e 100644 --- a/doc/en/autogen/user/weechat_commands.txt +++ b/doc/en/autogen/user/weechat_commands.txt @@ -65,7 +65,7 @@ Examples: /buffer list clear [<number>|-merged|-all] move|merge <number> - unmerge [<number>] + unmerge [<number>|-all] close [<n1>[-<n2>]|<name>] notify <level> localvar diff --git a/doc/fr/autogen/user/weechat_commands.txt b/doc/fr/autogen/user/weechat_commands.txt index 636b7229b..895653fd3 100644 --- a/doc/fr/autogen/user/weechat_commands.txt +++ b/doc/fr/autogen/user/weechat_commands.txt @@ -65,7 +65,7 @@ Exemples: /buffer list clear [<nombre>|-merged|-all] move|merge <nombre> - unmerge [<nombre>] + unmerge [<nombre>|-all] close [<n1>[-<n2>]|<nom>] notify <niveau> localvar diff --git a/doc/it/autogen/user/weechat_commands.txt b/doc/it/autogen/user/weechat_commands.txt index 58e857267..fbeda12b0 100644 --- a/doc/it/autogen/user/weechat_commands.txt +++ b/doc/it/autogen/user/weechat_commands.txt @@ -65,7 +65,7 @@ Examples: /buffer list clear [<number>|-merged|-all] move|merge <number> - unmerge [<number>] + unmerge [<number>|-all] close [<n1>[-<n2>]|<name>] notify <level> localvar @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-04 16:12+0200\n" +"POT-Creation-Date: 2011-08-04 17:13+0200\n" "PO-Revision-Date: 2011-07-05 15:37+0200\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -932,8 +932,8 @@ msgstr "řídit buffery" #, fuzzy msgid "" "list || clear [<number>|-merged|-all] || move|merge <number> || unmerge " -"[<number>] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar || " -"set <property> <value> || get <property> || <number>|<name>" +"[<number>|-all] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar " +"|| set <property> <value> || get <property> || <number>|<name>" msgstr "" "list || clear [<číslo>|-merged|-all] || move|merge <číslo> || unmerge " "[<číslo>] || close [<n1>[-<n2>]] || notify <úroveň> || localvar || set " @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-04 16:12+0200\n" +"POT-Creation-Date: 2011-08-04 17:13+0200\n" "PO-Revision-Date: 2011-07-14 20:53+0100\n" "Last-Translator: Nils Görs\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -950,8 +950,8 @@ msgstr "Buffer verwalten" #, fuzzy msgid "" "list || clear [<number>|-merged|-all] || move|merge <number> || unmerge " -"[<number>] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar || " -"set <property> <value> || get <property> || <number>|<name>" +"[<number>|-all] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar " +"|| set <property> <value> || get <property> || <number>|<name>" msgstr "" "list || clear [<number>|-merged|-all] || move|merge <number> || unmerge " "[<number>] || close [<n1>[-<n2>]] || notify <level> || localvar || set " @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-04 16:12+0200\n" +"POT-Creation-Date: 2011-08-04 17:13+0200\n" "PO-Revision-Date: 2011-07-05 15:37+0200\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -937,8 +937,8 @@ msgstr "gestionar los buffers" #, fuzzy msgid "" "list || clear [<number>|-merged|-all] || move|merge <number> || unmerge " -"[<number>] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar || " -"set <property> <value> || get <property> || <number>|<name>" +"[<number>|-all] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar " +"|| set <property> <value> || get <property> || <number>|<name>" msgstr "" "list || clear [<número>|-merged|-all] || move|merge <número> || unmerge " "[<número>] || close [<n1>[-<n2>]] || notify <nivel> || localvar || set " @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-04 16:12+0200\n" -"PO-Revision-Date: 2011-08-04 16:00+0200\n" +"POT-Creation-Date: 2011-08-04 17:13+0200\n" +"PO-Revision-Date: 2011-08-04 17:13+0200\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: French\n" @@ -935,12 +935,12 @@ msgstr "gestion des tampons" msgid "" "list || clear [<number>|-merged|-all] || move|merge <number> || unmerge " -"[<number>] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar || " -"set <property> <value> || get <property> || <number>|<name>" +"[<number>|-all] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar " +"|| set <property> <value> || get <property> || <number>|<name>" msgstr "" "list || clear [<nombre>|-merged|-all] || move|merge <nombre> || unmerge " -"[<nombre>] || close [<n1>[-<n2>]|<nom>] || notify <niveau> || localvar || " -"set <propriété> <valeur> || get <propriété> || <nombre>|<nom>" +"[<nombre>|-all] || close [<n1>[-<n2>]|<nom>] || notify <niveau> || localvar " +"|| set <propriété> <valeur> || get <propriété> || <nombre>|<nom>" msgid "" " list: list buffers (without argument, this list is displayed)\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-04 16:12+0200\n" +"POT-Creation-Date: 2011-08-04 17:13+0200\n" "PO-Revision-Date: 2011-05-15 10:51+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -916,8 +916,8 @@ msgstr "pufferek kezelése" msgid "" "list || clear [<number>|-merged|-all] || move|merge <number> || unmerge " -"[<number>] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar || " -"set <property> <value> || get <property> || <number>|<name>" +"[<number>|-all] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar " +"|| set <property> <value> || get <property> || <number>|<name>" msgstr "" #, fuzzy @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-04 16:12+0200\n" +"POT-Creation-Date: 2011-08-04 17:13+0200\n" "PO-Revision-Date: 2011-07-16 11:32+0200\n" "Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -931,8 +931,8 @@ msgstr "gestione buffer" #, fuzzy msgid "" "list || clear [<number>|-merged|-all] || move|merge <number> || unmerge " -"[<number>] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar || " -"set <property> <value> || get <property> || <number>|<name>" +"[<number>|-all] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar " +"|| set <property> <value> || get <property> || <number>|<name>" msgstr "" "list || clear [<numero>|-merged|-all] || move|merge <numero> || unmerge " "[<numero>] || close [<n1>[-<n2>]] || notify <livello> || localvar || set " @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-04 16:12+0200\n" +"POT-Creation-Date: 2011-08-04 17:13+0200\n" "PO-Revision-Date: 2011-07-05 15:38+0200\n" "Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -940,8 +940,8 @@ msgstr "zarządzaj buforami" #, fuzzy msgid "" "list || clear [<number>|-merged|-all] || move|merge <number> || unmerge " -"[<number>] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar || " -"set <property> <value> || get <property> || <number>|<name>" +"[<number>|-all] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar " +"|| set <property> <value> || get <property> || <number>|<name>" msgstr "" "list || clear [<numer>|-merged|-all] || move|merge <numer> || unmerge " "[<numer>] || close [<n1>[-<n2>]] || notify <poziom> || localvar || set " diff --git a/po/pt_BR.po b/po/pt_BR.po index faa825712..79e62534e 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-04 16:12+0200\n" +"POT-Creation-Date: 2011-08-04 17:13+0200\n" "PO-Revision-Date: 2011-05-15 10:52+0200\n" "Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -944,8 +944,8 @@ msgstr "gerenciar buffers" #, fuzzy msgid "" "list || clear [<number>|-merged|-all] || move|merge <number> || unmerge " -"[<number>] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar || " -"set <property> <value> || get <property> || <number>|<name>" +"[<number>|-all] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar " +"|| set <property> <value> || get <property> || <number>|<name>" msgstr "" "[clear [número | -merged | -all] | move número | merge número | unmerge " "[número] | close [n1[-n2]] | list | notify nível | localvar | set property " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-04 16:12+0200\n" +"POT-Creation-Date: 2011-08-04 17:13+0200\n" "PO-Revision-Date: 2011-05-15 10:52+0200\n" "Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -923,8 +923,8 @@ msgstr "управление буферами" msgid "" "list || clear [<number>|-merged|-all] || move|merge <number> || unmerge " -"[<number>] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar || " -"set <property> <value> || get <property> || <number>|<name>" +"[<number>|-all] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar " +"|| set <property> <value> || get <property> || <number>|<name>" msgstr "" #, fuzzy diff --git a/po/weechat.pot b/po/weechat.pot index f18ec7b96..b264518e1 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: 2011-08-04 16:12+0200\n" +"POT-Creation-Date: 2011-08-04 17:13+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" @@ -816,8 +816,8 @@ msgstr "" msgid "" "list || clear [<number>|-merged|-all] || move|merge <number> || unmerge " -"[<number>] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar || " -"set <property> <value> || get <property> || <number>|<name>" +"[<number>|-all] || close [<n1>[-<n2>]|<name>] || notify <level> || localvar " +"|| set <property> <value> || get <property> || <number>|<name>" msgstr "" msgid "" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index d1346fa7a..d9ee92877 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -651,15 +651,22 @@ COMMAND_CALLBACK(buffer) number = -1; if (argc >= 3) { - error = NULL; - number = strtol (argv[2], &error, 10); - if (!error || error[0]) + if (string_strcasecmp (argv[2], "-all") == 0) { - /* invalid number */ - gui_chat_printf (NULL, - _("%sError: incorrect buffer number"), - gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); - return WEECHAT_RC_OK; + gui_buffer_unmerge_all (); + } + else + { + error = NULL; + number = strtol (argv[2], &error, 10); + if (!error || error[0]) + { + /* invalid number */ + gui_chat_printf (NULL, + _("%sError: incorrect buffer number"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); + return WEECHAT_RC_OK; + } } } gui_buffer_unmerge (buffer, (int) number); @@ -5159,7 +5166,7 @@ command_init () N_("list" " || clear [<number>|-merged|-all]" " || move|merge <number>" - " || unmerge [<number>]" + " || unmerge [<number>|-all]" " || close [<n1>[-<n2>]|<name>]" " || notify <level>" " || localvar" @@ -5217,7 +5224,7 @@ command_init () "clear -merged|-all|%(buffers_numbers)" " || move %(buffers_numbers)" " || merge %(buffers_numbers)" - " || unmerge %(buffers_numbers)" + " || unmerge %(buffers_numbers)|-all" " || close %(buffers_plugins_names)" " || list" " || notify reset|none|highlight|message|all" diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index cc2f2ef3b..766ef87f2 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -2581,6 +2581,33 @@ gui_buffer_unmerge (struct t_gui_buffer *buffer, int number) } /* + * gui_buffer_unmerge_all: unmerge all merged buffers + */ + +void +gui_buffer_unmerge_all () +{ + int number, count_merged, i; + struct t_gui_buffer *ptr_buffer; + + number = 1; + while (number <= last_gui_buffer->number) + { + count_merged = gui_buffer_count_merged_buffers (number); + if (count_merged > 1) + { + for (i = 0; i < count_merged - 1; i++) + { + ptr_buffer = gui_buffer_search_by_number (number); + if (ptr_buffer) + gui_buffer_unmerge (ptr_buffer, -1); + } + } + number++; + } +} + +/* * gui_buffer_undo_snap: do a "snapshot" of buffer input (save content and * position) */ diff --git a/src/gui/gui-buffer.h b/src/gui/gui-buffer.h index eae31a665..312388aa5 100644 --- a/src/gui/gui-buffer.h +++ b/src/gui/gui-buffer.h @@ -278,6 +278,7 @@ extern void gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number); extern void gui_buffer_merge (struct t_gui_buffer *buffer, struct t_gui_buffer *target_buffer); extern void gui_buffer_unmerge (struct t_gui_buffer *buffer, int number); +extern void gui_buffer_unmerge_all (); extern void gui_buffer_undo_snap (struct t_gui_buffer *buffer); extern void gui_buffer_undo_snap_free (struct t_gui_buffer *buffer); extern void gui_buffer_undo_add (struct t_gui_buffer *buffer); |