Fix CI, escape not working

This commit is contained in:
kramo
2024-01-27 09:34:30 +01:00
parent 3e1ef88a1f
commit 303f2a2063
4 changed files with 16 additions and 12 deletions

View File

@@ -21,6 +21,8 @@ jobs:
with:
bundle: hu.kramo.Cartridges.Devel.flatpak
manifest-path: flatpak/hu.kramo.Cartridges.Devel.json
repository-url: https://nightly.gnome.org/gnome-nightly.flatpakrepo
repository-name: gnome-nightly
windows:
name: Windows
@@ -47,7 +49,7 @@ jobs:
- name: Test
shell: msys2 {0}
run: |
set +e
set +e
timeout 2 cartridges; [ "$?" -eq "124" ]
- name: Inno Setup
@@ -57,4 +59,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: Windows Installer
path: _build/windows/Output/Cartridges Setup.exe
path: _build/windows/Output/Cartridges Setup.exe

View File

@@ -153,7 +153,6 @@ class CartridgesApplication(Adw.Application):
("go_to_parent", ("<alt>Up",), shared.win),
("go_home", ("<alt>Home",), shared.win),
("toggle_search", ("<primary>f",), shared.win),
("escape", ("Escape",), shared.win),
("undo", ("<primary>z",), shared.win),
("open_menu", ("F10",), shared.win),
("close", ("<primary>w",), shared.win),

View File

@@ -469,15 +469,6 @@ class CartridgesWindow(Adw.ApplicationWindow):
search_entry.set_text("")
def on_escape_action(self, *_args: Any) -> None:
if (
self.get_focus() == self.search_entry.get_focus_child()
or self.hidden_search_entry.get_focus_child()
):
self.on_toggle_search_action()
else:
self.navigation_view.pop()
def show_details_page_search(self, widget: Gtk.Widget) -> None:
library = (
self.hidden_library if widget == self.hidden_search_entry else self.library

View File

@@ -201,6 +201,13 @@ template $CartridgesWindow : Adw.ApplicationWindow {
SearchEntry search_entry {
placeholder-text: _("Search");
hexpand: true;
ShortcutController {
Shortcut {
trigger: "Escape";
action: "action(win.toggle_search)";
}
}
}
}
}
@@ -261,6 +268,11 @@ Adw.NavigationPage hidden_library_page {
SearchEntry hidden_search_entry {
placeholder-text: _("Search");
hexpand: true;
Shortcut {
trigger: "Escape";
action: "action(win.toggle_search)";
}
}
}
}