comparison src/gtk/gtkui.c @ 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 afbe37351940
children e999754d6106
comparison
equal deleted inserted replaced
878:916c2c89b569 879:a41a3590d696
44 44
45 void 45 void
46 gftpui_refresh (void *uidata, int clear_cache_entry) 46 gftpui_refresh (void *uidata, int clear_cache_entry)
47 { 47 {
48 gftp_window_data * wdata; 48 gftp_window_data * wdata;
49 int ret;
49 50
50 wdata = uidata; 51 wdata = uidata;
52 wdata->request->refreshing = 1;
53
51 if (!check_status (_("Refresh"), wdata, 0, 0, 0, 1)) 54 if (!check_status (_("Refresh"), wdata, 0, 0, 0, 1))
52 return; 55 {
56 wdata->request->refreshing = 0;
57 return;
58 }
53 59
54 if (clear_cache_entry) 60 if (clear_cache_entry)
55 gftp_delete_cache_entry (wdata->request, NULL, 0); 61 gftp_delete_cache_entry (wdata->request, NULL, 0);
56 62
57 if (check_reconnect (wdata) < 0) 63 if (check_reconnect (wdata) < 0)
58 return; 64 {
65 wdata->request->refreshing = 0;
66 return;
67 }
59 68
60 gtk_clist_freeze (GTK_CLIST (wdata->listbox)); 69 gtk_clist_freeze (GTK_CLIST (wdata->listbox));
61 remove_files_window (wdata); 70 remove_files_window (wdata);
62 71
63 ftp_list_files (wdata); 72 ftp_list_files (wdata);
64 gtk_clist_thaw (GTK_CLIST (wdata->listbox)); 73 gtk_clist_thaw (GTK_CLIST (wdata->listbox));
74
75 wdata->request->refreshing = 0;
65 } 76 }
66 77
67 78
68 #define _GFTPUI_GTK_USER_PW_SIZE 256 79 #define _GFTPUI_GTK_USER_PW_SIZE 256
69 80