Commit e2b31414 authored by Christopher Davis's avatar Christopher Davis
Browse files

general: Sync with libadwaita swipe -> navigate change

parent e3666a2a
Pipeline #359260 passed with stage
in 31 minutes and 51 seconds
......@@ -6,7 +6,7 @@ private class Highscore.PreferencesWindow : Adw.PreferencesWindow {
public void open_subpage (PreferencesSubpage subpage) {
swipe_back_binding = subpage.bind_property (
"allow-back", this, "can-swipe-back", BindingFlags.SYNC_CREATE);
"allow-back", this, "can-navigate-back", BindingFlags.SYNC_CREATE);
subpage.back.connect (() => {
swipe_back_binding.unbind ();
......
......@@ -8,7 +8,7 @@
<property name="content">
<object class="AdwLeaflet" id="leaflet">
<property name="can-unfold">False</property>
<property name="can-swipe-back" bind-source="HighscoreCollectionActionWindow" bind-property="create-collection-page-only" bind-flags="invert-boolean|sync-create"/>
<property name="can-navigate-back" bind-source="HighscoreCollectionActionWindow" bind-property="create-collection-page-only" bind-flags="invert-boolean|sync-create"/>
<signal name="notify::visible-child" handler="on_visible_child_changed"/>
<child>
<object class="GtkBox" id="add_to_collection_page">
......
......@@ -2,13 +2,13 @@
<interface>
<requires lib="gtk+" version="3.24"/>
<template class="HighscoreCollectionsPage" parent="AdwBin">
<signal name="notify::is-search-mode" handler="update_can_swipe_back"/>
<signal name="notify::is-selection-mode" handler="update_can_swipe_back"/>
<signal name="notify::is-search-mode" handler="update_can_navigate_back"/>
<signal name="notify::is-selection-mode" handler="update_can_navigate_back"/>
<property name="child">
<object class="AdwLeaflet" id="collections_leaflet">
<property name="visible-child">collections_main_page</property>
<property name="can-unfold">False</property>
<property name="can-swipe-back" bind-source="HighscoreCollectionsPage" bind-property="can-swipe-back"/>
<property name="can-navigate-back" bind-source="HighscoreCollectionsPage" bind-property="can-navigate-back"/>
<signal name="notify::visible-child" handler="on_visible_child_changed"/>
<child>
<object class="HighscoreCollectionsMainPage" id="collections_main_page">
......
......@@ -57,7 +57,7 @@ private class Highscore.CollectionsPage : Adw.Bin {
public bool is_selection_mode { get; set; }
public bool is_showing_user_collection { get; set; }
public bool is_search_empty { get; set; }
public bool can_swipe_back { get; set; }
public bool can_navigate_back { get; set; }
public string collection_title { get; set; }
public string removed_notification_title { get; set; }
......@@ -73,7 +73,7 @@ private class Highscore.CollectionsPage : Adw.Bin {
collections_main_page.selected_items_changed.connect (() => {
selected_items_changed ();
});
update_can_swipe_back ();
update_can_navigate_back ();
}
public void select_all () {
......@@ -243,7 +243,7 @@ private class Highscore.CollectionsPage : Adw.Bin {
}
[GtkCallback]
private void update_can_swipe_back () {
can_swipe_back = !is_search_mode && !is_selection_mode;
private void update_can_navigate_back () {
can_navigate_back = !is_search_mode && !is_selection_mode;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment