[grilo/wip/jfelder/grilo-test-ui-deprecated: 3/3] grilo-test-ui: Do not use gtk_show_uri on newer gtk
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo/wip/jfelder/grilo-test-ui-deprecated: 3/3] grilo-test-ui: Do not use gtk_show_uri on newer gtk
- Date: Thu, 14 May 2020 18:33:32 +0000 (UTC)
commit ccca23820c89cd0b3910313de19cf781c08ac2ba
Author: Jean Felder <jfelder gnome org>
Date: Thu May 14 20:31:28 2020 +0200
grilo-test-ui: Do not use gtk_show_uri on newer gtk
On 3.22.0, gtk_show_uri has been deprecated in favor of
gtk_show_uri_on_window.
Add a GTK_CHECK_VERSION to prevent depending on a GTK version too
recent. It can be removed after bumping GTK to >= 3.22.0
tools/grilo-test-ui/main.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/tools/grilo-test-ui/main.c b/tools/grilo-test-ui/main.c
index 26f330a..17e5389 100644
--- a/tools/grilo-test-ui/main.c
+++ b/tools/grilo-test-ui/main.c
@@ -1640,10 +1640,17 @@ activate_ok_button (GtkLabel *label,
gpointer user_data)
{
GRL_DEBUG ("activate invoked");
+#if GTK_CHECK_VERSION (3, 22, 0)
+ gtk_show_uri_on_window (GTK_WINDOW (view->window),
+ uri,
+ GDK_CURRENT_TIME,
+ NULL);
+#else
gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (label)),
uri,
GDK_CURRENT_TIME,
NULL);
+#endif
gtk_widget_set_sensitive (user_data, TRUE);
}
#endif /* HAVE_OAUTH */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]