mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-08-01 01:26:21 +00:00
@@ -142,6 +142,8 @@ theme_init(const char *const theme_name)
|
|||||||
g_hash_table_insert(defaults, strdup("roster.xa.unread"), strdup("cyan"));
|
g_hash_table_insert(defaults, strdup("roster.xa.unread"), strdup("cyan"));
|
||||||
g_hash_table_insert(defaults, strdup("roster.room"), strdup("green"));
|
g_hash_table_insert(defaults, strdup("roster.room"), strdup("green"));
|
||||||
g_hash_table_insert(defaults, strdup("roster.room.unread"), strdup("green"));
|
g_hash_table_insert(defaults, strdup("roster.room.unread"), strdup("green"));
|
||||||
|
g_hash_table_insert(defaults, strdup("roster.room.trigger"), strdup("green"));
|
||||||
|
g_hash_table_insert(defaults, strdup("roster.room.mention"), strdup("green"));
|
||||||
g_hash_table_insert(defaults, strdup("occupants.header"), strdup("yellow"));
|
g_hash_table_insert(defaults, strdup("occupants.header"), strdup("yellow"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -765,6 +767,8 @@ theme_attrs(theme_item_t attrs)
|
|||||||
case THEME_ROSTER_XA_UNREAD: _theme_prep_fgnd("roster.xa.unread", "cyan", lookup_str, &bold); break;
|
case THEME_ROSTER_XA_UNREAD: _theme_prep_fgnd("roster.xa.unread", "cyan", lookup_str, &bold); break;
|
||||||
case THEME_ROSTER_ROOM: _theme_prep_fgnd("roster.room", "green", lookup_str, &bold); break;
|
case THEME_ROSTER_ROOM: _theme_prep_fgnd("roster.room", "green", lookup_str, &bold); break;
|
||||||
case THEME_ROSTER_ROOM_UNREAD: _theme_prep_fgnd("roster.room.unread", "green", lookup_str, &bold); break;
|
case THEME_ROSTER_ROOM_UNREAD: _theme_prep_fgnd("roster.room.unread", "green", lookup_str, &bold); break;
|
||||||
|
case THEME_ROSTER_ROOM_TRIGGER: _theme_prep_fgnd("roster.room.trigger", "green", lookup_str, &bold); break;
|
||||||
|
case THEME_ROSTER_ROOM_MENTION: _theme_prep_fgnd("roster.room.mention", "green", lookup_str, &bold); break;
|
||||||
case THEME_OCCUPANTS_HEADER: _theme_prep_fgnd("occupants.header", "yellow", lookup_str, &bold); break;
|
case THEME_OCCUPANTS_HEADER: _theme_prep_fgnd("occupants.header", "yellow", lookup_str, &bold); break;
|
||||||
case THEME_WHITE: g_string_append(lookup_str, "white"); bold = FALSE; break;
|
case THEME_WHITE: g_string_append(lookup_str, "white"); bold = FALSE; break;
|
||||||
case THEME_WHITE_BOLD: g_string_append(lookup_str, "white"); bold = TRUE; break;
|
case THEME_WHITE_BOLD: g_string_append(lookup_str, "white"); bold = TRUE; break;
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ typedef enum {
|
|||||||
THEME_ROSTER_XA_UNREAD,
|
THEME_ROSTER_XA_UNREAD,
|
||||||
THEME_ROSTER_ROOM,
|
THEME_ROSTER_ROOM,
|
||||||
THEME_ROSTER_ROOM_UNREAD,
|
THEME_ROSTER_ROOM_UNREAD,
|
||||||
|
THEME_ROSTER_ROOM_TRIGGER,
|
||||||
|
THEME_ROSTER_ROOM_MENTION,
|
||||||
THEME_RECEIPT_SENT,
|
THEME_RECEIPT_SENT,
|
||||||
THEME_NONE,
|
THEME_NONE,
|
||||||
THEME_WHITE,
|
THEME_WHITE,
|
||||||
|
|||||||
@@ -281,6 +281,13 @@ sv_ev_room_message(const char *const room_jid, const char *const nick, const cha
|
|||||||
if (notify) {
|
if (notify) {
|
||||||
mucwin->notify = TRUE;
|
mucwin->notify = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mention) {
|
||||||
|
mucwin->unread_mentions = TRUE;
|
||||||
|
}
|
||||||
|
if (triggers) {
|
||||||
|
mucwin->unread_triggers = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (triggers) {
|
if (triggers) {
|
||||||
|
|||||||
@@ -2189,6 +2189,8 @@ cons_theme_properties(void)
|
|||||||
_cons_theme_prop(THEME_ROSTER_OFFLINE_UNREAD, "roster.offline.unread");
|
_cons_theme_prop(THEME_ROSTER_OFFLINE_UNREAD, "roster.offline.unread");
|
||||||
_cons_theme_prop(THEME_ROSTER_ROOM, "roster.room");
|
_cons_theme_prop(THEME_ROSTER_ROOM, "roster.room");
|
||||||
_cons_theme_prop(THEME_ROSTER_ROOM_UNREAD, "roster.room.unread");
|
_cons_theme_prop(THEME_ROSTER_ROOM_UNREAD, "roster.room.unread");
|
||||||
|
_cons_theme_prop(THEME_ROSTER_ROOM_TRIGGER, "roster.room.trigger");
|
||||||
|
_cons_theme_prop(THEME_ROSTER_ROOM_MENTION, "roster.room.mention");
|
||||||
|
|
||||||
_cons_theme_prop(THEME_OCCUPANTS_HEADER, "occupants.header");
|
_cons_theme_prop(THEME_OCCUPANTS_HEADER, "occupants.header");
|
||||||
|
|
||||||
|
|||||||
@@ -479,7 +479,11 @@ _rosterwin_room(ProfLayoutSplit *layout, ProfMucWin *mucwin)
|
|||||||
{
|
{
|
||||||
GString *msg = g_string_new(" ");
|
GString *msg = g_string_new(" ");
|
||||||
|
|
||||||
if (mucwin->unread > 0) {
|
if (mucwin->unread_mentions) {
|
||||||
|
wattron(layout->subwin, theme_attrs(THEME_ROSTER_ROOM_MENTION));
|
||||||
|
} else if (mucwin->unread_triggers) {
|
||||||
|
wattron(layout->subwin, theme_attrs(THEME_ROSTER_ROOM_TRIGGER));
|
||||||
|
} else if (mucwin->unread > 0) {
|
||||||
wattron(layout->subwin, theme_attrs(THEME_ROSTER_ROOM_UNREAD));
|
wattron(layout->subwin, theme_attrs(THEME_ROSTER_ROOM_UNREAD));
|
||||||
} else {
|
} else {
|
||||||
wattron(layout->subwin, theme_attrs(THEME_ROSTER_ROOM));
|
wattron(layout->subwin, theme_attrs(THEME_ROSTER_ROOM));
|
||||||
@@ -514,7 +518,11 @@ _rosterwin_room(ProfLayoutSplit *layout, ProfMucWin *mucwin)
|
|||||||
win_sub_print(layout->subwin, msg->str, FALSE, wrap, current_indent);
|
win_sub_print(layout->subwin, msg->str, FALSE, wrap, current_indent);
|
||||||
g_string_free(msg, TRUE);
|
g_string_free(msg, TRUE);
|
||||||
|
|
||||||
if (mucwin->unread > 0) {
|
if (mucwin->unread_mentions) {
|
||||||
|
wattroff(layout->subwin, theme_attrs(THEME_ROSTER_ROOM_MENTION));
|
||||||
|
} else if (mucwin->unread_triggers) {
|
||||||
|
wattroff(layout->subwin, theme_attrs(THEME_ROSTER_ROOM_TRIGGER));
|
||||||
|
} else if (mucwin->unread > 0) {
|
||||||
wattroff(layout->subwin, theme_attrs(THEME_ROSTER_ROOM_UNREAD));
|
wattroff(layout->subwin, theme_attrs(THEME_ROSTER_ROOM_UNREAD));
|
||||||
} else {
|
} else {
|
||||||
wattroff(layout->subwin, theme_attrs(THEME_ROSTER_ROOM));
|
wattroff(layout->subwin, theme_attrs(THEME_ROSTER_ROOM));
|
||||||
|
|||||||
@@ -117,6 +117,8 @@ typedef struct prof_muc_win_t {
|
|||||||
ProfWin window;
|
ProfWin window;
|
||||||
char *roomjid;
|
char *roomjid;
|
||||||
int unread;
|
int unread;
|
||||||
|
gboolean unread_mentions;
|
||||||
|
gboolean unread_triggers;
|
||||||
gboolean notify;
|
gboolean notify;
|
||||||
gboolean showjid;
|
gboolean showjid;
|
||||||
unsigned long memcheck;
|
unsigned long memcheck;
|
||||||
|
|||||||
@@ -181,6 +181,8 @@ win_create_muc(const char *const roomjid)
|
|||||||
|
|
||||||
new_win->roomjid = strdup(roomjid);
|
new_win->roomjid = strdup(roomjid);
|
||||||
new_win->unread = 0;
|
new_win->unread = 0;
|
||||||
|
new_win->unread_mentions = FALSE;
|
||||||
|
new_win->unread_triggers = FALSE;
|
||||||
new_win->notify = FALSE;
|
new_win->notify = FALSE;
|
||||||
if (prefs_get_boolean(PREF_OCCUPANTS_JID)) {
|
if (prefs_get_boolean(PREF_OCCUPANTS_JID)) {
|
||||||
new_win->showjid = TRUE;
|
new_win->showjid = TRUE;
|
||||||
|
|||||||
@@ -228,6 +228,8 @@ wins_set_current_by_num(int i)
|
|||||||
ProfMucWin *mucwin = (ProfMucWin*) window;
|
ProfMucWin *mucwin = (ProfMucWin*) window;
|
||||||
assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
|
assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
|
||||||
mucwin->unread = 0;
|
mucwin->unread = 0;
|
||||||
|
mucwin->unread_mentions = FALSE;
|
||||||
|
mucwin->unread_triggers = FALSE;
|
||||||
mucwin->notify = FALSE;
|
mucwin->notify = FALSE;
|
||||||
} else if (window->type == WIN_PRIVATE) {
|
} else if (window->type == WIN_PRIVATE) {
|
||||||
ProfPrivateWin *privatewin = (ProfPrivateWin*) window;
|
ProfPrivateWin *privatewin = (ProfPrivateWin*) window;
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ roster.dnd.unread=
|
|||||||
roster.offline.unread=
|
roster.offline.unread=
|
||||||
roster.room=
|
roster.room=
|
||||||
roster.room.unread=
|
roster.room.unread=
|
||||||
|
roster.room.trigger=
|
||||||
|
roster.room.mention=
|
||||||
occupants.header=
|
occupants.header=
|
||||||
receipt.sent=
|
receipt.sent=
|
||||||
|
|
||||||
|
|||||||
@@ -67,5 +67,7 @@ roster.dnd.unread=blue
|
|||||||
roster.offline.unread=bold_black
|
roster.offline.unread=bold_black
|
||||||
roster.room=cyan
|
roster.room=cyan
|
||||||
roster.room.unread=bold_cyan
|
roster.room.unread=bold_cyan
|
||||||
|
roster.room.mention=bold_blue
|
||||||
|
roster.room.trigger=bold_blue
|
||||||
occupants.header=bold_white
|
occupants.header=bold_white
|
||||||
receipt.sent=white
|
receipt.sent=white
|
||||||
|
|||||||
@@ -67,5 +67,7 @@ roster.dnd.unread=green
|
|||||||
roster.offline.unread=bold_black
|
roster.offline.unread=bold_black
|
||||||
roster.room=green
|
roster.room=green
|
||||||
roster.room.unread=green
|
roster.room.unread=green
|
||||||
|
roster.room.mention=green
|
||||||
|
roster.room.trigger=green
|
||||||
occupants.header=yellow
|
occupants.header=yellow
|
||||||
receipt.sent=red
|
receipt.sent=red
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ roster.dnd.unread=bold_red
|
|||||||
roster.offline.unread=bold_blue
|
roster.offline.unread=bold_blue
|
||||||
roster.room=bold_red
|
roster.room=bold_red
|
||||||
roster.room.unread=bold_magenta
|
roster.room.unread=bold_magenta
|
||||||
|
roster.room.mention=bold_magenta
|
||||||
|
roster.room.trigger=bold_magenta
|
||||||
occupants.header=bold_magenta
|
occupants.header=bold_magenta
|
||||||
receipt.sent=bold_blue
|
receipt.sent=bold_blue
|
||||||
|
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ typing=yellow
|
|||||||
gone=red
|
gone=red
|
||||||
error=red
|
error=red
|
||||||
roominfo=yellow
|
roominfo=yellow
|
||||||
roommention=bold_magenta
|
roommention=bold_cyan
|
||||||
roomtrigger=bold_red
|
roomtrigger=bold_blue
|
||||||
me=blue
|
me=blue
|
||||||
them=bold_green
|
them=bold_green
|
||||||
roster.header=bold_yellow
|
roster.header=bold_yellow
|
||||||
@@ -67,6 +67,8 @@ roster.dnd.unread=bold_magenta
|
|||||||
roster.offline.unread=bold_red
|
roster.offline.unread=bold_red
|
||||||
roster.room=green
|
roster.room=green
|
||||||
roster.room.unread=bold_green
|
roster.room.unread=bold_green
|
||||||
|
roster.room.mention=bold_cyan
|
||||||
|
roster.room.trigger=bold_blue
|
||||||
occupants.header=bold_yellow
|
occupants.header=bold_yellow
|
||||||
receipt.sent=bold_black
|
receipt.sent=bold_black
|
||||||
|
|
||||||
|
|||||||
@@ -67,5 +67,7 @@ roster.dnd.unread=bold_black
|
|||||||
roster.offline.unread=bold_black
|
roster.offline.unread=bold_black
|
||||||
roster.room=green
|
roster.room=green
|
||||||
roster.room.unread=bold_green
|
roster.room.unread=bold_green
|
||||||
|
roster.room.mention=bold_green
|
||||||
|
roster.room.trigger=bold_green
|
||||||
occupants.header=bold_green
|
occupants.header=bold_green
|
||||||
receipt.sent=bold_black
|
receipt.sent=bold_black
|
||||||
|
|||||||
@@ -67,5 +67,7 @@ roster.dnd.unread=bold_magenta
|
|||||||
roster.offline.unread=bold_green
|
roster.offline.unread=bold_green
|
||||||
roster.room=red
|
roster.room=red
|
||||||
roster.room.unread=bold_red
|
roster.room.unread=bold_red
|
||||||
|
roster.room.mention=bold_red
|
||||||
|
roster.room.trigger=bold_red
|
||||||
occupants.header=bold_cyan
|
occupants.header=bold_cyan
|
||||||
receipt.sent=red
|
receipt.sent=red
|
||||||
|
|||||||
@@ -67,5 +67,7 @@ roster.dnd.unread=green
|
|||||||
roster.offline.unread=bold_black
|
roster.offline.unread=bold_black
|
||||||
roster.room=green
|
roster.room=green
|
||||||
roster.room.unread=green
|
roster.room.unread=green
|
||||||
|
roster.room.mention=green
|
||||||
|
roster.room.trigger=green
|
||||||
occupants.header=magenta
|
occupants.header=magenta
|
||||||
receipt.sent=red
|
receipt.sent=red
|
||||||
|
|||||||
@@ -67,5 +67,7 @@ roster.dnd.unread=white
|
|||||||
roster.offline.unread=white
|
roster.offline.unread=white
|
||||||
roster.room=white
|
roster.room=white
|
||||||
roster.room.unread=white
|
roster.room.unread=white
|
||||||
|
roster.room.mention=white
|
||||||
|
roster.room.trigger=white
|
||||||
occupants.header=white
|
occupants.header=white
|
||||||
receipt.sent=white
|
receipt.sent=white
|
||||||
|
|||||||
@@ -67,5 +67,7 @@ roster.dnd.unread=white
|
|||||||
roster.offline.unread=white
|
roster.offline.unread=white
|
||||||
roster.room=blue
|
roster.room=blue
|
||||||
roster.room.unread=blue
|
roster.room.unread=blue
|
||||||
|
roster.room.mention=blue
|
||||||
|
roster.room.trigger=blue
|
||||||
occupants.header=black
|
occupants.header=black
|
||||||
receipt.sent=red
|
receipt.sent=red
|
||||||
|
|||||||
@@ -67,5 +67,7 @@ roster.dnd.unread=red
|
|||||||
roster.offline.unread=red
|
roster.offline.unread=red
|
||||||
roster.room=green
|
roster.room=green
|
||||||
roster.room.unread=green
|
roster.room.unread=green
|
||||||
|
roster.room.mention=green
|
||||||
|
roster.room.trigger=green
|
||||||
occupants.header=yellow
|
occupants.header=yellow
|
||||||
receipt.sent=red
|
receipt.sent=red
|
||||||
|
|||||||
@@ -67,5 +67,7 @@ roster.dnd.unread=bold_red
|
|||||||
roster.offline.unread=bold_red
|
roster.offline.unread=bold_red
|
||||||
roster.room=bold_green
|
roster.room=bold_green
|
||||||
roster.room.unread=bold_green
|
roster.room.unread=bold_green
|
||||||
|
roster.room.mention=bold_green
|
||||||
|
roster.room.trigger=bold_green
|
||||||
occupants.header=bold_yellow
|
occupants.header=bold_yellow
|
||||||
receipt.sent=bold_red
|
receipt.sent=bold_red
|
||||||
|
|||||||
@@ -67,5 +67,7 @@ roster.dnd.unread=green
|
|||||||
roster.offline.unread=white
|
roster.offline.unread=white
|
||||||
roster.room=green
|
roster.room=green
|
||||||
roster.room.unread=green
|
roster.room.unread=green
|
||||||
|
roster.room.mention=green
|
||||||
|
roster.room.trigger=green
|
||||||
occupants.header=magenta
|
occupants.header=magenta
|
||||||
receipt.sent=red
|
receipt.sent=red
|
||||||
|
|||||||
@@ -67,5 +67,7 @@ roster.dnd.unread=green
|
|||||||
roster.offline.unread=bold_black
|
roster.offline.unread=bold_black
|
||||||
roster.room=green
|
roster.room=green
|
||||||
roster.room.unread=green
|
roster.room.unread=green
|
||||||
|
roster.room.mention=green
|
||||||
|
roster.room.trigger=green
|
||||||
occupants.header=white
|
occupants.header=white
|
||||||
receipt.sent=red
|
receipt.sent=red
|
||||||
|
|||||||
@@ -67,5 +67,7 @@ roster.dnd.unread=red
|
|||||||
roster.offline.unread=red
|
roster.offline.unread=red
|
||||||
roster.room=green
|
roster.room=green
|
||||||
roster.room.unread=green
|
roster.room.unread=green
|
||||||
|
roster.room.mention=green
|
||||||
|
roster.room.trigger=green
|
||||||
occupants.header=black
|
occupants.header=black
|
||||||
receipt.sent=red
|
receipt.sent=red
|
||||||
|
|||||||
Reference in New Issue
Block a user