Skip to content

Commit c70ac08

Browse files
committed
Fix test schema compilation and harden settings infrastructure
1 parent 7a9df73 commit c70ac08

15 files changed

Lines changed: 51 additions & 205 deletions

data/meson.build

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@ plank_appdata = i18n.merge_file(
77
install_dir: join_paths(data_dir, 'metainfo'),
88
)
99

10-
plank_gschema = configure_file(
11-
input: 'net.launchpad.plank.gschema.xml.in',
12-
output: 'net.launchpad.plank.gschema.xml',
13-
configuration: customconf,
14-
install: true,
10+
install_data(
11+
'net.launchpad.plank.gschema.xml',
1512
install_dir: join_paths(data_dir, 'glib-2.0', 'schemas'),
1613
)
1714

1815
plank_gschema_compile = gnome.compile_schemas(
19-
depend_files: plank_gschema,
16+
depend_files: files('net.launchpad.plank.gschema.xml'),
2017
)
2118

2219
i18n.merge_file(

data/net.launchpad.plank.gschema.xml.in

Lines changed: 0 additions & 175 deletions
This file was deleted.

docklets/Applications/ApplicationsPreferences.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ namespace Docky {
2727
}
2828

2929
protected override void reset_properties () {
30+
base.reset_properties ();
3031
LargeIcons = false;
3132
CustomIcon = "";
3233
}

docklets/Battery/BatteryPreferences.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ namespace Docky {
3030
}
3131

3232
protected override void reset_properties () {
33+
base.reset_properties ();
3334
BatteryDeviceName = DEFAULT_BATTERY_DEVICE_NAME;
3435
}
3536
}

docklets/Clippy/ClippyPreferences.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ namespace Docky {
4040
}
4141

4242
protected override void reset_properties () {
43+
base.reset_properties ();
4344
MaxEntries = 15;
4445
TrackMouseSelections = false;
4546
TrackImages = true;

docklets/Clock/ClockPreferences.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ namespace Docky {
3737
}
3838

3939
protected override void reset_properties () {
40+
base.reset_properties ();
4041
ShowMilitary = false;
4142
ShowDigital = false;
4243
ShowDate = false;

docklets/Notifications/NotificationsPreferences.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ namespace Docky {
2929
}
3030

3131
protected override void reset_properties () {
32+
base.reset_properties ();
3233
EnableExpiry = false;
3334
ShowCount = true;
3435
ShowTransient = false;

docklets/Separator/SeparatorPreferences.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ namespace Docky {
4343
}
4444

4545
protected override void reset_properties () {
46+
base.reset_properties ();
4647
InvertColor = false;
4748
Style = SeparatorStyle.LINE;
4849
CustomIcon = "";

docklets/Trash/TrashDockItem.vala

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -263,26 +263,16 @@ namespace Docky {
263263
show_empty_trash_dialog();
264264
}
265265

266-
private static GLib.Settings? create_settings(string schema_id, string? path = null) {
267-
var schema_source = GLib.SettingsSchemaSource.get_default();
268-
var schema = schema_source.lookup(schema_id, true);
269-
if (schema == null) {
270-
warning("GSettingsSchema '%s' not found", schema_id);
271-
return null;
272-
}
273-
return new GLib.Settings.full(schema, null, path);
274-
}
275-
276266
private bool confirm_trash_delete() {
277267
if (environment_is_session_desktop(XdgSessionDesktop.CINNAMON)) {
278-
var settings = create_settings(NEMO_SCHEMA, NEMO_PATH);
268+
var settings = try_create_settings(NEMO_SCHEMA, NEMO_PATH);
279269
if (settings != null) {
280270
return settings.get_boolean("confirm-trash");
281271
}
282272
}
283273

284274
if (environment_is_session_desktop(XdgSessionDesktop.MATE)) {
285-
var settings = create_settings(CAJA_SCHEMA, CAJA_PATH);
275+
var settings = try_create_settings(CAJA_SCHEMA, CAJA_PATH);
286276
if (settings != null) {
287277
return settings.get_boolean("confirm-trash");
288278
}

docklets/Workspaces/WorkspacesPreferences.vala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ namespace Docky {
3333
}
3434

3535
protected override void reset_properties () {
36+
base.reset_properties ();
3637
InvertColor = false;
38+
LivePreviews = true;
3739
}
3840
}
3941
}

0 commit comments

Comments
 (0)