[epiphany] application mode: when opening a tab on the default browser, close it
- From: Gustavo Noronha Silva <gns src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] application mode: when opening a tab on the default browser, close it
- Date: Tue, 24 Oct 2017 17:33:21 +0000 (UTC)
commit 26bb4848639e1c0ac45fdba8356308d5a347e697
Author: Gustavo Noronha Silva <gns gnome org>
Date: Mon Oct 9 15:25:50 2017 -0300
application mode: when opening a tab on the default browser, close it
https://bugzilla.gnome.org/show_bug.cgi?id=788845
src/ephy-window.c | 7 +++++++
src/ephy-window.h | 2 ++
src/window-commands.c | 2 ++
3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index e97a112..5c6883f 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2552,6 +2552,13 @@ ephy_window_close_tab (EphyWindow *window,
}
}
+void
+ephy_window_close_active_child (EphyWindow *window)
+{
+ EphyEmbed *embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
+ ephy_window_close_tab (window, embed);
+}
+
static void
tab_has_modified_forms_cb (EphyWebView *view,
GAsyncResult *result,
diff --git a/src/ephy-window.h b/src/ephy-window.h
index 3778833..edec1a9 100644
--- a/src/ephy-window.h
+++ b/src/ephy-window.h
@@ -61,6 +61,8 @@ GtkWidget *ephy_window_get_header_bar (EphyWindow *window);
gboolean ephy_window_close (EphyWindow *window);
+void ephy_window_close_active_child (EphyWindow *window);
+
EphyWindowChrome ephy_window_get_chrome (EphyWindow *window);
EphyLocationController *ephy_window_get_location_controller (EphyWindow *window);
diff --git a/src/window-commands.c b/src/window-commands.c
index 378e4e1..cbe03f6 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -936,6 +936,8 @@ window_cmd_open_in_browser (GSimpleAction *action,
ephy_file_open_uri_in_default_browser (uri, GDK_CURRENT_TIME,
gtk_window_get_screen (GTK_WINDOW (window)));
+
+ ephy_window_close_active_child (window);
}
typedef struct {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]