[epiphany/wip/christopherdavis/tabs-page: 3/3] window-commands: Ensure view goes to content on tab creation
- From: Jan-Michael Brummer <jbrummer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/christopherdavis/tabs-page: 3/3] window-commands: Ensure view goes to content on tab creation
- Date: Sat, 20 Apr 2019 14:33:50 +0000 (UTC)
commit 335fd19cd46714478f091ce27eb12a17ca4d87fc
Author: Christopher Davis <brainblasted disroot org>
Date: Fri Apr 19 05:35:17 2019 -0400
window-commands: Ensure view goes to content on tab creation
With the new Tabs page, the button to create a tab did
nothing after a tab was created, which can be jarring
as the user may expect some more visible action to happen.
Now we switch to the new tab as soon as it's created.
src/window-commands.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/window-commands.c b/src/window-commands.c
index 639342e7e..bbafd10b4 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -831,11 +831,15 @@ window_cmd_new_tab (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
+ GtkWidget *stack;
EphyWindow *window = user_data;
+ stack = ephy_window_get_stack (window);
+
ephy_link_open (EPHY_LINK (window),
NULL, NULL,
EPHY_LINK_NEW_TAB | EPHY_LINK_JUMP_TO);
+ gtk_stack_set_visible_child_name (GTK_STACK (stack), "content");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]