[Pkg-privacy-commits] [nautilus-wipe] 33/224: Fix use of the Nautilus' window.

Ulrike Uhlig u-guest at moszumanska.debian.org
Thu Jul 7 19:45:31 UTC 2016


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to branch master
in repository nautilus-wipe.

commit b9c9b514ff768b922b77ffbc7aaab4f2a327850f
Author: Colomban Wendling <ban at herbesfolles.org>
Date:   Sat Feb 20 22:47:14 2010 +0100

    Fix use of the Nautilus' window.
    
    Don't get a reference to the Nautilus' window because the window seems
    to be destroyed unconditionally, but the object is still alive if we
    ref'd it, leading to use of a destroyed widget.
---
 nautilus-srm/nautilus-srm.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/nautilus-srm/nautilus-srm.c b/nautilus-srm/nautilus-srm.c
index 5db0b79..3f50bf0 100644
--- a/nautilus-srm/nautilus-srm.c
+++ b/nautilus-srm/nautilus-srm.c
@@ -190,7 +190,10 @@ static void       run_delete_operation  (GtkWindow *parent,
  * operations to the same window rather than the one that launched it. */
 struct ItemData
 {
-  GtkWindow *window;  /* parent window */
+  GtkWindow *window;  /* parent window
+                       * Note: don't ref or unref it, it seems to break
+                       * something in Nautilus (like the object being alive but
+                       * the widget destroyed... strange) */
   GList     *files;   /* list of selected NautilusFileInfos */
 };
 
@@ -198,7 +201,6 @@ struct ItemData
 static void
 item_data_free (struct ItemData *idata)
 {
-  g_object_unref (idata->window);
   nautilus_file_info_list_free (idata->files);
   g_slice_free1 (sizeof *idata, idata);
 }
@@ -215,7 +217,7 @@ add_item_data (NautilusMenuItem *item,
   struct ItemData *idata;
   
   idata = g_slice_alloc (sizeof *idata);
-  idata->window = g_object_ref (window);
+  idata->window = window;
   idata->files = nautilus_file_info_list_copy (files);
   g_object_set_data_full (G_OBJECT (item), "NautilusSrm::item-data",
                           idata, (GDestroyNotify)item_data_free);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/nautilus-wipe.git



More information about the Pkg-privacy-commits mailing list