From 5139fdcf2a3bb720184deecd121adae561bf4407 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Wed, 22 Jul 2009 18:07:22 +0200 Subject: [PATCH] Add new option weechat.look.search_text_not_found_alert --- doc/en/autogen/user/weechat_options.txt | 5 +++++ doc/fr/autogen/user/weechat_options.txt | 7 ++++++- po/cs.po | 5 ++++- po/de.po | 5 ++++- po/es.po | 5 ++++- po/fr.po | 11 ++++++++--- po/hu.po | 5 ++++- po/pl.po | 5 ++++- po/ru.po | 5 ++++- po/weechat.pot | 5 ++++- src/core/wee-config.c | 6 ++++++ src/core/wee-config.h | 1 + src/gui/gui-window.c | 7 +++++++ 13 files changed, 61 insertions(+), 11 deletions(-) diff --git a/doc/en/autogen/user/weechat_options.txt b/doc/en/autogen/user/weechat_options.txt index 18143ce93..f5914f9be 100644 --- a/doc/en/autogen/user/weechat_options.txt +++ b/doc/en/autogen/user/weechat_options.txt @@ -523,6 +523,11 @@ ** type: integer ** values: 1 .. 100 (default value: 100) +* *weechat.look.search_text_not_found_alert* +** description: alert user when text sought is not found in buffer +** type: boolean +** values: on, off (default value: on) + * *weechat.look.set_title* ** description: set title for window (terminal for Curses GUI) with name and version ** type: boolean diff --git a/doc/fr/autogen/user/weechat_options.txt b/doc/fr/autogen/user/weechat_options.txt index 295f8553a..fd49b9d0f 100644 --- a/doc/fr/autogen/user/weechat_options.txt +++ b/doc/fr/autogen/user/weechat_options.txt @@ -314,7 +314,7 @@ ** valeurs: toute chaîne (valeur par défaut: "[]-^") * *weechat.completion.partial_completion_alert* -** description: alterte de l'utilisateur lorsqu'une complétion partielle survient +** description: alterte l'utilisateur lorsqu'une complétion partielle survient ** type: booléen ** valeurs: on, off (valeur par défaut: on) @@ -523,6 +523,11 @@ ** type: entier ** valeurs: 1 .. 100 (valeur par défaut: 100) +* *weechat.look.search_text_not_found_alert* +** description: alterte l'utilisateur lorsque le texte cherché n'est pas trouvé dans le tampon +** type: booléen +** valeurs: on, off (valeur par défaut: on) + * *weechat.look.set_title* ** description: définit le titre de la fenêtre (terminal pour l'interface Curses) avec le nom et la version ** type: booléen diff --git a/po/cs.po b/po/cs.po index 2d02e03b6..aa33f588d 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-07-10 23:40+0200\n" +"POT-Creation-Date: 2009-07-22 18:00+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -1463,6 +1463,9 @@ msgstr "" "procenta obrazovky, o které posunout, při posunutí o stránku nahoru nebo " "dolů (například 100 znamená jedna stránka, 50 půl stránky)" +msgid "alert user when text sought is not found in buffer" +msgstr "" + msgid "set title for window (terminal for Curses GUI) with name and version" msgstr "nastaví titulek okna (terminálu pro Cruses GUI) s jménem a verzí" diff --git a/po/de.po b/po/de.po index 79af40f3b..4b19391fa 100644 --- a/po/de.po +++ b/po/de.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: 2009-07-10 23:40+0200\n" +"POT-Creation-Date: 2009-07-22 18:00+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Thomas Schuetz \n" "Language-Team: weechat-dev \n" @@ -1485,6 +1485,9 @@ msgid "" "100 means one page, 50 half-page)" msgstr "" +msgid "alert user when text sought is not found in buffer" +msgstr "" + msgid "set title for window (terminal for Curses GUI) with name and version" msgstr "" "Fenstertitel setzen (oder Terminaltitel im Curses-GUI) mit Name und Version" diff --git a/po/es.po b/po/es.po index 41059f3e6..27099ead1 100644 --- a/po/es.po +++ b/po/es.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-07-10 23:40+0200\n" +"POT-Creation-Date: 2009-07-22 18:00+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Roberto González Cardenete \n" "Language-Team: weechat-dev \n" @@ -1466,6 +1466,9 @@ msgid "" "100 means one page, 50 half-page)" msgstr "" +msgid "alert user when text sought is not found in buffer" +msgstr "" + msgid "set title for window (terminal for Curses GUI) with name and version" msgstr "" "define el título de la ventana (el terminal para la interfaz Curses) con el " diff --git a/po/fr.po b/po/fr.po index 3b7c41cbd..d91d56c78 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-07-10 23:40+0200\n" -"PO-Revision-Date: 2009-07-10 23:41+0200\n" +"POT-Creation-Date: 2009-07-22 18:00+0200\n" +"PO-Revision-Date: 2009-07-22 18:01+0200\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -1648,6 +1648,11 @@ msgstr "" "pourcentage de l'écran à faire défiler lors du défilement avec page " "précédente ou suivante (par exemple 100 signifie une page, 50 une demi-page)" +msgid "alert user when text sought is not found in buffer" +msgstr "" +"alterte l'utilisateur lorsque le texte cherché n'est pas trouvé dans le " +"tampon" + msgid "set title for window (terminal for Curses GUI) with name and version" msgstr "" "définit le titre de la fenêtre (terminal pour l'interface Curses) avec le " @@ -1868,7 +1873,7 @@ msgid "chars ignored for nick completion" msgstr "caractères à ignorer pour la complétion des pseudos" msgid "alert user when a partial completion occurs" -msgstr "alterte de l'utilisateur lorsqu'une complétion partielle survient" +msgstr "alterte l'utilisateur lorsqu'une complétion partielle survient" msgid "" "partially complete command names (stop when many commands found begin with " diff --git a/po/hu.po b/po/hu.po index a8bbf23b2..1319e4d5c 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-07-10 23:40+0200\n" +"POT-Creation-Date: 2009-07-22 18:00+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -1495,6 +1495,9 @@ msgid "" "100 means one page, 50 half-page)" msgstr "" +msgid "alert user when text sought is not found in buffer" +msgstr "" + msgid "set title for window (terminal for Curses GUI) with name and version" msgstr "" "ablak címsorának beállítása (Curses GUI esetén a terminálé) a program nevére " diff --git a/po/pl.po b/po/pl.po index 2cd04b884..cf9ab3001 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: 2009-07-10 23:40+0200\n" +"POT-Creation-Date: 2009-07-22 18:00+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: \n" "Language-Team: Polish\n" @@ -1315,6 +1315,9 @@ msgid "" "100 means one page, 50 half-page)" msgstr "" +msgid "alert user when text sought is not found in buffer" +msgstr "" + msgid "set title for window (terminal for Curses GUI) with name and version" msgstr "" diff --git a/po/ru.po b/po/ru.po index 1d57a1159..08d27e2ed 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-07-10 23:40+0200\n" +"POT-Creation-Date: 2009-07-22 18:00+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -1498,6 +1498,9 @@ msgid "" "100 means one page, 50 half-page)" msgstr "" +msgid "alert user when text sought is not found in buffer" +msgstr "" + msgid "set title for window (terminal for Curses GUI) with name and version" msgstr "" "устанавливать заголовок окна (терминала при интерфейсе Curses) с именем и " diff --git a/po/weechat.pot b/po/weechat.pot index 2850239df..db111f6e1 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-07-10 23:40+0200\n" +"POT-Creation-Date: 2009-07-22 18:00+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1283,6 +1283,9 @@ msgid "" "100 means one page, 50 half-page)" msgstr "" +msgid "alert user when text sought is not found in buffer" +msgstr "" + msgid "set title for window (terminal for Curses GUI) with name and version" msgstr "" diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 0515cfbd2..46cf00693 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -99,6 +99,7 @@ struct t_config_option *config_look_save_config_on_exit; struct t_config_option *config_look_save_layout_on_exit; struct t_config_option *config_look_scroll_amount; struct t_config_option *config_look_scroll_page_percent; +struct t_config_option *config_look_search_text_not_found_alert; struct t_config_option *config_look_set_title; /* config, colors section */ @@ -1409,6 +1410,11 @@ config_weechat_init_options () N_("percent of screen to scroll when scrolling one page up or down " "(for example 100 means one page, 50 half-page)"), NULL, 1, 100, "100", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); + config_look_search_text_not_found_alert = config_file_new_option ( + weechat_config_file, ptr_section, + "search_text_not_found_alert", "boolean", + N_("alert user when text sought is not found in buffer"), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); config_look_set_title = config_file_new_option ( weechat_config_file, ptr_section, "set_title", "boolean", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 2a9530c4b..0908e68e1 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -114,6 +114,7 @@ extern struct t_config_option *config_look_save_config_on_exit; extern struct t_config_option *config_look_save_layout_on_exit; extern struct t_config_option *config_look_scroll_amount; extern struct t_config_option *config_look_scroll_page_percent; +extern struct t_config_option *config_look_search_text_not_found_alert; extern struct t_config_option *config_look_set_title; extern struct t_config_option *config_color_separator; diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c index d039c8520..55d539ee0 100644 --- a/src/gui/gui-window.c +++ b/src/gui/gui-window.c @@ -889,7 +889,14 @@ gui_window_search_restart (struct t_gui_window *window) if (gui_window_search_text (window)) window->buffer->text_search_found = 1; else + { + if (CONFIG_BOOLEAN(config_look_search_text_not_found_alert) + && window->buffer->input_buffer && window->buffer->input_buffer[0]) + { + printf ("\a"); + } gui_buffer_ask_chat_refresh (window->buffer, 2); + } } /*