gnome-commander r1893 - in trunk: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1893 - in trunk: . src
- Date: Fri, 18 Jul 2008 16:37:31 +0000 (UTC)
Author: epiotr
Date: Fri Jul 18 16:37:31 2008
New Revision: 1893
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1893&view=rev
Log:
Removed superfluous code for GnomeCmdConFtp
Modified:
trunk/ChangeLog
trunk/src/gnome-cmd-con-dialog.cc
trunk/src/gnome-cmd-con-ftp.cc
trunk/src/gnome-cmd-con-ftp.h
trunk/src/gnome-cmd-remote-dialog.cc
Modified: trunk/src/gnome-cmd-con-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-con-dialog.cc (original)
+++ trunk/src/gnome-cmd-con-dialog.cc Fri Jul 18 16:37:31 2008
@@ -637,7 +637,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 *password = gnome_vfs_uri_get_password (uri); // do not g_free !!
gnome_cmd_con_set_alias (con, alias);
gnome_cmd_con_set_uri (con, conndlg->priv->uri_str);
@@ -646,7 +645,6 @@
con->gnome_auth = conndlg->priv->use_auth;
gnome_cmd_con_ftp_set_host_name (server, host);
- gnome_cmd_con_ftp_set_pw (server, password);
gnome_vfs_uri_unref (uri);
}
Modified: trunk/src/gnome-cmd-con-ftp.cc
==============================================================================
--- trunk/src/gnome-cmd-con-ftp.cc (original)
+++ trunk/src/gnome-cmd-con-ftp.cc Fri Jul 18 16:37:31 2008
@@ -28,12 +28,6 @@
using namespace std;
-struct _GnomeCmdConFtpPrivate
-{
- gchar *pw;
-};
-
-
static GnomeCmdConClass *parent_class = NULL;
@@ -151,10 +145,6 @@
{
GnomeCmdConFtp *con = GNOME_CMD_CON_FTP (object);
- g_free (con->priv->pw);
-
- g_free (con->priv);
-
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(*GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
@@ -219,10 +209,6 @@
g_object_unref (overlay);
}
}
-
- ftp_con->priv = g_new0 (GnomeCmdConFtpPrivate, 1);
-
- // ftp_con->priv->pw = NULL;
}
@@ -278,7 +264,6 @@
gnome_cmd_con_set_host_name (con, host);
gnome_cmd_con_ftp_set_host_name (server, host);
- gnome_cmd_con_ftp_set_pw (server, password);
con->method = gnome_vfs_uri_is_local (uri) ? CON_LOCAL :
g_str_equal (scheme, "ftp") ? (user && g_str_equal (user, "anonymous") ? CON_ANON_FTP : CON_FTP) :
@@ -329,7 +314,6 @@
gnome_cmd_con_set_host_name (con, _host);
gnome_cmd_con_ftp_set_host_name (server, host);
- gnome_cmd_con_ftp_set_pw (server, password);
con->gnome_auth = !password && con->method!=CON_ANON_FTP; // ?????????
@@ -340,23 +324,8 @@
void gnome_cmd_con_ftp_set_host_name (GnomeCmdConFtp *con, const gchar *host_name)
{
g_return_if_fail (con != NULL);
- g_return_if_fail (con->priv != NULL);
g_return_if_fail (host_name != NULL);
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_pw (GnomeCmdConFtp *con, const gchar *pw)
-{
- g_return_if_fail (con != NULL);
- g_return_if_fail (con->priv != NULL);
-
- if (pw == con->priv->pw)
- return;
-
- g_free (con->priv->pw);
-
- con->priv->pw = g_strdup (pw);
-}
Modified: trunk/src/gnome-cmd-con-ftp.h
==============================================================================
--- trunk/src/gnome-cmd-con-ftp.h (original)
+++ trunk/src/gnome-cmd-con-ftp.h Fri Jul 18 16:37:31 2008
@@ -32,14 +32,11 @@
typedef struct _GnomeCmdConFtp GnomeCmdConFtp;
typedef struct _GnomeCmdConFtpClass GnomeCmdConFtpClass;
-typedef struct _GnomeCmdConFtpPrivate GnomeCmdConFtpPrivate;
struct _GnomeCmdConFtp
{
GnomeCmdCon parent;
-
- GnomeCmdConFtpPrivate *priv;
};
struct _GnomeCmdConFtpClass
@@ -55,6 +52,4 @@
void gnome_cmd_con_ftp_set_host_name (GnomeCmdConFtp *fs, const gchar *host_name);
-void gnome_cmd_con_ftp_set_pw (GnomeCmdConFtp *fs, const gchar *pw);
-
#endif // __GNOME_CMD_CON_FTP_H__
Modified: trunk/src/gnome-cmd-remote-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-remote-dialog.cc (original)
+++ trunk/src/gnome-cmd-remote-dialog.cc Fri Jul 18 16:37:31 2008
@@ -129,16 +129,12 @@
if (!server) // exit as there is no server selected
return;
- const gchar *anon_pw = gtk_entry_get_text (GTK_ENTRY (ftp_dialog->priv->anonymous_pw_entry));
-
// store the anonymous ftp password as the user might have changed it
+ const gchar *anon_pw = gtk_entry_get_text (GTK_ENTRY (ftp_dialog->priv->anonymous_pw_entry));
gnome_cmd_data_set_ftp_anonymous_password (anon_pw);
GnomeCmdCon *con = GNOME_CMD_CON (server);
- if (con->method==CON_ANON_FTP)
- gnome_cmd_con_ftp_set_pw (server, anon_pw);
-
gtk_widget_destroy (GTK_WIDGET (ftp_dialog));
g_timeout_add (1, (GtkFunction) do_connect_real, server);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]