File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6310,10 +6310,8 @@ nemo_file_get_size_as_string_with_real_size (NemoFile *file)
63106310 return NULL ;
63116311 }
63126312
6313- /* If base-2 or base-2-full, then prefix will be 2 (i.e. base-2), if base-10 or base-10-long
6314- then prefix will be 0 (i.e. base-0). Prefix will be added to LONG_FORMAT */
6315- prefix = nemo_global_preferences_get_size_prefix_preference () * 2 ;
6316- return g_format_size_full (file -> details -> size , G_FORMAT_SIZE_LONG_FORMAT + prefix );
6313+ prefix = nemo_global_preferences_get_size_prefix_preference ();
6314+ return g_format_size_full (file -> details -> size , prefix );
63176315}
63186316
63196317
Original file line number Diff line number Diff line change @@ -112,7 +112,18 @@ nemo_global_preferences_get_inherit_show_thumbnails_preference (void)
112112int
113113nemo_global_preferences_get_size_prefix_preference (void )
114114{
115- return size_prefixes_preference ;
115+ switch (size_prefixes_preference ) {
116+ case 0 : // base-10
117+ return G_FORMAT_SIZE_DEFAULT ;
118+ case 1 : // base-10 full
119+ return G_FORMAT_SIZE_DEFAULT | G_FORMAT_SIZE_LONG_FORMAT ;
120+ case 2 : // base-2
121+ return G_FORMAT_SIZE_DEFAULT | G_FORMAT_SIZE_IEC_UNITS ;
122+ case 3 : // base-2 full
123+ return G_FORMAT_SIZE_DEFAULT | G_FORMAT_SIZE_IEC_UNITS | G_FORMAT_SIZE_LONG_FORMAT ;
124+ }
125+
126+ return 0 ;
116127}
117128
118129char *
You can’t perform that action at this time.
0 commit comments