mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 14:56:39 +02:00
Add irc and jabber options to display nick modes in input_prompt bar item
This commit is contained in:
@@ -249,7 +249,8 @@ irc_bar_item_input_prompt (void *data, struct t_gui_bar_item *item,
|
||||
buf = malloc (length);
|
||||
if (buf)
|
||||
{
|
||||
if (server->nick_modes && server->nick_modes[0])
|
||||
if (weechat_config_boolean (irc_config_look_display_nick_modes)
|
||||
&& server->nick_modes && server->nick_modes[0])
|
||||
{
|
||||
snprintf (buf, length, "%s%s%s(%s%s%s)",
|
||||
IRC_COLOR_INPUT_NICK,
|
||||
|
||||
@@ -50,6 +50,7 @@ struct t_config_option *irc_config_look_nick_suffix;
|
||||
struct t_config_option *irc_config_look_nick_completion_smart;
|
||||
struct t_config_option *irc_config_look_display_away;
|
||||
struct t_config_option *irc_config_look_display_channel_modes;
|
||||
struct t_config_option *irc_config_look_display_nick_modes;
|
||||
struct t_config_option *irc_config_look_hide_nickserv_pwd;
|
||||
struct t_config_option *irc_config_look_highlight_tags;
|
||||
struct t_config_option *irc_config_look_show_away_once;
|
||||
@@ -183,6 +184,22 @@ irc_config_change_look_display_channel_modes (void *data,
|
||||
weechat_bar_item_update ("buffer_name");
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_config_change_look_display_nick_modes: called when the "display
|
||||
* nick modes" option is changed
|
||||
*/
|
||||
|
||||
void
|
||||
irc_config_change_look_display_nick_modes (void *data,
|
||||
struct t_config_option *option)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
weechat_bar_item_update ("input_prompt");
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_config_change_look_highlight_tags: called when the "highlight tags"
|
||||
* option is changed
|
||||
@@ -1038,6 +1055,12 @@ irc_config_init ()
|
||||
N_("display channel modes in \"buffer_name\" bar item"),
|
||||
NULL, 0, 0, "on", NULL, 0, NULL, NULL,
|
||||
&irc_config_change_look_display_channel_modes, NULL, NULL, NULL);
|
||||
irc_config_look_display_nick_modes = weechat_config_new_option (
|
||||
irc_config_file, ptr_section,
|
||||
"display_nick_modes", "boolean",
|
||||
N_("display nick modes in \"input_prompt\" bar item"),
|
||||
NULL, 0, 0, "on", NULL, 0, NULL, NULL,
|
||||
&irc_config_change_look_display_nick_modes, NULL, NULL, NULL);
|
||||
irc_config_look_hide_nickserv_pwd = weechat_config_new_option (
|
||||
irc_config_file, ptr_section,
|
||||
"hide_nickserv_pwd", "boolean",
|
||||
|
||||
@@ -39,6 +39,7 @@ extern struct t_config_option *irc_config_look_nick_suffix;
|
||||
extern struct t_config_option *irc_config_look_nick_completion_smart;
|
||||
extern struct t_config_option *irc_config_look_display_away;
|
||||
extern struct t_config_option *irc_config_look_display_channel_modes;
|
||||
extern struct t_config_option *irc_config_look_display_nick_modes;
|
||||
extern struct t_config_option *irc_config_look_hide_nickserv_pwd;
|
||||
extern struct t_config_option *irc_config_look_highlight_tags;
|
||||
extern struct t_config_option *irc_config_look_show_away_once;
|
||||
|
||||
@@ -49,6 +49,7 @@ struct t_config_option *jabber_config_look_nick_suffix;
|
||||
struct t_config_option *jabber_config_look_nick_completion_smart;
|
||||
struct t_config_option *jabber_config_look_display_away;
|
||||
struct t_config_option *jabber_config_look_display_muc_modes;
|
||||
struct t_config_option *jabber_config_look_display_nick_modes;
|
||||
struct t_config_option *jabber_config_look_highlight_tags;
|
||||
struct t_config_option *jabber_config_look_show_away_once;
|
||||
struct t_config_option *jabber_config_look_smart_filter;
|
||||
@@ -182,6 +183,22 @@ jabber_config_change_look_display_muc_modes (void *data,
|
||||
weechat_bar_item_update ("buffer_name");
|
||||
}
|
||||
|
||||
/*
|
||||
* jabber_config_change_look_display_nick_modes: called when the "display
|
||||
* nick modes" option is changed
|
||||
*/
|
||||
|
||||
void
|
||||
jabber_config_change_look_display_nick_modes (void *data,
|
||||
struct t_config_option *option)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
weechat_bar_item_update ("input_prompt");
|
||||
}
|
||||
|
||||
/*
|
||||
* jabber_config_change_look_highlight_tags: called when the "highlight tags"
|
||||
* option is changed
|
||||
@@ -784,6 +801,12 @@ jabber_config_init ()
|
||||
N_("display MUC modes in \"buffer_name\" bar item"),
|
||||
NULL, 0, 0, "on", NULL, 0, NULL, NULL,
|
||||
&jabber_config_change_look_display_muc_modes, NULL, NULL, NULL);
|
||||
jabber_config_look_display_nick_modes = weechat_config_new_option (
|
||||
jabber_config_file, ptr_section,
|
||||
"display_nick_modes", "boolean",
|
||||
N_("display nick modes in \"input_prompt\" bar item"),
|
||||
NULL, 0, 0, "on", NULL, 0, NULL, NULL,
|
||||
&jabber_config_change_look_display_nick_modes, NULL, NULL, NULL);
|
||||
jabber_config_look_highlight_tags = weechat_config_new_option (
|
||||
jabber_config_file, ptr_section,
|
||||
"highlight_tags", "string",
|
||||
|
||||
@@ -39,6 +39,7 @@ extern struct t_config_option *jabber_config_look_nick_suffix;
|
||||
extern struct t_config_option *jabber_config_look_nick_completion_smart;
|
||||
extern struct t_config_option *jabber_config_look_display_away;
|
||||
extern struct t_config_option *jabber_config_look_display_muc_modes;
|
||||
extern struct t_config_option *jabber_config_look_display_nick_modes;
|
||||
extern struct t_config_option *jabber_config_look_highlight_tags;
|
||||
extern struct t_config_option *jabber_config_look_show_away_once;
|
||||
extern struct t_config_option *jabber_config_look_smart_filter;
|
||||
|
||||
Reference in New Issue
Block a user