changeset 395:ac1e7ac005d1

2003-2-4 Brian Masney <masneyb@gftp.org> * src/gtk/gftp-gtk.c - allow pasting a URL in the host box
author masneyb
date Thu, 05 Feb 2004 03:16:11 +0000
parents 47337e04036f
children 151d91e84b39
files ChangeLog src/gtk/gftp-gtk.c
diffstat 2 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Feb 05 03:15:14 2004 +0000
+++ b/ChangeLog	Thu Feb 05 03:16:11 2004 +0000
@@ -1,4 +1,6 @@
 2003-2-4 Brian Masney <masneyb@gftp.org>
+	* src/gtk/gftp-gtk.c - allow pasting a URL in the host box
+
 	* lib/Makefile.am - added ftpcommon.h to noinst_HEADERS
 
 2003-2-3 Brian Masney <masneyb@gftp.org>
@@ -2160,7 +2162,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.218 2004/02/05 03:15:11 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.219 2004/02/05 03:16:08 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/src/gtk/gftp-gtk.c	Thu Feb 05 03:15:14 2004 +0000
+++ b/src/gtk/gftp-gtk.c	Thu Feb 05 03:16:11 2004 +0000
@@ -1020,7 +1020,15 @@
   if (init (current_wdata->request) < 0)
     return;
  
-  gftp_set_hostname (current_wdata->request, gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (hostedit)->entry)));
+  txt = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (hostedit)->entry));
+  if (strchr (txt, '/') != NULL) 
+    {
+      /* The user entered a URL in the host box... */
+      gftpui_common_cmd_open (current_wdata, current_wdata->request, NULL, NULL, txt);
+      return;
+    }
+
+  gftp_set_hostname (current_wdata->request, txt);
   if (current_wdata->request->hostname == NULL)
     return;
   alltrim (current_wdata->request->hostname);