summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2018-03-24 13:09:47 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2018-03-30 12:51:46 +0200
commit85715707b1b88718d9cdd9935bdcee17e41dec9e (patch)
treefe642b81d9388825278d3daeaed63b8bef9491f4
parent1358dc6beba43365572122d5c89347c2491d2b13 (diff)
downloadnautilus-85715707b1b88718d9cdd9935bdcee17e41dec9e.tar.gz
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.
-rw-r--r--data/org.gnome.nautilus.gschema.xml2
-rw-r--r--src/nautilus-file.c2
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 '.'