[nautilus/wip/ernestask/men-use: 1/3] files-view: Stop sinking ref for GMenu instances
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/ernestask/men-use: 1/3] files-view: Stop sinking ref for GMenu instances
- Date: Sun, 16 Dec 2018 10:45:27 +0000 (UTC)
commit 0195988096ae34234a894b93e84f1014bff2fd4d
Author: Ernestas Kulik <ekulik redhat com>
Date: Sun Dec 16 11:12:45 2018 +0100
files-view: Stop sinking ref for GMenu instances
They are not GInitiallyUnowned.
src/nautilus-files-view.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 20a5c03d2..d6bc99bc0 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -7959,6 +7959,7 @@ real_update_context_menus (NautilusFilesView *view)
{
NautilusFilesViewPrivate *priv;
GtkBuilder *builder;
+ GObject *object;
priv = nautilus_files_view_get_instance_private (view);
builder = gtk_builder_new_from_resource ("/org/gnome/nautilus/ui/nautilus-files-view-context-menus.ui");
@@ -7966,8 +7967,12 @@ real_update_context_menus (NautilusFilesView *view)
g_clear_object (&priv->background_menu);
g_clear_object (&priv->selection_menu);
- priv->background_menu = g_object_ref_sink (G_MENU (gtk_builder_get_object (builder, "background-menu")));
- priv->selection_menu = g_object_ref_sink (G_MENU (gtk_builder_get_object (builder, "selection-menu")));
+ object = gtk_builder_get_object (builder, "background-menu");
+ priv->background_menu = g_object_ref (G_MENU (object));
+
+ object = gtk_builder_get_object (builder, "selection-menu");
+ priv->selection_menu = g_object_ref (G_MENU (object));
+
g_object_unref (builder);
update_selection_menu (view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]