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