changeset 783:6f766002bff2

2006-7-21 Brian Masney <masneyb@gftp.org> * src/gtk/misc-gtk.c (update_window_info) - fixed the default protocol dropdown when some protocols are disabled (from Aurelien Jarno <aurelien@aurel32.net>) (closes #348177) * src/uicommon/gftpui.c (_gftpui_common_thread_callback) - don't use pause(). This causes a problem on systems that use NPTL. Use nanosleep() instead (from Aurelien Jarno <aurelien@aurel32.net>) (closes #320883)
author masneyb
date Fri, 21 Jul 2006 13:17:33 +0000
parents deb8a8b07797
children 6cfc7104e23b
files ChangeLog src/gtk/misc-gtk.c src/uicommon/gftpui.c
diffstat 3 files changed, 23 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jul 21 08:05:48 2006 +0000
+++ b/ChangeLog	Fri Jul 21 13:17:33 2006 +0000
@@ -1,3 +1,12 @@
+2006-7-21 Brian Masney <masneyb@gftp.org>
+	* src/gtk/misc-gtk.c (update_window_info) - fixed the default protocol
+	dropdown when some protocols are disabled (from
+	Aurelien Jarno <aurelien@aurel32.net>) (closes #348177)
+
+	* src/uicommon/gftpui.c (_gftpui_common_thread_callback) - don't use
+	pause(). This causes a problem on systems that use NPTL. Use nanosleep()
+	instead (from Aurelien Jarno <aurelien@aurel32.net>) (closes #320883)
+
 2006-7-20 Brian Masney <masneyb@gftp.org>
 	* configure.in - added configure check for fsplib. Also, removed 
 	intl/Makefile and po/Makefile.in from AC_OUTPUT()
@@ -11,7 +20,7 @@
 	added more pixmaps to CVS
 
 	* lib/misc.c (gftp_copy_request) - updated patch that makes sure the
-	request->hostp structure is copied properly (from (from Aurelien Jarno
+	request->hostp structure is copied properly (from Aurelien Jarno
         <aurelien@aurel32.net>) (closes #314626)
 
 	* src/gtk/transfer.c (check_done_process) - make sure the temporary
@@ -3469,7 +3478,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.453 2006/07/20 10:22:16 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.454 2006/07/21 13:17:32 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/src/gtk/misc-gtk.c	Fri Jul 21 08:05:48 2006 +0000
+++ b/src/gtk/misc-gtk.c	Fri Jul 21 13:17:33 2006 +0000
@@ -209,7 +209,7 @@
 update_window_info (void)
 {
   char *tempstr, empty[] = "";
-  unsigned int port, i;
+  unsigned int port, i, j;
   GtkWidget * tempwid;
 
   if (current_wdata->request != NULL)
@@ -239,13 +239,17 @@
           else
             gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (portedit)->entry), "");
     
-          for (i=0; gftp_protocols[i].init != NULL; i++)
+          for (i=0, j=0; gftp_protocols[i].init != NULL; i++)
             {
+              if (!gftp_protocols[i].shown) 
+                continue;
+
               if (current_wdata->request->init == gftp_protocols[i].init)
                 {
                   gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), i);
                   break;
                 }
+              j++;
             }
 
           gtk_tooltips_set_tip (GTK_TOOLTIPS(openurl_tooltip), openurl_btn,
--- a/src/uicommon/gftpui.c	Fri Jul 21 08:05:48 2006 +0000
+++ b/src/uicommon/gftpui.c	Fri Jul 21 13:17:33 2006 +0000
@@ -54,6 +54,7 @@
   intptr_t network_timeout, sleep_time;
   gftpui_callback_data * cdata;
   int success, sj, num_timeouts;
+  struct timespec ts;
 
   cdata = data;
   gftp_lookup_request_option (cdata->request, "network_timeout",
@@ -90,8 +91,11 @@
           cdata->request->logging_function (gftp_logging_error, cdata->request,
                        _("Waiting %d seconds until trying to connect again\n"),
                        sleep_time);
-          alarm (sleep_time);
-          pause ();
+
+	  ts.tv_sec = sleep_time;
+	  ts.tv_nsec = 0;
+	  if (nanosleep (&ts, NULL) == 0)
+            siglongjmp (gftpui_common_jmp_environment, 2);
         }
     }
   else