Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/screen.c @ 824:37ef269330f0
Show incomplete subscriptions in the roster
When the "from" subscription is missing, curly braces are used.
When the "to" subscription is missing, the status is replaced by '?'.
Thanks to pmw for the suggestion.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Tue, 25 Apr 2006 07:13:43 +0200 |
parents | 0dbb2be10975 |
children | 3ecfaa6111e2 |
comparison
equal
deleted
inserted
replaced
823:19c615fd071e | 824:37ef269330f0 |
---|---|
1048 sep = "+++"; | 1048 sep = "+++"; |
1049 else | 1049 else |
1050 sep = "---"; | 1050 sep = "---"; |
1051 snprintf(rline, Roster_Width, " %c%s %s", pending, sep, name); | 1051 snprintf(rline, Roster_Width, " %c%s %s", pending, sep, name); |
1052 } else { | 1052 } else { |
1053 snprintf(rline, Roster_Width, " %c[%c] %s", pending, status, name); | 1053 char sepleft = '['; |
1054 char sepright = ']'; | |
1055 if (btype & ROSTER_TYPE_USER) { | |
1056 guint subtype = buddy_getsubscription(BUDDATA(buddy)); | |
1057 if (!(subtype & sub_to)) | |
1058 status = '?'; | |
1059 if (!(subtype & sub_from)) { | |
1060 sepleft = '{'; | |
1061 sepright = '}'; | |
1062 } | |
1063 } | |
1064 | |
1065 snprintf(rline, Roster_Width, | |
1066 " %c%c%c%c %s", pending, sepleft, status, sepright, name); | |
1054 } | 1067 } |
1055 | 1068 |
1056 rline_locale = from_utf8(rline); | 1069 rline_locale = from_utf8(rline); |
1057 mvwprintw(rosterWnd, i, 0, "%s", rline_locale); | 1070 mvwprintw(rosterWnd, i, 0, "%s", rline_locale); |
1058 g_free(rline_locale); | 1071 g_free(rline_locale); |