Mercurial > gftp.yaz
changeset 879:a41a3590d696
2007-2-14 Brian Masney <masneyb@gftp.org>
* 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)
author | masneyb |
---|---|
date | Thu, 15 Feb 2007 01:06:49 +0000 |
parents | 916c2c89b569 |
children | 18850d856cf6 |
files | ChangeLog lib/gftp.h src/gtk/gtkui.c src/uicommon/gftpui.c |
diffstat | 4 files changed, 26 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 <masneyb@gftp.org> + * 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 <masneyb@gftp.org> * src/text/textui.c src/gtk/gtkui_transfer.c src/uicommon/gftpui.h - added new function: gftpui_cancel_file_transfer()
--- 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;
--- 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; }
--- 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);