Added account theme property

This commit is contained in:
James Booth
2016-01-22 01:06:28 +00:00
parent 72bbb5c2b9
commit 53fc89f711
16 changed files with 175 additions and 20 deletions

View File

@@ -851,6 +851,9 @@ cons_show_account(ProfAccount *account)
if (account->startscript) {
cons_show ("Start script : %s", account->startscript);
}
if (account->theme) {
cons_show ("Theme : %s", account->theme);
}
if (account->otr_policy) {
cons_show ("OTR policy : %s", account->otr_policy);
}

View File

@@ -353,6 +353,25 @@ ui_group_removed(const char *const contact, const char *const group)
void
ui_handle_login_account_success(ProfAccount *account, int secured)
{
if (account->theme) {
if (theme_load(account->theme)) {
ui_load_colours();
if (prefs_get_boolean(PREF_ROSTER)) {
ui_show_roster();
} else {
ui_hide_roster();
}
if (prefs_get_boolean(PREF_OCCUPANTS)) {
ui_show_all_room_rosters();
} else {
ui_hide_all_room_rosters();
}
ui_redraw();
} else {
cons_show("Couldn't find account theme: %s", account->theme);
}
}
resource_presence_t resource_presence = accounts_get_login_presence(account->name);
contact_presence_t contact_presence = contact_presence_from_resource_presence(resource_presence);
cons_show_login_success(account, secured);