[gtk/shortcuts-rebased-again: 102/135] shortcut controller: Make model readable



commit ef09d3b873ed7a33439a26a3e725c41e072a3133
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]