[gnome-builder/wip/gtk4-port: 1002/1774] plugins/symbol-tree: return to editor with Escape
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 1002/1774] plugins/symbol-tree: return to editor with Escape
- Date: Mon, 11 Jul 2022 22:31:31 +0000 (UTC)
commit 04546101eb1e296f96e9c6db8e1137df95ea6986
Author: Christian Hergert <chergert redhat com>
Date: Fri May 13 08:25:51 2022 -0700
plugins/symbol-tree: return to editor with Escape
src/plugins/symbol-tree/gbp-symbol-popover.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/src/plugins/symbol-tree/gbp-symbol-popover.c b/src/plugins/symbol-tree/gbp-symbol-popover.c
index e812685ab..9e91be418 100644
--- a/src/plugins/symbol-tree/gbp-symbol-popover.c
+++ b/src/plugins/symbol-tree/gbp-symbol-popover.c
@@ -162,6 +162,18 @@ on_search_key_pressed_cb (GbpSymbolPopover *self,
{
switch (keyval)
{
+ case GDK_KEY_Escape:
+ {
+ IdeWorkspace *workspace = ide_widget_get_workspace (GTK_WIDGET (self));
+ IdePage *page = ide_workspace_get_most_recent_page (workspace);
+
+ gtk_popover_popdown (GTK_POPOVER (self));
+ if (page)
+ gtk_widget_grab_focus (GTK_WIDGET (page));
+
+ return TRUE;
+ }
+
case GDK_KEY_Up:
case GDK_KEY_KP_Up:
ide_gtk_list_view_move_previous (self->list_view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]