[nautilus/follow-up-to-mr281: 4/4] files-view: Sink floating refs on initialization
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/follow-up-to-mr281: 4/4] files-view: Sink floating refs on initialization
- Date: Mon, 30 Jul 2018 06:48:50 +0000 (UTC)
commit 23ecabd71ee6c4e7f06787756bf6dc8c04f6b60a
Author: António Fernandes <antoniof gnome org>
Date: Sat Jul 28 12:41:16 2018 +0100
files-view: Sink floating refs on initialization
src/nautilus-files-view.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 593c20fa4..ef8c9884e 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -8176,7 +8176,7 @@ nautilus_files_view_pop_up_selection_context_menu (NautilusFilesView *view,
*/
update_context_menus_if_pending (view);
- gtk_menu = gtk_menu_new_from_model (G_MENU_MODEL (priv->selection_menu));
+ gtk_menu = g_object_ref_sink (gtk_menu_new_from_model (G_MENU_MODEL (priv->selection_menu)));
gtk_menu_attach_to_widget (GTK_MENU (gtk_menu), GTK_WIDGET (view), NULL);
if (event != NULL)
{
@@ -8197,7 +8197,6 @@ nautilus_files_view_pop_up_selection_context_menu (NautilusFilesView *view,
GDK_GRAVITY_NORTH_WEST,
NULL);
}
- g_object_ref_sink (gtk_menu);
}
/**
@@ -8223,7 +8222,7 @@ nautilus_files_view_pop_up_background_context_menu (NautilusFilesView *view,
*/
update_context_menus_if_pending (view);
- gtk_menu = gtk_menu_new_from_model (G_MENU_MODEL (priv->background_menu));
+ gtk_menu = g_object_ref_sink (gtk_menu_new_from_model (G_MENU_MODEL (priv->background_menu)));
gtk_menu_attach_to_widget (GTK_MENU (gtk_menu), GTK_WIDGET (view), NULL);
if (event != NULL)
{
@@ -8239,7 +8238,6 @@ nautilus_files_view_pop_up_background_context_menu (NautilusFilesView *view,
GDK_GRAVITY_CENTER,
NULL);
}
- g_object_ref_sink (gtk_menu);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]