[nautilus/wip/corey/properties: 2/4] properties: Remove code for opening existing window




commit 09c846453f08db086fdfcd563adeeec9f888d175
Author: Corey Berla <corey berla me>
Date:   Tue Aug 23 10:23:20 2022 -0700

    properties: Remove code for opening existing window
    
    Apparently this was from when Nautilus had properties windows as
    independent windows.  Now it breaks the ability to open the same
    property window from another Nautilus window.  Remove the code.
    
    Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2358

 src/nautilus-properties-window.c | 35 -----------------------------------
 1 file changed, 35 deletions(-)
---
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 3343fa4eb..204eb6caf 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -3955,17 +3955,6 @@ remove_window (NautilusPropertiesWindow *self)
     }
 }
 
-static NautilusPropertiesWindow *
-get_existing_window (GList *file_list)
-{
-    if (!file_list->next)
-    {
-        return g_hash_table_lookup (windows, file_list->data);
-    }
-
-    return NULL;
-}
-
 static void
 properties_window_finish (StartupData *data)
 {
@@ -4099,7 +4088,6 @@ nautilus_properties_window_present (GList                            *original_f
     GtkWindow *parent_window;
     StartupData *startup_data;
     g_autolist (NautilusFile) target_files = NULL;
-    NautilusPropertiesWindow *existing_window;
     g_autofree char *pending_key = NULL;
 
     g_return_if_fail (original_files != NULL);
@@ -4117,29 +4105,6 @@ nautilus_properties_window_present (GList                            *original_f
         pending_lists = g_hash_table_new (g_str_hash, g_str_equal);
     }
 
-    /* Look to see if there's already a window for this file. */
-    existing_window = get_existing_window (original_files);
-    if (existing_window != NULL)
-    {
-        if (parent_widget)
-        {
-            gtk_window_set_display (GTK_WINDOW (existing_window),
-                                    gtk_widget_get_display (parent_widget));
-        }
-        else if (startup_id)
-        {
-            gtk_window_set_startup_id (GTK_WINDOW (existing_window), startup_id);
-        }
-
-        gtk_window_present (GTK_WINDOW (existing_window));
-        startup_data = startup_data_new (NULL, NULL, NULL, NULL, NULL, NULL,
-                                         callback, callback_data, existing_window);
-        g_signal_connect (GTK_WIDGET (existing_window), "destroy",
-                          G_CALLBACK (widget_on_destroy), startup_data);
-        return;
-    }
-
-
     pending_key = get_pending_key (original_files);
 
     /* Look to see if we're already waiting for a window for this file. */


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