Changed type to enum for presence colour attributes

This commit is contained in:
James Booth
2014-11-16 23:37:07 +00:00
parent b60a5b08c0
commit 74d9937573
6 changed files with 39 additions and 39 deletions

View File

@@ -558,6 +558,24 @@ _theme_find(const char * const theme_name)
return path;
}
theme_item_t
theme_main_presence_attrs(const char * const presence)
{
if (g_strcmp0(presence, "online") == 0) {
return THEME_ONLINE;
} else if (g_strcmp0(presence, "away") == 0) {
return THEME_AWAY;
} else if (g_strcmp0(presence, "chat") == 0) {
return THEME_CHAT;
} else if (g_strcmp0(presence, "dnd") == 0) {
return THEME_DND;
} else if (g_strcmp0(presence, "xa") == 0) {
return THEME_XA;
} else {
return THEME_OFFLINE;
}
}
int
theme_attrs(theme_item_t attrs)
{

View File

@@ -99,5 +99,6 @@ gboolean theme_load(const char * const theme_name);
GSList* theme_list(void);
void theme_close(void);
int theme_attrs(theme_item_t attrs);
theme_item_t theme_main_presence_attrs(const char * const presence);
#endif