Coloured contact and subscription in /roster and /group output
This commit is contained in:
@@ -72,6 +72,8 @@ static struct colours_t {
|
||||
NCURSES_COLOR_T inputtext;
|
||||
NCURSES_COLOR_T timetext;
|
||||
NCURSES_COLOR_T splashtext;
|
||||
NCURSES_COLOR_T subscribed;
|
||||
NCURSES_COLOR_T unsubscribed;
|
||||
NCURSES_COLOR_T online;
|
||||
NCURSES_COLOR_T away;
|
||||
NCURSES_COLOR_T xa;
|
||||
@@ -220,6 +222,10 @@ theme_init_colours(void)
|
||||
// states
|
||||
init_pair(60, colour_prefs.typing, colour_prefs.bkgnd);
|
||||
init_pair(61, colour_prefs.gone, colour_prefs.bkgnd);
|
||||
|
||||
// subscription status
|
||||
init_pair(70, colour_prefs.subscribed, colour_prefs.bkgnd);
|
||||
init_pair(71, colour_prefs.unsubscribed, colour_prefs.bkgnd);
|
||||
}
|
||||
|
||||
static NCURSES_COLOR_T
|
||||
@@ -306,6 +312,14 @@ _load_colours(void)
|
||||
_set_colour(timetext_val, &colour_prefs.timetext, COLOR_WHITE);
|
||||
g_free(timetext_val);
|
||||
|
||||
gchar *subscribed_val = g_key_file_get_string(theme, "colours", "subscribed", NULL);
|
||||
_set_colour(subscribed_val, &colour_prefs.subscribed, COLOR_GREEN);
|
||||
g_free(subscribed_val);
|
||||
|
||||
gchar *unsubscribed_val = g_key_file_get_string(theme, "colours", "unsubscribed", NULL);
|
||||
_set_colour(unsubscribed_val, &colour_prefs.unsubscribed, COLOR_RED);
|
||||
g_free(unsubscribed_val);
|
||||
|
||||
gchar *online_val = g_key_file_get_string(theme, "colours", "online", NULL);
|
||||
_set_colour(online_val, &colour_prefs.online, COLOR_GREEN);
|
||||
g_free(online_val);
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
#define COLOUR_XA COLOR_PAIR(55)
|
||||
#define COLOUR_TYPING COLOR_PAIR(60)
|
||||
#define COLOUR_GONE COLOR_PAIR(61)
|
||||
#define COLOUR_SUBSCRIBED COLOR_PAIR(70)
|
||||
#define COLOUR_UNSUBSCRIBED COLOR_PAIR(71)
|
||||
|
||||
void theme_init(const char * const theme_name);
|
||||
void theme_init_colours(void);
|
||||
|
||||
Reference in New Issue
Block a user