diff options
author | rbuj <[email protected]> | 2020-07-15 01:04:01 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-07-26 11:11:51 +0200 |
commit | 626b731a6bcd701bf16b1164972eb11af344271c (patch) | |
tree | 65562f149820cf96cc8e8b14faa82fd97fba2c2b /multiload/properties.c | |
parent | e1e531145476d424ef7a882447fd411d18a974e8 (diff) | |
download | mate-applets-626b731a6bcd701bf16b1164972eb11af344271c.tar.bz2 mate-applets-626b731a6bcd701bf16b1164972eb11af344271c.tar.xz |
multiload: Do not add the same global variables within all graphs
Diffstat (limited to 'multiload/properties.c')
-rw-r--r-- | multiload/properties.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/multiload/properties.c b/multiload/properties.c index de4c060b..8849943c 100644 --- a/multiload/properties.c +++ b/multiload/properties.c @@ -185,45 +185,45 @@ spin_button_changed_cb(GtkWidget *widget, gpointer name) case PROP_NET_THRESHOLD1: g_settings_set_uint (ma->settings, (gchar *)name, value); - if (value >= ma->graphs[2]->net_threshold2) + if (value >= ma->net_threshold2) { gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), (gdouble)g_settings_get_uint (ma->settings, "netthreshold2") - 1); - ma->graphs[2]->net_threshold1 = g_settings_get_uint (ma->settings, "netthreshold2") - 1; + ma->net_threshold1 = g_settings_get_uint (ma->settings, "netthreshold2") - 1; } else - ma->graphs[2]->net_threshold1 = value; + ma->net_threshold1 = value; break; case PROP_NET_THRESHOLD2: g_settings_set_uint (ma->settings, (gchar *)name, value); - if (value >= ma->graphs[2]->net_threshold3) + if (value >= ma->net_threshold3) { gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), (gdouble)g_settings_get_uint (ma->settings, "netthreshold3") - 1); - ma->graphs[2]->net_threshold2 = g_settings_get_uint (ma->settings, "netthreshold3") - 1; + ma->net_threshold2 = g_settings_get_uint (ma->settings, "netthreshold3") - 1; } - else if (value <= ma->graphs[2]->net_threshold1) + else if (value <= ma->net_threshold1) { gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), (gdouble)g_settings_get_uint (ma->settings, "netthreshold1") + 1); - ma->graphs[2]->net_threshold2 = g_settings_get_uint (ma->settings, "netthreshold1") + 1; + ma->net_threshold2 = g_settings_get_uint (ma->settings, "netthreshold1") + 1; } else - ma->graphs[2]->net_threshold2 = value; + ma->net_threshold2 = value; break; case PROP_NET_THRESHOLD3: g_settings_set_uint (ma->settings, (gchar *)name, value); - if (value <= ma->graphs[2]->net_threshold2) + if (value <= ma->net_threshold2) { gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), (gdouble)g_settings_get_uint (ma->settings, "netthreshold2") + 1); - ma->graphs[2]->net_threshold3 = g_settings_get_uint (ma->settings, "netthreshold2") + 1; + ma->net_threshold3 = g_settings_get_uint (ma->settings, "netthreshold2") + 1; } else - ma->graphs[2]->net_threshold3 = value; + ma->net_threshold3 = value; break; default: g_assert_not_reached(); |