[nautilus] preferences: Fix MB/MiB confusion



commit 85715707b1b88718d9cdd9935bdcee17e41dec9e
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Sat Mar 24 13:09:47 2018 +0100

    preferences: Fix MB/MiB confusion
    
    NAUTILUS_PREFERENCES_FILE_THUMBNAIL_LIMIT really uses MiB as its unit,
    not MB as we multiply its value by 1024*1024 (MEGA_TO_BASE_RATE) in
    thumbnail_limit_changed_callback(). This commit changes
    MEGA_TO_BASE_RATE and its maximum value so that it shows a number using
    MB unit as advertised.

 data/org.gnome.nautilus.gschema.xml | 2 +-
 src/nautilus-file.c                 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/data/org.gnome.nautilus.gschema.xml b/data/org.gnome.nautilus.gschema.xml
index cffe06661..3dc5f7deb 100644
--- a/data/org.gnome.nautilus.gschema.xml
+++ b/data/org.gnome.nautilus.gschema.xml
@@ -158,7 +158,7 @@
       <description>Speed trade-off for when to show a file as a thumbnail. If set to “always” then always 
thumbnail, even if the folder is on a remote server. If set to “local-only” then only show thumbnails for 
local file systems. If set to “never” then never bother to thumbnail files, just use a generic icon. Despite 
what the name may suggest, this applies to any previewable file type.</description>
     </key>
     <key type="t" name="thumbnail-limit">
-      <range max="4096"/>
+      <range max="5000"/>
       <default>10</default>
       <summary>Maximum image size for thumbnailing</summary>
       <description>Images over this size (in megabytes) won’t be thumbnailed. The purpose of this setting is 
to avoid thumbnailing large images that may take a long time to load or use lots of memory.</description>
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index d4463178d..abf8a5e5f 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -85,7 +85,7 @@
 #define DEBUG_REF_PRINTF printf
 #endif
 
-#define MEGA_TO_BASE_RATE 1048576
+#define MEGA_TO_BASE_RATE 1000000
 
 /* Files that start with these characters sort after files that don't. */
 #define SORT_LAST_CHAR1 '.'


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