diff options
author | Wu Xiaotian <[email protected]> | 2019-07-25 22:32:36 +0800 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-07-27 20:08:46 +0000 |
commit | 25c9935c888006f8a540d7bcaadb99a9a52bf4d0 (patch) | |
tree | 2fc244ab5fdc3ce7409d8399d1b6644589985e95 /src/file-manager/fm-list-model.c | |
parent | d3af9ff752a3ec22670a19352c1e034c60288068 (diff) | |
download | caja-25c9935c888006f8a540d7bcaadb99a9a52bf4d0.tar.bz2 caja-25c9935c888006f8a540d7bcaadb99a9a52bf4d0.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.c | 14 |
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 d8b99aad..3b7f03b0 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) |