diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-04-03 17:56:40 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-04-03 17:56:40 +0200 |
commit | 7c58018cb109cd50c9b80980adff9b7ff508c2c2 (patch) | |
tree | d554b826fca3711ad4f0fa8dc7722416a2ac45b9 | |
parent | 76b700a55552891d29bd09c83d1ab001bef4e449 (diff) | |
download | weechat-7c58018cb109cd50c9b80980adff9b7ff508c2c2.zip |
Add new option "weechat.completion.nick_add_space" (add space after nick completion, on by default)
-rw-r--r-- | doc/de/autogen/weechat_options.xml | 10 | ||||
-rw-r--r-- | doc/en/autogen/weechat_options.xml | 10 | ||||
-rw-r--r-- | doc/fr/autogen/weechat_options.xml | 10 | ||||
-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 | 10 | ||||
-rw-r--r-- | po/hu.po | 6 | ||||
-rw-r--r-- | po/ru.po | 6 | ||||
-rw-r--r-- | po/weechat.pot | 6 | ||||
-rw-r--r-- | src/core/wee-config.c | 7 | ||||
-rw-r--r-- | src/core/wee-config.h | 1 | ||||
-rw-r--r-- | src/gui/gui-completion.c | 5 |
13 files changed, 81 insertions, 8 deletions
diff --git a/doc/de/autogen/weechat_options.xml b/doc/de/autogen/weechat_options.xml index e9cf2b6f1..ead661fea 100644 --- a/doc/de/autogen/weechat_options.xml +++ b/doc/de/autogen/weechat_options.xml @@ -576,6 +576,16 @@ </listitem> </itemizedlist> +<command>weechat.completion.nick_add_space</command>: add space after nick completion (when nick is not first word on command line) +<itemizedlist> + <listitem> + <para>type: boolean</para> + </listitem> + <listitem> + <para>values: on, off (default value: on)</para> + </listitem> +</itemizedlist> + <command>weechat.completion.nick_completor</command>: string inserted after nick completion <itemizedlist> <listitem> diff --git a/doc/en/autogen/weechat_options.xml b/doc/en/autogen/weechat_options.xml index d4461a48d..0015063b2 100644 --- a/doc/en/autogen/weechat_options.xml +++ b/doc/en/autogen/weechat_options.xml @@ -576,6 +576,16 @@ </listitem> </itemizedlist> +<command>weechat.completion.nick_add_space</command>: add space after nick completion (when nick is not first word on command line) +<itemizedlist> + <listitem> + <para>type: boolean</para> + </listitem> + <listitem> + <para>values: on, off (default value: on)</para> + </listitem> +</itemizedlist> + <command>weechat.completion.nick_completor</command>: string inserted after nick completion <itemizedlist> <listitem> diff --git a/doc/fr/autogen/weechat_options.xml b/doc/fr/autogen/weechat_options.xml index 364ae3c18..89ecdfebd 100644 --- a/doc/fr/autogen/weechat_options.xml +++ b/doc/fr/autogen/weechat_options.xml @@ -576,6 +576,16 @@ </listitem> </itemizedlist> +<command>weechat.completion.nick_add_space</command>: ajouter un espace après la complétion du pseudo (quand le pseudo n'est pas le premier mot sur la ligne de commande) +<itemizedlist> + <listitem> + <para>type: booléen</para> + </listitem> + <listitem> + <para>valeurs: on, off (valeur par défaut: on)</para> + </listitem> +</itemizedlist> + <command>weechat.completion.nick_completor</command>: chaîne affichée après la complétion des pseudos <itemizedlist> <listitem> @@ -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-03 15:08+0200\n" +"POT-Creation-Date: 2009-04-03 17:50+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1624,6 +1624,10 @@ msgid "" "values)" msgstr "" +msgid "" +"add space after nick completion (when nick is not first word on command line)" +msgstr "" + #, fuzzy msgid "string inserted after nick completion" msgstr "řetězec vložený za doplňování přezdívky" @@ -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-03 15:08+0200\n" +"POT-Creation-Date: 2009-04-03 17:50+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1650,6 +1650,10 @@ msgid "" "values)" msgstr "" +msgid "" +"add space after nick completion (when nick is not first word on command line)" +msgstr "" + #, fuzzy msgid "string inserted after nick completion" msgstr "Nach Nickvervollständigung anzufügende Zeichenfolge" @@ -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-03 15:08+0200\n" +"POT-Creation-Date: 2009-04-03 17:50+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1631,6 +1631,10 @@ msgid "" "values)" msgstr "" +msgid "" +"add space after nick completion (when nick is not first word on command line)" +msgstr "" + #, fuzzy msgid "string inserted after nick completion" msgstr "la cadena mostrada tras la finalización de los nombres de usuario" @@ -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-03 15:08+0200\n" -"PO-Revision-Date: 2009-04-03 15:08+0200\n" +"POT-Creation-Date: 2009-04-03 17:50+0200\n" +"PO-Revision-Date: 2009-04-03 17:50+0200\n" "Last-Translator: FlashCode <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "MIME-Version: 1.0\n" @@ -1718,6 +1718,12 @@ msgstr "" "modèle de complétion par défaut (merci de consulter la documentation pour " "les codes et valeurs du modèle)" +msgid "" +"add space after nick completion (when nick is not first word on command line)" +msgstr "" +"ajouter un espace après la complétion du pseudo (quand le pseudo n'est pas " +"le premier mot sur la ligne de commande)" + msgid "string inserted after nick completion" msgstr "chaîne affichée après la complétion des pseudos" @@ -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-03 15:08+0200\n" +"POT-Creation-Date: 2009-04-03 17:50+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1659,6 +1659,10 @@ msgid "" "values)" msgstr "" +msgid "" +"add space after nick completion (when nick is not first word on command line)" +msgstr "" + #, fuzzy msgid "string inserted after nick completion" msgstr "névkiegészítés után beszúrt szöveg" @@ -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-03 15:08+0200\n" +"POT-Creation-Date: 2009-04-03 17:50+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1662,6 +1662,10 @@ msgid "" "values)" msgstr "" +msgid "" +"add space after nick completion (when nick is not first word on command line)" +msgstr "" + #, fuzzy msgid "string inserted after nick completion" msgstr "строка, вставляемая после автодополнения ника" diff --git a/po/weechat.pot b/po/weechat.pot index b9f9fa75d..a13eb72be 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-03 15:08+0200\n" +"POT-Creation-Date: 2009-04-03 17:50+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" @@ -1390,6 +1390,10 @@ msgid "" "values)" msgstr "" +msgid "" +"add space after nick completion (when nick is not first word on command line)" +msgstr "" + msgid "string inserted after nick completion" msgstr "" diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 239c26167..38c549663 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -145,6 +145,7 @@ struct t_config_option *config_color_nicklist_separator; /* config, completion section */ struct t_config_option *config_completion_default_template; +struct t_config_option *config_completion_nick_add_space; struct t_config_option *config_completion_nick_completor; struct t_config_option *config_completion_nick_first_only; struct t_config_option *config_completion_nick_ignore_chars; @@ -1605,6 +1606,12 @@ config_weechat_init_options () "codes and values)"), NULL, 0, 0, "%n|%(irc_channels)", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); + config_completion_nick_add_space = config_file_new_option ( + weechat_config_file, ptr_section, + "nick_add_space", "boolean", + N_("add space after nick completion (when nick is not first word on " + "command line)"), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); config_completion_nick_completor = config_file_new_option ( weechat_config_file, ptr_section, "nick_completor", "string", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 1ef819e14..f8754ae2e 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -147,6 +147,7 @@ extern struct t_config_option *config_color_nicklist_more; extern struct t_config_option *config_color_nicklist_separator; extern struct t_config_option *config_completion_default_template; +extern struct t_config_option *config_completion_nick_add_space; extern struct t_config_option *config_completion_nick_completor; extern struct t_config_option *config_completion_nick_first_only; extern struct t_config_option *config_completion_nick_ignore_chars; diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index a1ec06246..482c55fd2 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -1501,6 +1501,11 @@ gui_completion_complete (struct t_gui_completion *completion) free (completion->word_found); completion->word_found = strdup (ptr_item->data); completion->word_found_is_nick = item_is_nick; + if (item_is_nick && (completion->base_word_pos > 0) + && !CONFIG_BOOLEAN(config_completion_nick_add_space)) + { + completion->add_space = 0; + } /* stop after first nick if user asked that */ if (item_is_nick |