gnome-commander r1891 - branches/gcmd-1-3/src



Author: epiotr
Date: Thu Jul 17 21:37:39 2008
New Revision: 1891
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1891&view=rev

Log:
Removed superfluous code for remote_dir handling

Modified:
   branches/gcmd-1-3/src/gnome-cmd-con-dialog.cc
   branches/gcmd-1-3/src/gnome-cmd-con-ftp.cc
   branches/gcmd-1-3/src/gnome-cmd-con-ftp.h

Modified: branches/gcmd-1-3/src/gnome-cmd-con-dialog.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-con-dialog.cc	(original)
+++ branches/gcmd-1-3/src/gnome-cmd-con-dialog.cc	Thu Jul 17 21:37:39 2008
@@ -638,7 +638,6 @@
 
         const gchar *alias = conndlg->priv->alias ? conndlg->priv->alias->c_str() : NULL;
         const gchar *host = gnome_vfs_uri_get_host_name (uri);      // do not g_free !!
-        const gchar *remote_dir = gnome_vfs_uri_get_path (uri);     // do not g_free !!
         const gchar *password = gnome_vfs_uri_get_password (uri);   // do not g_free !!
 
         gnome_cmd_con_set_alias (con, alias);
@@ -648,7 +647,6 @@
         con->gnome_auth = conndlg->priv->use_auth;
 
         gnome_cmd_con_ftp_set_host_name (server, host);
-        gnome_cmd_con_ftp_set_remote_dir (server, remote_dir);
         gnome_cmd_con_ftp_set_pw (server, password);
 
         gnome_vfs_uri_unref (uri);

Modified: branches/gcmd-1-3/src/gnome-cmd-con-ftp.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-con-ftp.cc	(original)
+++ branches/gcmd-1-3/src/gnome-cmd-con-ftp.cc	Thu Jul 17 21:37:39 2008
@@ -30,8 +30,6 @@
 
 struct _GnomeCmdConFtpPrivate
 {
-    gchar *host_name;
-    gchar *remote_dir;
     gchar *pw;
 };
 
@@ -153,9 +151,7 @@
 {
     GnomeCmdConFtp *con = GNOME_CMD_CON_FTP (object);
 
-    g_free (con->priv->host_name);
     g_free (con->priv->pw);
-    g_free (con->priv->remote_dir);
 
     g_free (con->priv);
 
@@ -226,8 +222,6 @@
 
     ftp_con->priv = g_new0 (GnomeCmdConFtpPrivate, 1);
 
-    // ftp_con->priv->host_name = NULL;
-    // ftp_con->priv->remote_dir = NULL;
     // ftp_con->priv->pw = NULL;
 }
 
@@ -284,7 +278,6 @@
     gnome_cmd_con_set_host_name (con, host);
 
     gnome_cmd_con_ftp_set_host_name (server, host);
-    gnome_cmd_con_ftp_set_remote_dir (server, remote_dir);
     gnome_cmd_con_ftp_set_pw (server, password);
 
     con->method = gnome_vfs_uri_is_local (uri) ? CON_LOCAL :
@@ -336,7 +329,6 @@
     gnome_cmd_con_set_host_name (con, _host);
 
     gnome_cmd_con_ftp_set_host_name (server, host);
-    gnome_cmd_con_ftp_set_remote_dir (server, remote_dir);
     gnome_cmd_con_ftp_set_pw (server, password);
 
     con->gnome_auth = !password && con->method!=CON_ANON_FTP;          // ?????????
@@ -351,26 +343,11 @@
     g_return_if_fail (con->priv != NULL);
     g_return_if_fail (host_name != NULL);
 
-    g_free (con->priv->host_name);
-
-    con->priv->host_name = g_strdup (host_name);
-
     GNOME_CMD_CON (con)->open_tooltip = g_strdup_printf (_("Opens remote connection to %s"), host_name);
     GNOME_CMD_CON (con)->close_tooltip = g_strdup_printf (_("Closes remote connection to %s"), host_name);
 }
 
 
-void gnome_cmd_con_ftp_set_remote_dir (GnomeCmdConFtp *con, const gchar *remote_dir)
-{
-    g_return_if_fail (con != NULL);
-    g_return_if_fail (con->priv != NULL);
-
-    g_free (con->priv->remote_dir);
-
-    con->priv->remote_dir = g_strdup (remote_dir);
-}
-
-
 void gnome_cmd_con_ftp_set_pw (GnomeCmdConFtp *con, const gchar *pw)
 {
     g_return_if_fail (con != NULL);

Modified: branches/gcmd-1-3/src/gnome-cmd-con-ftp.h
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-con-ftp.h	(original)
+++ branches/gcmd-1-3/src/gnome-cmd-con-ftp.h	Thu Jul 17 21:37:39 2008
@@ -55,8 +55,6 @@
 
 void gnome_cmd_con_ftp_set_host_name (GnomeCmdConFtp *fs, const gchar *host_name);
 
-void gnome_cmd_con_ftp_set_remote_dir (GnomeCmdConFtp *fs, const gchar *pw);
-
 void gnome_cmd_con_ftp_set_pw (GnomeCmdConFtp *fs, const gchar *pw);
 
 #endif // __GNOME_CMD_CON_FTP_H__



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