[gnome-commander/ConfigurableFileListColumns: 5/26] Create method for getting the file list icon string
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/ConfigurableFileListColumns: 5/26] Create method for getting the file list icon string
- Date: Sun, 12 May 2019 13:18:19 +0000 (UTC)
commit 7bfbd4b43a3de21881bc843c8e5dc30cf8753354
Author: Uwe Scholz <u scholz83 gmx de>
Date: Fri May 3 22:33:51 2019 +0200
Create method for getting the file list icon string
src/gnome-cmd-file-list.cc | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index 7dcd8a82..7db188eb 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -309,13 +309,19 @@ struct FileFormatData
gchar FileFormatData::empty_string[] = "";
-FileFormatData::FileFormatData(GnomeCmdFileList *fl, GnomeCmdFile *f, gboolean tree_size)
+static char* GetGnomeCmdFileListIcon(GnomeCmdFile *f)
{
// If the user wants a character instead of icon for filetype set it now
if (gnome_cmd_data.options.layout == GNOME_CMD_LAYOUT_TEXT)
- text[GnomeCmdFileList::COLUMN_ICON] = (gchar *) f->get_type_string();
+ return (gchar *) f->get_type_string();
else
- text[GnomeCmdFileList::COLUMN_ICON] = nullptr;
+ return nullptr;
+}
+
+
+FileFormatData::FileFormatData(GnomeCmdFileList *fl, GnomeCmdFile *f, gboolean tree_size)
+{
+ text[GnomeCmdFileList::COLUMN_ICON] = GetGnomeCmdFileListIcon(f);
// Prepare the strings to show
gchar *t1 = f->get_path();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]