|
|
b12e4c |
From 97473ee42d3f6b39a1ac7ba5cafd88a31159c7fb Mon Sep 17 00:00:00 2001
|
|
|
b12e4c |
From: Martin Kutlak <mkutlak@redhat.com>
|
|
|
b12e4c |
Date: Thu, 8 Jun 2017 12:09:34 +0200
|
|
|
b12e4c |
Subject: [PATCH] wizard: replace deprecated gtk3 functions
|
|
|
b12e4c |
|
|
|
b12e4c |
gdk_cursor_new was deprecated in version 3.16.
|
|
|
b12e4c |
https://developer.gnome.org/gdk3/stable/gdk3-Cursors.html#gdk-cursor-new
|
|
|
b12e4c |
|
|
|
b12e4c |
gdk_display_get_device_manager was deprecated in version 3.20.
|
|
|
b12e4c |
https://developer.gnome.org/gdk3/stable/GdkDisplay.html#gdk-display-get-device-manager
|
|
|
b12e4c |
|
|
|
b12e4c |
gtk_show_uri was deprecated in version 3.22
|
|
|
b12e4c |
https://developer.gnome.org/gtk3/stable/gtk3-Filesystem-utilities.html#gtk-show-uri
|
|
|
b12e4c |
|
|
|
b12e4c |
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
|
|
b12e4c |
---
|
|
|
b12e4c |
src/gui-wizard-gtk/wizard.c | 12 ++++++++----
|
|
|
b12e4c |
1 file changed, 8 insertions(+), 4 deletions(-)
|
|
|
b12e4c |
|
|
|
b12e4c |
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
|
|
b12e4c |
index c5b0b7f..b9b27fe 100644
|
|
|
b12e4c |
--- a/src/gui-wizard-gtk/wizard.c
|
|
|
b12e4c |
+++ b/src/gui-wizard-gtk/wizard.c
|
|
|
b12e4c |
@@ -627,7 +627,11 @@ static void open_browse_if_link(GtkWidget *text_view, GtkTextIter *iter)
|
|
|
b12e4c |
}
|
|
|
b12e4c |
|
|
|
b12e4c |
GError *error = NULL;
|
|
|
b12e4c |
+#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 22) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 22 && GTK_MICRO_VERSION < 5))
|
|
|
b12e4c |
if (!gtk_show_uri(/* use default screen */ NULL, url, GDK_CURRENT_TIME, &error))
|
|
|
b12e4c |
+#else
|
|
|
b12e4c |
+ if (!gtk_show_uri_on_window(NULL, url, GDK_CURRENT_TIME, &error))
|
|
|
b12e4c |
+#endif
|
|
|
b12e4c |
error_msg("Can't open url '%s': %s", url, error->message);
|
|
|
b12e4c |
|
|
|
b12e4c |
break;
|
|
|
b12e4c |
@@ -765,8 +769,8 @@ static gboolean visibility_notify_event(GtkWidget *text_view, GdkEventVisibility
|
|
|
b12e4c |
gint wx, wy, bx, by;
|
|
|
b12e4c |
|
|
|
b12e4c |
GdkWindow *win = gtk_text_view_get_window(GTK_TEXT_VIEW(text_view), GTK_TEXT_WINDOW_TEXT);
|
|
|
b12e4c |
- GdkDeviceManager *device_manager = gdk_display_get_device_manager(gdk_window_get_display (win));
|
|
|
b12e4c |
- GdkDevice *pointer = gdk_device_manager_get_client_pointer(device_manager);
|
|
|
b12e4c |
+ GdkSeat *display_seat = gdk_display_get_default_seat(gdk_window_get_display(win));
|
|
|
b12e4c |
+ GdkDevice *pointer = gdk_seat_get_pointer(display_seat);
|
|
|
b12e4c |
gdk_window_get_device_position(gtk_widget_get_window(text_view), pointer, &wx, &wy, NULL);
|
|
|
b12e4c |
|
|
|
b12e4c |
gtk_text_view_window_to_buffer_coords(GTK_TEXT_VIEW(text_view),
|
|
|
b12e4c |
@@ -3873,8 +3877,8 @@ void create_assistant(GtkApplication *app, bool expert_mode)
|
|
|
b12e4c |
g_signal_connect (g_tv_event_log, "visibility-notify-event", G_CALLBACK (visibility_notify_event), NULL);
|
|
|
b12e4c |
g_signal_connect (gtk_text_view_get_buffer(g_tv_event_log), "changed", G_CALLBACK (on_log_changed), NULL);
|
|
|
b12e4c |
|
|
|
b12e4c |
- hand_cursor = gdk_cursor_new (GDK_HAND2);
|
|
|
b12e4c |
- regular_cursor = gdk_cursor_new (GDK_XTERM);
|
|
|
b12e4c |
+ hand_cursor = gdk_cursor_new_for_display(gdk_display_get_default(), GDK_HAND2);
|
|
|
b12e4c |
+ regular_cursor = gdk_cursor_new_for_display(gdk_display_get_default(), GDK_XTERM);
|
|
|
b12e4c |
|
|
|
b12e4c |
/* switch to right starting page */
|
|
|
b12e4c |
on_page_prepare(g_assistant, gtk_notebook_get_nth_page(g_assistant, 0), NULL);
|
|
|
b12e4c |
--
|
|
|
b12e4c |
2.21.0
|
|
|
b12e4c |
|