#include "modest-mail-operation.h"
-#ifdef MODEST_ENABLE_HILDON /* Hildon includes */
+#if MODEST_PLATFORM_ID==2
#include <libosso.h>
-#endif /* MODEST_ENABLE_HILDON */
+#endif /* MODEST_PLATFORM==2 */
/* return values */
#define MODEST_ERR_NONE 0
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
- g_type_init ();
+ g_type_init ();
+ g_thread_init (NULL);
+ gdk_threads_init ();
context = g_option_context_new (NULL);
g_option_context_add_main_entries (context, options, NULL);
/* subject, /\* subject *\/ */
/* body, /\* body *\/ */
/* NULL); /\* attachments *\/ */
- } else
-#ifndef OLD_UI_STUFF
- win = modest_ui_main_window (modest_ui);
- gtk_widget_show (win);
-#else
- modest_ui_show_main_window (modest_ui);
-#endif
- gtk_main();
+ } else
+ win = modest_ui_main_window (modest_ui);
+ if (win) {
+ gtk_widget_show (win);
+ gtk_main();
+ }
cleanup:
if (modest_ui)
g_object_unref (modest_ui);
static gboolean
hildon_init ()
{
-#ifdef MODEST_ENABLE_HILDON
-
+#if MODEST_PLATFORM_ID==2
+
osso_context_t *osso_context =
osso_initialize(PACKAGE, PACKAGE_VERSION,
TRUE, NULL);
if (!osso_context) {
- g_printerr ("modest: failed to aquire osso context, exiting\n");
-
+ g_printerr ("modest: failed to acquire osso context\n");
return FALSE;
-
}
-#endif /* MODEST_ENABLE_HILDON */
+
+#endif /* MODEST_PLATFORM_ID==2 */
return TRUE;
}
account = TNY_TRANSPORT_ACCOUNT (tny_iterator_get_current(iter));
- mail_operation = modest_mail_operation_new (TNY_ACCOUNT (account));
+ mail_operation = modest_mail_operation_new ();
modest_mail_operation_send_new_mail (mail_operation,
+ account,
"djcb@djcbsoftware.nl", mailto, cc, bcc,
subject, body, NULL);