diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-03-06 13:13:52 +0100 |
---|---|---|
committer | pranavk <pranavk@collabora.co.uk> | 2017-03-06 15:43:50 +0000 |
commit | 45dd570ac474c336cceac1ca2792f243ee125fa2 (patch) | |
tree | cfcce6d157085136d69571d8613bab6e1ae65e5b | |
parent | Fix flip issue in Snake animation subtype (diff) | |
download | core-45dd570ac474c336cceac1ca2792f243ee125fa2.tar.gz core-45dd570ac474c336cceac1ca2792f243ee125fa2.zip |
libreofficekit: GTK 3.22 deprecates gtk_show_uri
Avoid -Werror=deprecated-declaration and use
gtk_show_uri_on_window instead, which needs a GtkWindow.
Change-Id: Ia77978348809c8d88cb2823a1549cbdeffcc6c97
Reviewed-on: https://gerrit.libreoffice.org/34926
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
-rw-r--r-- | libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx index 0ad1c2eb1410..ed1d7f10a694 100644 --- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx @@ -1525,10 +1525,17 @@ static void signalPart(LOKDocView* pLOKDocView, int nPart, gpointer /*pData*/) } /// User clicked on a command button -> inform LOKDocView. -static void signalHyperlink(LOKDocView* /*pLOKDocView*/, char* pPayload, gpointer /*pData*/) +static void signalHyperlink(LOKDocView* pLOKDocView, char* pPayload, gpointer /*pData*/) { GError* pError = nullptr; +#if GTK_CHECK_VERSION(3,22,0) + gtk_show_uri_on_window( + GTK_WINDOW (gtk_widget_get_toplevel(GTK_WIDGET(pLOKDocView))), + pPayload, GDK_CURRENT_TIME, &pError); +#else + (void) pLOKDocView; gtk_show_uri(nullptr, pPayload, GDK_CURRENT_TIME, &pError); +#endif if (pError != nullptr) { g_warning("Unable to show URI %s : %s", pPayload, pError->message); |