account: Rework account states

Introduce a state-changed signal which also gives a reason for why the state
changed. This will allow the UI to give some meaningful feedback to the user.

Additionally we can get rid of a number of things that were not really states,
but rather reasons for why a state changed (f.e. authentication failures).
This commit is contained in:
Evangelos Ribeiro Tzaras
2021-12-21 08:20:56 +01:00
parent d5fd098479
commit cdb6f90acc
5 changed files with 164 additions and 66 deletions

View File

@@ -74,7 +74,7 @@ on_account_state_changed (CallsAccountRow *self)
{
CallsAccountState state = calls_account_get_state (self->account);
gtk_switch_set_active (self->online_switch, state == CALLS_ACCOUNT_ONLINE);
gtk_switch_set_active (self->online_switch, state == CALLS_ACCOUNT_STATE_ONLINE);
}
static void