mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-23 19:56:21 +00:00
Added /roster room unread preference
closes ##708
This commit is contained in:
@@ -1341,6 +1341,15 @@ cons_roster_setting(void)
|
||||
cons_show("Roster rooms order (/roster) : %s", rooms_order);
|
||||
prefs_free_string(rooms_order);
|
||||
|
||||
char *roomsunread = prefs_get_string(PREF_ROSTER_ROOMS_UNREAD);
|
||||
if (g_strcmp0(roomsunread, "before") == 0) {
|
||||
cons_show("Roster rooms unread (/roster) : before");
|
||||
} else if (g_strcmp0(roomsunread, "after") == 0) {
|
||||
cons_show("Roster rooms unread (/roster) : after");
|
||||
} else {
|
||||
cons_show("Roster rooms unread (/roster) : OFF");
|
||||
}
|
||||
|
||||
int size = prefs_get_roster_size();
|
||||
cons_show("Roster size (/roster) : %d", size);
|
||||
|
||||
|
||||
@@ -483,10 +483,15 @@ _rosterwin_room(ProfLayoutSplit *layout, ProfMucWin *mucwin)
|
||||
g_string_append_printf(msg, "%c", ch);
|
||||
}
|
||||
|
||||
char *unreadpos = prefs_get_string(PREF_ROSTER_ROOMS_UNREAD);
|
||||
if ((g_strcmp0(unreadpos, "before") == 0) && mucwin->unread > 0) {
|
||||
g_string_append_printf(msg, "(%d) ", mucwin->unread);
|
||||
}
|
||||
g_string_append(msg, mucwin->roomjid);
|
||||
if (mucwin->unread > 0) {
|
||||
if ((g_strcmp0(unreadpos, "after") == 0) && mucwin->unread > 0) {
|
||||
g_string_append_printf(msg, " (%d)", mucwin->unread);
|
||||
}
|
||||
prefs_free_string(unreadpos);
|
||||
|
||||
win_sub_newline_lazy(layout->subwin);
|
||||
gboolean wrap = prefs_get_boolean(PREF_ROSTER_WRAP);
|
||||
|
||||
Reference in New Issue
Block a user