aboutsummaryrefslogtreecommitdiff
path: root/main/src/windows/preferences_window/general_preferences_page.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2025-10-05 13:35:41 +0200
committerfiaxh <git@lightrise.org>2025-10-05 17:59:08 +0200
commite14c7d933bfa0bdd97781857b9341854232058a2 (patch)
treee302c07398dad3196a87a99843d9383ef116cb25 /main/src/windows/preferences_window/general_preferences_page.vala
parent6d8ccb414529c017ef1b8a52499b7bbdb6432adb (diff)
Adjust to Adw 1.4: Use specialized ActionRows
Diffstat (limited to 'main/src/windows/preferences_window/general_preferences_page.vala')
-rw-r--r--main/src/windows/preferences_window/general_preferences_page.vala16
1 files changed, 8 insertions, 8 deletions
diff --git a/main/src/windows/preferences_window/general_preferences_page.vala b/main/src/windows/preferences_window/general_preferences_page.vala
index 6f8dd771..1e81a1b7 100644
--- a/main/src/windows/preferences_window/general_preferences_page.vala
+++ b/main/src/windows/preferences_window/general_preferences_page.vala
@@ -9,10 +9,10 @@ public class Dino.Ui.ViewModel.GeneralPreferencesPage : Object {
[GtkTemplate (ui = "/im/dino/Dino/preferences_window/general_preferences_page.ui")]
public class Dino.Ui.GeneralPreferencesPage : Adw.PreferencesPage {
- [GtkChild] private unowned Switch typing_switch;
- [GtkChild] private unowned Switch marker_switch;
- [GtkChild] private unowned Switch notification_switch;
- [GtkChild] private unowned Switch emoji_switch;
+ [GtkChild] private unowned Adw.SwitchRow typing_row;
+ [GtkChild] private unowned Adw.SwitchRow marker_row;
+ [GtkChild] private unowned Adw.SwitchRow notification_row;
+ [GtkChild] private unowned Adw.SwitchRow emoji_row;
public ViewModel.GeneralPreferencesPage model { get; set; default = new ViewModel.GeneralPreferencesPage(); }
private Binding[] model_bindings = new Binding[0];
@@ -27,10 +27,10 @@ public class Dino.Ui.GeneralPreferencesPage : Adw.PreferencesPage {
}
if (model != null) {
model_bindings = new Binding[] {
- model.bind_property("send-typing", typing_switch, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL),
- model.bind_property("send-marker", marker_switch, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL),
- model.bind_property("notifications", notification_switch, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL),
- model.bind_property("convert-emojis", emoji_switch, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL)
+ model.bind_property("send-typing", typing_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL),
+ model.bind_property("send-marker", marker_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL),
+ model.bind_property("notifications", notification_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL),
+ model.bind_property("convert-emojis", emoji_row, "active", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL)
};
} else {
model_bindings = new Binding[0];