[gtk/wip/matthiasc/shortcut-2: 3/6] popover: Implement GtkShortcutManager



commit c6e9c2cbf3dad3748a00645e14830372338a0954
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Mar 23 23:04:06 2020 -0400

    popover: Implement GtkShortcutManager
    
    This makes mnemonics work in popovers.

 gtk/gtkpopover.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 7a0bffdb06..cafc25a8c4 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -119,6 +119,7 @@
 #include "gtkcsscolorvalueprivate.h"
 #include "gtkcssnumbervalueprivate.h"
 #include "gtksnapshot.h"
+#include "gtkshortcutmanager.h"
 
 #include "gtkrender.h"
 #include "gtkstylecontextprivate.h"
@@ -174,10 +175,13 @@ enum {
 
 static GParamSpec *properties[NUM_PROPERTIES] = { NULL };
 
+static void gtk_popover_shortcut_manager_interface_init (GtkShortcutManagerInterface *iface);
 static void gtk_popover_native_interface_init (GtkNativeInterface *iface);
 
 G_DEFINE_TYPE_WITH_CODE (GtkPopover, gtk_popover, GTK_TYPE_BIN,
                          G_ADD_PRIVATE (GtkPopover)
+                         G_IMPLEMENT_INTERFACE (GTK_TYPE_SHORTCUT_MANAGER,
+                                                gtk_popover_shortcut_manager_interface_init)
                          G_IMPLEMENT_INTERFACE (GTK_TYPE_NATIVE,
                                                 gtk_popover_native_interface_init))
 
@@ -1620,6 +1624,11 @@ gtk_popover_set_default_widget (GtkPopover *popover,
   g_object_notify_by_pspec (G_OBJECT (popover), properties[PROP_DEFAULT_WIDGET]);
 }
 
+static void
+gtk_popover_shortcut_manager_interface_init (GtkShortcutManagerInterface *iface)
+{
+}
+
 static void
 gtk_popover_native_interface_init (GtkNativeInterface *iface)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]