[Poppler-bugs] [Bug 103050] Fix warnings and cleanup unused defs
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Oct 22 07:20:28 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=103050
--- Comment #65 from Carlos Garcia Campos <carlosgc at gnome.org> ---
Comment on attachment 134581
--> https://bugs.freedesktop.org/attachment.cgi?id=134581
Fix deprecated warnings in glib demo
Review of attachment 134581:
-----------------------------------------------------------------
::: glib/demo/utils.c
@@ +274,5 @@
> uri = g_file_get_uri (file);
> g_object_unref (file);
> if (uri) {
> +#if GTK_CHECK_VERSION(3, 22, 0)
> + gtk_show_uri_on_window (GTK_WINDOW(gtk_widget_get_window (button)),
This is not correct. gtk_show_uri_on_window() expects a GtkWindow, but
gtk_widget_get_window() returns a GdkWindow (which is not a toplevel window).
To get the toplevel window of a widget you can use something like this:
toplevel = gtk_widget_get_toplevel (button);
gtk_show_uri_on_window (gtk_widget_is_toplevel (toplevel) ? GTK_WINDOW
(toplevel) : NULL,
@@ +542,5 @@
> uri = g_file_get_uri (file);
> g_object_unref (file);
> if (uri) {
> +#if GTK_CHECK_VERSION(3, 22, 0)
> + gtk_show_uri_on_window (GTK_WINDOW(gtk_widget_get_window (button)),
Ditto.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20171022/48267019/attachment.html>
More information about the Poppler-bugs
mailing list