prefs: Add can-swipe-back compat with latest libadwaita

Recent libadwaita has renamed "can-swipe-back" into "can-navigate-back".
Set both in JS code instead of UI file in order to support all libadwaita versions.

Fixes #185
This commit is contained in:
Rafał Dzięgiel
2021-11-29 10:13:00 +01:00
parent 654b8aaf60
commit 82e3c9a52f
2 changed files with 5 additions and 1 deletions

View File

@@ -553,6 +553,11 @@ class ClapperPrefsWindow extends Adw.PreferencesWindow
transient_for: window,
});
/* FIXME: old libadwaita compat, should be
* normally in prefs UI file */
this.can_swipe_back = true;
this.can_navigate_back = true;
this.show();
}
});

View File

@@ -5,7 +5,6 @@
<property name="resizable">True</property>
<property name="search-enabled">True</property>
<property name="destroy-with-parent">True</property>
<property name="can-swipe-back">True</property>
<property name="modal">True</property>
<child>
<object class="AdwPreferencesPage">