KiB = 1024 bytes
MiB = 1024 * 1024 bytes
GiB = 1024 * 1024 * 1024 bytes
Please be aware, I am no C programmer. I also saw some use of Mb and mb,
which might indicate Megabit.
Please double check if my assumptions are correct.
Reference:
https://en.wikipedia.org/wiki/Byte#Multiple-byte_units
If the desire is to use decimal units like KB, MB and GB,
the code would need to be changed to use 1000 for kilo.
That is way over my head and not a good task for me.
}
if (size < (gint64)1048576)
{
}
if (size < (gint64)1048576)
{
- return g_strdup_printf(_("%.1f K"), (gdouble)size / 1024.0);
+ return g_strdup_printf(_("%.1f KiB"), (gdouble)size / 1024.0);
}
if (size < (gint64)1073741824)
{
}
if (size < (gint64)1073741824)
{
- return g_strdup_printf(_("%.1f MB"), (gdouble)size / 1048576.0);
+ return g_strdup_printf(_("%.1f MiB"), (gdouble)size / 1048576.0);
}
/* to avoid overflowing the gdouble, do division in two steps */
size /= 1048576;
}
/* to avoid overflowing the gdouble, do division in two steps */
size /= 1048576;
- return g_strdup_printf(_("%.1f GB"), (gdouble)size / 1024.0);
+ return g_strdup_printf(_("%.1f GiB"), (gdouble)size / 1024.0);
}
/* note: returned string is valid until next call to text_from_time() */
}
/* note: returned string is valid until next call to text_from_time() */
g_object_class_install_property(gobject_class,
PROP_CACHE_SIZE_DISPLAY,
g_param_spec_uint("cache_display",
g_object_class_install_property(gobject_class,
PROP_CACHE_SIZE_DISPLAY,
g_param_spec_uint("cache_display",
- "Display cache size MB",
+ "Display cache size MiB",
*/
#define PR_MIN_SCALE_SIZE 8
*/
#define PR_MIN_SCALE_SIZE 8
-/* default size of tile cache (mb) */
+/* default size of tile cache (MiB) */
#define PR_CACHE_SIZE_DEFAULT 8
/* round A up/down to integer count of B */
#define PR_CACHE_SIZE_DEFAULT 8
/* round A up/down to integer count of B */
group = pref_group_new(vbox, FALSE, _("Image loading and caching"), GTK_ORIENTATION_VERTICAL);
group = pref_group_new(vbox, FALSE, _("Image loading and caching"), GTK_ORIENTATION_VERTICAL);
- pref_spin_new_int(group, _("Decoded image cache size (Mb):"), NULL,
+ pref_spin_new_int(group, _("Decoded image cache size (MiB):"), NULL,
0, 99999, 1, options->image.image_cache_max, &c_options->image.image_cache_max);
pref_checkbox_new_int(group, _("Preload next image"),
options->image.enable_read_ahead, &c_options->image.enable_read_ahead);
0, 99999, 1, options->image.image_cache_max, &c_options->image.image_cache_max);
pref_checkbox_new_int(group, _("Preload next image"),
options->image.enable_read_ahead, &c_options->image.enable_read_ahead);
pref_checkbox_link_sensitivity(ct_button, hbox);
pref_spacer(hbox, PREF_PAD_INDENT - PREF_PAD_GAP);
pref_checkbox_link_sensitivity(ct_button, hbox);
pref_spacer(hbox, PREF_PAD_INDENT - PREF_PAD_GAP);
- spin = pref_spin_new_int(hbox, _("Maximum size:"), _("MB"),
+ spin = pref_spin_new_int(hbox, _("Maximum size:"), _("MiB"),
0, 2048, 1, options->file_ops.safe_delete_folder_maxsize, &c_options->file_ops.safe_delete_folder_maxsize);
gtk_widget_set_tooltip_markup(spin, _("Set to 0 for unlimited size"));
button = pref_button_new(NULL, NULL, _("View"), FALSE,
0, 2048, 1, options->file_ops.safe_delete_folder_maxsize, &c_options->file_ops.safe_delete_folder_maxsize);
gtk_widget_set_tooltip_markup(spin, _("Set to 0 for unlimited size"));
button = pref_button_new(NULL, NULL, _("View"), FALSE,
RendererFuncs f;
PixbufRenderer *pr;
RendererFuncs f;
PixbufRenderer *pr;
- gint tile_cache_max; /* max mb to use for offscreen buffer */
+ gint tile_cache_max; /* max MiB to use for offscreen buffer */
gint tile_width;
gint tile_height;
gint tile_width;
gint tile_height;
{
gchar *buf2;
if (options->file_ops.safe_delete_folder_maxsize > 0)
{
gchar *buf2;
if (options->file_ops.safe_delete_folder_maxsize > 0)
- buf2 = g_strdup_printf(_(" (max. %d MB)"), options->file_ops.safe_delete_folder_maxsize);
+ buf2 = g_strdup_printf(_(" (max. %d MiB)"), options->file_ops.safe_delete_folder_maxsize);
else
buf2 = g_strdup("");
else
buf2 = g_strdup("");