Portál AbcLinuxu, 10. května 2025 05:50
Řešení dotazu:
neviem ake ubuntu pouzivas, ale toto je typicke okno pri kopirovani (samozrejme so zmenenou temou a fontom).OT: Při kopírování/přesunu používám příkazy
cp
a mv
, které nic takového neprodukují. To bude zřejmě ten pravý důvod, proč jsem to dialogové okno nikdy neviděl.
Debaty jsem se zúčastnil jen proto, abych z tazatele vytáhl údaje o prostředí, důležité pro vyřešení problému někým jiným. Gnome nepoužívám.
apt-get source libglib2.0-0 cd /glib2.0-2.24.2/glibv souboru gfileutils.c je funkce
/** * g_format_size_for_display: * @size: a size in bytes. * * Formats a size (for example the size of a file) into a human readable string. * Sizes are rounded to the nearest size prefix (KB, MB, GB) and are displayed * rounded to the nearest tenth. E.g. the file size 3292528 bytes will be * converted into the string "3.1 MB". * * The prefix units base is 1024 (i.e. 1 KB is 1024 bytes). * * This string should be freed with g_free() when not needed any longer. * * Returns: a newly-allocated formatted string containing a human readable * file size. * * Since: 2.16 **/ char * g_format_size_for_display (goffset size) { if (size < (goffset) KILOBYTE_FACTOR) return g_strdup_printf (g_dngettext(GETTEXT_PACKAGE, "%u byte", "%u bytes",(guint) size), (guint) size); else { gdouble displayed_size; if (size < (goffset) MEGABYTE_FACTOR) { displayed_size = (gdouble) size / (gdouble) KILOBYTE_FACTOR; return g_strdup_printf (_("%.1f KB"), displayed_size); } else if (size < (goffset) GIGABYTE_FACTOR) { displayed_size = (gdouble) size / (gdouble) MEGABYTE_FACTOR; return g_strdup_printf (_("%.1f MB"), displayed_size); } else if (size < (goffset) TERABYTE_FACTOR) { displayed_size = (gdouble) size / (gdouble) GIGABYTE_FACTOR; return g_strdup_printf (_("%.1f GB"), displayed_size); } else if (size < (goffset) PETABYTE_FACTOR) { displayed_size = (gdouble) size / (gdouble) TERABYTE_FACTOR; return g_strdup_printf (_("%.1f TB"), displayed_size); } else if (size < (goffset) EXABYTE_FACTOR) { displayed_size = (gdouble) size / (gdouble) PETABYTE_FACTOR; return g_strdup_printf (_("%.1f PB"), displayed_size); } else { displayed_size = (gdouble) size / (gdouble) EXABYTE_FACTOR; return g_strdup_printf (_("%.1f EB"), displayed_size); } } }staci tedy oeditovat na neco na zpusob
char * g_format_size_for_display (goffset size) { if (size < (goffset) KILOBYTE_FACTOR) return g_strdup_printf (g_dngettext(GETTEXT_PACKAGE, "%u byte", "%u bytes",(guint) size), (guint) size); else { gdouble displayed_size; if (size < (goffset) MEGABYTE_FACTOR) { displayed_size = (gdouble) size / (gdouble) KILOBYTE_FACTOR; return g_strdup_printf (_("%.1f KB"), displayed_size); } else { displayed_size = (gdouble) size / (gdouble) MEGABYTE_FACTOR; return g_strdup_printf (_("%.2f MB"), displayed_size); } } }a uz jen nainstalovat zavislosti, zkompilovat a nainstalovat:
apt-get build-dep libglib2.0-0 cd .. ./configure make make install... hotovo ... screenshot prilozen :)
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.