gnome-commander r1881 - in trunk: . doc/C src



Author: epiotr
Date: Thu Jul 17 19:52:59 2008
New Revision: 1881
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1881&view=rev

Log:
Fixed problem #541404 (update of host names)

Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/doc/C/gnome-commander.xml
   trunk/src/gnome-cmd-con-dialog.cc
   trunk/src/gnome-cmd-con-ftp.cc
   trunk/src/gnome-cmd-con.h
   trunk/src/gnome-cmd-remote-dialog.cc

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Thu Jul 17 19:52:59 2008
@@ -3,7 +3,8 @@
 ---------------
 
 Bug fixes:
- * Fixed problems #539753 (build error on Solaris)
+ * Fixed problem #539753 (build error on Solaris)
+ * Fixed problem #541404 (update of host names)
  * Fixed problem with file sorting in advanced file rename tool
  * Build fixes
 

Modified: trunk/doc/C/gnome-commander.xml
==============================================================================
--- trunk/doc/C/gnome-commander.xml	(original)
+++ trunk/doc/C/gnome-commander.xml	Thu Jul 17 19:52:59 2008
@@ -5918,7 +5918,10 @@
                 <para>
                     <itemizedlist>
                         <listitem>
-                            <para>Fixed problem 539753 (build error on Solaris)</para>
+                            <para>Fixed problem #539753 (build error on Solaris)</para>
+                        </listitem>
+                        <listitem>
+                            <para>Fixed problem #541404 (update of host names)</para>
                         </listitem>
                         <listitem>
                             <para>Fixed problem with file sorting in advanced file rename tool</para>

Modified: trunk/src/gnome-cmd-con-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-con-dialog.cc	(original)
+++ trunk/src/gnome-cmd-con-dialog.cc	Thu Jul 17 19:52:59 2008
@@ -644,6 +644,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: trunk/src/gnome-cmd-con-ftp.cc
==============================================================================
--- trunk/src/gnome-cmd-con-ftp.cc	(original)
+++ trunk/src/gnome-cmd-con-ftp.cc	Thu Jul 17 19:52:59 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: trunk/src/gnome-cmd-con.h
==============================================================================
--- trunk/src/gnome-cmd-con.h	(original)
+++ trunk/src/gnome-cmd-con.h	Thu Jul 17 19:52:59 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: trunk/src/gnome-cmd-remote-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-remote-dialog.cc	(original)
+++ trunk/src/gnome-cmd-remote-dialog.cc	Thu Jul 17 19:52:59 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]