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:
parent
c1cfc4a8e4
commit
aef9a2e028
1 changed files with 1 additions and 17 deletions
|
@ -71,23 +71,7 @@ def matrix_bar_item_name(data, item, window, buffer, extra_info):
|
||||||
|
|
||||||
name = W.buffer_get_string(buffer, "name")
|
name = W.buffer_get_string(buffer, "name")
|
||||||
|
|
||||||
if name:
|
return "{}{}".format(W.color("status_name"), 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 ""
|
|
||||||
|
|
||||||
|
|
||||||
@utf8_decode
|
@utf8_decode
|
||||||
|
|
Loading…
Reference in a new issue