This patch includes a lot of work to refactor and reorganize the
account settings dialogs. The main improvement is the implementation
of ModestAccountSettings and ModestServerAccountSettings. These
classes represent the settings of accounts and server accounts in
memory, avoiding storage in ModestConf for temporal or non persistent
account settings.
* src/modest-protocol-info.[ch]:
* New method modest_protocol_info_get_connection_protocol, that
obtains a ModestConnectionProtocol from a string.
* src/modest-server-account-settings.[ch]:
* New class, that represents server settings (common for
store and transport server settings. It's only a memory
storage. Persistence is managed in ModestAccountMgr.
* src/modest-account-settings.[ch]:
* New class, that represents an account. It contains two
ModestServerStoreSettings for store and transport accounts
associated with the account. It represents all the common
account information (display name, user fullname, email
address, etc).
* src/modest-account-mgr-helpers.[ch]:
* Added internal method null_means_empty for avoiding setting
NULL to values we shouldn't put NULL.
* (modest_account_mgr_get_store_protocol): use the new
settings api.
* (get_secure_auth_for_conf_string): removed, as it's also
in ModestProtocolInfo. Also use
modest_protocol_info_get_auth_protocol_name instead of
the big if.
* (get_security_for_conf_string): removed, as it's also in
ModestProtocolInfo. Also removed if.
* Replaced modest_account_mgr_get_server_account_data with
modest_account_mgr_load_server_settings. The method creates
an instance of ModestServerAccountSettings from a ModestConf
account.
* Removed free method for server account data.
* Added method modest_account_mgr_save_server_settings. It
stores a ModestServerAccountSettings in ModestConf.
* Replaced modest_account_mgr_get_account_data with
modest_account_mgr_load_account_settings. This fills a
ModestAccountSettings instance with information, and
also obtains the store and transport server settings. Also
removed old ModestAccountData and ModestServerAccountData
structs.
* New method modest_account_mgr_save_account_settings, that
saves an account to ModestConf. It's more intended for
updating an existing accoung.
* Methods get_retrieve_type_name and get_retrieve_type, to
convert from string representation of retrieve types into
modest ModestAccountRetrieveType and viceversa.
* src/modest-account-mgr.[ch]:
* New (modest_account_mgr_add_account_from_settings): creates
a new account in ModestConf, and emits the signal to register
it in the list of available accounts.
* Usage of ModestAccountRetrieveType instead of conf strings.
* Use ModestAccountSettings and ModestServerAccountSettings
instead of deprecated ModestAccountData and
ModestServerAccountData.
* src/modest-tny-account.c:
* Use ModestAccountSettings and ModestServerAccountSettings.
* src/modest-tny-account-store.c:
* Use ModestAccountSettings.
* src/modest-mail-operation.c:
* Use ModestAccountRetrieveType instead of strings.
* src/modest-widget-memory.c:
* Use ModestAccountSettings.
* src/widgets/modest-retrieve-combo-box.[ch]:
* Use ModestAccountRetrieveType instead of strings.
* src/widgets/modest-account-view.c:
* Use ModestServerAccountSettings and ModestAccountSettings.
* src/widgets/modest-header-view.c:
* Small change, if model is NULL, expose returns silently.
* src/modest-ui-actions.c:
* Use ModestAccountSettings api.
* Make some specific maemo code be now usable again also
in gnome port.
* src/maemo/modest-connection-specific-smtp-window.c:
* User ModestServerAccountSettings api.
* src/maemo/easysetup/modest-easysetup-wizard.[ch]:
* Big work here to adapt to ModestAccountSettings. As a benefit,
now we use it to pass the settings to
ModestAccountSettingsDialog
(advanced settings). We only save to the account manager on
finishing and approving changes.
* Moved code to create the account to ModestAccountMgr, and
added code to fill the ModestAccountSettings.
* src/maemo/easysetup/modest-easysetup-provider-combo-box.c:
* New method to set the provider to others.
* src/maemo/modest-account-view-window.c:
* Use ModestAccountSettings.
* src/maemo/modest-account-settings-dialog.c:
* Use ModestAccountSettings.
* Move storage and fetch code from ModestConf to account
manager.
* Added code to fill and retrieve information in
ModestAccountSettings and ModestServerAccountSettings.
* Now it works with ModestAccountSettings, instead of storing
directly to ModestConf.
* src/maemo/modest-main-window.c:
* Use ModestAccountSettings for management of accounts menu
options.
* src/maemo/modest-connection-specific-smtp-edit-window.c:
* Use ModestServerAccountSettings.
* src/modes-platform.h, src/maemo/modest-plaform.c,
src/gnome/modest-platform.c:
* Provide methods to retrieve an instance of the account
settings dialog and the account settings wizard.
* Provide valid implementation of some dialogs in gnome port.
And some work for splitting modest-maemo-utils in modest-utils (for
common usable methods) and modest-maemo-utils (specific maemo platform):
* src/modest-utils.[ch]:
* New set of methods, now available for all modest platforms.
* Reworked many other objects, to use this split.
* src/maemo/modest-maemo-utils.[ch]:
* Moved a lot of methods to modest-utils.
pmo-trunk-r3846
41 files changed: