Commit 889707bf authored by Michael Catanzaro's avatar Michael Catanzaro

Revert "Use gtk_show_uri_on_window"

This reverts commit 486f4389.
parent 67cfa075
......@@ -122,6 +122,7 @@ ephy_gui_help (GtkWidget *parent,
const char *page)
{
GError *error = NULL;
GdkScreen *screen;
char *url;
if (page)
......@@ -129,7 +130,12 @@ ephy_gui_help (GtkWidget *parent,
else
url = g_strdup ("help:epiphany");
gtk_show_uri_on_window (GTK_WINDOW (parent), url, gtk_get_current_event_time (), &error);
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);
if (error != NULL) {
GtkWidget *dialog;
......
......@@ -1952,8 +1952,10 @@ decide_policy_cb (WebKitWebView *web_view,
if (!ephy_embed_utils_address_has_web_scheme (uri)) {
GError *error = NULL;
GdkScreen *screen;
gtk_show_uri_on_window (GTK_WINDOW (window), uri, GDK_CURRENT_TIME, &error);
screen = gtk_widget_get_screen (GTK_WIDGET (web_view));
gtk_show_uri (screen, uri, GDK_CURRENT_TIME, &error);
if (error) {
LOG ("failed to handle non web scheme: %s", error->message);
......
......@@ -2043,6 +2043,7 @@ 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
......@@ -2062,7 +2063,13 @@ window_cmd_send_to (GSimpleAction *action,
g_free (subject);
g_free (body);
if (!gtk_show_uri_on_window (GTK_WINDOW (window), command, gtk_get_current_event_time (), &error)) {
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)) {
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