[nautilus/wip/antoniof/gtk4-preparation-miscellaneous: 14/15] files-view: Stop using NULL slot as destruction flag




commit 1acded8c0c14ab4b367ae2c26e5302e2ea1ec9bc
Author: António Fernandes <antoniof gnome org>
Date:   Sun Oct 17 16:38:37 2021 +0100

    files-view: Stop using NULL slot as destruction flag
    
    We already have a boolean to query whether we are in destruction.

 src/nautilus-files-view.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index f63cb4b88..981cfc8cb 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -7302,7 +7302,7 @@ on_clipboard_contents_received (GtkClipboard     *clipboard,
     view = NAUTILUS_FILES_VIEW (user_data);
     priv = nautilus_files_view_get_instance_private (view);
 
-    if (priv->slot == NULL ||
+    if (priv->in_destruction ||
         !priv->active)
     {
         /* We've been destroyed or became inactive since call */
@@ -7344,7 +7344,7 @@ on_clipboard_targets_received (GtkClipboard *clipboard,
     priv = nautilus_files_view_get_instance_private (view);
     is_data_copied = FALSE;
 
-    if (priv->slot == NULL ||
+    if (priv->in_destruction ||
         !priv->active)
     {
         /* We've been destroyed or became inactive since call */
@@ -8396,7 +8396,7 @@ nautilus_files_view_update_toolbar_menus (NautilusFilesView *view)
     /* Don't update after destroy (#349551),
      * or if we are not active.
      */
-    if (priv->slot == NULL ||
+    if (priv->in_destruction ||
         !priv->active)
     {
         return;
@@ -8553,7 +8553,7 @@ schedule_update_context_menus (NautilusFilesView *view)
     /* Don't schedule updates after destroy (#349551),
      * or if we are not active.
      */
-    if (priv->slot == NULL ||
+    if (priv->in_destruction ||
         !priv->active)
     {
         return;
@@ -8604,7 +8604,7 @@ schedule_update_status (NautilusFilesView *view)
     priv = nautilus_files_view_get_instance_private (view);
 
     /* Make sure we haven't already destroyed it */
-    if (priv->slot == NULL)
+    if (priv->in_destruction)
     {
         return;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]