mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-30 20:33:08 +02:00
Rename g_format_file_size_for_display to g_format_size_for_display.
2007-12-19 Alexander Larsson <alexl@redhat.com> * glib/gfileutils.[ch]: * glib/glib.symbols: Rename g_format_file_size_for_display to g_format_size_for_display. svn path=/trunk/; revision=6158
This commit is contained in:
parent
13f33931fc
commit
de9c37dd91
@ -1,3 +1,9 @@
|
|||||||
|
2007-12-19 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* glib/gfileutils.[ch]:
|
||||||
|
* glib/glib.symbols:
|
||||||
|
Rename g_format_file_size_for_display to g_format_size_for_display.
|
||||||
|
|
||||||
2007-12-18 Tim-Philipp Müller <tim at centricular dot net>
|
2007-12-18 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* docs/reference/glib/glib-sections.txt:
|
* docs/reference/glib/glib-sections.txt:
|
||||||
|
@ -1805,20 +1805,22 @@ g_build_filename (const gchar *first_element,
|
|||||||
#define GIGABYTE_FACTOR (1024.0 * 1024.0 * 1024.0)
|
#define GIGABYTE_FACTOR (1024.0 * 1024.0 * 1024.0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_format_file_size_for_display:
|
* g_format_size_for_display:
|
||||||
* @size: a file size.
|
* @size: a size in bytes.
|
||||||
*
|
*
|
||||||
* Formats a file size into a human readable string. Sizes are rounded
|
* Formats a size (for example the size of a file) into a human readable string.
|
||||||
* to the nearest metric prefix and are displayed rounded to the nearest
|
* Sizes are rounded to the nearest size prefix (KB, MB, GB) and are displayed rounded to
|
||||||
* tenth. E.g. the file size 3292528 bytes will be converted into the string
|
* the nearest tenth. E.g. the file size 3292528 bytes will be converted into
|
||||||
* "3.1 MB".
|
* the string "3.1 MB".
|
||||||
|
*
|
||||||
|
* The prefix units base is 1024 (i.e. 1 KB is 1024 bytes).
|
||||||
*
|
*
|
||||||
* Returns: a formatted string containing a human readable file size.
|
* Returns: a formatted string containing a human readable file size.
|
||||||
*
|
*
|
||||||
* Since: 2.16
|
* Since: 2.16
|
||||||
**/
|
**/
|
||||||
char *
|
char *
|
||||||
g_format_file_size_for_display (goffset size)
|
g_format_size_for_display (goffset size)
|
||||||
{
|
{
|
||||||
if (size < (goffset) KILOBYTE_FACTOR)
|
if (size < (goffset) KILOBYTE_FACTOR)
|
||||||
return g_strdup_printf (dngettext(GETTEXT_PACKAGE, "%u byte", "%u bytes",(guint) size), (guint) size);
|
return g_strdup_printf (dngettext(GETTEXT_PACKAGE, "%u byte", "%u bytes",(guint) size), (guint) size);
|
||||||
|
@ -101,7 +101,7 @@ gint g_file_open_tmp (const gchar *tmpl,
|
|||||||
gchar **name_used,
|
gchar **name_used,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
char *g_format_file_size_for_display (goffset size);
|
char *g_format_size_for_display (goffset size);
|
||||||
|
|
||||||
gchar *g_build_path (const gchar *separator,
|
gchar *g_build_path (const gchar *separator,
|
||||||
const gchar *first_element,
|
const gchar *first_element,
|
||||||
|
@ -351,7 +351,7 @@ g_file_set_contents
|
|||||||
g_file_open_tmp PRIVATE
|
g_file_open_tmp PRIVATE
|
||||||
g_file_test PRIVATE
|
g_file_test PRIVATE
|
||||||
g_file_read_link
|
g_file_read_link
|
||||||
g_format_file_size_for_display
|
g_format_size_for_display
|
||||||
g_mkstemp PRIVATE
|
g_mkstemp PRIVATE
|
||||||
g_mkdir_with_parents
|
g_mkdir_with_parents
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user