[file-roller/wip/jtojnar/gtk4: 5/16] Refer to cursors using name




commit b954f17cdaeb66c82de74756e4c1edd0341c5784
Author: Jan Tojnar <jtojnar gmail com>
Date:   Tue Dec 14 03:26:25 2021 +0100

    Refer to cursors using name
    
    gdk_cursor_new_for_display has been removed in GTK 4:
    https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-cursor-api-changes

 src/dlg-package-installer.c | 2 +-
 src/fr-window.c             | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/dlg-package-installer.c b/src/dlg-package-installer.c
index 125d4c8b..97004933 100644
--- a/src/dlg-package-installer.c
+++ b/src/dlg-package-installer.c
@@ -172,7 +172,7 @@ install_packages (InstallerData *idata)
                if (window != NULL) {
                        GdkCursor *cursor;
 
-                       cursor = gdk_cursor_new_for_display (gdk_display_get_default(), GDK_WATCH);
+                       cursor = gdk_cursor_new_from_name (gdk_display_get_default(), "wait");
                        gdk_window_set_cursor (window, cursor);
 
                        g_object_unref (cursor);
diff --git a/src/fr-window.c b/src/fr-window.c
index 235221c0..5eac080b 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -3923,8 +3923,8 @@ file_motion_notify_callback (GtkWidget *widget,
                                       NULL, NULL, NULL);
 
        if (window->priv->list_hover_path != NULL)
-               cursor = gdk_cursor_new_for_display (gtk_widget_get_display (GTK_WIDGET (window)),
-                                                    GDK_HAND2);
+               cursor = gdk_cursor_new_from_name (gtk_widget_get_display (GTK_WIDGET (window)),
+                                                    "pointer");
        else
                cursor = NULL;
 


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