+
+static gboolean
+on_idle_open_default_inbox(gpointer user_data)
+{
+ ModestWindow *win =
+ modest_window_mgr_get_main_window (modest_runtime_get_window_mgr ());
+
+ /* Get the folder view */
+ GtkWidget *folder_view = modest_main_window_get_child_widget (MODEST_MAIN_WINDOW (win),
+ MODEST_WIDGET_TYPE_FOLDER_VIEW);
+ modest_folder_view_select_first_inbox_or_local (
+ MODEST_FOLDER_VIEW (folder_view));
+
+ return FALSE; /* Do not call this callback again. */
+}
+
+static gint on_open_default_inbox(GArray * arguments, gpointer data, osso_rpc_t * retval)
+{
+ /* Use g_idle to context-switch into the application's thread: */
+
+ /* This method has no arguments. */
+
+ g_idle_add(on_idle_open_default_inbox, NULL);
+
+ /* Note that we cannot report failures during send/receive,
+ * because that would be asynchronous. */
+ return OSSO_OK;
+}