[gnome-commander] Removed unused code
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Removed unused code
- Date: Tue, 2 Mar 2010 20:55:27 +0000 (UTC)
commit b8bd1a71a154f1a500e312fb9dcefec9b042d254
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Tue Mar 2 21:53:30 2010 +0100
Removed unused code
src/gnome-cmd-con-ftp.cc | 40 --------------------
src/gnome-cmd-con-ftp.h | 1 -
src/gnome-cmd-data.cc | 91 ----------------------------------------------
3 files changed, 0 insertions(+), 132 deletions(-)
---
diff --git a/src/gnome-cmd-con-ftp.cc b/src/gnome-cmd-con-ftp.cc
index 8d98dd1..929753d 100644
--- a/src/gnome-cmd-con-ftp.cc
+++ b/src/gnome-cmd-con-ftp.cc
@@ -272,46 +272,6 @@ GnomeCmdConFtp *gnome_cmd_con_ftp_new (const gchar *alias, const string &text_ur
}
-GnomeCmdConFtp *gnome_cmd_con_ftp_new (const gchar *alias, const gchar *host, guint port, const gchar *user, const gchar *password, const gchar *remote_dir)
-{
- GnomeCmdConFtp *server = (GnomeCmdConFtp *) gtk_type_new (gnome_cmd_con_ftp_get_type ());
-
- g_return_val_if_fail (server != NULL, NULL);
-
- GnomeCmdCon *con = GNOME_CMD_CON (server);
-
- string _uri;
- string _host;
- string _port;
- string _remote_dir;
- string _user;
- string _password;
-
- if (port) // convert 0 --> ""
- stringify (_port, port);
-
- con->method = user && g_str_equal (user, "anonymous") ? CON_ANON_FTP : CON_FTP;
-
- gnome_cmd_con_make_ftp_uri (_uri,
- con->gnome_auth,
- stringify (_host, host),
- _port,
- stringify (_remote_dir, remote_dir),
- stringify (_user, user),
- stringify (_password, password));
-
- gnome_cmd_con_set_alias (con, alias);
- gnome_cmd_con_set_uri (con, _uri);
- gnome_cmd_con_set_host_name (con, _host);
-
- gnome_cmd_con_ftp_set_host_name (server, host);
-
- con->gnome_auth = !password && con->method!=CON_ANON_FTP; // ?????????
-
- return server;
-}
-
-
void gnome_cmd_con_ftp_set_host_name (GnomeCmdConFtp *con, const gchar *host_name)
{
g_return_if_fail (con != NULL);
diff --git a/src/gnome-cmd-con-ftp.h b/src/gnome-cmd-con-ftp.h
index 1092665..50724a2 100644
--- a/src/gnome-cmd-con-ftp.h
+++ b/src/gnome-cmd-con-ftp.h
@@ -45,7 +45,6 @@ struct GnomeCmdConFtpClass
GtkType gnome_cmd_con_ftp_get_type ();
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_host_name (GnomeCmdConFtp *con, const gchar *host_name);
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index e9f34e8..4430fe2 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -324,97 +324,6 @@ inline gboolean load_connections (const gchar *fname)
}
break;
- case 'S': // format S: alias host port user password
- {
- gchar alias[256], host[256], user[256], pw[256];
- guint port2;
-
- gint ret = sscanf (line, "S: %256s %256s %ud %256s %256s\n", alias, host, &port2, user, pw);
-
- if (ret == 4 || ret == 5)
- {
- gchar *alias2 = gnome_vfs_unescape_string (alias, NULL);
-
- if (gnome_cmd_con_list_has_alias (gnome_cmd_data.priv->con_list, alias2))
- g_warning ("%s: ignored duplicate entry: %s", path, alias2);
- else
- {
- gchar *host2 = gnome_vfs_unescape_string (host, NULL);
- gchar *user2 = gnome_vfs_unescape_string (user, NULL);
- gchar *pw2 = NULL;
-
- if (ret == 5)
- pw2 = gnome_vfs_unescape_string (pw, NULL);
-
- server = gnome_cmd_con_ftp_new (alias2, host2, port2, user2, pw2, NULL);
- // server = gnome_cmd_con_ftp_new (alias2, gnome_cmd_con_make_ftp_uri (host2, port2, NULL, user2, pw2));
-
- GnomeCmdCon *con = GNOME_CMD_CON (server);
-
- con->gnome_auth = FALSE;
-
- gnome_cmd_con_list_add_ftp (gnome_cmd_data.priv->con_list, server);
-
- g_free (host2);
- g_free (user2);
- g_free (pw2);
- }
-
- g_free (alias2);
- }
- }
- break;
-
- case 'C': // format C: method: alias host port remote-dir user password
- {
- gchar **a = g_strsplit_set(line, " \t\n", 9);
- guint port2;
-
- if (g_strv_length(a)==8 &&
- strcmp(a[0], "C:")==0 &&
- strcmp(a[1], "ftp:")==0 &&
- sscanf(a[4], "%ud", &port2)==1)
- {
- gchar *alias2 = gnome_vfs_unescape_string (a[2], NULL);
-
- if (gnome_cmd_con_list_has_alias (gnome_cmd_data.priv->con_list, alias2))
- g_warning ("%s: ignored duplicate entry: %s", path, alias2);
- else
- {
- // gchar *scheme2 = a[1];
- gchar *host2 = gnome_vfs_unescape_string (a[3], NULL);
- gchar *remote_dir2 = gnome_vfs_unescape_string (a[5], NULL);
- gchar *user2 = gnome_vfs_unescape_string (a[6], NULL);
- gchar *password2 = gnome_vfs_unescape_string (a[7], NULL);
-
- server = gnome_cmd_con_ftp_new (alias2, host2, port2, user2, password2, remote_dir2);
- // server = gnome_cmd_con_ftp_new (alias2, gnome_cmd_con_make_ftp_uri (host2, port2, remote_dir2, user2, password2));
-
- GnomeCmdCon *con = GNOME_CMD_CON (server);
-
- con->gnome_auth = FALSE;
-
- g_free (host2);
- g_free (remote_dir2);
- g_free (user2);
- g_free (password2);
-
- gnome_cmd_con_list_add_ftp (gnome_cmd_data.priv->con_list, server);
- }
-
- g_free (alias2);
-
- }
- else
- {
- g_warning ("Invalid line in the '%s' file - skipping it...", path);
- g_warning ("\t... %s", line);
- }
-
- g_strfreev(a);
- }
- break;
-
case 'B':
if (server)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]