[nautilus/wip/antoniof/experimental-gtk4-build: 27/52] GdkScreen -> GdkDisplay




commit 31aaf1d731c474e5df83f402ae7961968ec9b222
Author: António Fernandes <antoniof gnome org>
Date:   Fri Dec 24 01:02:07 2021 +0000

    GdkScreen -> GdkDisplay

 src/nautilus-files-view.c        | 2 +-
 src/nautilus-list-model.c        | 2 +-
 src/nautilus-program-choosing.c  | 6 ------
 src/nautilus-properties-window.c | 8 ++++----
 4 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 00f6b8c9c..b5ef98f8f 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -544,7 +544,7 @@ set_floating_bar_status (NautilusFilesView *view,
         priv->floating_bar_set_status_timeout_id = 0;
     }
 
-    settings = gtk_settings_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (view)));
+    settings = gtk_settings_get_for_display (gtk_widget_get_display (GTK_WIDGET (view)));
     g_object_get (settings,
                   "gtk-double-click-time", &double_click_time,
                   NULL);
diff --git a/src/nautilus-list-model.c b/src/nautilus-list-model.c
index 701fc3eaf..a8df95fca 100644
--- a/src/nautilus-list-model.c
+++ b/src/nautilus-list-model.c
@@ -302,7 +302,7 @@ nautilus_list_model_get_icon_scale (NautilusListModel *model)
 
     if (retval == -1)
     {
-        retval = gdk_monitor_get_scale_factor (gdk_display_get_monitor (gdk_display_get_default (), 0));
+        retval = gdk_monitor_get_scale_factor (g_list_model_get_item (gdk_display_get_monitors 
(gdk_display_get_default ()), 0));
     }
 
     /* FIXME: Temporary regression: HiDPI icons not supported, ignore scale. */
diff --git a/src/nautilus-program-choosing.c b/src/nautilus-program-choosing.c
index 715ac00e4..ceaee0a63 100644
--- a/src/nautilus-program-choosing.c
+++ b/src/nautilus-program-choosing.c
@@ -143,12 +143,6 @@ get_launch_context (GtkWindow *parent_window)
 
     launch_context = gdk_display_get_app_launch_context (display);
 
-    if (parent_window != NULL)
-    {
-        gdk_app_launch_context_set_screen (launch_context,
-                                           gtk_window_get_screen (parent_window));
-    }
-
     return launch_context;
 }
 
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 18a82f8ff..1a6b3c4af 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -4693,8 +4693,8 @@ create_properties_window (StartupData *startup_data)
 
     if (startup_data->parent_widget)
     {
-        gtk_window_set_screen (GTK_WINDOW (window),
-                               gtk_widget_get_screen (startup_data->parent_widget));
+        gtk_window_set_display (GTK_WINDOW (window),
+                               gtk_widget_get_display (startup_data->parent_widget));
     }
 
     if (startup_data->parent_window)
@@ -4988,8 +4988,8 @@ nautilus_properties_window_present (GList                            *original_f
     {
         if (parent_widget)
         {
-            gtk_window_set_screen (GTK_WINDOW (existing_window),
-                                   gtk_widget_get_screen (parent_widget));
+            gtk_window_set_display (GTK_WINDOW (existing_window),
+                                   gtk_widget_get_display (parent_widget));
         }
         else if (startup_id)
         {


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