summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2017-01-08 19:06:32 +0100
committerDave Andreoli <dave@gurumeditation.it>2017-01-08 19:06:32 +0100
commit127c1c88aaa030a83ddaada5c5e8b7154646f245 (patch)
tree1f418b232f474c48161a7058227db738d19ca256 /data
parent979416fc3c53d077520e807ae0a24362b6781367 (diff)
mem gadget: update to use a single msg from c code
Diffstat (limited to 'data')
-rw-r--r--data/elementary/themes/edc/memusage.edc7
1 files changed, 4 insertions, 3 deletions
diff --git a/data/elementary/themes/edc/memusage.edc b/data/elementary/themes/edc/memusage.edc
index 3472816..256beef 100644
--- a/data/elementary/themes/edc/memusage.edc
+++ b/data/elementary/themes/edc/memusage.edc
@@ -4,6 +4,7 @@ group { name: "e/modules/memusage/main";
4 script { 4 script {
5 public message(Msg_Type:type, id, ...) { 5 public message(Msg_Type:type, id, ...) {
6 if ((type == MSG_INT_SET) && (id == 1)) { 6 if ((type == MSG_INT_SET) && (id == 1)) {
7 // mem
7 new val = getarg(2); 8 new val = getarg(2);
8 if (val > (100 / 9 * 1)) set_state(PART:"mem_led1", "on", 0.0); 9 if (val > (100 / 9 * 1)) set_state(PART:"mem_led1", "on", 0.0);
9 else set_state(PART:"mem_led1", "off", 0.0); 10 else set_state(PART:"mem_led1", "off", 0.0);
@@ -21,9 +22,9 @@ group { name: "e/modules/memusage/main";
21 else set_state(PART:"mem_led7", "off", 0.0); 22 else set_state(PART:"mem_led7", "off", 0.0);
22 if (val > (100 / 9 * 8)) set_state(PART:"mem_led8", "on", 0.0); 23 if (val > (100 / 9 * 8)) set_state(PART:"mem_led8", "on", 0.0);
23 else set_state(PART:"mem_led8", "off", 0.0); 24 else set_state(PART:"mem_led8", "off", 0.0);
24 } 25
25 if ((type == MSG_INT_SET) && (id == 2)) { 26 // swap
26 new val = getarg(2); 27 val = getarg(3);
27 if (val > (100 / 9 * 1)) set_state(PART:"swp_led1", "on", 0.0); 28 if (val > (100 / 9 * 1)) set_state(PART:"swp_led1", "on", 0.0);
28 else set_state(PART:"swp_led1", "off", 0.0); 29 else set_state(PART:"swp_led1", "off", 0.0);
29 if (val > (100 / 9 * 2)) set_state(PART:"swp_led2", "on", 0.0); 30 if (val > (100 / 9 * 2)) set_state(PART:"swp_led2", "on", 0.0);