summaryrefslogtreecommitdiff
path: root/gtk/gtkshortcutmanager.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-07-26 10:53:55 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-07-26 14:21:28 -0400
commit7e87ad188748039d35bca0ecf3630f51e717f174 (patch)
treeb9068cb2ab6d40258fdc267485492a484b35e900 /gtk/gtkshortcutmanager.c
parentef6babf896cd06bd42d0fb11e3aae7c109708bdd (diff)
downloadgtk+-flatten-list-constructor.tar.gz
flattenlistmodel: Make the constructor transfer fullflatten-list-constructor
This is for consistency with other wrapping list constructors. We want them all to be transfer full, allow-none. Update all callers.
Diffstat (limited to 'gtk/gtkshortcutmanager.c')
-rw-r--r--gtk/gtkshortcutmanager.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gtk/gtkshortcutmanager.c b/gtk/gtkshortcutmanager.c
index a6f2559b1d..0351490df2 100644
--- a/gtk/gtkshortcutmanager.c
+++ b/gtk/gtkshortcutmanager.c
@@ -44,21 +44,16 @@ G_DEFINE_INTERFACE (GtkShortcutManager, gtk_shortcut_manager, G_TYPE_OBJECT)
void
gtk_shortcut_manager_create_controllers (GtkWidget *widget)
{
- GListStore *store;
GtkFlattenListModel *model;
GtkEventController *controller;
- store = g_list_store_new (GTK_TYPE_SHORTCUT_CONTROLLER);
- model = gtk_flatten_list_model_new (G_LIST_MODEL (store));
- g_object_unref (store);
+ model = gtk_flatten_list_model_new (G_LIST_MODEL (g_list_store_new (GTK_TYPE_SHORTCUT_CONTROLLER)));
g_object_set_data_full (G_OBJECT (widget), "gtk-shortcut-manager-bubble", model, g_object_unref);
controller = gtk_shortcut_controller_new_for_model (G_LIST_MODEL (model));
gtk_event_controller_set_name (controller, "gtk-shortcut-manager-bubble");
gtk_widget_add_controller (widget, controller);
- store = g_list_store_new (GTK_TYPE_SHORTCUT_CONTROLLER);
- model = gtk_flatten_list_model_new (G_LIST_MODEL (store));
- g_object_unref (store);
+ model = gtk_flatten_list_model_new (G_LIST_MODEL (g_list_store_new (GTK_TYPE_SHORTCUT_CONTROLLER)));
g_object_set_data_full (G_OBJECT (widget), "gtk-shortcut-manager-capture", model, g_object_unref);
controller = gtk_shortcut_controller_new_for_model (G_LIST_MODEL (model));
gtk_event_controller_set_name (controller, "gtk-shortcut-manager-capture");