mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 19:13:02 +01:00
Show friend connection type (UDP/TCP) in friend status bar
This commit is contained in:
parent
41e93adbdb
commit
13337041ce
@ -1307,12 +1307,14 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *connection_status_s = statusbar->connection == TOX_CONNECTION_TCP ? "TCP" : "UDP";
|
||||||
|
|
||||||
wattron(statusbar->topline, COLOR_PAIR(BAR_ACCENT));
|
wattron(statusbar->topline, COLOR_PAIR(BAR_ACCENT));
|
||||||
wprintw(statusbar->topline, " [");
|
wprintw(statusbar->topline, " [");
|
||||||
wattroff(statusbar->topline, COLOR_PAIR(BAR_ACCENT));
|
wattroff(statusbar->topline, COLOR_PAIR(BAR_ACCENT));
|
||||||
|
|
||||||
wattron(statusbar->topline, COLOR_PAIR(colour) | A_BOLD);
|
wattron(statusbar->topline, COLOR_PAIR(colour) | A_BOLD);
|
||||||
wprintw(statusbar->topline, "%s", ONLINE_CHAR);
|
wprintw(statusbar->topline, "%s", connection_status_s);
|
||||||
wattroff(statusbar->topline, COLOR_PAIR(colour) | A_BOLD);
|
wattroff(statusbar->topline, COLOR_PAIR(colour) | A_BOLD);
|
||||||
|
|
||||||
wattron(statusbar->topline, COLOR_PAIR(BAR_ACCENT));
|
wattron(statusbar->topline, COLOR_PAIR(BAR_ACCENT));
|
||||||
@ -1342,7 +1344,7 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
|
|||||||
wattroff(statusbar->topline, COLOR_PAIR(BAR_ACCENT));
|
wattroff(statusbar->topline, COLOR_PAIR(BAR_ACCENT));
|
||||||
|
|
||||||
wattron(statusbar->topline, COLOR_PAIR(BAR_TEXT));
|
wattron(statusbar->topline, COLOR_PAIR(BAR_TEXT));
|
||||||
wprintw(statusbar->topline, "%s", OFFLINE_CHAR);
|
wprintw(statusbar->topline, "Offline");
|
||||||
wattroff(statusbar->topline, COLOR_PAIR(BAR_TEXT));
|
wattroff(statusbar->topline, COLOR_PAIR(BAR_TEXT));
|
||||||
|
|
||||||
wattron(statusbar->topline, COLOR_PAIR(BAR_ACCENT));
|
wattron(statusbar->topline, COLOR_PAIR(BAR_ACCENT));
|
||||||
|
Loading…
Reference in New Issue
Block a user