# HG changeset patch # User masneyb # Date 1171501609 0 # Node ID a41a3590d696aa50ad46addb657196cf23d4d179 # Parent 916c2c89b5697f2577160e1049934a1574b58b8c 2007-2-14 Brian Masney * lib/gftp.h src/gtk/gtkui.c src/uicommon/gftpui.c - added refreshing field to the gftp_request structure. If this is set in gftpui_common_cmd_open(), then the refresh command is not ran after a connection is made to the server. This field is currently only enabled when running called from the refresh function in the GTK+ port. It fixes an issue where the refresh command was being ran twice. (closes #171732) diff -r 916c2c89b569 -r a41a3590d696 ChangeLog --- a/ChangeLog Sun Feb 11 22:36:54 2007 +0000 +++ b/ChangeLog Thu Feb 15 01:06:49 2007 +0000 @@ -1,3 +1,12 @@ +2007-2-14 Brian Masney + * lib/gftp.h src/gtk/gtkui.c src/uicommon/gftpui.c - added refreshing + field to the gftp_request structure. If this is set in + gftpui_common_cmd_open(), then the refresh command is not ran after + a connection is made to the server. This field is currently only + enabled when running called from the refresh function in the GTK+ + port. It fixes an issue where the refresh command was being ran + twice. (closes #171732) + 2007-2-6 Brian Masney * src/text/textui.c src/gtk/gtkui_transfer.c src/uicommon/gftpui.h - added new function: gftpui_cancel_file_transfer() diff -r 916c2c89b569 -r a41a3590d696 lib/gftp.h --- a/lib/gftp.h Sun Feb 11 22:36:54 2007 +0000 +++ b/lib/gftp.h Thu Feb 15 01:06:49 2007 +0000 @@ -409,6 +409,7 @@ cancel : 1, /* If a signal is received, should we cancel this operation */ stopable : 1, + refreshing : 1, use_local_encoding : 1; off_t gotbytes; diff -r 916c2c89b569 -r a41a3590d696 src/gtk/gtkui.c --- a/src/gtk/gtkui.c Sun Feb 11 22:36:54 2007 +0000 +++ b/src/gtk/gtkui.c Thu Feb 15 01:06:49 2007 +0000 @@ -46,22 +46,33 @@ gftpui_refresh (void *uidata, int clear_cache_entry) { gftp_window_data * wdata; + int ret; wdata = uidata; + wdata->request->refreshing = 1; + if (!check_status (_("Refresh"), wdata, 0, 0, 0, 1)) - return; + { + wdata->request->refreshing = 0; + return; + } if (clear_cache_entry) gftp_delete_cache_entry (wdata->request, NULL, 0); if (check_reconnect (wdata) < 0) - return; + { + wdata->request->refreshing = 0; + return; + } gtk_clist_freeze (GTK_CLIST (wdata->listbox)); remove_files_window (wdata); ftp_list_files (wdata); gtk_clist_thaw (GTK_CLIST (wdata->listbox)); + + wdata->request->refreshing = 0; } diff -r 916c2c89b569 -r a41a3590d696 src/uicommon/gftpui.c --- a/src/uicommon/gftpui.c Sun Feb 11 22:36:54 2007 +0000 +++ b/src/uicommon/gftpui.c Thu Feb 15 01:06:49 2007 +0000 @@ -650,6 +650,9 @@ cdata->retries = retries; cdata->dont_check_connection = 1; + if (request->refreshing) + cdata->dont_refresh = 1; + gftpui_show_busy (TRUE); gftpui_common_run_callback_function (cdata); gftpui_show_busy (FALSE);