aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/src/ui/util/config.vala15
1 files changed, 12 insertions, 3 deletions
diff --git a/main/src/ui/util/config.vala b/main/src/ui/util/config.vala
index 4ca0d8a0..ce5a3c59 100644
--- a/main/src/ui/util/config.vala
+++ b/main/src/ui/util/config.vala
@@ -22,7 +22,10 @@ public class Config : Object {
get { return window_maximize_; }
set {
if (value == window_maximize_) return;
- db.settings.insert().or("REPLACE").value(db.settings.key, "window_maximized").value(db.settings.value, value.to_string()).perform();
+ db.settings.upsert()
+ .value(db.settings.key, "window_maximized", true)
+ .value(db.settings.value, value.to_string())
+ .perform();
window_maximize_ = value;
}
}
@@ -32,7 +35,10 @@ public class Config : Object {
get { return window_height_; }
set {
if (value == window_height_) return;
- db.settings.insert().or("REPLACE").value(db.settings.key, "window_height").value(db.settings.value, value.to_string()).perform();
+ db.settings.upsert()
+ .value(db.settings.key, "window_height", true)
+ .value(db.settings.value, value.to_string())
+ .perform();
window_height_ = value;
}
}
@@ -42,7 +48,10 @@ public class Config : Object {
get { return window_width_; }
set {
if (value == window_width_) return;
- db.settings.insert().or("REPLACE").value(db.settings.key, "window_width").value(db.settings.value, value.to_string()).perform();
+ db.settings.upsert()
+ .value(db.settings.key, "window_width", true)
+ .value(db.settings.value, value.to_string())
+ .perform();
window_width_ = value;
}
}