[epiphany/wip/christopherdavis/tabs-page: 2/2] window-commands: Ensure view goes to content on tab creation
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/christopherdavis/tabs-page: 2/2] window-commands: Ensure view goes to content on tab creation
- Date: Fri, 19 Apr 2019 16:56:54 +0000 (UTC)
commit b9123aa101f8c3f3006b3ef420882850dd7c1fcd
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]