[gnome-commander] noop: code cleanup



commit 01323fd2d8e5a5650809409020d19d3573738361
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Thu Apr 14 20:07:10 2011 +0200

    noop: code cleanup

 src/gnome-cmd-con-device.cc    |    3 +--
 src/gnome-cmd-con-home.cc      |    3 +--
 src/gnome-cmd-con.cc           |    9 ---------
 src/gnome-cmd-search-dialog.cc |    1 +
 4 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/src/gnome-cmd-con-device.cc b/src/gnome-cmd-con-device.cc
index d7cec3a..b590c36 100644
--- a/src/gnome-cmd-con-device.cc
+++ b/src/gnome-cmd-con-device.cc
@@ -278,8 +278,7 @@ static GnomeVFSURI *dev_create_uri (GnomeCmdCon *con, GnomeCmdPath *path)
 
     GnomeCmdConDevice *dev_con = GNOME_CMD_CON_DEVICE (con);
 
-    const gchar *path_str = path->get_path();
-    gchar *p = g_build_filename (dev_con->priv->mountp, path_str, NULL);
+    gchar *p = g_build_filename (dev_con->priv->mountp, path->get_path(), NULL);
     GnomeVFSURI *u1 = gnome_vfs_uri_new ("file:");
     GnomeVFSURI *u2 = gnome_vfs_uri_append_path (u1, p);
     gnome_vfs_uri_unref (u1);
diff --git a/src/gnome-cmd-con-home.cc b/src/gnome-cmd-con-home.cc
index 1bf7c8c..9c7e1af 100644
--- a/src/gnome-cmd-con-home.cc
+++ b/src/gnome-cmd-con-home.cc
@@ -122,8 +122,7 @@ static void init (GnomeCmdConHome *home_con)
     con->open_pixmap = gnome_cmd_pixmap_new_from_icon ("gnome-fs-home", dev_icon_size);
     con->close_pixmap = gnome_cmd_pixmap_new_from_icon ("gnome-fs-home", dev_icon_size);
 
-    GnomeCmdPath *path = new GnomeCmdPlainPath(g_get_home_dir ());
-    GnomeCmdDir *dir = gnome_cmd_dir_new (con, path);
+    GnomeCmdDir *dir = gnome_cmd_dir_new (con, new GnomeCmdPlainPath(g_get_home_dir ()));
 
     gnome_cmd_con_set_default_dir (con, dir);
 }
diff --git a/src/gnome-cmd-con.cc b/src/gnome-cmd-con.cc
index fdf36e5..99dff78 100644
--- a/src/gnome-cmd-con.cc
+++ b/src/gnome-cmd-con.cc
@@ -355,15 +355,6 @@ GnomeCmdDir *gnome_cmd_con_get_default_dir (GnomeCmdCon *con)
 {
     g_return_val_if_fail (GNOME_CMD_IS_CON (con), NULL);
 
-    /*
-    if (!con->priv->default_dir)
-    {
-        GnomeCmdDir *dir = gnome_cmd_dir_new (con, con->base_path);
-        if (dir)
-            gnome_cmd_con_set_default_dir (con, dir);
-    }
-    */
-
     return con->priv->default_dir;
 }
 
diff --git a/src/gnome-cmd-search-dialog.cc b/src/gnome-cmd-search-dialog.cc
index 5354ed4..5d41702 100755
--- a/src/gnome-cmd-search-dialog.cc
+++ b/src/gnome-cmd-search-dialog.cc
@@ -146,6 +146,7 @@ inline void search_file_data_free (SearchFileData  *searchfile_data)
     g_free (searchfile_data);
 }
 
+
 /**
  * Loads a file in chunks and returns the content.
  */



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