Skip to content

Commit 44cdc4c

Browse files
committed
Remove unused legacy settings
1 parent b74a27e commit 44cdc4c

File tree

2 files changed

+0
-55
lines changed

2 files changed

+0
-55
lines changed

data/gschema.xml

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<schemalist>
3-
<!-- Obsolete. Replaced with the timers schema. Will be removed at some point. -->
4-
<schema
5-
path="/com/github/elfenware/badger/reminders/"
6-
id="com.github.elfenware.badger.reminders"
7-
gettext-domain="com.github.elfenware.badger">
8-
<key name="all" type="b">
9-
<default>true</default>
10-
<summary>Global switch to control all reminders</summary>
11-
</key>
12-
<key name="eyes" type="b">
13-
<default>true</default>
14-
<summary>Remind the user to blink their eyes</summary>
15-
</key>
16-
<key name="fingers" type="b">
17-
<default>true</default>
18-
<summary>Remind the user to stretch their fingers</summary>
19-
</key>
20-
<key name="legs" type="b">
21-
<default>true</default>
22-
<summary>Remind the user to stretch their legs</summary>
23-
</key>
24-
<key name="arms" type="b">
25-
<default>true</default>
26-
<summary>Remind the user to stretch their arms</summary>
27-
</key>
28-
<key name="neck" type="b">
29-
<default>true</default>
30-
<summary>Remind the user to stretch their neck</summary>
31-
</key>
32-
</schema>
333
<schema
344
path="/com/github/elfenware/badger/timers/"
355
id="com.github.elfenware.badger.timers"
@@ -86,10 +56,6 @@
8656
<default>false</default>
8757
<summary>Whether to show the posture reminders</summary>
8858
</key>
89-
<key name="old-settings-replaced" type="b">
90-
<default>false</default>
91-
<summary>Whether the installation has switched to the newer custom timers instead of booleans</summary>
92-
</key>
9359
</schema>
9460
<schema
9561
path="/com/github/elfenware/badger/state/"

src/MainGrid.vala

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,6 @@ public class Badger.MainGrid : Gtk.Grid {
2424
public MainGrid (Reminder[] reminders) {
2525
var settings = new GLib.Settings ("com.github.elfenware.badger.timers");
2626

27-
/* GSettings migration code. Will be removed at some point. */
28-
if (!settings.get_boolean ("old-settings-replaced")) {
29-
var old_settings = new GLib.Settings ("com.github.elfenware.badger.reminders");
30-
var key_names = new string[5];
31-
key_names[0] = "eyes";
32-
key_names[1] = "fingers";
33-
key_names[2] = "legs";
34-
key_names[3] = "arms";
35-
key_names[4] = "neck";
36-
37-
foreach (string key in key_names) {
38-
bool old_value = old_settings.get_boolean (key);
39-
if (!old_value) {
40-
settings.set_uint (key, 0);
41-
}
42-
}
43-
44-
settings.set_boolean ("old-settings-replaced", true);
45-
}
46-
/* GSettings migration code ends. */
47-
4827
row_spacing = 4;
4928
column_spacing = 12;
5029
margin_bottom = 12;

0 commit comments

Comments
 (0)