gnome-commander r1882 - in branches/gcmd-1-3: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1882 - in branches/gcmd-1-3: . src
- Date: Thu, 17 Jul 2008 19:55:20 +0000 (UTC)
Author: epiotr
Date: Thu Jul 17 19:55:20 2008
New Revision: 1882
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1882&view=rev
Log:
Fixed problem #541404 (update of host names)
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.h
branches/gcmd-1-3/src/gnome-cmd-remote-dialog.cc
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 19:55:20 2008
@@ -645,6 +645,7 @@
gnome_cmd_con_set_alias (con, alias);
gnome_cmd_con_set_uri (con, conndlg->priv->uri_str);
+ gnome_cmd_con_set_host_name (con, host);
con->method = (ConnectionMethodID) gtk_combo_box_get_active (GTK_COMBO_BOX (conndlg->priv->type_combo));
con->gnome_auth = conndlg->priv->use_auth;
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 19:55:20 2008
@@ -289,6 +289,7 @@
gnome_cmd_con_set_alias (con, alias);
gnome_cmd_con_set_uri (con, text_uri);
+ gnome_cmd_con_set_host_name (con, host);
gnome_cmd_con_ftp_set_host_name (server, host);
gnome_cmd_con_ftp_set_host_port (server, port);
@@ -306,8 +307,6 @@
con->gnome_auth = !password && con->method!=CON_ANON_FTP; // ?????????
- con->open_msg = g_strdup_printf (_("Connecting to %s\n"), host);
-
gnome_vfs_uri_unref (uri);
return server;
@@ -344,6 +343,7 @@
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);
gnome_cmd_con_ftp_set_host_port (server, port);
@@ -353,8 +353,6 @@
con->gnome_auth = !password && con->method!=CON_ANON_FTP; // ?????????
- con->open_msg = g_strdup_printf (_("Connecting to %s\n"), host);
-
return server;
}
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 Thu Jul 17 19:55:20 2008
@@ -197,6 +197,18 @@
con->close_text = g_strdup_printf (_("Disconnect from: %s"), alias);
}
+inline void gnome_cmd_con_set_host_name (GnomeCmdCon *con, const gchar *host)
+{
+ g_return_if_fail (GNOME_CMD_IS_CON (con));
+ g_free (con->open_msg);
+ con->open_msg = g_strdup_printf (_("Connecting to %s\n"), host ? host : "<?>");
+}
+
+inline void gnome_cmd_con_set_host_name (GnomeCmdCon *con, const std::string &host)
+{
+ gnome_cmd_con_set_host_name (con, host.empty() ? NULL : host.c_str());
+}
+
void gnome_cmd_con_set_cwd (GnomeCmdCon *con, GnomeCmdDir *dir);
GnomeCmdDir *gnome_cmd_con_get_cwd (GnomeCmdCon *con);
Modified: branches/gcmd-1-3/src/gnome-cmd-remote-dialog.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-remote-dialog.cc (original)
+++ branches/gcmd-1-3/src/gnome-cmd-remote-dialog.cc Thu Jul 17 19:55:20 2008
@@ -301,16 +301,16 @@
static gint sort_by_method (GtkTreeModel *model, GtkTreeIter *i1, GtkTreeIter *i2, gpointer user_data)
{
- GnomeCmdConFtp *c1;
- GnomeCmdConFtp *c2;
+ GnomeCmdCon *c1;
+ GnomeCmdCon *c2;
- gtk_tree_model_get (model, i1, COL_FTP_CON, &c1, -1);
- gtk_tree_model_get (model, i2, COL_FTP_CON, &c2, -1);
+ gtk_tree_model_get (model, i1, COL_CON, &c1, -1);
+ gtk_tree_model_get (model, i2, COL_CON, &c2, -1);
- if (GNOME_CMD_CON(c1)->method==GNOME_CMD_CON(c2)->method)
+ if (c1->method==c2->method)
return sort_by_name (model, i1, i2, user_data);
- return int(GNOME_CMD_CON(c1)->method) - int(GNOME_CMD_CON(c2)->method);
+ return int(c1->method) - int(c2->method);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]