[nautilus/gnome-42] window: Fix crash when opening new window from pathbar



commit 8ee894fb4dd5df633f614d37f357c588b91c51f4
Author: Corey Berla <corey berla me>
Date:   Mon Apr 4 17:41:25 2022 -0700

    window: Fix crash when opening new window from pathbar
    
    Changes as part of commit 022867e3d3370560f2c6c07f90ad5fdfd7916d50
    switched the handler of the pathbar signal.
    
    The new handler raises an exception for NAUTILUS_OPEN_FLAG_NEW_WINDOW.
    
    Use nautilus_application API should be used when handling new windows.
    
    Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2208
    
    
    (cherry picked from commit 493deebd50409e869a1a45d745ed46c991e4741f)

 src/nautilus-window.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index f92858bdf..0d01e7132 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1753,7 +1753,15 @@ on_path_bar_open_location (NautilusWindow    *window,
                            GFile             *location,
                            NautilusOpenFlags  open_flags)
 {
-    nautilus_window_open_location_full (window, location, open_flags, NULL, NULL);
+    if (open_flags & NAUTILUS_OPEN_FLAG_NEW_WINDOW)
+    {
+        nautilus_application_open_location_full (NAUTILUS_APPLICATION (g_application_get_default ()),
+                                                 location, NAUTILUS_OPEN_FLAG_NEW_WINDOW, NULL, NULL, NULL);
+    }
+    else
+    {
+        nautilus_window_open_location_full (window, location, open_flags, NULL, NULL);
+    }
 }
 
 static void


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