+ return; /* TODO: Reenable this later. I disabled it to avoid having one notification per email. */
+#ifndef MODEST_HILDON_VERSION_0
+ HildonNotification *not;
+
+ /* Create a new notification. FIXME put the right values, need
+ some more specs */
+ not = hildon_notification_new ("TODO: (new email) Summary",
+ "TODO: (new email) Description",
+ "qgn_contact_group_chat_invitation",
+ "system.note.dialog");
+
+ /* Play sound SR-SND-18. TODO: play the right file */
+/* hildon_notification_set_sound (not, "/usr/share/sounds/ui-new_email.wav"); */
+
+ /* Set the led pattern */
+ notify_notification_set_hint_int32 (NOTIFY_NOTIFICATION (not), "led-pattern", 3);
+
+ /* Notify. We need to do this in an idle because this function
+ could be called from a thread */
+ if (!notify_notification_show (NOTIFY_NOTIFICATION (not), NULL))
+ g_error ("Failed to send notification");
+
+ g_object_unref (not);
+#endif /*MODEST_HILDON_VERSION_0*/
+}
+
+
+void
+modest_platform_show_help (GtkWindow *parent_window,
+ const gchar *help_id)
+{
+ osso_return_t result;
+
+ g_return_if_fail (help_id);
+ g_return_if_fail (osso_context);
+
+ /* Show help */
+#ifdef MODEST_HILDON_VERSION_0
+ result = ossohelp_show (osso_context, help_id, OSSO_HELP_SHOW_DIALOG);
+#else
+ result = hildon_help_show (osso_context, help_id, OSSO_HELP_SHOW_DIALOG);
+#endif
+
+ if (result != OSSO_OK) {
+ gchar *error_msg;
+ error_msg = g_strdup_printf ("FIXME The help topic %s could not be found", help_id);
+ hildon_banner_show_information (GTK_WIDGET (parent_window),
+ NULL,
+ error_msg);
+ g_free (error_msg);
+ }
+}
+
+void
+modest_platform_show_search_messages (GtkWindow *parent_window)
+{
+ osso_return_t result = OSSO_ERROR;
+
+ result = osso_rpc_run_with_defaults (osso_context, "osso_global_search", "search_email", NULL, DBUS_TYPE_INVALID);
+
+ if (result != OSSO_OK) {
+ /* TODO: warning about error showing dialog */
+ }
+}
+
+void
+modest_platform_show_addressbook (GtkWindow *parent_window)
+{
+ osso_return_t result = OSSO_ERROR;
+
+ result = osso_rpc_run_with_defaults (osso_context, "osso_addressbook", "top_application", NULL, DBUS_TYPE_INVALID);
+
+ if (result != OSSO_OK) {
+ /* TODO: warning about error showing dialog */
+ }
+}
+
+GtkWidget *
+modest_platform_create_folder_view (TnyFolderStoreQuery *query)
+{
+ GtkWidget *widget = modest_folder_view_new (query);
+
+ /* Show all accounts by default */
+ modest_folder_view_set_style (MODEST_FOLDER_VIEW (widget),
+ MODEST_FOLDER_VIEW_STYLE_SHOW_ONE);
+
+ /* Restore settings */
+ modest_widget_memory_restore (modest_runtime_get_conf(),
+ G_OBJECT (widget),
+ MODEST_CONF_FOLDER_VIEW_KEY);
+
+ return widget;