Added mention and trigger themes for console
This commit is contained in:
@@ -82,6 +82,8 @@ theme_init(const char *const theme_name)
|
||||
g_hash_table_insert(defaults, strdup("main.splash"), strdup("cyan"));
|
||||
g_hash_table_insert(defaults, strdup("error"), strdup("red"));
|
||||
g_hash_table_insert(defaults, strdup("incoming"), strdup("yellow"));
|
||||
g_hash_table_insert(defaults, strdup("mention"), strdup("yellow"));
|
||||
g_hash_table_insert(defaults, strdup("trigger"), strdup("yellow"));
|
||||
g_hash_table_insert(defaults, strdup("input.text"), strdup("white"));
|
||||
g_hash_table_insert(defaults, strdup("main.time"), strdup("white"));
|
||||
g_hash_table_insert(defaults, strdup("titlebar.text"), strdup("white"));
|
||||
@@ -724,6 +726,8 @@ theme_attrs(theme_item_t attrs)
|
||||
case THEME_SPLASH: _theme_prep_fgnd("main.splash", lookup_str, &bold); break;
|
||||
case THEME_ERROR: _theme_prep_fgnd("error", lookup_str, &bold); break;
|
||||
case THEME_INCOMING: _theme_prep_fgnd("incoming", lookup_str, &bold); break;
|
||||
case THEME_MENTION: _theme_prep_fgnd("mention", lookup_str, &bold); break;
|
||||
case THEME_TRIGGER: _theme_prep_fgnd("trigger", lookup_str, &bold); break;
|
||||
case THEME_INPUT_TEXT: _theme_prep_fgnd("input.text", lookup_str, &bold); break;
|
||||
case THEME_TIME: _theme_prep_fgnd("main.time", lookup_str, &bold); break;
|
||||
case THEME_TITLE_TEXT: _theme_prep_fgnd("titlebar.text", lookup_str, &bold); break;
|
||||
|
||||
@@ -46,6 +46,8 @@ typedef enum {
|
||||
THEME_SPLASH,
|
||||
THEME_ERROR,
|
||||
THEME_INCOMING,
|
||||
THEME_MENTION,
|
||||
THEME_TRIGGER,
|
||||
THEME_INPUT_TEXT,
|
||||
THEME_TIME,
|
||||
THEME_TITLE_TEXT,
|
||||
|
||||
@@ -334,10 +334,10 @@ cons_show_incoming_room_message(const char *const nick, const char *const room,
|
||||
|
||||
if (g_strcmp0(muc_show, "all") == 0) {
|
||||
if (mention) {
|
||||
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< room mention: %s in %s (win %d)", nick, room, ui_index);
|
||||
win_vprint(console, '-', 0, NULL, 0, THEME_MENTION, "", "<< room mention: %s in %s (win %d)", nick, room, ui_index);
|
||||
} else if (triggers) {
|
||||
char *triggers_str = _room_triggers_to_string(triggers);
|
||||
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< room trigger %s: %s in %s (win %d)", triggers_str, nick, room, ui_index);
|
||||
win_vprint(console, '-', 0, NULL, 0, THEME_TRIGGER, "", "<< room trigger %s: %s in %s (win %d)", triggers_str, nick, room, ui_index);
|
||||
free(triggers_str);
|
||||
} else {
|
||||
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< room message: %s in %s (win %d)", nick, room, ui_index);
|
||||
@@ -346,11 +346,11 @@ cons_show_incoming_room_message(const char *const nick, const char *const room,
|
||||
|
||||
} else if (g_strcmp0(muc_show, "first") == 0) {
|
||||
if (mention) {
|
||||
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< room mention: %s in %s (win %d)", nick, room, ui_index);
|
||||
win_vprint(console, '-', 0, NULL, 0, THEME_MENTION, "", "<< room mention: %s in %s (win %d)", nick, room, ui_index);
|
||||
cons_alert();
|
||||
} else if (triggers) {
|
||||
char *triggers_str = _room_triggers_to_string(triggers);
|
||||
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< room trigger %s: %s in %s (win %d)", triggers_str, nick, room, ui_index);
|
||||
win_vprint(console, '-', 0, NULL, 0, THEME_TRIGGER, "", "<< room trigger %s: %s in %s (win %d)", triggers_str, nick, room, ui_index);
|
||||
free(triggers_str);
|
||||
cons_alert();
|
||||
} else if (unread == 0) {
|
||||
@@ -2208,6 +2208,8 @@ cons_theme_properties(void)
|
||||
_cons_theme_prop(THEME_UNSUBSCRIBED, "unsubscribed");
|
||||
|
||||
_cons_theme_prop(THEME_INCOMING, "incoming");
|
||||
_cons_theme_prop(THEME_MENTION, "mention");
|
||||
_cons_theme_prop(THEME_TRIGGER, "trigger");
|
||||
_cons_theme_prop(THEME_TYPING, "typing");
|
||||
_cons_theme_prop(THEME_GONE, "gone");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user