Re: mc wish: possibility to configure passive/active ftp mode from UI (fwd)



----- Forwarded message from Andrew W. Nosenko -----
Date: Wed, 16 Oct 2002 12:10:16 +0300
From: "Andrew W. Nosenko" <awn bcs zp ua>
Message-ID: <20021016091016 GA28978 bcs zp ua>
To: "Andrew V. Samoilov" <andrew email zp ua>
Subject: mc wish: possibility to configure passive/active ftp mode from UI


First part of this patch attached. One more option leaves Special settings and come to UI. Another part should be discussed. I see some ways to implement this feature:

1. Check box in the "FTP: Password required" dialog. Public entries (entries without password) cannot be handled this way.
2. New ftp URL syntax.

ChangeLog:
* boxes.c (configure_vfs): Ask whether passive connections should be used.

--
Regards,
Andrew V. Samoilov.
--- mc/src/boxes.c~	Wed Sep  4 11:48:23 2002
+++ mc/src/boxes.c	Thu Oct 31 19:05:55 2002
@@ -686,8 +686,8 @@ tree_box (char *current_dir)
 #ifdef USE_VFS
 
 #if defined(USE_NETCODE)
-#define VFSY 15
-#define VFS_WIDGETBASE 8
+#define VFSY 16
+#define VFS_WIDGETBASE 9
 #else
 #define VFSY 8
 #define VFS_WIDGETBASE 0
@@ -702,6 +702,7 @@ static char *ret_passwd;
 static char *ret_directory_timeout;
 static char *ret_ftp_proxy;
 static int ret_use_netrc;
+static int ret_ftpfs_use_passive_connections;
 #endif
 
 static QuickWidget confvfs_widgets [] = {
@@ -710,6 +711,8 @@ static QuickWidget confvfs_widgets [] = 
 { quick_button,   12, VFSX,    VFSY - 3, VFSY, N_("&Ok"),
       0, B_ENTER, 0, 0, "button-ok" },
 #if defined(USE_NETCODE)
+{ quick_checkbox,  4, VFSX, 11, VFSY, N_("Use &passive connections"), 0, 0,
+      &ret_ftpfs_use_passive_connections, 0, "check-use-passive-mode" },
 { quick_checkbox,  4, VFSX, 10, VFSY, N_("&Use ~/.netrc"), 0, 0,
       &ret_use_netrc, 0, "check-use-netrc" },
 { quick_input,     4, VFSX, 9, VFSY, "", 48, 0, 0, &ret_ftp_proxy,
@@ -752,10 +755,11 @@ configure_vfs (void)
     confvfs_widgets [3 + VFS_WIDGETBASE].text = buffer2;
 #if defined(USE_NETCODE)
     ret_use_netrc = use_netrc;
+    ret_ftpfs_use_passive_connections = ftpfs_use_passive_connections;
     g_snprintf(buffer3, sizeof (buffer3), "%i", ftpfs_directory_timeout);
-    confvfs_widgets[6].text = buffer3;
-    confvfs_widgets[8].text = ftpfs_anonymous_passwd;
-    confvfs_widgets[3].text = ftpfs_proxy_host;
+    confvfs_widgets[7].text = buffer3;
+    confvfs_widgets[9].text = ftpfs_anonymous_passwd;
+    confvfs_widgets[4].text = ftpfs_proxy_host;
 #endif
 
     if (quick_dialog (&confvfs_dlg) != B_CANCEL) {
@@ -771,6 +775,7 @@ configure_vfs (void)
 	ftpfs_proxy_host = ret_ftp_proxy;
 	ftpfs_directory_timeout = atoi(ret_directory_timeout);
 	use_netrc = ret_use_netrc;
+	ftpfs_use_passive_connections = ret_ftpfs_use_passive_connections;
 	g_free (ret_directory_timeout);
 #endif
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]