diff src/gtk/misc-gtk.c @ 33:c8ec7877432e

2002-10-06 Brian Masney <masneyb@gftp.org> * src/gtk/delete_dialog.c, src/gtk/gftp-gtk.c, src/gtk/misc-gtk.c, src/gtk/transfer.c - Fixed dead-locks with GDK_THREADS_{ENTER,LEAVE} * configure.in, src/gtk/Makefile.am - Use GTHREAD_LIBS 2002-10-03 Brian Masney <masneyb@gftp.org> * Makefile.am - remove intl and m4 directory from subdirs. autogen.sh will automagically add these for me. * autogen.sh - remove check for libtool * configure.in - link in gthread * cvsclean - added this script * *.[ch] - added $Id$ tags * debian/* - updated files from Debian maintainer
author masneyb
date Mon, 07 Oct 2002 10:40:43 +0000
parents d930e06af9ae
children 4bcfaf6307b5
line wrap: on
line diff
--- a/src/gtk/misc-gtk.c	Thu Oct 03 12:06:18 2002 +0000
+++ b/src/gtk/misc-gtk.c	Mon Oct 07 10:40:43 2002 +0000
@@ -18,6 +18,7 @@
 /*****************************************************************************/
 
 #include <gftp-gtk.h>
+static const char cvsid[] = "$Id$";
 
 static void set_menu_sensitive 			( gftp_window_data * wdata,
 						  char *path, 
@@ -36,12 +37,14 @@
 {
   int ret;
 
+  if (!gftp_is_started)
+    return;
+
   ret = 1;
   while (ret)
     {
-      gdk_threads_leave ();
+      GDK_THREADS_LEAVE ();
       ret = g_main_iteration (FALSE);
-      gdk_threads_enter ();
     }
 }
 
@@ -187,7 +190,7 @@
     }
 #endif
 
-  if (ptr == NULL)
+  if (ptr == NULL) 
     fix_display ();
 }
 
@@ -1133,9 +1136,8 @@
 
       while (wdata->request->stopable)
         {
-          gdk_threads_leave ();
+          GDK_THREADS_LEAVE ();
           g_main_iteration (TRUE);
-          gdk_threads_enter ();
         }
 
       pthread_join (wdata->tid, &ret);