gnome-commander r1816 - in branches/gcmd-1-3: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1816 - in branches/gcmd-1-3: . src
- Date: Tue, 3 Jun 2008 20:25:36 +0000 (UTC)
Author: epiotr
Date: Tue Jun 3 20:25:36 2008
New Revision: 1816
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1816&view=rev
Log:
Removed superfluous alias from GnomeCmdConFtp object
Modified:
branches/gcmd-1-3/ChangeLog
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
branches/gcmd-1-3/src/gnome-cmd-con.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 Tue Jun 3 20:25:36 2008
@@ -643,18 +643,17 @@
const gchar *user = gnome_vfs_uri_get_user_name (uri); // do not g_free !!
const gchar *password = gnome_vfs_uri_get_password (uri); // do not g_free !!
- gnome_cmd_con_ftp_set_alias (server, alias);
+ gnome_cmd_con_set_alias (con, alias);
+ gnome_cmd_con_set_uri (con, conndlg->priv->uri_str);
+ con->method = (ConnectionMethodID) gtk_combo_box_get_active (GTK_COMBO_BOX (conndlg->priv->type_combo));
+ con->gnome_auth = conndlg->priv->use_auth;
+
gnome_cmd_con_ftp_set_host_name (server, host);
gnome_cmd_con_ftp_set_host_port (server, port);
gnome_cmd_con_ftp_set_remote_dir (server, remote_dir);
gnome_cmd_con_ftp_set_user_name (server, user);
gnome_cmd_con_ftp_set_pw (server, password);
- // do not set con->alias as it is already done in gnome_cmd_con_ftp_set_alias (alias, ...)
- gnome_cmd_con_set_uri (con, conndlg->priv->uri_str);
- con->method = (ConnectionMethodID) gtk_combo_box_get_active (GTK_COMBO_BOX (conndlg->priv->type_combo));
- con->gnome_auth = conndlg->priv->use_auth;
-
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 Tue Jun 3 20:25:36 2008
@@ -30,7 +30,6 @@
struct _GnomeCmdConFtpPrivate
{
- gchar *alias;
gchar *host_name;
gushort host_port;
gchar *remote_dir;
@@ -169,7 +168,6 @@
{
GnomeCmdConFtp *con = GNOME_CMD_CON_FTP (object);
- g_free (con->priv->alias);
g_free (con->priv->host_name);
g_free (con->priv->user_name);
g_free (con->priv->pw);
@@ -244,7 +242,6 @@
ftp_con->priv = g_new0 (GnomeCmdConFtpPrivate, 1);
- // ftp_con->priv->alias = NULL;
// ftp_con->priv->host_name = NULL;
// ftp_con->priv->host_port = NULL;
// ftp_con->priv->remote_dir = NULL;
@@ -302,7 +299,7 @@
GnomeCmdCon *con = GNOME_CMD_CON (server);
- gnome_cmd_con_ftp_set_alias (server, alias);
+ gnome_cmd_con_set_alias (con, alias);
gnome_cmd_con_set_uri (con, text_uri);
gnome_cmd_con_ftp_set_host_name (server, host);
@@ -311,7 +308,6 @@
gnome_cmd_con_ftp_set_user_name (server, user);
gnome_cmd_con_ftp_set_pw (server, password);
- // do not set con->alias as it is already done in gnome_cmd_con_ftp_set_alias ()
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) :
g_str_equal (scheme, "sftp") ? CON_SSH :
@@ -358,7 +354,7 @@
stringify (_user, user),
stringify (_password, password));
- gnome_cmd_con_ftp_set_alias (server, alias);
+ gnome_cmd_con_set_alias (con, alias);
gnome_cmd_con_set_uri (con, _uri);
gnome_cmd_con_ftp_set_host_name (server, host);
@@ -367,7 +363,6 @@
gnome_cmd_con_ftp_set_user_name (server, user);
gnome_cmd_con_ftp_set_pw (server, password);
- // do not set con->alias as it is done in gnome_cmd_con_ftp_set_alias ()
con->gnome_auth = !password && con->method!=CON_ANON_FTP; // ?????????
con->open_msg = g_strdup_printf (_("Connecting to %s\n"), host);
@@ -376,25 +371,6 @@
}
-void gnome_cmd_con_ftp_set_alias (GnomeCmdConFtp *con, const gchar *alias)
-{
- g_return_if_fail (con != NULL);
- g_return_if_fail (con->priv != NULL);
-
- g_free (con->priv->alias);
-
- con->priv->alias = g_strdup (alias);
- gnome_cmd_con_set_alias (GNOME_CMD_CON (con), alias);
-
- if (!alias)
- alias = _("<New connection>");
-
- GNOME_CMD_CON (con)->go_text = g_strdup_printf (_("Go to: %s"), alias);
- GNOME_CMD_CON (con)->open_text = g_strdup_printf (_("Connect to: %s"), alias);
- GNOME_CMD_CON (con)->close_text = g_strdup_printf (_("Disconnect from: %s"), alias);
-}
-
-
void gnome_cmd_con_ftp_set_host_name (GnomeCmdConFtp *con, const gchar *host_name)
{
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 Tue Jun 3 20:25:36 2008
@@ -53,8 +53,6 @@
GnomeCmdConFtp *gnome_cmd_con_ftp_new (const gchar *alias, const std::string &uri);
GnomeCmdConFtp *gnome_cmd_con_ftp_new (const gchar *alias, const gchar *host, guint port, const gchar *user, const gchar *password, const gchar *remote_dir);
-void gnome_cmd_con_ftp_set_alias (GnomeCmdConFtp *fs, const gchar *alias);
-
void gnome_cmd_con_ftp_set_host_name (GnomeCmdConFtp *fs, const gchar *host_name);
void gnome_cmd_con_ftp_set_host_port (GnomeCmdConFtp *fs, gushort host_port);
Modified: branches/gcmd-1-3/src/gnome-cmd-con.h
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-con.h (original)
+++ branches/gcmd-1-3/src/gnome-cmd-con.h Tue Jun 3 20:25:36 2008
@@ -187,7 +187,14 @@
{
g_return_if_fail (GNOME_CMD_IS_CON (con));
g_free (con->alias);
- con->alias = g_strdup(alias);
+ con->alias = g_strdup (alias);
+
+ if (!alias)
+ alias = _("<New connection>");
+
+ con->go_text = g_strdup_printf (_("Go to: %s"), alias);
+ con->open_text = g_strdup_printf (_("Connect to: %s"), alias);
+ con->close_text = g_strdup_printf (_("Disconnect from: %s"), alias);
}
void gnome_cmd_con_set_cwd (GnomeCmdCon *con, GnomeCmdDir *dir);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]