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
This commit is contained in:
Trygve Aaberge 2019-05-15 00:35:22 +02:00
parent c1cfc4a8e4
commit aef9a2e028

View file

@ -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