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