From aef9a2e028bf27830c89db41c14365fdd4ec3f99 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Wed, 15 May 2019 00:35:22 +0200 Subject: [PATCH] Only use buffer name for buffer_name bar item The logic that was here is only relevant for the irc plugin, and should not be included. The default value for the buffers from other plugins just contains the color and name, as seen at https://github.com/weechat/weechat/blob/v2.4/src/gui/gui-bar-item.c#L1112-L1141 Fixes a part of #54 --- matrix/bar_items.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/matrix/bar_items.py b/matrix/bar_items.py index 49f4645..e711f92 100644 --- a/matrix/bar_items.py +++ b/matrix/bar_items.py @@ -71,23 +71,7 @@ def matrix_bar_item_name(data, item, window, buffer, extra_info): name = W.buffer_get_string(buffer, "name") - if name: - localvar_type = W.buffer_get_string(buffer, "localvar_type") - is_channel = localvar_type == "channel" - - if is_channel: - name = W.buffer_get_string(buffer, "localvar_channel") - - return "{}{}{}{}{}{}".format( - W.color("bar_delim") if is_channel else "", - "(" if is_channel else "", - W.color("status_name"), - name, - W.color("bar_delim") if is_channel else "", - ")" if is_channel else "", - ) - - return "" + return "{}{}".format(W.color("status_name"), name) @utf8_decode