summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
80b2adf)
* added wizard to modest_ui_new with some reasonable testing
if no accounts are defined
* the wizard_dialog methos has to be exported in modest-ui-wizard.h
pmo-trunk-r211
#include "modest-ui-glade.h"
#include "modest-ui-glade.h"
+void wizard_account_dialog(ModestUI *);
+
void new_wizard_account (GtkWidget *,
gpointer);
void new_wizard_account (GtkWidget *,
gpointer);
ModestAccountMgr *modest_acc_mgr;
ModestIdentityMgr *modest_id_mgr;
TnyAccountStoreIface *account_store_iface;
ModestAccountMgr *modest_acc_mgr;
ModestIdentityMgr *modest_id_mgr;
TnyAccountStoreIface *account_store_iface;
+ GSList *account_names_list;
+ GSList *identities_list;
g_return_val_if_fail (modest_conf, NULL);
g_return_val_if_fail (modest_conf, NULL);
g_signal_connect (priv->modest_window_mgr, "last_window_closed",
G_CALLBACK(modest_ui_last_window_closed),
NULL);
g_signal_connect (priv->modest_window_mgr, "last_window_closed",
G_CALLBACK(modest_ui_last_window_closed),
NULL);
+
+ account_names_list=modest_account_mgr_server_account_names(modest_acc_mgr, NULL, MODEST_PROTO_TYPE_ANY, NULL, FALSE);
+ identities_list=modest_identity_mgr_identity_names(modest_id_mgr, NULL);
+ if (!(account_names_list!=NULL || identities_list!=NULL))
+ wizard_account_dialog(obj);
+ g_slist_free(account_names_list);
+ g_slist_free(identities_list);
+
+ gtk_init (&argc, &argv);
+
+ modest_icon_factory_init ();
+
if (reinstall) {
modest_conf_remove_key (modest_conf, MODEST_CONF_NAMESPACE, NULL);
install_basic_conf_settings (modest_conf);
if (reinstall) {
modest_conf_remove_key (modest_conf, MODEST_CONF_NAMESPACE, NULL);
install_basic_conf_settings (modest_conf);
- install_test_account (modest_conf);
-
-
- gtk_init (&argc, &argv);
-
- modest_icon_factory_init ();
-
modest_ui = MODEST_UI(modest_ui_new (modest_conf));
if (!modest_ui) {
g_warning ("failed to initialize ui");
goto cleanup;
}
modest_ui = MODEST_UI(modest_ui_new (modest_conf));
if (!modest_ui) {
g_warning ("failed to initialize ui");
goto cleanup;
}
{
gboolean ok;
gtk_init (&argc, &argv);
{
gboolean ok;
gtk_init (&argc, &argv);
NULL, "imap");
modest_account_mgr_add_server_account (acc_mgr, "mytransport", "localhost", NULL,
NULL, "smtp");
NULL, "imap");
modest_account_mgr_add_server_account (acc_mgr, "mytransport", "localhost", NULL,
NULL, "smtp");
}
id_mgr = MODEST_IDENTITY_MGR(modest_identity_mgr_new (conf));
if (modest_identity_mgr_identity_exists(id_mgr, "myidentity", NULL)) {
}
id_mgr = MODEST_IDENTITY_MGR(modest_identity_mgr_new (conf));
if (modest_identity_mgr_identity_exists(id_mgr, "myidentity", NULL)) {
"user@localhost",
"", "", FALSE, NULL, FALSE ))
g_warning ("failed to add test identity");
"user@localhost",
"", "", FALSE, NULL, FALSE ))
g_warning ("failed to add test identity");
g_object_unref (G_OBJECT(acc_mgr));
g_object_unref (G_OBJECT(id_mgr));
}
g_object_unref (G_OBJECT(acc_mgr));
g_object_unref (G_OBJECT(id_mgr));
}