summaryrefslogtreecommitdiffstats
path: root/Settings.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2020-08-20 14:42:18 +1000
committerNathan Scott <nathans@redhat.com>2020-08-20 14:42:18 +1000
commit011125dab2338acac9c4bbc7b04604f01f40e54b (patch)
tree0ca61ef6b8049efc6dcd26a6e491fe3ad68bd730 /Settings.c
parentab61ae3963e7181f382cd5240d4a2a928b8b5f82 (diff)
parent7858ee6cee4c1633865fc70e037b56d0c9c8388e (diff)
Merge branch 'hishamhm-pull-923'
Diffstat (limited to 'Settings.c')
-rw-r--r--Settings.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Settings.c b/Settings.c
index fea6c3b7..69a94a8b 100644
--- a/Settings.c
+++ b/Settings.c
@@ -58,6 +58,7 @@ typedef struct Settings_ {
bool updateProcessNames;
bool accountGuestInCPUMeter;
bool headerMargin;
+ bool enableMouse;
bool changed;
} Settings;
@@ -232,6 +233,8 @@ static bool Settings_read(Settings* this, const char* fileName) {
} else if (String_eq(option[0], "color_scheme")) {
this->colorScheme = atoi(option[1]);
if (this->colorScheme < 0 || this->colorScheme >= LAST_COLORSCHEME) this->colorScheme = 0;
+ } else if (String_eq(option[0], "enable_mouse")) {
+ this->enableMouse = atoi(option[1]);
} else if (String_eq(option[0], "left_meters")) {
Settings_readMeters(this, option[1], 0);
didReadMeters = true;
@@ -315,6 +318,7 @@ bool Settings_write(Settings* this) {
fprintf(fd, "update_process_names=%d\n", (int) this->updateProcessNames);
fprintf(fd, "account_guest_in_cpu_meter=%d\n", (int) this->accountGuestInCPUMeter);
fprintf(fd, "color_scheme=%d\n", (int) this->colorScheme);
+ fprintf(fd, "enable_mouse=%d\n", (int) this->enableMouse);
fprintf(fd, "delay=%d\n", (int) this->delay);
fprintf(fd, "left_meters="); writeMeters(this, fd, 0);
fprintf(fd, "left_meter_modes="); writeMeterModes(this, fd, 0);
@@ -390,6 +394,7 @@ Settings* Settings_new(int cpuCount) {
CRT_restorePrivileges();
}
this->colorScheme = 0;
+ this->enableMouse = true;
this->changed = false;
this->delay = DEFAULT_DELAY;
bool ok = false;