diff options
author | James Booth <boothj5@gmail.com> | 2016-01-22 01:06:28 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-01-22 01:06:28 +0000 |
commit | 53fc89f71120a7ceba494cb1eed18667c24d1775 (patch) | |
tree | 5564e45185ba286f8ae5860bdf84145fbb2e4b3c /src/ui | |
parent | 72bbb5c2b9953237c39c4003cabb95ad420afe64 (diff) | |
download | profani-tty-53fc89f71120a7ceba494cb1eed18667c24d1775.tar.gz |
Added account theme property
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/console.c | 3 | ||||
-rw-r--r-- | src/ui/core.c | 19 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/ui/console.c b/src/ui/console.c index 260f6d6d..e087ae79 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -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); } diff --git a/src/ui/core.c b/src/ui/core.c index a4e5814a..78a992d9 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -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); |