Fix CI, escape not working
This commit is contained in:
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user