if (!msg) {
g_printerr ("modest: failed to create message\n");
- } else
- {
- /* Add the message to a folder and show its UI for editing: */
- TnyFolder *folder = modest_tny_account_get_special_folder (account,
- TNY_FOLDER_TYPE_DRAFTS);
- if (!folder) {
- g_printerr ("modest: failed to find Drafts folder\n");
- } else {
-
- tny_folder_add_msg (folder, msg, NULL); /* TODO: check err */
-
- /* This is a GDK lock because we are an idle callback and
- * the code below is or does Gtk+ code */
-
- gdk_threads_enter (); /* CHECKED */
-
- ModestWindow *win = modest_msg_edit_window_new (msg, account_name, FALSE);
- modest_window_mgr_register_window (modest_runtime_get_window_mgr (), win);
- gtk_widget_show_all (GTK_WIDGET (win));
-
- gdk_threads_leave (); /* CHECKED */
+ } else {
+ ModestWindow *win;
+
+ /* This is a GDK lock because we are an idle callback and
+ * the code below is or does Gtk+ code */
+ gdk_threads_enter ();
+ win = modest_msg_edit_window_new (msg, account_name, FALSE);
+ modest_window_mgr_register_window (modest_runtime_get_window_mgr (), win);
+ gtk_widget_show_all (GTK_WIDGET (win));
+ gdk_threads_leave ();
- g_object_unref (G_OBJECT(folder));
- g_object_unref (win);
- }
-
- g_object_unref (G_OBJECT(msg));
+ g_object_unref (win);
}
+ g_object_unref (G_OBJECT(msg));
g_object_unref (G_OBJECT(account));
}
}
return FALSE; /* Do not call this callback again. */
}
-static gint on_mail_to(GArray * arguments, gpointer data, osso_rpc_t * retval)
+static gint
+on_mail_to(GArray * arguments, gpointer data, osso_rpc_t * retval)
{
if (arguments->len != MODEST_DBUS_MAIL_TO_ARGS_COUNT)
return OSSO_ERROR;
}
-void
-modest_maemo_show_information_note_and_forget (GtkWindow *parent_window, const gchar* message)
-{
- GtkDialog *dialog = GTK_DIALOG (hildon_note_new_information (parent_window, message));
-
- /* Destroy the dialog when it is closed: */
- g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (gtk_widget_destroy), NULL);
- gtk_widget_show (GTK_WIDGET (dialog));
-}
-
#if 0
static void
on_hide (GtkDialog *dialog, gpointer user_data)
*/
void modest_maemo_utils_setup_images_filechooser (GtkFileChooser *chooser);
-/** modest_maemo_show_information_note_and_forget:
- * @parent_window: The window for which the note should be transient.
- * @message: The text to show.
- *
- * Show the information note and destroy it when it is closed, without
- * blocking. Use this when you don't want to use gtk_dialog_run(), which might lead
- * to hangs.
- */
-void modest_maemo_show_information_note_and_forget (GtkWindow *parent_window, const gchar* message);
-
/** modest_maemo_show_information_note_in_main_context_and_forget:
* @parent_window: The window for which the note should be transient.
* @message: The text to show.