[Bf-blender-cvs] [6d4b311888d] master: UI: File Browser Sizes in Binary for Windows

Harley Acheson noreply at git.blender.org
Mon Sep 9 17:31:19 CEST 2019


Commit: 6d4b311888d01f32381d8838a440981134613d40
Author: Harley Acheson
Date:   Mon Sep 9 08:29:21 2019 -0700
Branches: master
https://developer.blender.org/rB6d4b311888d01f32381d8838a440981134613d40

UI: File Browser Sizes in Binary for Windows

This adds per-platform change so Windows users will see file sizes calculated with a base of 1024.

Differential Revision: https://developer.blender.org/D5714

Reviewed by Brecht Van Lommel

===================================================================

M	release/scripts/addons
M	release/scripts/addons_contrib
M	source/blender/blenlib/intern/BLI_filelist.c
M	source/blender/editors/space_file/filesel.c
M	source/tools

===================================================================

diff --git a/release/scripts/addons b/release/scripts/addons
index c3348263dc2..14abe13dc89 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit c3348263dc26d6272db88ed94b73caa3ddb3a3fd
+Subproject commit 14abe13dc890ba8fc7f78723ad67533ec2146aff
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index 7cba50c84cd..c646ac7c009 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit 7cba50c84cd415cbdfc900ee2c4e7b3f59d5214c
+Subproject commit c646ac7c00965d9a117e50a066b777f5691028b9
diff --git a/source/blender/blenlib/intern/BLI_filelist.c b/source/blender/blenlib/intern/BLI_filelist.c
index 3c53d1eee1b..a3b745fd63e 100644
--- a/source/blender/blenlib/intern/BLI_filelist.c
+++ b/source/blender/blenlib/intern/BLI_filelist.c
@@ -271,7 +271,11 @@ void BLI_filelist_entry_size_to_string(const struct stat *st,
    * everyone starts using __USE_FILE_OFFSET64 or equivalent.
    */
   double size = (double)(st ? st->st_size : sz);
+#ifdef WIN32
+  BLI_str_format_byte_unit(r_size, size, false);
+#else
   BLI_str_format_byte_unit(r_size, size, true);
+#endif
 }
 
 /**
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index be8ebc18c2c..e54f13e9356 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -639,7 +639,7 @@ static void file_attribute_columns_widths(const FileSelectParams *params, FileLa
   columns[COLUMN_DATETIME].width = file_string_width(small_size ? "23/08/89" :
                                                                   "23 Dec 6789, 23:59") +
                                    pad;
-  columns[COLUMN_SIZE].width = file_string_width(small_size ? "98.7 M" : "098.7 MB") + pad;
+  columns[COLUMN_SIZE].width = file_string_width(small_size ? "98.7 M" : "098.7 MiB") + pad;
   if (params->display == FILE_IMGDISPLAY) {
     columns[COLUMN_NAME].width = ((float)params->thumbnail_size / 8.0f) * UI_UNIT_X;
   }
diff --git a/source/tools b/source/tools
index 2550eda6bce..7b740545cd0 160000
--- a/source/tools
+++ b/source/tools
@@ -1 +1 @@
-Subproject commit 2550eda6bcefad45289acbb4b8e52107e742ce1f
+Subproject commit 7b740545cd039ddcadbfb9bffcac842476eee271



More information about the Bf-blender-cvs mailing list