diff options
author | rbuj <[email protected]> | 2020-12-16 21:28:46 +0100 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2020-12-17 07:29:54 -0500 |
commit | c85a5cf5f08bee3706c0a450a971bfcdd2938a0d (patch) | |
tree | 9b9a238e4b0c4ee51bca59d0d6e41cf27170e68d /multiload/src/main.c | |
parent | 99d50b247e1ec9714ff5922cea60a29d1a864ff0 (diff) | |
download | mate-applets-c85a5cf5f08bee3706c0a450a971bfcdd2938a0d.tar.bz2 mate-applets-c85a5cf5f08bee3706c0a450a971bfcdd2938a0d.tar.xz |
multiload: use guint64 as data source for graphs
Diffstat (limited to 'multiload/src/main.c')
-rw-r--r-- | multiload/src/main.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/multiload/src/main.c b/multiload/src/main.c index e1b0481e..d27bef7a 100644 --- a/multiload/src/main.c +++ b/multiload/src/main.c @@ -189,7 +189,7 @@ multiload_change_orient_cb(MatePanelApplet *applet, gint arg1, gpointer data) static void multiload_destroy_cb(GtkWidget *widget, gpointer data) { - gint i; + guint i; MultiloadApplet *ma = data; for (i = 0; i < graph_n; i++) @@ -350,7 +350,7 @@ multiload_create_graphs(MultiloadApplet *ma) struct { const char *label; const char *visibility_key; const char *name; - int num_colours; + guint num_colours; LoadGraphDataFunc callback; } graph_types [graph_n] = { [graph_cpuload] = { _("CPU Load"), VIEW_CPULOAD_KEY, "cpuload", cpuload_n, GetLoad }, @@ -363,16 +363,16 @@ multiload_create_graphs(MultiloadApplet *ma) guint size; guint speed; - guint net_threshold1; - guint net_threshold2; - guint net_threshold3; + guint64 net_threshold1; + guint64 net_threshold2; + guint64 net_threshold3; gint i; speed = CLAMP (g_settings_get_uint (ma->settings, REFRESH_RATE_KEY), REFRESH_RATE_MIN, REFRESH_RATE_MAX); size = CLAMP (g_settings_get_uint (ma->settings, GRAPH_SIZE_KEY), GRAPH_SIZE_MIN, GRAPH_SIZE_MAX); - net_threshold1 = CLAMP (g_settings_get_uint (ma->settings, KEY_NET_THRESHOLD1), MIN_NET_THRESHOLD1, MAX_NET_THRESHOLD1); - net_threshold2 = CLAMP (g_settings_get_uint (ma->settings, KEY_NET_THRESHOLD2), MIN_NET_THRESHOLD2, MAX_NET_THRESHOLD2); - net_threshold3 = CLAMP (g_settings_get_uint (ma->settings, KEY_NET_THRESHOLD3), MIN_NET_THRESHOLD3, MAX_NET_THRESHOLD3); + net_threshold1 = CLAMP (g_settings_get_uint64 (ma->settings, KEY_NET_THRESHOLD1), MIN_NET_THRESHOLD1, MAX_NET_THRESHOLD1); + net_threshold2 = CLAMP (g_settings_get_uint64 (ma->settings, KEY_NET_THRESHOLD2), MIN_NET_THRESHOLD2, MAX_NET_THRESHOLD2); + net_threshold3 = CLAMP (g_settings_get_uint64 (ma->settings, KEY_NET_THRESHOLD3), MIN_NET_THRESHOLD3, MAX_NET_THRESHOLD3); if (net_threshold1 >= net_threshold2) { net_threshold1 = net_threshold2 - 1; @@ -411,7 +411,7 @@ multiload_create_graphs(MultiloadApplet *ma) void multiload_applet_refresh(MultiloadApplet *ma) { - gint i; + guint i; MatePanelAppletOrient orientation; /* stop and free the old graphs */ |