Roster private chat preferences

This commit is contained in:
James Booth
2016-01-24 02:28:22 +00:00
parent 7cacee8781
commit 2a8da892aa
7 changed files with 206 additions and 47 deletions

View File

@@ -1277,6 +1277,24 @@ cons_roster_setting(void)
else
cons_show("Roster contact char (/roster) : none");
char resource_ch = prefs_get_roster_resource_char();
if (resource_ch)
cons_show("Roster resource char (/roster) : %c", resource_ch);
else
cons_show("Roster resource char (/roster) : none");
char room_ch = prefs_get_roster_room_char();
if (room_ch)
cons_show("Roster room char (/roster) : %c", room_ch);
else
cons_show("Roster room char (/roster) : none");
char private_ch = prefs_get_roster_private_char();
if (private_ch)
cons_show("Roster private char (/roster) : %c", private_ch);
else
cons_show("Roster private char (/roster) : none");
gint contact_indent = prefs_get_roster_contact_indent();
cons_show("Roster contact indent (/roster) : %d", contact_indent);
@@ -1285,12 +1303,6 @@ cons_roster_setting(void)
else
cons_show("Roster resource (/roster) : hide");
char resource_ch = prefs_get_roster_resource_char();
if (resource_ch)
cons_show("Roster resource char (/roster) : %c", resource_ch);
else
cons_show("Roster resource char (/roster) : none");
gint resource_indent = prefs_get_roster_resource_indent();
cons_show("Roster resource indent (/roster) : %d", resource_indent);

View File

@@ -494,7 +494,7 @@ _rosterwin_room(ProfLayoutSplit *layout, ProfMucWin *mucwin)
indent--;
}
}
char ch = prefs_get_roster_contact_char();
char ch = prefs_get_roster_room_char();
if (ch) {
g_string_append_printf(msg, "%c", ch);
}
@@ -549,14 +549,12 @@ _rosterwin_room(ProfLayoutSplit *layout, ProfMucWin *mucwin)
}
}
// TODO add preference
unreadpos = prefs_get_string(PREF_ROSTER_ROOMS_UNREAD);
if ((g_strcmp0(unreadpos, "before") == 0) && privwin->unread > 0) {
g_string_append_printf(privmsg, "(%d) ", privwin->unread);
}
// TODO add preference
ch = '/';
ch = prefs_get_roster_private_char();
if (ch) {
g_string_append_printf(privmsg, "%c", ch);
}
@@ -652,6 +650,11 @@ _rosterwin_private_chats(ProfLayoutSplit *layout)
g_string_append_printf(privmsg, "(%d) ", privwin->unread);
}
ch = prefs_get_roster_private_char();
if (ch) {
g_string_append_printf(privmsg, "%c", ch);
}
g_string_append(privmsg, privwin->fulljid);
if ((g_strcmp0(unreadpos, "after") == 0) && privwin->unread > 0) {