From 906a178ce8264e7848330d5244639c0c2d856aee Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Mon, 28 Aug 2000 14:36:26 +0000 Subject: Goodbye, GDK_THREADS! svn path=/trunk/; revision=5074 --- mail/mail-threads.c | 77 +++-------------------------------------------------- 1 file changed, 3 insertions(+), 74 deletions(-) (limited to 'mail/mail-threads.c') diff --git a/mail/mail-threads.c b/mail/mail-threads.c index 6643b75615..d886a8a981 100644 --- a/mail/mail-threads.c +++ b/mail/mail-threads.c @@ -278,7 +278,7 @@ mail_operation_queue (const mail_operation_spec * spec, gpointer input, g_free (msg); gnome_dialog_set_close (GNOME_DIALOG (err_dialog), TRUE); - mail_dialog_run_and_close (GNOME_DIALOG (err_dialog)); + gnome_dialog_run_and_close (GNOME_DIALOG (err_dialog)); g_warning ("Setup failed for `%s': %s", clur->infinitive, @@ -518,77 +518,6 @@ mail_operations_get_status (int *busy_return, *message_return = current_message; } -/** - * mail_dialog_run_and_close: - * - * A wrapper for gnome_dialog... that will Do The Right Thing - * wrt the GDK lock. - **/ - -gint -mail_dialog_run_and_close (GnomeDialog *dlg) -{ - gint ret; - gboolean unlock = FALSE; - - /*g_message ("DLG: IN: r_a_c");*/ - - /*if (inside_read_msg || gtk_main_level() == 1) - * GDK_THREADS_ENTER (); - */ - - if (gdk_threads_mutex && g_mutex_trylock (gdk_threads_mutex)) - unlock = TRUE; - - ret = gnome_dialog_run_and_close (dlg); - - /*if (inside_read_msg || gtk_main_level() == 1) - * GDK_THREADS_LEAVE(); - */ - - if (unlock) - g_mutex_unlock (gdk_threads_mutex); - - /*g_message ("DLG: OUT: r_a_c");*/ - - return ret; -} - -/** - * mail_dialog_run: - * - * Analogous to above. - **/ - -gint -mail_dialog_run (GnomeDialog *dlg) -{ - gint ret; - gboolean unlock = FALSE; - - /*g_message ("DLG: IN: run");*/ - - /*if (inside_read_msg || gtk_main_level() == 1) - * GDK_THREADS_ENTER(); - */ - - if (gdk_threads_mutex && g_mutex_trylock (gdk_threads_mutex)) - unlock = TRUE; - - ret = gnome_dialog_run (dlg); - - /*if (inside_read_msg || gtk_main_level() == 1) - * GDK_THREADS_LEAVE(); - */ - - if (unlock) - g_mutex_unlock (gdk_threads_mutex); - - /*g_message ("DLG: OUT: run");*/ - - return ret; -} - /* ** Static functions **************************************************** */ static void check_dispatcher (void) @@ -890,7 +819,7 @@ show_error (com_msg_t * msg) * only GDK_THREADS_ENTER were recursive... */ - mail_dialog_run_and_close (GNOME_DIALOG (err_dialog)); + gnome_dialog_run_and_close (GNOME_DIALOG (err_dialog)); /* Allow the other thread to proceed */ @@ -928,7 +857,7 @@ get_password (com_msg_t * msg) button = -1; } else { *(msg->reply) = NULL; - button = mail_dialog_run_and_close (GNOME_DIALOG (dialog)); + button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); } if (button == 1 || *(msg->reply) == NULL) { -- cgit v1.2.3