[gtk/shortcuts-rebased-again: 101/159] shortcut controller: Make model readable



commit 7abad1224b78508fc2414e43703b114a99a8f6d0
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jun 19 04:27:02 2019 +0000

    shortcut controller: Make model readable
    
    We want to show the shortcuts in the inspector,
    so we need to be able to get at the model.

 gtk/gtkshortcutcontroller.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkshortcutcontroller.c b/gtk/gtkshortcutcontroller.c
index 31fbac549b..f077bf0ed5 100644
--- a/gtk/gtkshortcutcontroller.c
+++ b/gtk/gtkshortcutcontroller.c
@@ -207,6 +207,10 @@ gtk_shortcut_controller_get_property (GObject    *object,
       g_value_set_flags (value, self->mnemonics_modifiers);
       break;
 
+    case PROP_MODEL:
+      g_value_set_object (value, self->shortcuts);
+      break;
+
     case PROP_SCOPE:
       g_value_set_enum (value, self->scope);
       break;
@@ -376,7 +380,7 @@ gtk_shortcut_controller_class_init (GtkShortcutControllerClass *klass)
                            P_("Model"),
                            P_("A list model to take shortcuts from"),
                            G_TYPE_LIST_MODEL,
-                           G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_EXPLICIT_NOTIFY | 
G_PARAM_STATIC_STRINGS);
+                           G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_EXPLICIT_NOTIFY | 
G_PARAM_STATIC_STRINGS);
 
   /**
    * GtkShortcutController:scope:


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