[gtk/wip/matthiasc/popup2: 27/90] window: Implement GtkRoot::default-widget



commit 08bdfc0b25e162788bf6ef0026652d5d2747166e
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Mar 3 19:58:29 2019 -0500

    window: Implement GtkRoot::default-widget
    
    Implement the ::default-widget property.

 gtk/gtkwindow.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index a287b1da32..7897622194 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -2073,6 +2073,9 @@ gtk_window_set_property (GObject      *object,
     case LAST_ARG + GTK_ROOT_PROP_FOCUS_WIDGET:
       gtk_window_set_focus (window, g_value_get_object (value));
       break;
+    case LAST_ARG + GTK_ROOT_PROP_DEFAULT_WIDGET:
+      gtk_window_set_default (window, g_value_get_object (value));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -2191,6 +2194,9 @@ gtk_window_get_property (GObject      *object,
     case LAST_ARG + GTK_ROOT_PROP_FOCUS_WIDGET:
       g_value_set_object (value, gtk_window_get_focus (window));
       break;
+    case LAST_ARG + GTK_ROOT_PROP_DEFAULT_WIDGET:
+      g_value_set_object (value, gtk_window_get_default_widget (window));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;


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