[nautilus/wip/antoniof/gtk4-preparation-discontinued-api: 5/19] general: Stop using GtkWindow API which is gone in GTK4




commit 996ca51a4b18067e6185aad7080d9e0606868db8
Author: António Fernandes <antoniof gnome org>
Date:   Wed Dec 15 20:56:16 2021 +0000

    general: Stop using GtkWindow API which is gone in GTK4
    
    They didn't work under wayland anyway.

 src/nautilus-autorun-software.c | 9 ---------
 src/nautilus-file-operations.c  | 7 -------
 src/nautilus-window.c           | 2 --
 3 files changed, 18 deletions(-)
---
diff --git a/src/nautilus-autorun-software.c b/src/nautilus-autorun-software.c
index edf0a35fb..0496be5b5 100644
--- a/src/nautilus-autorun-software.c
+++ b/src/nautilus-autorun-software.c
@@ -156,10 +156,6 @@ out:
                                                      GTK_BUTTONS_OK,
                                                      _("Oops! There was a problem running this software."));
         gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", error_string);
-        /* This is required because we don't show dialogs in the
-         *  window picker and if the window pops under another window
-         *  there is no way to get it back. */
-        gtk_window_set_keep_above (GTK_WINDOW (dialog), TRUE);
 
         g_signal_connect (dialog,
                           "response",
@@ -203,11 +199,6 @@ present_autorun_for_software_dialog (GMount *mount)
                                               "%s",
                                               _("If you don’t trust this location or aren’t sure, press 
Cancel."));
 
-    /* This is required because we don't show dialogs in the
-     *  window picker and if the window pops under another window
-     *  there is no way to get it back. */
-    gtk_window_set_keep_above (GTK_WINDOW (dialog), TRUE);
-
     /* TODO: in a star trek future add support for verifying
      * software on media (e.g. if it has a certificate, check it
      * etc.)
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index 746ac2956..7af3865aa 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -1418,13 +1418,6 @@ do_run_simple_dialog (gpointer _data)
 
         timestamp = nautilus_file_operations_dbus_data_get_timestamp (data->dbus_data);
 
-        /* Assuming this is used for desktop implementations, we want the
-         * dialog to be centered on the screen rather than the parent window,
-         * which could extend to all monitors. This is the case for
-         * gnome-flashback.
-         */
-        gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER);
-
         if (nautilus_file_operations_dbus_data_get_parent_handle (data->dbus_data) != NULL)
         {
             g_signal_connect (dialog, "realize", G_CALLBACK (dialog_realize_cb), data->dbus_data);
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index c99bbc98d..ad5e74e85 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1984,8 +1984,6 @@ notebook_create_window_cb (GtkNotebook *notebook,
     g_object_set_data (G_OBJECT (slot), "dnd-window-slot",
                        GINT_TO_POINTER (TRUE));
 
-    gtk_window_set_position (GTK_WINDOW (new_window), GTK_WIN_POS_MOUSE);
-
     return GTK_NOTEBOOK (new_window->notebook);
 }
 


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