[epiphany/gnome-3-24-loki: 2/6] Revert "Use gtk_show_uri_on_window"
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-24-loki: 2/6] Revert "Use gtk_show_uri_on_window"
- Date: Thu, 21 Sep 2017 23:10:06 +0000 (UTC)
commit 978f8566051307d949b8ae95066e8fc53ac8d776
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Thu Sep 21 17:42:59 2017 -0500
Revert "Use gtk_show_uri_on_window"
This reverts commit 486f4389a11bee5e5fb2a4e2f1b415d082e6e6b6.
lib/ephy-gui.c | 8 +++++++-
src/ephy-window.c | 4 +++-
src/window-commands.c | 9 ++++++++-
3 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/lib/ephy-gui.c b/lib/ephy-gui.c
index 3d1836c..435ab27 100644
--- a/lib/ephy-gui.c
+++ b/lib/ephy-gui.c
@@ -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;
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 9709ab1..e3b1b9d 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -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);
diff --git a/src/window-commands.c b/src/window-commands.c
index d48df1b..bf074da 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -2039,6 +2039,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
@@ -2058,7 +2059,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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]