Managing accounts
About
Not all E-mail clients can manage their own accounts. Sometimes E-mail clients are being managed by an external configuration utility. On a mobile device it would not even be a strange idea to let the user configure the E-mail accounts using a web service. For example, if the vendor of the device provides optimized proxy IMAP servers (which is what we recommend in stead of letting your E-mail client support POP accounts, although Tinymail supports POP accounts too).
Nonetheless has TMut an account manager called TMutAccountManager.
Design
TMutAccountManager utilizes three methods: tmut_account_manager_on_edit_account_activated, tmut_account_manager_on_new_account_activated and tmut_account_manager_on_delete_account_activated which are the handlers for the menu items. The component also has a combobox with all the currently existing accounts and which gets its model set in tmut_account_manager_set_account_store.
The tmut_account_manager_on_edit_account_activated method creates a TMutAccountEditor using the currently selected account. It creates two signals on the GtkWindow, one on ok-clicked that calls back with on_edit_account and one on destroyed that calls back with on_account_editor_destroy. The private on_edit_account method calls the TMutAccountStore with tmut_account_store_edit_account.
The tmut_account_manager_on_new_account_activated method creates a TMutAccountEditor. It creates two signals on the GtkWindow, one on ok-clicked that calls back with on_create_new_account and one on destroyed that calls back with on_account_editor_destroy. The private on_create_new_account method calls the TMutAccountStore with tmut_account_store_create_account.
The tmut_account_manager_on_delete_account_activated method proxies the request to delete the account to the TMutAccountStore with tmut_account_store_delete_account.
