Fix CI, escape not working
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -21,6 +21,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
bundle: hu.kramo.Cartridges.Devel.flatpak
|
bundle: hu.kramo.Cartridges.Devel.flatpak
|
||||||
manifest-path: flatpak/hu.kramo.Cartridges.Devel.json
|
manifest-path: flatpak/hu.kramo.Cartridges.Devel.json
|
||||||
|
repository-url: https://nightly.gnome.org/gnome-nightly.flatpakrepo
|
||||||
|
repository-name: gnome-nightly
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
name: Windows
|
name: Windows
|
||||||
|
|||||||
@@ -153,7 +153,6 @@ class CartridgesApplication(Adw.Application):
|
|||||||
("go_to_parent", ("<alt>Up",), shared.win),
|
("go_to_parent", ("<alt>Up",), shared.win),
|
||||||
("go_home", ("<alt>Home",), shared.win),
|
("go_home", ("<alt>Home",), shared.win),
|
||||||
("toggle_search", ("<primary>f",), shared.win),
|
("toggle_search", ("<primary>f",), shared.win),
|
||||||
("escape", ("Escape",), shared.win),
|
|
||||||
("undo", ("<primary>z",), shared.win),
|
("undo", ("<primary>z",), shared.win),
|
||||||
("open_menu", ("F10",), shared.win),
|
("open_menu", ("F10",), shared.win),
|
||||||
("close", ("<primary>w",), shared.win),
|
("close", ("<primary>w",), shared.win),
|
||||||
|
|||||||
@@ -469,15 +469,6 @@ class CartridgesWindow(Adw.ApplicationWindow):
|
|||||||
|
|
||||||
search_entry.set_text("")
|
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:
|
def show_details_page_search(self, widget: Gtk.Widget) -> None:
|
||||||
library = (
|
library = (
|
||||||
self.hidden_library if widget == self.hidden_search_entry else self.library
|
self.hidden_library if widget == self.hidden_search_entry else self.library
|
||||||
|
|||||||
@@ -201,6 +201,13 @@ template $CartridgesWindow : Adw.ApplicationWindow {
|
|||||||
SearchEntry search_entry {
|
SearchEntry search_entry {
|
||||||
placeholder-text: _("Search");
|
placeholder-text: _("Search");
|
||||||
hexpand: true;
|
hexpand: true;
|
||||||
|
|
||||||
|
ShortcutController {
|
||||||
|
Shortcut {
|
||||||
|
trigger: "Escape";
|
||||||
|
action: "action(win.toggle_search)";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -261,6 +268,11 @@ Adw.NavigationPage hidden_library_page {
|
|||||||
SearchEntry hidden_search_entry {
|
SearchEntry hidden_search_entry {
|
||||||
placeholder-text: _("Search");
|
placeholder-text: _("Search");
|
||||||
hexpand: true;
|
hexpand: true;
|
||||||
|
|
||||||
|
Shortcut {
|
||||||
|
trigger: "Escape";
|
||||||
|
action: "action(win.toggle_search)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user