Commit 486f4389 authored by Michael Catanzaro's avatar Michael Catanzaro

Use gtk_show_uri_on_window

To avoid deprecation warnings
parent 2cb839ce
......@@ -54,7 +54,6 @@ ephy_gui_help (GtkWidget *parent,
const char *page)
{
GError *error = NULL;
GdkScreen *screen;
char *url;
if (page)
......@@ -62,12 +61,7 @@ ephy_gui_help (GtkWidget *parent,
else
url = g_strdup ("help:epiphany");
if (parent)
screen = gtk_widget_get_screen (parent);
else
screen = gdk_screen_get_default ();
gtk_show_uri (screen, url, gtk_get_current_event_time (), &error);
gtk_show_uri_on_window (GTK_WINDOW (parent), url, gtk_get_current_event_time (), &error);
if (error != NULL) {
GtkWidget *dialog;
......
......@@ -1946,10 +1946,8 @@ decide_policy_cb (WebKitWebView *web_view,
if (!ephy_embed_utils_address_has_web_scheme (uri)) {
GError *error = NULL;
GdkScreen *screen;
screen = gtk_widget_get_screen (GTK_WIDGET (web_view));
gtk_show_uri (screen, uri, GDK_CURRENT_TIME, &error);
gtk_show_uri_on_window (GTK_WINDOW (window), uri, GDK_CURRENT_TIME, &error);
if (error) {
LOG ("failed to handle non web scheme: %s", error->message);
......
......@@ -2052,7 +2052,6 @@ window_cmd_send_to (GSimpleAction *action,
EphyEmbed *embed;
char *command, *subject, *body;
const char *location, *title;
GdkScreen *screen;
GError *error = NULL;
embed = ephy_embed_container_get_active_child
......@@ -2072,13 +2071,7 @@ window_cmd_send_to (GSimpleAction *action,
g_free (subject);
g_free (body);
if (window) {
screen = gtk_widget_get_screen (GTK_WIDGET (window));
} else {
screen = gdk_screen_get_default ();
}
if (!gtk_show_uri (screen, command, gtk_get_current_event_time (), &error)) {
if (!gtk_show_uri_on_window (GTK_WINDOW (window), command, gtk_get_current_event_time (), &error)) {
g_warning ("Unable to send link by email: %s\n", error->message);
g_error_free (error);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment