summaryrefslogtreecommitdiff
path: root/multiload/src/main.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-12-10 12:27:53 +0100
committerVictor Kareh <[email protected]>2020-12-17 07:29:54 -0500
commitb3ef7cce4a6390eec5058d2308070fbe072ad8f4 (patch)
treeb2fe306d711bc18aca935bf125e2bb980e89854f /multiload/src/main.c
parentca954c08f78e07193168f902af46ba5ce8ea96b5 (diff)
downloadmate-applets-b3ef7cce4a6390eec5058d2308070fbe072ad8f4.tar.bz2
mate-applets-b3ef7cce4a6390eec5058d2308070fbe072ad8f4.tar.xz
multiload: increase refresh rate range setting
Diffstat (limited to 'multiload/src/main.c')
-rw-r--r--multiload/src/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/multiload/src/main.c b/multiload/src/main.c
index e2cfe6bd..12363fe8 100644
--- a/multiload/src/main.c
+++ b/multiload/src/main.c
@@ -361,14 +361,15 @@ multiload_create_graphs(MultiloadApplet *ma)
[graph_diskload] = { _("Disk Load"), VIEW_DISKLOAD_KEY, "diskload", diskload_n, GetDiskLoad }
};
- gint speed, size;
+ gint size;
+ guint speed;
guint net_threshold1;
guint net_threshold2;
guint net_threshold3;
gint i;
- speed = g_settings_get_int (ma->settings, "speed");
- size = g_settings_get_int (ma->settings, "size");
+ speed = CLAMP (g_settings_get_uint (ma->settings, REFRESH_RATE_KEY), REFRESH_RATE_MIN, REFRESH_RATE_MAX);
+ size = CLAMP (g_settings_get_int (ma->settings, "size"), 10, 400);
net_threshold1 = CLAMP (g_settings_get_uint (ma->settings, "netthreshold1"), MIN_NET_THRESHOLD1, MAX_NET_THRESHOLD1);
net_threshold2 = CLAMP (g_settings_get_uint (ma->settings, "netthreshold2"), MIN_NET_THRESHOLD2, MAX_NET_THRESHOLD2);
net_threshold3 = CLAMP (g_settings_get_uint (ma->settings, "netthreshold3"), MIN_NET_THRESHOLD3, MAX_NET_THRESHOLD3);
@@ -380,8 +381,6 @@ multiload_create_graphs(MultiloadApplet *ma)
{
net_threshold3 = net_threshold2 + 1;
}
- speed = MAX (speed, 50);
- size = CLAMP (size, 10, 400);
for (i = 0; i < graph_n; i++)
{