[gtk/matthiasc/for-master] inspector: Add focus handling to the property editor



commit 76d80ef516ed3cdcc8a8d92b2a5b599f4726e0b4
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jul 18 11:53:16 2020 -0400

    inspector: Add focus handling to the property editor
    
    We want to focus the actual control here.

 gtk/inspector/prop-editor.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gtk/inspector/prop-editor.c b/gtk/inspector/prop-editor.c
index c557e4206f..5ce78cec3a 100644
--- a/gtk/inspector/prop-editor.c
+++ b/gtk/inspector/prop-editor.c
@@ -1741,12 +1741,16 @@ static void
 gtk_inspector_prop_editor_class_init (GtkInspectorPropEditorClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
+  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
   object_class->constructed = constructed;
   object_class->finalize = finalize;
   object_class->get_property = get_property;
   object_class->set_property = set_property;
 
+  widget_class->focus = gtk_widget_focus_child;
+  widget_class->grab_focus = gtk_widget_grab_focus_child;
+
   signals[SHOW_OBJECT] =
     g_signal_new ("show-object",
                   G_TYPE_FROM_CLASS (object_class),


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