<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Fix warnings and cleanup unused defs"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103050#c65">Comment # 65</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Fix warnings and cleanup unused defs"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103050">bug 103050</a>
from <span class="vcard"><a class="email" href="mailto:carlosgc@gnome.org" title="Carlos Garcia Campos <carlosgc@gnome.org>"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=134581" name="attach_134581" title="Fix deprecated warnings in glib demo">attachment 134581</a> <a href="attachment.cgi?id=134581&action=edit" title="Fix deprecated warnings in glib demo">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=103050&attachment=134581'>[review]</a>
Fix deprecated warnings in glib demo
Review of <span class=""><a href="attachment.cgi?id=134581" name="attach_134581" title="Fix deprecated warnings in glib demo">attachment 134581</a> <a href="attachment.cgi?id=134581&action=edit" title="Fix deprecated warnings in glib demo">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=103050&attachment=134581'>[review]</a>:
-----------------------------------------------------------------
::: glib/demo/utils.c
@@ +274,5 @@
<span class="quote">> 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)),</span >
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 @@
<span class="quote">> 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)),</span >
Ditto.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>