[gnome-commander] Remove deprecated function for creating a gnome_cmd_dir object with GFileInfo instead of GnomeVFSFil



commit 5fd8313f41f3b13ce24096981c1ab5f92d407461
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Tue Jul 6 23:11:40 2021 +0200

    Remove deprecated function for creating a gnome_cmd_dir object with GFileInfo instead of GnomeVFSFileInfo 
object

 src/gnome-cmd-dir.cc      | 39 ---------------------------------------
 src/gnome-cmd-dir.h       |  1 -
 src/gnome-cmd-main-win.cc |  2 +-
 3 files changed, 1 insertion(+), 41 deletions(-)
---
diff --git a/src/gnome-cmd-dir.cc b/src/gnome-cmd-dir.cc
index a38f67e4..d31f8146 100644
--- a/src/gnome-cmd-dir.cc
+++ b/src/gnome-cmd-dir.cc
@@ -239,45 +239,6 @@ static void gnome_cmd_dir_class_init (GnomeCmdDirClass *klass)
  * Public functions
  ***********************************/
 
-GnomeCmdDir *gnome_cmd_dir_new_from_info (GnomeVFSFileInfo *info, GnomeCmdDir *parent)
-{
-    g_return_val_if_fail (info != nullptr, nullptr);
-    g_return_val_if_fail (GNOME_CMD_IS_DIR (parent), nullptr);
-
-    GnomeCmdCon *con = gnome_cmd_dir_get_connection (parent);
-    GnomeCmdPath *path =  gnome_cmd_dir_get_path (parent)->get_child(info->name);
-    if (!path)
-    {
-        return nullptr;
-    }
-
-    GnomeVFSURI *uri = gnome_cmd_con_create_uri (con, path);
-    gchar *uri_str = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_PASSWORD);
-
-    GnomeCmdDir *dir = gnome_cmd_con_cache_lookup (gnome_cmd_dir_get_connection (parent), uri_str);
-    g_free (uri_str);
-    gnome_vfs_uri_unref (uri);
-
-    if (dir)
-    {
-        delete path;
-        GNOME_CMD_FILE (dir)->update_info(info);
-        return dir;
-    }
-
-    dir = static_cast<GnomeCmdDir*> (g_object_new (GNOME_CMD_TYPE_DIR, nullptr));
-    gnome_cmd_file_setup (GNOME_CMD_FILE (dir), info, parent);
-
-    dir->priv->con = con;
-    gnome_cmd_dir_set_path (dir, path);
-    dir->priv->needs_mtime_update = FALSE;
-
-    gnome_cmd_con_add_to_cache (gnome_cmd_dir_get_connection (parent), dir);
-
-    return dir;
-}
-
-
 GnomeCmdDir *gnome_cmd_dir_new_from_gfileinfo (GFileInfo *gFileInfo, GnomeCmdDir *parent)
 {
     g_return_val_if_fail (gFileInfo != nullptr, nullptr);
diff --git a/src/gnome-cmd-dir.h b/src/gnome-cmd-dir.h
index a892aab7..df475307 100644
--- a/src/gnome-cmd-dir.h
+++ b/src/gnome-cmd-dir.h
@@ -85,7 +85,6 @@ struct GnomeCmdDirClass
 
 struct GnomeCmdCon;
 
-GnomeCmdDir *gnome_cmd_dir_new_from_info (GnomeVFSFileInfo *info, GnomeCmdDir *parent);
 GnomeCmdDir *gnome_cmd_dir_new_from_gfileinfo (GFileInfo *gFileInfo, GnomeCmdDir *parent);
 GnomeCmdDir *gnome_cmd_dir_new_with_con (GnomeCmdCon *con);
 GnomeCmdDir *gnome_cmd_dir_new (GnomeCmdCon *con, GnomeCmdPath *path, gboolean isStartup = false);
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index ec2bc2b8..900c99f9 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -1254,7 +1254,7 @@ void GnomeCmdMainWin::set_fs_directory_to_opposite(FileSelectorID fsID)
         GnomeCmdFile *file = other->file_list()->get_selected_file();
 
         if (file && (file->GetGfileAttributeUInt32(G_FILE_ATTRIBUTE_STANDARD_TYPE) == G_FILE_TYPE_DIRECTORY))
-            dir = GNOME_CMD_IS_DIR (file) ? GNOME_CMD_DIR (file) : gnome_cmd_dir_new_from_info (file->info, 
dir);
+            dir = GNOME_CMD_IS_DIR (file) ? GNOME_CMD_DIR (file) : gnome_cmd_dir_new_from_gfileinfo 
(file->gFileInfo, dir);
     }
 
     if (fselector->file_list()->locked)


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