[nautilus/wip/corey/properties: 42/44] properties: Remove code for opening existing window




commit c1cc3fb7dd671e5049b1799da696f48a8fa0af53
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 6b48c8340..5f99e1fdd 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -3937,17 +3937,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)
 {
@@ -4081,7 +4070,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);
@@ -4099,29 +4087,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]