From 5a3b0cc5832af1ac323a343d086815755609bb63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Pettersson?= Date: Sat, 13 Sep 2014 00:40:59 +0200 Subject: [PATCH] Changed bar item buffer_plugin to show plugin name and identity name. --- src/tox-weechat-gui.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/tox-weechat-gui.c b/src/tox-weechat-gui.c index 6893125..624ba62 100644 --- a/src/tox-weechat-gui.c +++ b/src/tox-weechat-gui.c @@ -58,13 +58,15 @@ bar_item_buffer_plugin(void *data, struct t_gui_bar_item *item, char string[256]; - const char *name = weechat_plugin_get_name(weechat_plugin); - - const char *status = identity->is_connected ? "online" : "offline"; - const char *color = weechat_color(identity->is_connected ? "green" : "red"); + const char *plugin_name = weechat_plugin_get_name(weechat_plugin); + const char *identity_name = identity->name; snprintf(string, sizeof(string), - "%s %s%s", name, color, status); + "%s%s/%s%s", + plugin_name, + weechat_color("bar_delim"), + weechat_color("bar_fg"), + identity_name); return strdup(string); }