summaryrefslogtreecommitdiff
path: root/src/file-manager/fm-list-model.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-07-25 22:32:36 +0800
committerraveit65 <[email protected]>2022-07-20 21:40:31 +0200
commit43c2460c03f30dbfe69f9bea2bf688de2303bd61 (patch)
tree00b5efe70c715e6bdae05ce3da7b9460b59ac8da /src/file-manager/fm-list-model.c
parent2b082d8a2aa4c5a02e60f970bf73434aa25234da (diff)
downloadcaja-43c2460c03f30dbfe69f9bea2bf688de2303bd61.tar.bz2
caja-43c2460c03f30dbfe69f9bea2bf688de2303bd61.tar.xz
Add preference option to hide icons in list view.
Diffstat (limited to 'src/file-manager/fm-list-model.c')
-rw-r--r--src/file-manager/fm-list-model.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/file-manager/fm-list-model.c b/src/file-manager/fm-list-model.c
index ef330913..a0ef8b0a 100644
--- a/src/file-manager/fm-list-model.c
+++ b/src/file-manager/fm-list-model.c
@@ -37,6 +37,7 @@
#include "../../eel/eel-graphic-effects.h"
#include "../../libcaja-private/caja-dnd.h"
+#include "../../libcaja-private/caja-global-preferences.h"
#include "fm-list-model.h"
@@ -321,6 +322,19 @@ fm_list_model_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, int column
case FM_LIST_MODEL_LARGE_ICON_COLUMN:
case FM_LIST_MODEL_LARGER_ICON_COLUMN:
case FM_LIST_MODEL_LARGEST_ICON_COLUMN:
+ if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_HIDE_ICON_IN_LIST_VIEW)) {
+ cairo_surface_t *surface;
+ int icon_size;
+
+ g_value_init (value, CAIRO_GOBJECT_TYPE_SURFACE);
+
+ zoom_level = fm_list_model_get_zoom_level_from_column_id (column);
+ icon_size = caja_get_icon_size_for_zoom_level (zoom_level);
+
+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, icon_size, icon_size);
+ g_value_take_boxed (value, surface);
+ break;
+ }
g_value_init (value, CAIRO_GOBJECT_TYPE_SURFACE);
if (file != NULL)