-static int start_ui (ModestConf *conf, const gchar* mailto, const gchar *cc,
- const gchar *bcc, const gchar* subject, const gchar *body);
+static ModestErrorCode start_ui (const gchar *account,
+ const gchar* mailto, const gchar *cc,
+ const gchar *bcc, const gchar* subject, const gchar *body, GtkWidget **ui);
+
+static ModestErrorCode send_mail (const gchar* account,
+ const gchar* mailto, const gchar *cc, const gchar *bcc,
+ const gchar* subject, const gchar *body);
+
+static void
+on_show (GtkWidget *widget, gpointer user_data)
+{
+ if (modest_conf_get_bool (modest_runtime_get_conf(),
+ MODEST_CONF_CONNECT_AT_STARTUP, NULL))
+ modest_platform_connect_and_wait(NULL);
+}
+
+static void
+log_default_handler (const gchar *log_domain,
+ GLogLevelFlags log_level,
+ const gchar *message,
+ gpointer unused_data)
+{
+ if (log_level == G_LOG_LEVEL_ERROR ||
+ log_level == G_LOG_LEVEL_CRITICAL)
+ g_print ("EEEEE ------ %s\n", message);
+}