diff src/gtk/misc-gtk.c @ 616:461ae1bba8b6

2004-11-4 Brian Masney <masneyb@gftp.org> * lib/options.h src/gtk/gftp-gtk.c src/gtk/misc-gtk.c - whenever gftp is started, show in the toolbar the last connection details (except the password)
author masneyb
date Fri, 05 Nov 2004 03:27:23 +0000
parents 5df5eac28f47
children b8faf63b2e9b
line wrap: on
line diff
--- a/src/gtk/misc-gtk.c	Fri Nov 05 03:05:26 2004 +0000
+++ b/src/gtk/misc-gtk.c	Fri Nov 05 03:27:23 2004 +0000
@@ -215,41 +215,43 @@
 
   if (current_wdata->request != NULL)
     {
-      if ((tempstr = current_wdata->request->hostname) == NULL)
-        tempstr = empty;
-      gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (hostedit)->entry), tempstr);
-
-      if ((tempstr = current_wdata->request->username) == NULL)
-        tempstr = empty;
-      gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (useredit)->entry), tempstr);
-
-      if ((tempstr = current_wdata->request->password) == NULL)
-        tempstr = empty;
-      gtk_entry_set_text (GTK_ENTRY (passedit), tempstr);
-
-      port = gftp_protocol_default_port (current_wdata->request);
-      if (current_wdata->request->port != 0 &&
-          port != current_wdata->request->port)
+      if (GFTP_IS_CONNECTED (current_wdata->request))
         {
-          tempstr = g_strdup_printf ("%d", current_wdata->request->port);
-          gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (portedit)->entry), tempstr);
-          g_free (tempstr);
-        }
-      else
-        gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (portedit)->entry), "");
+          if ((tempstr = current_wdata->request->hostname) == NULL)
+            tempstr = empty;
+          gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (hostedit)->entry), tempstr);
+    
+          if ((tempstr = current_wdata->request->username) == NULL)
+            tempstr = empty;
+          gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (useredit)->entry), tempstr);
+    
+          if ((tempstr = current_wdata->request->password) == NULL)
+            tempstr = empty;
+          gtk_entry_set_text (GTK_ENTRY (passedit), tempstr);
+    
+          port = gftp_protocol_default_port (current_wdata->request);
+          if (current_wdata->request->port != 0 &&
+              port != current_wdata->request->port)
+            {
+              tempstr = g_strdup_printf ("%d", current_wdata->request->port);
+              gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (portedit)->entry), tempstr);
+              g_free (tempstr);
+            }
+          else
+            gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (portedit)->entry), "");
+    
+          for (i=0; gftp_protocols[i].init != NULL; i++)
+            {
+              if (current_wdata->request->init == gftp_protocols[i].init)
+                {
+                  gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), i);
+                  break;
+                }
+            }
 
-      for (i=0; gftp_protocols[i].init != NULL; i++)
-        {
-          if (current_wdata->request->init == gftp_protocols[i].init)
-            {
-              gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), i);
-              break;
-            }
+          gtk_tooltips_set_tip (GTK_TOOLTIPS(openurl_tooltip), openurl_btn,
+                                _("Disconnect from the remote server"), NULL);
         }
-
-      if (GFTP_IS_CONNECTED (current_wdata->request))
-        gtk_tooltips_set_tip (GTK_TOOLTIPS(openurl_tooltip), openurl_btn,
-                              _("Disconnect from the remote server"), NULL);
       else
         gtk_tooltips_set_tip (GTK_TOOLTIPS(openurl_tooltip), openurl_btn,
                               _("Connect to the site specified in the host entry. If the host entry is blank, then a dialog is presented that will allow you to enter a URL."), NULL);