gnome-system-monitor r2394 - trunk/src
- From: bdejean svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-system-monitor r2394 - trunk/src
- Date: Mon, 21 Apr 2008 17:51:19 +0100 (BST)
Author: bdejean
Date: Mon Apr 21 16:51:19 2008
New Revision: 2394
URL: http://svn.gnome.org/viewvc/gnome-system-monitor?rev=2394&view=rev
Log:
s/SI_gnome_vfs_format_file_size_for_display/procman::format_size/g
Modified:
trunk/src/load-graph.cpp
trunk/src/sysinfo.cpp
trunk/src/util.cpp
trunk/src/util.h
Modified: trunk/src/load-graph.cpp
==============================================================================
--- trunk/src/load-graph.cpp (original)
+++ trunk/src/load-graph.cpp Mon Apr 21 16:51:19 2008
@@ -320,8 +320,8 @@
char* total_text;
char* text;
- used_text = SI_gnome_vfs_format_file_size_for_display(used);
- total_text = SI_gnome_vfs_format_file_size_for_display(total);
+ used_text = procman::format_size(used);
+ total_text = procman::format_size(total);
// xgettext: 540MiB (53 %) of 1.0 GiB
text = g_strdup_printf(_("%s (%.1f %%) of %s"), used_text, 100.0 * percent, total_text);
gtk_label_set_text(label, text);
@@ -501,13 +501,13 @@
gtk_label_set_text (GTK_LABEL (g->labels.net_in), procman::format_rate(din).c_str());
- text1 = SI_gnome_vfs_format_file_size_for_display (in);
+ text1 = procman::format_size (in);
gtk_label_set_text (GTK_LABEL (g->labels.net_in_total), text1);
g_free (text1);
gtk_label_set_text (GTK_LABEL (g->labels.net_out), procman::format_rate(dout).c_str());
- text1 = SI_gnome_vfs_format_file_size_for_display (out);
+ text1 = procman::format_size (out);
gtk_label_set_text (GTK_LABEL (g->labels.net_out_total), text1);
g_free (text1);
}
Modified: trunk/src/sysinfo.cpp
==============================================================================
--- trunk/src/sysinfo.cpp (original)
+++ trunk/src/sysinfo.cpp Mon Apr 21 16:51:19 2008
@@ -546,7 +546,7 @@
GTK_FILL, GTK_FILL, 0, 0
);
- markup = SI_gnome_vfs_format_file_size_for_display(data->memory_bytes);
+ markup = procman::format_size(data->memory_bytes);
memory_label = gtk_label_new(markup);
g_free(markup);
gtk_misc_set_alignment(GTK_MISC(memory_label), 0.0, 0.5);
@@ -612,7 +612,7 @@
GTK_FILL, GTK_FILL, 0, 0
);
- markup = SI_gnome_vfs_format_file_size_for_display(data->free_space_bytes);
+ markup = procman::format_size(data->free_space_bytes);
disk_space_label = gtk_label_new(markup);
g_free(markup);
gtk_misc_set_alignment(GTK_MISC(disk_space_label), 0.0, 0.5);
Modified: trunk/src/util.cpp
==============================================================================
--- trunk/src/util.cpp (original)
+++ trunk/src/util.cpp Mon Apr 21 16:51:19 2008
@@ -142,7 +142,7 @@
/**
- * SI_gnome_vfs_format_file_size_for_display:
+ * procman::format_size:
* @size:
*
* Formats the file size passed in @bytes in a way that is easy for
@@ -153,7 +153,7 @@
**/
gchar*
-SI_gnome_vfs_format_file_size_for_display (GnomeVFSFileSize size, GnomeVFSFileSize max_size)
+procman::format_size(GnomeVFSFileSize size, GnomeVFSFileSize max_size)
{
if (max_size == 0)
max_size = size;
@@ -310,7 +310,7 @@
g_value_unset(&value);
- char *str = SI_gnome_vfs_format_file_size_for_display(size);
+ char *str = procman::format_size(size);
g_object_set(renderer, "text", str, NULL);
g_free(str);
}
@@ -348,7 +348,7 @@
if (size == 0)
g_object_set(renderer, "markup", _("<i>N/A</i>"), NULL);
else {
- char *str = SI_gnome_vfs_format_file_size_for_display(size);
+ char *str = procman::format_size(size);
g_object_set(renderer, "text", str, NULL);
g_free(str);
}
@@ -461,7 +461,7 @@
std::string format_rate(GnomeVFSFileSize rate, GnomeVFSFileSize max_rate)
{
- char* bytes = SI_gnome_vfs_format_file_size_for_display(rate, max_rate);
+ char* bytes = procman::format_size(rate, max_rate);
// xgettext: rate, 10MiB/s
return make_string(g_strdup_printf(_("%s/s"), bytes));
}
Modified: trunk/src/util.h
==============================================================================
--- trunk/src/util.h (original)
+++ trunk/src/util.h Mon Apr 21 16:51:19 2008
@@ -33,11 +33,6 @@
const char *process_name,
unsigned pid);
-
-gchar*
-SI_gnome_vfs_format_file_size_for_display (GnomeVFSFileSize size, GnomeVFSFileSize max = 0);
-
-
gboolean
load_symbols(const char *module, ...) G_GNUC_NULL_TERMINATED;
@@ -140,6 +135,7 @@
}
+ gchar* format_size(GnomeVFSFileSize size, GnomeVFSFileSize max = 0);
std::string format_rate(GnomeVFSFileSize rate, GnomeVFSFileSize max_rate = 0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]