diff src/text/textui.c @ 380:05ee37a5558b

2003-1-28 Brian Masney <masneyb@gftp.org> * src/gtk/bookmarks.c src/gtk/dnd.c src/gtk/gftp-gtk.c src/gtk/gftp-gtk.h src/gtk/gtkui.c src/gtk/menu-items.c src/gtk/transfer.c - renamed disconnect() to gftpui_disconnect() * src/gtk/gtkui.c src/text/textui.c src/uicommon/gftpui.c - improved prompting for the username/password * src/gtk/gtkui.c src/text/textui.c src/uicommon/gftpui.c - call gftpui_disconnect() after a command is run and if we are no longer connected to the remote host * src/text/gftp-text.c - parse the command line arguments for the host to connect to * src/text/textui.c (gftpui_refresh) - clear the cache. (gftpui_ask_transfer) - check for carriage return or empty string * src/uicommon/gftp.h - define gftpui_common_cmd_m{get,put}_file() * lib/sshv2.c - removed temporary "fix"
author masneyb
date Wed, 28 Jan 2004 23:46:28 +0000
parents 712d3810f4e1
children 2f5ce7fb5aad
line wrap: on
line diff
--- a/src/text/textui.c	Wed Jan 28 10:52:53 2004 +0000
+++ b/src/text/textui.c	Wed Jan 28 23:46:28 2004 +0000
@@ -40,7 +40,10 @@
 void
 gftpui_refresh (void *uidata)
 {
-  /* FIXME - clear the cache entry */
+  gftp_request * request;
+
+  request = uidata; /* Note: uidata is set to the request in gftp_text.c */
+  gftp_delete_cache_entry (request, NULL, 0);
 }
 
 
@@ -58,26 +61,26 @@
 }
 
 
-char *
+void
 gftpui_prompt_username (void *uidata, gftp_request * request)
 {
-  char tempstr[256], *ret;
+  char tempstr[256];
 
-  ret = g_strdup (gftp_text_ask_question (_("Username [anonymous]:"), 1,
-                                          tempstr, sizeof (tempstr)));
-  return (ret);
+  gftp_set_username (request, 
+                     gftp_text_ask_question (_("Username [anonymous]:"), 1,
+                                             tempstr, sizeof (tempstr)));
 }
 
 
 
-char *
+void
 gftpui_prompt_password (void *uidata, gftp_request * request)
 {
-  char tempstr[256], *ret;
+  char tempstr[256];
 
-  ret = g_strdup (gftp_text_ask_question (_("Password:"), 0,
-                                          tempstr, sizeof (tempstr)));
-  return (ret);
+  gftp_set_password (request,
+                     gftp_text_ask_question (_("Password:"), 0,
+                                             tempstr, sizeof (tempstr)));
 }
 
 
@@ -85,7 +88,6 @@
 gftpui_add_file_to_transfer (gftp_transfer * tdata, GList * curfle,
                              char *filepos )
 {
-  /* FIXME */
 }
 
 
@@ -159,6 +161,12 @@
               case 'S':
                 action = newaction = GFTP_TRANS_ACTION_SKIP;
                 break;
+              case '\0':
+              case '\n':
+                break;
+              default:
+                action = -1;
+                break;
             }
         }
 
@@ -226,3 +234,9 @@
   gftpui_common_transfer_files (tdata);
 }
 
+
+void
+gftpui_disconnect (void *uidata)
+{
+}
+