From 890b2ed23a1311c9051cceb1675b9bb27cf45c70 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Tue, 21 Apr 2009 17:48:44 +0200 Subject: [PATCH] Add new option weechat.look.jump_current_to_previous_buffer --- doc/de/autogen/weechat_options.xml | 10 ++++++++++ doc/en/autogen/weechat_options.xml | 10 ++++++++++ doc/fr/autogen/weechat_options.xml | 10 ++++++++++ po/cs.po | 7 ++++++- po/de.po | 7 ++++++- po/es.po | 7 ++++++- po/fr.po | 12 ++++++++++-- po/hu.po | 7 ++++++- po/ru.po | 7 ++++++- po/weechat.pot | 7 ++++++- src/core/wee-config.c | 8 ++++++++ src/core/wee-config.h | 1 + src/gui/gui-buffer.c | 12 ++++++++++-- 13 files changed, 95 insertions(+), 10 deletions(-) diff --git a/doc/de/autogen/weechat_options.xml b/doc/de/autogen/weechat_options.xml index b1c9deed1..a4116a7d6 100644 --- a/doc/de/autogen/weechat_options.xml +++ b/doc/de/autogen/weechat_options.xml @@ -826,6 +826,16 @@ +weechat.look.jump_current_to_previous_buffer: jump to previous buffer displayed when jumping to current buffer number (to easyly switch to another buffer, then come back to current buffer) + + + type: boolean + + + values: on, off (default value: on) + + + weechat.look.nickmode: Nickmode (@%+) vorm Nickname anzeigen diff --git a/doc/en/autogen/weechat_options.xml b/doc/en/autogen/weechat_options.xml index 20779ea41..d6c4c499f 100644 --- a/doc/en/autogen/weechat_options.xml +++ b/doc/en/autogen/weechat_options.xml @@ -826,6 +826,16 @@ +weechat.look.jump_current_to_previous_buffer: jump to previous buffer displayed when jumping to current buffer number (to easyly switch to another buffer, then come back to current buffer) + + + type: boolean + + + values: on, off (default value: on) + + + weechat.look.nickmode: display nick mode ((half)op/voice) before each nick diff --git a/doc/fr/autogen/weechat_options.xml b/doc/fr/autogen/weechat_options.xml index 10b3c5087..0d91b618a 100644 --- a/doc/fr/autogen/weechat_options.xml +++ b/doc/fr/autogen/weechat_options.xml @@ -826,6 +826,16 @@ +weechat.look.jump_current_to_previous_buffer: sauter au tampon affiché précédemment lors du saut vers le numéro de tampon courant (pour facilement basculer à un autre tampon, puis revenir au tampon courant) + + + type: booléen + + + valeurs: on, off (valeur par défaut: on) + + + weechat.look.nickmode: afficher le mode du pseudo ((half)op/voice) devant chaque utilisateur diff --git a/po/cs.po b/po/cs.po index fdeaf9ca6..cd68f47ae 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: 2009-04-15 23:39+0200\n" +"POT-Creation-Date: 2009-04-21 17:40+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -1343,6 +1343,11 @@ msgstr "" msgid "time format for \"time\" bar item" msgstr "formát času pro \"time\" položu pole" +msgid "" +"jump to previous buffer displayed when jumping to current buffer number (to " +"easyly switch to another buffer, then come back to current buffer)" +msgstr "" + msgid "display nick mode ((half)op/voice) before each nick" msgstr "zobrazit mód přezdívky ((částečný)op/voice) před každou přezdívkou" diff --git a/po/de.po b/po/de.po index e131499db..65a8ae73e 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: 2009-04-15 23:39+0200\n" +"POT-Creation-Date: 2009-04-21 17:40+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Thomas Schuetz \n" "Language-Team: weechat-dev \n" @@ -1362,6 +1362,11 @@ msgstr "" msgid "time format for \"time\" bar item" msgstr "Timestamp in der Infobar" +msgid "" +"jump to previous buffer displayed when jumping to current buffer number (to " +"easyly switch to another buffer, then come back to current buffer)" +msgstr "" + msgid "display nick mode ((half)op/voice) before each nick" msgstr "Nickmode (@%+) vorm Nickname anzeigen" diff --git a/po/es.po b/po/es.po index ea6242522..99a0956c2 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: 2009-04-15 23:39+0200\n" +"POT-Creation-Date: 2009-04-21 17:40+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Roberto González Cardenete \n" "Language-Team: weechat-dev \n" @@ -1339,6 +1339,11 @@ msgstr "" msgid "time format for \"time\" bar item" msgstr "fecha y hora para las conversaciones guardadas" +msgid "" +"jump to previous buffer displayed when jumping to current buffer number (to " +"easyly switch to another buffer, then come back to current buffer)" +msgstr "" + msgid "display nick mode ((half)op/voice) before each nick" msgstr "mostrar modo del usuario ((half)op/voice) antes de cada usuario" diff --git a/po/fr.po b/po/fr.po index fad702a6e..059542b02 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: 2009-04-15 23:39+0200\n" -"PO-Revision-Date: 2009-04-15 23:39+0200\n" +"POT-Creation-Date: 2009-04-21 17:40+0200\n" +"PO-Revision-Date: 2009-04-21 17:29+0200\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -1477,6 +1477,14 @@ msgstr "" msgid "time format for \"time\" bar item" msgstr "format de date/heure pour l'objet de barre \"time\"" +msgid "" +"jump to previous buffer displayed when jumping to current buffer number (to " +"easyly switch to another buffer, then come back to current buffer)" +msgstr "" +"sauter au tampon affiché précédemment lors du saut vers le numéro de tampon " +"courant (pour facilement basculer à un autre tampon, puis revenir au tampon " +"courant)" + msgid "display nick mode ((half)op/voice) before each nick" msgstr "afficher le mode du pseudo ((half)op/voice) devant chaque utilisateur" diff --git a/po/hu.po b/po/hu.po index 2533d8146..1b1f5b6c5 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: 2009-04-15 23:39+0200\n" +"POT-Creation-Date: 2009-04-21 17:40+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -1371,6 +1371,11 @@ msgstr "" msgid "time format for \"time\" bar item" msgstr "időbélyeg a információs pult idejéhez" +msgid "" +"jump to previous buffer displayed when jumping to current buffer number (to " +"easyly switch to another buffer, then come back to current buffer)" +msgstr "" + msgid "display nick mode ((half)op/voice) before each nick" msgstr "a felhasználó módjának ((fél)operátor/voice) mutatása a név előtt" diff --git a/po/ru.po b/po/ru.po index 6853fd800..0e386fedb 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: 2009-04-15 23:39+0200\n" +"POT-Creation-Date: 2009-04-21 17:40+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -1373,6 +1373,11 @@ msgstr "" msgid "time format for \"time\" bar item" msgstr "время в информационной строке" +msgid "" +"jump to previous buffer displayed when jumping to current buffer number (to " +"easyly switch to another buffer, then come back to current buffer)" +msgstr "" + msgid "display nick mode ((half)op/voice) before each nick" msgstr "отображать режим ника (op/voice) перед каждым ником" diff --git a/po/weechat.pot b/po/weechat.pot index 8da0aea6b..e29fab8a5 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: 2009-04-15 23:39+0200\n" +"POT-Creation-Date: 2009-04-21 17:40+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1170,6 +1170,11 @@ msgstr "" msgid "time format for \"time\" bar item" msgstr "" +msgid "" +"jump to previous buffer displayed when jumping to current buffer number (to " +"easyly switch to another buffer, then come back to current buffer)" +msgstr "" + msgid "display nick mode ((half)op/voice) before each nick" msgstr "" diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 94ccb915b..307a6558d 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -82,6 +82,7 @@ struct t_config_option *config_look_hotlist_names_level; struct t_config_option *config_look_hotlist_short_names; struct t_config_option *config_look_hotlist_sort; struct t_config_option *config_look_item_time_format; +struct t_config_option *config_look_jump_current_to_previous_buffer; struct t_config_option *config_look_nickmode; struct t_config_option *config_look_nickmode_empty; struct t_config_option *config_look_paste_max_lines; @@ -1144,6 +1145,13 @@ config_weechat_init_options () "item_time_format", "string", N_("time format for \"time\" bar item"), NULL, 0, 0, "%H:%M", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); + config_look_jump_current_to_previous_buffer = config_file_new_option ( + weechat_config_file, ptr_section, + "jump_current_to_previous_buffer", "boolean", + N_("jump to previous buffer displayed when jumping to current buffer " + "number (to easyly switch to another buffer, then come back to " + "current buffer)"), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); config_look_nickmode = config_file_new_option ( weechat_config_file, ptr_section, "nickmode", "boolean", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index f8754ae2e..4f8fb0c9c 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -88,6 +88,7 @@ extern struct t_config_option *config_look_hotlist_names_level; extern struct t_config_option *config_look_hotlist_short_names; extern struct t_config_option *config_look_hotlist_sort; extern struct t_config_option *config_look_item_time_format; +extern struct t_config_option *config_look_jump_current_to_previous_buffer; extern struct t_config_option *config_look_nickmode; extern struct t_config_option *config_look_nickmode_empty; extern struct t_config_option *config_look_paste_max_lines; diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index c93818ff2..68cd3bac5 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -1380,8 +1380,16 @@ gui_buffer_switch_by_number (struct t_gui_window *window, int number) return; /* buffer is currently displayed ? then jump to previous buffer */ - if ((number == window->buffer->number) && gui_previous_buffer) - number = gui_previous_buffer->number; + if (number == window->buffer->number) + { + if (CONFIG_BOOLEAN(config_look_jump_current_to_previous_buffer) + && gui_previous_buffer) + { + number = gui_previous_buffer->number; + } + else + return; + } /* search for buffer in the list */ for (ptr_buffer = gui_buffers; ptr_buffer; ptr_buffer = ptr_buffer->next_buffer)