(cherry picked from commit 87e73624841d2b5e43f8194cad343d9d54e4df77)
cbb809d...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
gtksidebarrow: Disconnect from ::changed when unref'ing file
Also set self as call_when_ready data not to have rows stepping on
each other's callbacks.
1132868...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
gtksidebarrow: Don't keep ref to gone file
The row holds a NautilusFile instance to cache information needed for
Properties dialog and DND. [0]
But not listening for changes means we never release the reference when
the file is marked as gone. This naturally leads to bugs.
Listen "changed", clear when gone, and reconnect on-demand, but even
then protect against ref'ing a gone file (which shouldn't happen but
still does for self-owned files).
340507b...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
Revert "properties: Use cache nautilus file when opening from sidebar"
This reverts commit 5d371babaf464db61c1134568a72d4f553680439.
The result is the same, because `nautilus_file_get_by_uri()` would just
return a new reference to the already existing file.
Reverting because, with the next commit, we should not be relying on
the file to be set on the row.
8ec1244...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
file: Drop deep ref/unref wrappers
Their names are misleading: the list itself is not refcounted.
This misconception is likely how some memory leaks have been
introduced in nautilus_restore_files_from_trash() and in
properties_cb(). Both leaks are therefore fixed as part of
this commit by employing autocleanup in the first case and
stack allocation in the second case.