summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-04-16 00:59:04 +0200
committerraveit65 <[email protected]>2019-04-17 17:27:07 +0200
commit52532ffb9cea00d1bc8f29f4da14081d475b28ad (patch)
tree397fd9a27f38ffe7a8a730ea8eff9148ce2b0c17 /src/util.h
parent95cee02dfbaa0fc720e61872979e589b76ab62e6 (diff)
downloadmate-system-monitor-52532ffb9cea00d1bc8f29f4da14081d475b28ad.tar.bz2
mate-system-monitor-52532ffb9cea00d1bc8f29f4da14081d475b28ad.tar.xz
Use g_format_size or g_format_size_full
- IEC units for RAM - SI units for storage and network
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/util.h b/src/util.h
index 40934ae..9b1b498 100644
--- a/src/util.h
+++ b/src/util.h
@@ -46,13 +46,21 @@ namespace procman
{
gchar* format_duration_for_display(unsigned centiseconds);
- void size_cell_data_func(GtkTreeViewColumn *col, GtkCellRenderer *renderer,
- GtkTreeModel *model, GtkTreeIter *iter,
- gpointer user_data);
+ void memory_size_cell_data_func(GtkTreeViewColumn *col, GtkCellRenderer *renderer,
+ GtkTreeModel *model, GtkTreeIter *iter,
+ gpointer user_data);
+
+ void memory_size_na_cell_data_func(GtkTreeViewColumn *col, GtkCellRenderer *renderer,
+ GtkTreeModel *model, GtkTreeIter *iter,
+ gpointer user_data);
+
+ void storage_size_cell_data_func(GtkTreeViewColumn *col, GtkCellRenderer *renderer,
+ GtkTreeModel *model, GtkTreeIter *iter,
+ gpointer user_data);
- void size_na_cell_data_func(GtkTreeViewColumn *col, GtkCellRenderer *renderer,
- GtkTreeModel *model, GtkTreeIter *iter,
- gpointer user_data);
+ void storage_size_na_cell_data_func(GtkTreeViewColumn *col, GtkCellRenderer *renderer,
+ GtkTreeModel *model, GtkTreeIter *iter,
+ gpointer user_data);
void duration_cell_data_func(GtkTreeViewColumn *col, GtkCellRenderer *renderer,
GtkTreeModel *model, GtkTreeIter *iter,
@@ -113,14 +121,7 @@ namespace procman
tree_store_update<const char>(model, iter, column, new_value);
}
- gchar* format_size(guint64 size, guint64 max = 0, bool want_bits = false);
-
gchar* get_nice_level (gint nice);
-
- std::string format_rate(guint64 rate, guint64 max_rate = 0, bool want_bits = false);
-
- std::string format_network(guint64 rate, guint64 max_rate = 0);
- std::string format_network_rate(guint64 rate, guint64 max_rate = 0);
}