Replace client call to Gtk.show_uri() with show_uri_on_window().

Former is deprecated, latter works better with Flatpak.

* src/client/application/geary-application.vala: Use show_uri_on_window.
This commit is contained in:
Michael James Gratton 2017-12-02 01:03:51 +11:00
parent fd91eee46d
commit 6c6737d2ad

View file

@ -342,9 +342,8 @@ public class GearyApplication : Gtk.Application {
* Displays a URI on the current active window, if any.
*/
public void show_uri(string uri) throws Error {
Gtk.Window? window = get_active_window();
bool success = Gtk.show_uri(
window != null ? window.get_screen() : null, uri, Gdk.CURRENT_TIME
bool success = Gtk.show_uri_on_window(
get_active_window(), uri, Gdk.CURRENT_TIME
);
if (!success) {
throw new IOError.FAILED("gtk_show_uri() returned false");