[gnome-commander] Rename GnomeCmdConFtp -> GnomeCmdConRemote



commit 5ac24787bc23946a4dcb7f1829071341cdc0f529
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Tue Oct 25 20:02:44 2011 +0200

    Rename GnomeCmdConFtp -> GnomeCmdConRemote

 po/POTFILES.in                                     |    2 +-
 src/Makefile.am                                    |    4 +-
 src/dialogs/gnome-cmd-remote-dialog.cc             |   36 ++++++------
 src/dialogs/gnome-cmd-remote-dialog.h              |    4 +-
 src/gnome-cmd-con-dialog.cc                        |   10 ++--
 src/gnome-cmd-con-dialog.h                         |    6 +-
 src/gnome-cmd-con-ftp.h                            |   51 ------------------
 src/gnome-cmd-con-list.cc                          |   56 ++++++++++----------
 src/gnome-cmd-con-list.h                           |   16 +++---
 ...nome-cmd-con-ftp.cc => gnome-cmd-con-remote.cc} |   48 ++++++++--------
 src/gnome-cmd-con-remote.h                         |   51 ++++++++++++++++++
 src/gnome-cmd-data.cc                              |   20 ++++----
 src/gnome-cmd-data.h                               |    6 +-
 src/gnome-cmd-dir-indicator.h                      |    2 +-
 src/gnome-cmd-main-menu.cc                         |    4 +-
 src/gnome-cmd-main-win.cc                          |    2 +-
 src/gnome-cmd-xml-config.cc                        |    2 +-
 17 files changed, 160 insertions(+), 160 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 143916a..aa4109a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -28,8 +28,8 @@ src/gnome-cmd-chown-dialog.cc
 src/gnome-cmd-con.h
 src/gnome-cmd-con-device.cc
 src/gnome-cmd-con-dialog.cc
-src/gnome-cmd-con-ftp.cc
 src/gnome-cmd-con-home.cc
+src/gnome-cmd-con-remote.cc
 src/gnome-cmd-con-smb.cc
 src/gnome-cmd-data.cc
 src/gnome-cmd-delete-dialog.cc
diff --git a/src/Makefile.am b/src/Makefile.am
index c25a004..112ba90 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,13 +33,13 @@ gnome_commander_SOURCES = \
 	gnome-cmd-cmdline.h gnome-cmd-cmdline.cc \
 	gnome-cmd-collection.h \
 	gnome-cmd-combo.h gnome-cmd-combo.cc \
+	gnome-cmd-con.h gnome-cmd-con.cc \
 	gnome-cmd-con-device.h gnome-cmd-con-device.cc \
 	gnome-cmd-con-dialog.h gnome-cmd-con-dialog.cc \
-	gnome-cmd-con-ftp.h gnome-cmd-con-ftp.cc \
 	gnome-cmd-con-home.h gnome-cmd-con-home.cc \
 	gnome-cmd-con-list.h gnome-cmd-con-list.cc \
+	gnome-cmd-con-remote.h gnome-cmd-con-remote.cc \
 	gnome-cmd-con-smb.h gnome-cmd-con-smb.cc \
-	gnome-cmd-con.h gnome-cmd-con.cc \
 	gnome-cmd-convert.h gnome-cmd-convert.cc \
 	gnome-cmd-data.h gnome-cmd-data.cc \
 	gnome-cmd-delete-dialog.h gnome-cmd-delete-dialog.cc \
diff --git a/src/dialogs/gnome-cmd-remote-dialog.cc b/src/dialogs/gnome-cmd-remote-dialog.cc
index baf8601..632f6cf 100644
--- a/src/dialogs/gnome-cmd-remote-dialog.cc
+++ b/src/dialogs/gnome-cmd-remote-dialog.cc
@@ -46,7 +46,7 @@ G_DEFINE_TYPE (GnomeCmdRemoteDialog, gnome_cmd_remote_dialog, GNOME_CMD_TYPE_DIA
 
 
 /******************************************************
-    The main ftp dialog
+    The main remote dialog
 ******************************************************/
 
 enum
@@ -75,7 +75,7 @@ inline gboolean tree_is_empty (GtkTreeView *tree_view)
 }
 
 
-inline GnomeCmdConFtp *get_selected_server (GnomeCmdRemoteDialog *dialog, GtkTreeIter *iter=NULL)
+inline GnomeCmdConRemote *get_selected_server (GnomeCmdRemoteDialog *dialog, GtkTreeIter *iter=NULL)
 {
     GtkTreeView *tree_view = GTK_TREE_VIEW (dialog->priv->connection_list);
     GtkTreeModel *model = gtk_tree_view_get_model (tree_view);
@@ -84,7 +84,7 @@ inline GnomeCmdConFtp *get_selected_server (GnomeCmdRemoteDialog *dialog, GtkTre
     if (!iter)
         iter = &priv_iter;
 
-    GnomeCmdConFtp *server = NULL;
+    GnomeCmdConRemote *server = NULL;
 
     if (!gtk_tree_selection_get_selected (gtk_tree_view_get_selection (tree_view), NULL, iter))
         return server;
@@ -95,7 +95,7 @@ inline GnomeCmdConFtp *get_selected_server (GnomeCmdRemoteDialog *dialog, GtkTre
 }
 
 
-inline void set_server (GtkListStore *store, GtkTreeIter *iter, GnomeCmdConFtp *server)
+inline void set_server (GtkListStore *store, GtkTreeIter *iter, GnomeCmdConRemote *server)
 {
     GnomeCmdCon *con = GNOME_CMD_CON (server);
 
@@ -110,7 +110,7 @@ inline void set_server (GtkListStore *store, GtkTreeIter *iter, GnomeCmdConFtp *
 }
 
 
-static gboolean do_connect_real (GnomeCmdConFtp *server)
+static gboolean do_connect_real (GnomeCmdConRemote *server)
 {
     GnomeCmdCon *con = GNOME_CMD_CON (server);
     GnomeCmdFileSelector *fs = main_win->fs(ACTIVE);
@@ -124,7 +124,7 @@ static gboolean do_connect_real (GnomeCmdConFtp *server)
 }
 
 
-inline void GnomeCmdRemoteDialog::do_connect(GnomeCmdConFtp *server)
+inline void GnomeCmdRemoteDialog::do_connect(GnomeCmdConRemote *server)
 {
     if (!server)
         server = get_selected_server (this);
@@ -142,9 +142,9 @@ inline void GnomeCmdRemoteDialog::do_connect(GnomeCmdConFtp *server)
 }
 
 
-static void on_connect_btn_clicked (GtkButton *button, GnomeCmdRemoteDialog *ftp_dialog)
+static void on_connect_btn_clicked (GtkButton *button, GnomeCmdRemoteDialog *remote_dialog)
 {
-    ftp_dialog->do_connect();
+    remote_dialog->do_connect();
 }
 
 
@@ -160,15 +160,15 @@ static void on_help_btn_clicked (GtkButton *button, GnomeCmdRemoteDialog *dialog
 }
 
 
-static void on_new_btn_clicked (GtkButton *button, GnomeCmdRemoteDialog *ftp_dialog)
+static void on_new_btn_clicked (GtkButton *button, GnomeCmdRemoteDialog *remote_dialog)
 {
-    GnomeCmdConFtp *server = gnome_cmd_connect_dialog_new ();
+    GnomeCmdConRemote *server = gnome_cmd_connect_dialog_new ();
 
     if (!server)
         return;
 
     GnomeCmdCon *con = GNOME_CMD_CON (server);
-    GtkListStore *store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (ftp_dialog->priv->connection_list)));
+    GtkListStore *store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (remote_dialog->priv->connection_list)));
     GtkTreeIter iter;
 
     gnome_cmd_con_list_get()->add(server);
@@ -177,17 +177,17 @@ static void on_new_btn_clicked (GtkButton *button, GnomeCmdRemoteDialog *ftp_dia
 }
 
 
-static void on_edit_btn_clicked (GtkButton *button, GnomeCmdRemoteDialog *ftp_dialog)
+static void on_edit_btn_clicked (GtkButton *button, GnomeCmdRemoteDialog *remote_dialog)
 {
     GtkTreeIter iter;
-    GnomeCmdConFtp *server = get_selected_server (ftp_dialog, &iter);
+    GnomeCmdConRemote *server = get_selected_server (remote_dialog, &iter);
 
     if (!server)        // exit as there is no server selected
         return;
 
     if (gnome_cmd_connect_dialog_edit (server))
     {
-        GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (ftp_dialog->priv->connection_list));
+        GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (remote_dialog->priv->connection_list));
         set_server (GTK_LIST_STORE (model), &iter, server);
     }
 }
@@ -201,7 +201,7 @@ static void on_remove_btn_clicked (GtkButton *button, GnomeCmdRemoteDialog *dial
     if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (tree_view), NULL, &iter))
     {
         GtkTreeModel *model = gtk_tree_view_get_model (tree_view);
-        GnomeCmdConFtp *server = NULL;
+        GnomeCmdConRemote *server = NULL;
 
         gtk_tree_model_get (model, &iter, COL_FTP_CON, &server, -1);
         gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
@@ -326,7 +326,7 @@ inline GtkTreeModel *create_and_fill_model (GList *list)
         GnomeCmdCon *con = GNOME_CMD_CON (list->data);
 
         gtk_list_store_append (store, &iter);
-        set_server (store, &iter, GNOME_CMD_CON_FTP (list->data));
+        set_server (store, &iter, GNOME_CMD_CON_REMOTE (list->data));
     }
 
     GtkTreeSortable *sortable = GTK_TREE_SORTABLE (store);
@@ -440,7 +440,7 @@ static void gnome_cmd_remote_dialog_init (GnomeCmdRemoteDialog *dialog)
     sw = create_sw (*dialog);
     gtk_box_pack_start (GTK_BOX (cat_box), sw, TRUE, TRUE, 0);
 
-    dialog->priv->connection_list = create_view_and_model (get_ftp_cons ());
+    dialog->priv->connection_list = create_view_and_model (get_remote_cons ());
     g_object_ref (dialog->priv->connection_list);
     g_object_set_data_full (*dialog, "connection_list", dialog->priv->connection_list, g_object_unref);
     gtk_widget_show (dialog->priv->connection_list);
@@ -507,7 +507,7 @@ GtkWidget *gnome_cmd_remote_dialog_new ()
 
 void show_quick_connect_dialog ()
 {
-    GnomeCmdConFtp *con = gnome_cmd_data.get_quick_connect();
+    GnomeCmdConRemote *con = gnome_cmd_data.get_quick_connect();
 
     if (gnome_cmd_connect_dialog_edit (con))
         do_connect_real (con);
diff --git a/src/dialogs/gnome-cmd-remote-dialog.h b/src/dialogs/gnome-cmd-remote-dialog.h
index ece2ef9..5cc3ea2 100644
--- a/src/dialogs/gnome-cmd-remote-dialog.h
+++ b/src/dialogs/gnome-cmd-remote-dialog.h
@@ -27,7 +27,7 @@
 #define GNOME_CMD_IS_REMOTE_DIALOG_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_CMD_TYPE_REMOTE_DIALOG))
 #define GNOME_CMD_REMOTE_DIALOG_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GNOME_CMD_TYPE_REMOTE_DIALOG, GnomeCmdRemoteDialogClass))
 
-#include "gnome-cmd-con-ftp.h"
+#include "gnome-cmd-con-remote.h"
 
 struct GnomeCmdRemoteDialog
 {
@@ -41,7 +41,7 @@ struct GnomeCmdRemoteDialog
     operator GtkWidget * () const           {  return GTK_WIDGET (this);        }
     operator GnomeCmdDialog * () const      {  return GNOME_CMD_DIALOG (this);  }
 
-    void do_connect(GnomeCmdConFtp *server=NULL);
+    void do_connect(GnomeCmdConRemote *server=NULL);
 };
 
 
diff --git a/src/gnome-cmd-con-dialog.cc b/src/gnome-cmd-con-dialog.cc
index d199f31..9ceabf7 100644
--- a/src/gnome-cmd-con-dialog.cc
+++ b/src/gnome-cmd-con-dialog.cc
@@ -546,7 +546,7 @@ static void gnome_cmd_connect_dialog_init (GnomeCmdConnectDialog *dialog)
 }
 
 
-GnomeCmdConFtp *gnome_cmd_connect_dialog_new (gboolean has_alias)
+GnomeCmdConRemote *gnome_cmd_connect_dialog_new (gboolean has_alias)
 {
     GnomeCmdConnectDialog *dialog = (GnomeCmdConnectDialog *) g_object_new (GNOME_CMD_TYPE_CONNECT_DIALOG, NULL);
 
@@ -564,13 +564,13 @@ GnomeCmdConFtp *gnome_cmd_connect_dialog_new (gboolean has_alias)
 
     gint response = gtk_dialog_run (*dialog);
 
-    GnomeCmdConFtp *server = NULL;
+    GnomeCmdConRemote *server = NULL;
 
     if (response==GTK_RESPONSE_OK)
     {
         const gchar *alias = dialog->priv->alias && !dialog->priv->alias->empty() ? dialog->priv->alias->c_str() : NULL;
 
-        server = gnome_cmd_con_ftp_new (alias, dialog->priv->uri_str);
+        server = gnome_cmd_con_remote_new (alias, dialog->priv->uri_str);
 
         GnomeCmdCon *con = GNOME_CMD_CON (server);
 
@@ -584,7 +584,7 @@ GnomeCmdConFtp *gnome_cmd_connect_dialog_new (gboolean has_alias)
 }
 
 
-gboolean gnome_cmd_connect_dialog_edit (GnomeCmdConFtp *server)
+gboolean gnome_cmd_connect_dialog_edit (GnomeCmdConRemote *server)
 {
     g_return_val_if_fail (server != NULL, FALSE);
 
@@ -684,7 +684,7 @@ gboolean gnome_cmd_connect_dialog_edit (GnomeCmdConFtp *server)
         con->method = (ConnectionMethodID) gtk_combo_box_get_active (GTK_COMBO_BOX (dialog->priv->type_combo));
         con->auth = dialog->priv->auth;
 
-        gnome_cmd_con_ftp_set_host_name (server, host);
+        gnome_cmd_con_remote_set_host_name (server, host);
 
         gnome_vfs_uri_unref (uri);
     }
diff --git a/src/gnome-cmd-con-dialog.h b/src/gnome-cmd-con-dialog.h
index be9fb48..c4bb916 100644
--- a/src/gnome-cmd-con-dialog.h
+++ b/src/gnome-cmd-con-dialog.h
@@ -26,9 +26,9 @@
 #include <string>
 
 #include "gnome-cmd-con.h"
-#include "gnome-cmd-con-ftp.h"
+#include "gnome-cmd-con-remote.h"
 
-GnomeCmdConFtp *gnome_cmd_connect_dialog_new (gboolean has_alias=TRUE);
-gboolean gnome_cmd_connect_dialog_edit (GnomeCmdConFtp *server);
+GnomeCmdConRemote *gnome_cmd_connect_dialog_new (gboolean has_alias=TRUE);
+gboolean gnome_cmd_connect_dialog_edit (GnomeCmdConRemote *server);
 
 #endif // __GNOME_CMD_CON_DIALOG_H__
diff --git a/src/gnome-cmd-con-list.cc b/src/gnome-cmd-con-list.cc
index dabd64c..17e330e 100644
--- a/src/gnome-cmd-con-list.cc
+++ b/src/gnome-cmd-con-list.cc
@@ -32,11 +32,11 @@ struct GnomeCmdConList::Private
 {
     gboolean update_lock;
     gboolean changed;
-    gboolean ftp_cons_changed;
+    gboolean remote_cons_changed;
     gboolean device_cons_changed;
     gboolean quick_ftp_cons_changed;
 
-    GList *ftp_cons;
+    GList *remote_cons;
     GList *device_cons;
     GList *quick_ftp_cons;
 
@@ -66,7 +66,7 @@ static void on_con_updated (GnomeCmdCon *con, GnomeCmdConList *con_list)
     g_return_if_fail (GNOME_CMD_IS_CON (con));
     g_return_if_fail (GNOME_CMD_IS_CON_LIST (con_list));
 
-    if (GNOME_CMD_IS_CON_FTP (con))
+    if (GNOME_CMD_IS_CON_REMOTE (con))
         gtk_signal_emit (*con_list, signals[FTP_LIST_CHANGED]);
     else
         if (GNOME_CMD_IS_CON_DEVICE (con))
@@ -147,7 +147,7 @@ static void init (GnomeCmdConList *con_list)
     con_list->priv->home_con = gnome_cmd_con_home_new ();
     con_list->priv->smb_con = gnome_cmd_con_smb_new ();
 
-    // con_list->priv->ftp_cons = NULL;
+    // con_list->priv->remote_cons = NULL;
     // con_list->priv->device_cons = NULL;
     // con_list->priv->quick_ftp_cons = NULL;
     con_list->priv->all_cons = g_list_append (NULL, con_list->priv->home_con);
@@ -188,7 +188,7 @@ void GnomeCmdConList::lock()
 {
     priv->update_lock = TRUE;
     priv->changed = FALSE;
-    priv->ftp_cons_changed = FALSE;
+    priv->remote_cons_changed = FALSE;
     priv->device_cons_changed = FALSE;
 }
 
@@ -197,7 +197,7 @@ void GnomeCmdConList::unlock()
 {
     if (priv->changed)
         gtk_signal_emit (*this, signals[LIST_CHANGED]);
-    if (priv->ftp_cons_changed)
+    if (priv->remote_cons_changed)
         gtk_signal_emit (*this, signals[FTP_LIST_CHANGED]);
     if (priv->device_cons_changed)
         gtk_signal_emit (*this, signals[DEVICE_LIST_CHANGED]);
@@ -206,20 +206,20 @@ void GnomeCmdConList::unlock()
 }
 
 
-void GnomeCmdConList::add(GnomeCmdConFtp *con)
+void GnomeCmdConList::add(GnomeCmdConRemote *con)
 {
     g_return_if_fail (g_list_index (priv->all_cons, con) == -1);
-    g_return_if_fail (g_list_index (priv->ftp_cons, con) == -1);
+    g_return_if_fail (g_list_index (priv->remote_cons, con) == -1);
 
     priv->all_cons = g_list_append (priv->all_cons, con);
-    priv->ftp_cons = g_list_append (priv->ftp_cons, con);
+    priv->remote_cons = g_list_append (priv->remote_cons, con);
 
     g_signal_connect (con, "updated", G_CALLBACK (on_con_updated), this);
 
     if (priv->update_lock)
     {
         priv->changed = TRUE;
-        priv->ftp_cons_changed = TRUE;
+        priv->remote_cons_changed = TRUE;
     }
     else
     {
@@ -229,20 +229,20 @@ void GnomeCmdConList::add(GnomeCmdConFtp *con)
 }
 
 
-void GnomeCmdConList::remove(GnomeCmdConFtp *con)
+void GnomeCmdConList::remove(GnomeCmdConRemote *con)
 {
     g_return_if_fail (g_list_index (priv->all_cons, con) != -1);
-    g_return_if_fail (g_list_index (priv->ftp_cons, con) != -1);
+    g_return_if_fail (g_list_index (priv->remote_cons, con) != -1);
 
     priv->all_cons = g_list_remove (priv->all_cons, con);
-    priv->ftp_cons = g_list_remove (priv->ftp_cons, con);
+    priv->remote_cons = g_list_remove (priv->remote_cons, con);
 
     g_signal_handlers_disconnect_by_func (con, (gpointer) on_con_updated, this);
 
     if (priv->update_lock)
     {
         priv->changed = TRUE;
-        priv->ftp_cons_changed = TRUE;
+        priv->remote_cons_changed = TRUE;
     }
     else
     {
@@ -252,16 +252,16 @@ void GnomeCmdConList::remove(GnomeCmdConFtp *con)
 }
 
 
-void gnome_cmd_con_list_add_quick_ftp (GnomeCmdConList *con_list, GnomeCmdConFtp *ftp_con)
+void gnome_cmd_con_list_add_quick_ftp (GnomeCmdConList *con_list, GnomeCmdConRemote *remote_con)
 {
     g_return_if_fail (GNOME_CMD_IS_CON_LIST (con_list));
-    g_return_if_fail (g_list_index (con_list->priv->all_cons, ftp_con) == -1);
-    g_return_if_fail (g_list_index (con_list->priv->quick_ftp_cons, ftp_con) == -1);
+    g_return_if_fail (g_list_index (con_list->priv->all_cons, remote_con) == -1);
+    g_return_if_fail (g_list_index (con_list->priv->quick_ftp_cons, remote_con) == -1);
 
-    con_list->priv->all_cons = g_list_append (con_list->priv->all_cons, ftp_con);
-    con_list->priv->quick_ftp_cons = g_list_append (con_list->priv->quick_ftp_cons, ftp_con);
+    con_list->priv->all_cons = g_list_append (con_list->priv->all_cons, remote_con);
+    con_list->priv->quick_ftp_cons = g_list_append (con_list->priv->quick_ftp_cons, remote_con);
 
-    g_signal_connect (ftp_con, "updated", G_CALLBACK (on_con_updated), con_list);
+    g_signal_connect (remote_con, "updated", G_CALLBACK (on_con_updated), con_list);
 
     if (con_list->priv->update_lock)
     {
@@ -276,16 +276,16 @@ void gnome_cmd_con_list_add_quick_ftp (GnomeCmdConList *con_list, GnomeCmdConFtp
 }
 
 
-void gnome_cmd_con_list_remove_quick_ftp (GnomeCmdConList *con_list, GnomeCmdConFtp *ftp_con)
+void gnome_cmd_con_list_remove_quick_ftp (GnomeCmdConList *con_list, GnomeCmdConRemote *remote_con)
 {
     g_return_if_fail (GNOME_CMD_IS_CON_LIST (con_list));
-    g_return_if_fail (g_list_index (con_list->priv->all_cons, ftp_con) != -1);
-    g_return_if_fail (g_list_index (con_list->priv->quick_ftp_cons, ftp_con) != -1);
+    g_return_if_fail (g_list_index (con_list->priv->all_cons, remote_con) != -1);
+    g_return_if_fail (g_list_index (con_list->priv->quick_ftp_cons, remote_con) != -1);
 
-    con_list->priv->all_cons = g_list_remove (con_list->priv->all_cons, ftp_con);
-    con_list->priv->quick_ftp_cons = g_list_remove (con_list->priv->quick_ftp_cons, ftp_con);
+    con_list->priv->all_cons = g_list_remove (con_list->priv->all_cons, remote_con);
+    con_list->priv->quick_ftp_cons = g_list_remove (con_list->priv->quick_ftp_cons, remote_con);
 
-    g_signal_handlers_disconnect_by_func (ftp_con, (gpointer) on_con_updated, con_list);
+    g_signal_handlers_disconnect_by_func (remote_con, (gpointer) on_con_updated, con_list);
 
     if (con_list->priv->update_lock)
     {
@@ -352,11 +352,11 @@ GList *gnome_cmd_con_list_get_all (GnomeCmdConList *con_list)
 }
 
 
-GList *gnome_cmd_con_list_get_all_ftp (GnomeCmdConList *con_list)
+GList *gnome_cmd_con_list_get_all_remote (GnomeCmdConList *con_list)
 {
     g_return_val_if_fail (GNOME_CMD_IS_CON_LIST (con_list), NULL);
 
-    return con_list->priv->ftp_cons;
+    return con_list->priv->remote_cons;
 }
 
 
diff --git a/src/gnome-cmd-con-list.h b/src/gnome-cmd-con-list.h
index bcefc5e..00bd11c 100644
--- a/src/gnome-cmd-con-list.h
+++ b/src/gnome-cmd-con-list.h
@@ -23,7 +23,7 @@
 
 #include "gnome-cmd-data.h"
 #include "gnome-cmd-con.h"
-#include "gnome-cmd-con-ftp.h"
+#include "gnome-cmd-con-remote.h"
 #include "gnome-cmd-con-device.h"
 
 #define GNOME_CMD_TYPE_CON_LIST              (gnome_cmd_con_list_get_type ())
@@ -51,10 +51,10 @@ struct GnomeCmdConList
     void lock();
     void unlock();
 
-    void add(GnomeCmdConFtp *con);
+    void add(GnomeCmdConRemote *con);
     void add(GnomeCmdConDevice *con);
 
-    void remove(GnomeCmdConFtp *con);
+    void remove(GnomeCmdConRemote *con);
     void remove(GnomeCmdConDevice *con);
 
     GnomeCmdCon *find_alias(const gchar *alias) const;
@@ -86,11 +86,11 @@ inline GnomeCmdConList *gnome_cmd_con_list_get ()
     return (GnomeCmdConList *) gnome_cmd_data_get_con_list ();
 }
 
-void gnome_cmd_con_list_add_quick_ftp (GnomeCmdConList *list, GnomeCmdConFtp *ftp_con);
-void gnome_cmd_con_list_remove_quick_ftp (GnomeCmdConList *list, GnomeCmdConFtp *ftp_con);
+void gnome_cmd_con_list_add_quick_ftp (GnomeCmdConList *list, GnomeCmdConRemote *ftp_con);
+void gnome_cmd_con_list_remove_quick_ftp (GnomeCmdConList *list, GnomeCmdConRemote *ftp_con);
 
 GList *gnome_cmd_con_list_get_all (GnomeCmdConList *list);
-GList *gnome_cmd_con_list_get_all_ftp (GnomeCmdConList *list);
+GList *gnome_cmd_con_list_get_all_remote (GnomeCmdConList *list);
 GList *gnome_cmd_con_list_get_all_quick_ftp (GnomeCmdConList *list);
 
 GList *gnome_cmd_con_list_get_all_dev (GnomeCmdConList *list);
@@ -106,9 +106,9 @@ inline GnomeCmdCon *get_smb_con ()
     return gnome_cmd_con_list_get()->get_smb();
 }
 
-inline GList *get_ftp_cons ()
+inline GList *get_remote_cons ()
 {
-    return gnome_cmd_con_list_get_all_ftp (gnome_cmd_con_list_get ());
+    return gnome_cmd_con_list_get_all_remote (gnome_cmd_con_list_get ());
 }
 
 #endif // __GNOME_CMD_CON_LIST_H__
diff --git a/src/gnome-cmd-con-ftp.cc b/src/gnome-cmd-con-remote.cc
similarity index 84%
rename from src/gnome-cmd-con-ftp.cc
rename to src/gnome-cmd-con-remote.cc
index 5557e38..0bb4337 100644
--- a/src/gnome-cmd-con-ftp.cc
+++ b/src/gnome-cmd-con-remote.cc
@@ -22,7 +22,7 @@
 
 #include "gnome-cmd-includes.h"
 #include "gnome-cmd-data.h"
-#include "gnome-cmd-con-ftp.h"
+#include "gnome-cmd-con-remote.h"
 #include "gnome-cmd-plain-path.h"
 #include "imageloader.h"
 #include "utils.h"
@@ -77,7 +77,7 @@ static gboolean start_get_file_info (GnomeCmdCon *con)
 }
 
 
-static void ftp_open (GnomeCmdCon *con)
+static void remote_open (GnomeCmdCon *con)
 {
     DEBUG('m', "Opening remote connection\n");
 
@@ -91,7 +91,7 @@ static void ftp_open (GnomeCmdCon *con)
 }
 
 
-static gboolean ftp_close (GnomeCmdCon *con)
+static gboolean remote_close (GnomeCmdCon *con)
 {
     gnome_cmd_con_set_default_dir (con, NULL);
     delete con->base_path;
@@ -103,20 +103,20 @@ static gboolean ftp_close (GnomeCmdCon *con)
 }
 
 
-static void ftp_cancel_open (GnomeCmdCon *con)
+static void remote_cancel_open (GnomeCmdCon *con)
 {
     DEBUG('m', "Setting state CANCELLING\n");
     con->state = GnomeCmdCon::STATE_CANCELLING;
 }
 
 
-static gboolean ftp_open_is_needed (GnomeCmdCon *con)
+static gboolean remote_open_is_needed (GnomeCmdCon *con)
 {
     return TRUE;
 }
 
 
-static GnomeVFSURI *ftp_create_uri (GnomeCmdCon *con, GnomeCmdPath *path)
+static GnomeVFSURI *remote_create_uri (GnomeCmdCon *con, GnomeCmdPath *path)
 {
     g_return_val_if_fail (con->uri != NULL, NULL);
 
@@ -129,7 +129,7 @@ static GnomeVFSURI *ftp_create_uri (GnomeCmdCon *con, GnomeCmdPath *path)
 }
 
 
-static GnomeCmdPath *ftp_create_path (GnomeCmdCon *con, const gchar *path_str)
+static GnomeCmdPath *remote_create_path (GnomeCmdCon *con, const gchar *path_str)
 {
     return new GnomeCmdPlainPath(path_str);
 }
@@ -146,7 +146,7 @@ static void destroy (GtkObject *object)
 }
 
 
-static void class_init (GnomeCmdConFtpClass *klass)
+static void class_init (GnomeCmdConRemoteClass *klass)
 {
     GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
     GnomeCmdConClass *con_class = GNOME_CMD_CON_CLASS (klass);
@@ -155,23 +155,23 @@ static void class_init (GnomeCmdConFtpClass *klass)
 
     object_class->destroy = destroy;
 
-    con_class->open = ftp_open;
-    con_class->close = ftp_close;
-    con_class->cancel_open = ftp_cancel_open;
-    con_class->open_is_needed = ftp_open_is_needed;
-    con_class->create_uri = ftp_create_uri;
-    con_class->create_path = ftp_create_path;
+    con_class->open = remote_open;
+    con_class->close = remote_close;
+    con_class->cancel_open = remote_cancel_open;
+    con_class->open_is_needed = remote_open_is_needed;
+    con_class->create_uri = remote_create_uri;
+    con_class->create_path = remote_create_path;
 }
 
 
-static void init (GnomeCmdConFtp *ftp_con)
+static void init (GnomeCmdConRemote *remote_con)
 {
     guint dev_icon_size = gnome_cmd_data.dev_icon_size;
     gint icon_size;
 
     g_assert (gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR, &icon_size, NULL));
 
-    GnomeCmdCon *con = GNOME_CMD_CON (ftp_con);
+    GnomeCmdCon *con = GNOME_CMD_CON (remote_con);
 
     con->method = CON_FTP;
     con->should_remember_dir = TRUE;
@@ -213,7 +213,7 @@ static void init (GnomeCmdConFtp *ftp_con)
  * Public functions
  ***********************************/
 
-GtkType gnome_cmd_con_ftp_get_type ()
+GtkType gnome_cmd_con_remote_get_type ()
 {
     static GtkType type = 0;
 
@@ -221,9 +221,9 @@ GtkType gnome_cmd_con_ftp_get_type ()
     {
         GtkTypeInfo info =
         {
-            "GnomeCmdConFtp",
-            sizeof (GnomeCmdConFtp),
-            sizeof (GnomeCmdConFtpClass),
+            "GnomeCmdConRemote",
+            sizeof (GnomeCmdConRemote),
+            sizeof (GnomeCmdConRemoteClass),
             (GtkClassInitFunc) class_init,
             (GtkObjectInitFunc) init,
             /* reserved_1 */ NULL,
@@ -237,7 +237,7 @@ GtkType gnome_cmd_con_ftp_get_type ()
 }
 
 
-GnomeCmdConFtp *gnome_cmd_con_ftp_new (const gchar *alias, const string &text_uri)
+GnomeCmdConRemote *gnome_cmd_con_remote_new (const gchar *alias, const string &text_uri)
 {
     GnomeVFSURI *uri = gnome_vfs_uri_new (text_uri.c_str());
 
@@ -247,7 +247,7 @@ GnomeCmdConFtp *gnome_cmd_con_ftp_new (const gchar *alias, const string &text_ur
     const gchar *password = gnome_vfs_uri_get_password (uri);   // do not g_free
     gchar *path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (uri), NULL);
 
-    GnomeCmdConFtp *server = (GnomeCmdConFtp *) g_object_new (GNOME_CMD_TYPE_CON_FTP, NULL);
+    GnomeCmdConRemote *server = (GnomeCmdConRemote *) g_object_new (GNOME_CMD_TYPE_CON_REMOTE, NULL);
 
     g_return_val_if_fail (server != NULL, NULL);
 
@@ -258,7 +258,7 @@ GnomeCmdConFtp *gnome_cmd_con_ftp_new (const gchar *alias, const string &text_ur
     gnome_cmd_con_set_host_name (con, host);
     gnome_cmd_con_set_root_path (con, path);
 
-    gnome_cmd_con_ftp_set_host_name (server, host);
+    gnome_cmd_con_remote_set_host_name (server, host);
 
     con->method = gnome_cmd_con_get_scheme (uri);
     con->auth = con->method==CON_ANON_FTP ? GnomeCmdCon::NOT_REQUIRED :
@@ -271,7 +271,7 @@ GnomeCmdConFtp *gnome_cmd_con_ftp_new (const gchar *alias, const string &text_ur
 }
 
 
-void gnome_cmd_con_ftp_set_host_name (GnomeCmdConFtp *con, const gchar *host_name)
+void gnome_cmd_con_remote_set_host_name (GnomeCmdConRemote *con, const gchar *host_name)
 {
     g_return_if_fail (con != NULL);
     g_return_if_fail (host_name != NULL);
diff --git a/src/gnome-cmd-con-remote.h b/src/gnome-cmd-con-remote.h
new file mode 100644
index 0000000..fcf20f5
--- /dev/null
+++ b/src/gnome-cmd-con-remote.h
@@ -0,0 +1,51 @@
+/*
+    GNOME Commander - A GNOME based file manager
+    Copyright (C) 2001-2006 Marcus Bjurman
+    Copyright (C) 2007-2011 Piotr Eljasiak
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#ifndef __GNOME_CMD_CON_REMOTE_H__
+#define __GNOME_CMD_CON_REMOTE_H__
+
+#include "gnome-cmd-con.h"
+
+#define GNOME_CMD_TYPE_CON_REMOTE              (gnome_cmd_con_remote_get_type ())
+#define GNOME_CMD_CON_REMOTE(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj), GNOME_CMD_TYPE_CON_REMOTE, GnomeCmdConRemote))
+#define GNOME_CMD_CON_REMOTE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), GNOME_CMD_TYPE_CON_REMOTE, GnomeCmdConRemoteClass))
+#define GNOME_CMD_IS_CON_REMOTE(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNOME_CMD_TYPE_CON_REMOTE))
+#define GNOME_CMD_IS_CON_REMOTE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_CMD_TYPE_CON_REMOTE))
+#define GNOME_CMD_CON_REMOTE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GNOME_CMD_TYPE_CON_REMOTE, GnomeCmdConRemoteClass))
+
+
+struct GnomeCmdConRemote
+{
+    GnomeCmdCon parent;
+};
+
+struct GnomeCmdConRemoteClass
+{
+    GnomeCmdConClass parent_class;
+};
+
+
+GtkType gnome_cmd_con_remote_get_type ();
+
+GnomeCmdConRemote *gnome_cmd_con_remote_new (const gchar *alias, const std::string &uri);
+
+void gnome_cmd_con_remote_set_host_name (GnomeCmdConRemote *con, const gchar *host_name);
+
+#endif // __GNOME_CMD_CON_REMOTE_H__
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 04c24cf..5dc37e4 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -126,7 +126,7 @@ inline void write(XML::xstream &xml, GnomeCmdCon *con, const gchar *name)
 
     xml << XML::tag("Group") << XML::attr("name") << name;
 
-    if (GNOME_CMD_IS_CON_FTP (con))
+    if (GNOME_CMD_IS_CON_REMOTE (con))
         xml << XML::attr("remote") << TRUE;
 
     for (GList *i=bookmarks; i; i=i->next)
@@ -225,7 +225,7 @@ inline void save_fav_apps (const gchar *fname)
 
 inline gboolean load_connections (const gchar *fname)
 {
-    guint prev_ftp_cons_no = g_list_length (gnome_cmd_con_list_get_all_ftp (gnome_cmd_data.priv->con_list));
+    guint prev_ftp_cons_no = g_list_length (gnome_cmd_con_list_get_all_remote (gnome_cmd_data.priv->con_list));
 
     gchar *path = config_dir ? g_build_filename (config_dir, fname, NULL) : g_build_filename (g_get_home_dir (), "." PACKAGE, fname, NULL);
     FILE  *fd = fopen (path, "r");
@@ -236,7 +236,7 @@ inline gboolean load_connections (const gchar *fname)
 
         while (fgets (line, sizeof(line), fd) != NULL)
         {
-            GnomeCmdConFtp *server = NULL;
+            GnomeCmdConRemote *server = NULL;
 
             gchar *s = strchr (line, '\n');             // g_utf8_strchr (line, -1, '\n') ???
 
@@ -268,7 +268,7 @@ inline gboolean load_connections (const gchar *fname)
                             g_warning ("%s: ignored duplicate entry: %s", path, alias);
                         else
                         {
-                            server = gnome_cmd_con_ftp_new (alias, a[2]);
+                            server = gnome_cmd_con_remote_new (alias, a[2]);
 
                             if (!server)
                             {
@@ -309,13 +309,13 @@ inline gboolean load_connections (const gchar *fname)
 
     g_free (path);
 
-    if (!g_list_length (gnome_cmd_con_list_get_all_ftp (gnome_cmd_data.priv->con_list)))
+    if (!g_list_length (gnome_cmd_con_list_get_all_remote (gnome_cmd_data.priv->con_list)))
     {
-        GnomeCmdConFtp *server = gnome_cmd_con_ftp_new (_("GNOME Commander"), "ftp://anonymous ftp gnome org/pub/GNOME/sources/gnome-commander/");
+        GnomeCmdConRemote *server = gnome_cmd_con_remote_new (_("GNOME Commander"), "ftp://anonymous ftp gnome org/pub/GNOME/sources/gnome-commander/");
         gnome_cmd_data.priv->con_list->add(server);
     }
 
-    return fd!=NULL && g_list_length (gnome_cmd_con_list_get_all_ftp (gnome_cmd_data.priv->con_list))>prev_ftp_cons_no;
+    return fd!=NULL && g_list_length (gnome_cmd_con_list_get_all_remote (gnome_cmd_data.priv->con_list))>prev_ftp_cons_no;
 }
 
 
@@ -1446,7 +1446,7 @@ void GnomeCmdData::load()
     // "/quick-connect/uri" must be read AFTER retrieving anonymous password
 
     gchar *quick_connect_uri = gnome_cmd_data_get_string ("/quick-connect/uri", "ftp://anonymous ftp gnome org/pub/GNOME/");
-    quick_connect = gnome_cmd_con_ftp_new (NULL, quick_connect_uri);
+    quick_connect = gnome_cmd_con_remote_new (NULL, quick_connect_uri);
     g_free (quick_connect_uri);
 
     // if number of registered user actions does not exceed 10 (nothing has been read), try to read old cfg file
@@ -1654,7 +1654,7 @@ void GnomeCmdData::save()
 
         xml << XML::tag("Connections");
 
-        for (GList *i=gnome_cmd_con_list_get_all_ftp (gnome_cmd_data.priv->con_list); i; i=i->next)
+        for (GList *i=gnome_cmd_con_list_get_all_remote (gnome_cmd_data.priv->con_list); i; i=i->next)
         {
             GnomeCmdCon *con = GNOME_CMD_CON (i->data);
 
@@ -1669,7 +1669,7 @@ void GnomeCmdData::save()
         write (xml, priv->con_list->get_home(), "Home");
         write (xml, priv->con_list->get_smb(), "SMB");
 
-        for (GList *i=gnome_cmd_con_list_get_all_ftp (gnome_cmd_data.priv->con_list); i; i=i->next)
+        for (GList *i=gnome_cmd_con_list_get_all_remote (gnome_cmd_data.priv->con_list); i; i=i->next)
         {
             GnomeCmdCon *con = GNOME_CMD_CON (i->data);
             write (xml, con, XML::escape(gnome_cmd_con_get_alias (con)));
diff --git a/src/gnome-cmd-data.h b/src/gnome-cmd-data.h
index 2440faa..3a9842b 100644
--- a/src/gnome-cmd-data.h
+++ b/src/gnome-cmd-data.h
@@ -34,7 +34,7 @@
 #include "dict.h"
 #include "tuple.h"
 
-struct GnomeCmdConFtp;
+struct GnomeCmdConRemote;
 
 struct GnomeCmdData
 {
@@ -174,7 +174,7 @@ struct GnomeCmdData
 
   private:
 
-    GnomeCmdConFtp              *quick_connect;
+    GnomeCmdConRemote           *quick_connect;
 
     gchar *viewer;
     gchar *editor;
@@ -277,7 +277,7 @@ struct GnomeCmdData
     void save();
 
     gboolean hide_type(GnomeVFSFileType type) const {  return filter_settings.file_types[type];  }
-    GnomeCmdConFtp *get_quick_connect() const       {  return quick_connect;                     }
+    GnomeCmdConRemote *get_quick_connect() const       {  return quick_connect;                     }
 
     GnomeCmdFileList::ColumnID get_sort_col(FileSelectorID id) const;
     GtkSortType get_sort_direction(FileSelectorID id) const;
diff --git a/src/gnome-cmd-dir-indicator.h b/src/gnome-cmd-dir-indicator.h
index f5d8df5..48e5176 100644
--- a/src/gnome-cmd-dir-indicator.h
+++ b/src/gnome-cmd-dir-indicator.h
@@ -21,7 +21,7 @@
 #define __GNOME_CMD_DIR_INDICATOR_H__
 
 #include "gnome-cmd-con.h"
-#include "gnome-cmd-con-ftp.h"
+#include "gnome-cmd-con-remote.h"
 #include "gnome-cmd-con-device.h"
 #include "gnome-cmd-file-selector.h"
 
diff --git a/src/gnome-cmd-main-menu.cc b/src/gnome-cmd-main-menu.cc
index 2143f12..17bb2de 100644
--- a/src/gnome-cmd-main-menu.cc
+++ b/src/gnome-cmd-main-menu.cc
@@ -909,7 +909,7 @@ void gnome_cmd_main_menu_update_connections (GnomeCmdMainMenu *main_menu)
     GtkMenuShell *connections_menu = GTK_MENU_SHELL (GTK_MENU_ITEM (main_menu->priv->connections_menu)->submenu);
     GnomeCmdConList *con_list = gnome_cmd_con_list_get ();
     GList *all_cons = gnome_cmd_con_list_get_all (con_list);
-    // GList *ftp_cons = gnome_cmd_con_list_get_all_ftp (con_list);
+    // GList *remote_cons = gnome_cmd_con_list_get_all_remote (con_list);
     // GList *dev_cons = gnome_cmd_con_list_get_all_dev (con_list);
 
     // Remove all old items
@@ -926,7 +926,7 @@ void gnome_cmd_main_menu_update_connections (GnomeCmdMainMenu *main_menu)
     for (GList *tmp = all_cons; tmp; tmp = tmp->next)
     {
         GnomeCmdCon *con = GNOME_CMD_CON (tmp->data);
-        if (!GNOME_CMD_IS_CON_FTP (con) || gnome_cmd_con_is_open (con))
+        if (!GNOME_CMD_IS_CON_REMOTE (con) || gnome_cmd_con_is_open (con))
         {
             add_connection (main_menu, con,
                             gnome_cmd_con_get_go_text (con),
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index be1233e..e6f25bc 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -1009,7 +1009,7 @@ gboolean GnomeCmdMainWin::key_pressed(GdkEventKey *event)
             case GDK_f:
             case GDK_F:
             {
-                GnomeCmdConFtp *con = GNOME_CMD_CON_FTP (gnome_cmd_con_list_get_all_ftp (gnome_cmd_con_list_get ())->data);
+                GnomeCmdConRemote *con = GNOME_CMD_CON_REMOTE (gnome_cmd_con_list_get_all_remote (gnome_cmd_con_list_get ())->data);
 
                 fs(ACTIVE)->set_connection(GNOME_CMD_CON (con));
             }
diff --git a/src/gnome-cmd-xml-config.cc b/src/gnome-cmd-xml-config.cc
index 5280a38..83e775a 100644
--- a/src/gnome-cmd-xml-config.cc
+++ b/src/gnome-cmd-xml-config.cc
@@ -551,7 +551,7 @@ static void xml_start(GMarkupParseContext *context,
                     g_warning ("<Connections> duplicate entry: '%s' - ignored", param1);
                 else
                 {
-                    GnomeCmdConFtp *server = gnome_cmd_con_ftp_new (param1, param2);
+                    GnomeCmdConRemote *server = gnome_cmd_con_remote_new (param1, param2);
 
                     if (server)
                         gnome_cmd_con_list_get()->add(server);



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