mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
Fix statusbar display of active tab
When using `/statusbar tabmode actlist` and `/statusbar self user` then we get `[00:23] [user]` and now `[00:23] [1:user]` where `1` is the active tab. The active tab is only displayed with fulljid. This commit fixes 7d290b04d. Fix https://github.com/profanity-im/profanity/issues/1980
This commit is contained in:
parent
c32aac7644
commit
ebcb198f09
@ -549,37 +549,20 @@ _status_bar_draw_maintext(int pos)
|
|||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (statusbar->fulljid) {
|
if (statusbar->fulljid == NULL) {
|
||||||
jidp = jid_create(statusbar->fulljid);
|
|
||||||
if (g_strcmp0(self, "user") == 0) {
|
|
||||||
maintext = jidp->localpart;
|
|
||||||
} else if (g_strcmp0(self, "barejid") == 0) {
|
|
||||||
maintext = jidp->barejid;
|
|
||||||
} else {
|
|
||||||
maintext = statusbar->fulljid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (maintext == NULL) {
|
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (statusbar->fulljid) {
|
jidp = jid_create(statusbar->fulljid);
|
||||||
if (g_strcmp0(self, "off") == 0) {
|
if (!jidp)
|
||||||
return pos;
|
return pos;
|
||||||
}
|
|
||||||
if (g_strcmp0(self, "user") == 0) {
|
|
||||||
auto_jid Jid* jidp = jid_create(statusbar->fulljid);
|
|
||||||
mvwprintw(statusbar_win, 0, pos, "%s", jidp->localpart);
|
|
||||||
return pos;
|
|
||||||
}
|
|
||||||
if (g_strcmp0(self, "barejid") == 0) {
|
|
||||||
auto_jid Jid* jidp = jid_create(statusbar->fulljid);
|
|
||||||
mvwprintw(statusbar_win, 0, pos, "%s", jidp->barejid);
|
|
||||||
return pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
mvwprintw(statusbar_win, 0, pos, "%s", statusbar->fulljid);
|
if (g_strcmp0(self, "user") == 0) {
|
||||||
|
maintext = jidp->localpart;
|
||||||
|
} else if (g_strcmp0(self, "barejid") == 0) {
|
||||||
|
maintext = jidp->barejid;
|
||||||
|
} else {
|
||||||
|
maintext = statusbar->fulljid;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean actlist_tabmode = _tabmode_is_actlist();
|
gboolean actlist_tabmode = _tabmode_is_actlist();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user