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




commit e4b76986a921db106a4991d678a53fa2b9f36417
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 4e57ae61e..cce5ffe12 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -7336,7 +7336,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 */
@@ -7378,7 +7378,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 */
@@ -8413,7 +8413,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;
@@ -8570,7 +8570,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;
@@ -8621,7 +8621,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]