[dasher] gtk_show_uri deprecated in favour of gtk_show_uri_on_window in gtk 3.22
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher] gtk_show_uri deprecated in favour of gtk_show_uri_on_window in gtk 3.22
- Date: Fri, 25 Dec 2020 12:59:58 +0000 (UTC)
commit 4d29345adcdc254110d103b1f23bcac3ffc133ab
Author: Patrick Welche <prlw1 cam ac uk>
Date: Thu Dec 24 17:40:04 2020 +0000
gtk_show_uri deprecated in favour of gtk_show_uri_on_window in gtk 3.22
Src/Gtk2/dasher_main.cpp | 13 +++++++------
configure.ac | 6 +-----
2 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/Src/Gtk2/dasher_main.cpp b/Src/Gtk2/dasher_main.cpp
index 97f10cc6..c7fce533 100644
--- a/Src/Gtk2/dasher_main.cpp
+++ b/Src/Gtk2/dasher_main.cpp
@@ -358,12 +358,10 @@ dasher_main_load_interface(DasherMain *pSelf) {
pPrivate->pXML = dasher_main_open_gui_xml(pSelf, szGUIFilename);
pPrivate->pPrefXML = dasher_main_open_gui_xml(pSelf, szPrefGUIFilename);
-#ifndef HAVE_GTK_SHOW_URI
GtkAction *helpact =
GTK_ACTION(gtk_builder_get_object(pPrivate->pXML, "action_help"));
gtk_action_set_sensitive(helpact, false);
gtk_action_set_visible(helpact, false);
-#endif
// Save the details of some of the widgets for later
// pPrivate->pActionPane = gtk_builder_get_object(pPrivate->pXML, "vbox39");
@@ -864,13 +862,17 @@ dasher_main_command_preferences_alphabet(DasherMain *pSelf) {
static void
dasher_main_command_help(DasherMain *pSelf) {
-#ifdef HAVE_GTK_SHOW_URI
DasherMainPrivate *pPrivate = DASHER_MAIN_GET_PRIVATE(pSelf);
- GdkScreen *scr;
GError *err = NULL;
+#ifndef HAVE_GTK_SHOW_URI_ON_WINDOW
+ GdkScreen *scr;
scr = gtk_widget_get_screen(GTK_WIDGET(pPrivate->pMainWindow));
- if (!gtk_show_uri(scr, "help:dasher", gtk_get_current_event_time(), &err)) {
+ if (!gtk_show_uri(scr, "help:dasher", gtk_get_current_event_time(), &err))
+#else
+ if (!gtk_show_uri_on_window(pPrivate->pMainWindow, "help:dasher", gtk_get_current_event_time(), &err))
+#endif
+ {
GtkWidget *d;
d = gtk_message_dialog_new(GTK_WINDOW(pPrivate->pMainWindow),
GTK_DIALOG_MODAL,
@@ -883,7 +885,6 @@ dasher_main_command_help(DasherMain *pSelf) {
g_error_free (err);
}
-#endif
}
static void
diff --git a/configure.ac b/configure.ac
index 26e17030..91a9e0c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,11 +157,7 @@ then
CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
AC_CHECK_HEADERS([gdk/gdkkeysyms-compat.h])
- AC_CHECK_FUNCS([gtk_show_uri], [],
- [if test "x$ac_cv_func_gtk_show_uri" = "xno"; then
- AC_MSG_WARN([This version of GTK+ doesn't provide gtk_show_uri - help will not be
displayed from within dasher.])
- fi]
- )
+ AC_CHECK_FUNCS([gtk_show_uri_on_window])
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]