[gnome-commander/ConfigurableFileListColumns] Create method for getting the directory size string of a file in the file list
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/ConfigurableFileListColumns] Create method for getting the directory size string of a file in the file list
- Date: Sat, 4 May 2019 14:24:57 +0000 (UTC)
commit a6431f5370bf069a0d716c41a398bb5a2f8c88ae
Author: Uwe Scholz <u scholz83 gmx de>
Date: Sat May 4 16:24:22 2019 +0200
Create method for getting the directory size string of a file in the file list
src/gnome-cmd-file-list.cc | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index a10681e4..8eb0eee8 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -362,6 +362,11 @@ static gchar* GetGnomeCmdFileListDirString(GnomeCmdFileList *fl, GnomeCmdFile *f
return returnValue;
}
+static gchar* GetGnomeCmdFileListSize(GnomeCmdFile *f, gboolean tree_size)
+{
+ return tree_size ? (gchar *) f->get_tree_size_as_str() : (gchar *) f->get_size();
+}
+
FileFormatData::FileFormatData(GnomeCmdFileList *fl, GnomeCmdFile *f, gboolean tree_size)
{
@@ -373,7 +378,7 @@ FileFormatData::FileFormatData(GnomeCmdFileList *fl, GnomeCmdFile *f, gboolean t
DEBUG ('l', "FileFormatData text[GnomeCmdFileList::COLUMN_DIR]=[%s]\n",
text[GnomeCmdFileList::COLUMN_DIR]);
- text[GnomeCmdFileList::COLUMN_SIZE] = tree_size ? (gchar *) f->get_tree_size_as_str() : (gchar *)
f->get_size();
+ text[GnomeCmdFileList::COLUMN_SIZE] = GetGnomeCmdFileListSize(f, tree_size);
if (f->info->type != GNOME_VFS_FILE_TYPE_DIRECTORY || !f->is_dotdot)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]