diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2007-05-22 14:46:59 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2007-05-22 14:46:59 +0000 |
commit | e339e9020d903e7d2025661e43382e63b4c819d6 (patch) | |
tree | 4a26d123093391c6c3f8c4397baa6bd520cf7b4d | |
parent | 5332d2ba278e24eb7a388a241fc73e0fea5c87af (diff) | |
download | weechat-e339e9020d903e7d2025661e43382e63b4c819d6.zip |
Fixed "%C" completion: now completes with all channels of all servers
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | doc/de/weechat.de.xml | 3 | ||||
-rw-r--r-- | doc/en/weechat.en.xml | 2 | ||||
-rw-r--r-- | doc/fr/weechat.fr.xml | 2 | ||||
-rw-r--r-- | src/common/completion.c | 21 | ||||
-rw-r--r-- | weechat/ChangeLog | 1 | ||||
-rw-r--r-- | weechat/doc/de/weechat.de.xml | 3 | ||||
-rw-r--r-- | weechat/doc/en/weechat.en.xml | 2 | ||||
-rw-r--r-- | weechat/doc/fr/weechat.fr.xml | 2 | ||||
-rw-r--r-- | weechat/src/common/completion.c | 21 |
10 files changed, 36 insertions, 22 deletions
@@ -6,6 +6,7 @@ ChangeLog - 2007-05-22 Version 0.2.5 (under dev!): * removed ":" for unknown IRC commands before arguments (bug #19929) + * fixed "%C" completion: now completes with all channels of all servers * fixed bug with "/buffer query_name", added server and channel completion for /buffer command (bug #19928) * added cmake for weechat compile (patch #5943) diff --git a/doc/de/weechat.de.xml b/doc/de/weechat.de.xml index 3b7324e23..305375b78 100644 --- a/doc/de/weechat.de.xml +++ b/doc/de/weechat.de.xml @@ -2278,7 +2278,8 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK", </row> <row> <entry><literal>%C</literal></entry> - <entry>Channels des gegenwärtigen Servers</entry> + <!-- TRANSLATION NEEDED --> + <entry>all channels (including queries)</entry> </row> <row> <entry><literal>%f</literal></entry> diff --git a/doc/en/weechat.en.xml b/doc/en/weechat.en.xml index 0100b8004..9b36f89bc 100644 --- a/doc/en/weechat.en.xml +++ b/doc/en/weechat.en.xml @@ -2294,7 +2294,7 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK", </row> <row> <entry><literal>%C</literal></entry> - <entry>channels of current server</entry> + <entry>all channels (including queries)</entry> </row> <row> <entry><literal>%f</literal></entry> diff --git a/doc/fr/weechat.fr.xml b/doc/fr/weechat.fr.xml index d1d686084..1e4dbd56c 100644 --- a/doc/fr/weechat.fr.xml +++ b/doc/fr/weechat.fr.xml @@ -2351,7 +2351,7 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK", </row> <row> <entry><literal>%C</literal></entry> - <entry>canaux du serveur courant</entry> + <entry>tous les canaux (y compris les privés)</entry> </row> <row> <entry><literal>%f</literal></entry> diff --git a/src/common/completion.c b/src/common/completion.c index 9910637ed..60ffa5e43 100644 --- a/src/common/completion.c +++ b/src/common/completion.c @@ -340,21 +340,26 @@ completion_list_add_channel (t_completion *completion) } /* - * completion_list_add_server_channels: add server channels to completion list + * completion_list_add_channels: add server channels to completion list */ void -completion_list_add_server_channels (t_completion *completion) +completion_list_add_channels (t_completion *completion) { + t_irc_server *ptr_server; t_irc_channel *ptr_channel; if (completion->server) { - for (ptr_channel = ((t_irc_server *)(completion->server))->channels; - ptr_channel; ptr_channel = ptr_channel->next_channel) + for (ptr_server = irc_servers; ptr_server; + ptr_server = ptr_server->next_server) { - completion_list_add (completion, ptr_channel->name, - 0, WEELIST_POS_SORT); + for (ptr_channel = ptr_server->channels; + ptr_channel; ptr_channel = ptr_channel->next_channel) + { + completion_list_add (completion, ptr_channel->name, + 0, WEELIST_POS_SORT); + } } } } @@ -969,7 +974,7 @@ completion_build_list_template (t_completion *completion, char *template) completion_list_add_channel (completion); break; case 'C': /* all channels */ - completion_list_add_server_channels (completion); + completion_list_add_channels (completion); break; case 'f': /* filename */ completion_list_add_filename (completion); @@ -1521,7 +1526,7 @@ completion_auto (t_completion *completion) if (irc_channel_is_channel (completion->base_word)) { if (!completion->completion_list) - completion_list_add_server_channels (completion); + completion_list_add_channels (completion); completion_command_arg (completion, 0); return; } diff --git a/weechat/ChangeLog b/weechat/ChangeLog index c606632ea..d7727d4a6 100644 --- a/weechat/ChangeLog +++ b/weechat/ChangeLog @@ -6,6 +6,7 @@ ChangeLog - 2007-05-22 Version 0.2.5 (under dev!): * removed ":" for unknown IRC commands before arguments (bug #19929) + * fixed "%C" completion: now completes with all channels of all servers * fixed bug with "/buffer query_name", added server and channel completion for /buffer command (bug #19928) * added cmake for weechat compile (patch #5943) diff --git a/weechat/doc/de/weechat.de.xml b/weechat/doc/de/weechat.de.xml index 3b7324e23..305375b78 100644 --- a/weechat/doc/de/weechat.de.xml +++ b/weechat/doc/de/weechat.de.xml @@ -2278,7 +2278,8 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK", </row> <row> <entry><literal>%C</literal></entry> - <entry>Channels des gegenwärtigen Servers</entry> + <!-- TRANSLATION NEEDED --> + <entry>all channels (including queries)</entry> </row> <row> <entry><literal>%f</literal></entry> diff --git a/weechat/doc/en/weechat.en.xml b/weechat/doc/en/weechat.en.xml index 0100b8004..9b36f89bc 100644 --- a/weechat/doc/en/weechat.en.xml +++ b/weechat/doc/en/weechat.en.xml @@ -2294,7 +2294,7 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK", </row> <row> <entry><literal>%C</literal></entry> - <entry>channels of current server</entry> + <entry>all channels (including queries)</entry> </row> <row> <entry><literal>%f</literal></entry> diff --git a/weechat/doc/fr/weechat.fr.xml b/weechat/doc/fr/weechat.fr.xml index d1d686084..1e4dbd56c 100644 --- a/weechat/doc/fr/weechat.fr.xml +++ b/weechat/doc/fr/weechat.fr.xml @@ -2351,7 +2351,7 @@ msg_handler = plugin->msg_handler_add (plugin, "KICK", </row> <row> <entry><literal>%C</literal></entry> - <entry>canaux du serveur courant</entry> + <entry>tous les canaux (y compris les privés)</entry> </row> <row> <entry><literal>%f</literal></entry> diff --git a/weechat/src/common/completion.c b/weechat/src/common/completion.c index 9910637ed..60ffa5e43 100644 --- a/weechat/src/common/completion.c +++ b/weechat/src/common/completion.c @@ -340,21 +340,26 @@ completion_list_add_channel (t_completion *completion) } /* - * completion_list_add_server_channels: add server channels to completion list + * completion_list_add_channels: add server channels to completion list */ void -completion_list_add_server_channels (t_completion *completion) +completion_list_add_channels (t_completion *completion) { + t_irc_server *ptr_server; t_irc_channel *ptr_channel; if (completion->server) { - for (ptr_channel = ((t_irc_server *)(completion->server))->channels; - ptr_channel; ptr_channel = ptr_channel->next_channel) + for (ptr_server = irc_servers; ptr_server; + ptr_server = ptr_server->next_server) { - completion_list_add (completion, ptr_channel->name, - 0, WEELIST_POS_SORT); + for (ptr_channel = ptr_server->channels; + ptr_channel; ptr_channel = ptr_channel->next_channel) + { + completion_list_add (completion, ptr_channel->name, + 0, WEELIST_POS_SORT); + } } } } @@ -969,7 +974,7 @@ completion_build_list_template (t_completion *completion, char *template) completion_list_add_channel (completion); break; case 'C': /* all channels */ - completion_list_add_server_channels (completion); + completion_list_add_channels (completion); break; case 'f': /* filename */ completion_list_add_filename (completion); @@ -1521,7 +1526,7 @@ completion_auto (t_completion *completion) if (irc_channel_is_channel (completion->base_word)) { if (!completion->completion_list) - completion_list_add_server_channels (completion); + completion_list_add_channels (completion); completion_command_arg (completion, 0); return; } |