[tepl] TabGroup: append_tab(): grab focus to view if jump_to



commit 7bcf93bfc61b12ce647a9a3fc37eba4cb72f1501
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Aug 25 12:10:46 2017 +0200

    TabGroup: append_tab(): grab focus to view if jump_to
    
    It's at least for the win.tepl-new-file GAction.

 tepl/tepl-tab-group.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/tepl/tepl-tab-group.c b/tepl/tepl-tab-group.c
index 16876f4..22aeeb1 100644
--- a/tepl/tepl-tab-group.c
+++ b/tepl/tepl-tab-group.c
@@ -313,6 +313,11 @@ tepl_tab_group_append_tab (TeplTabGroup *tab_group,
 
        if (jump_to)
        {
+               TeplView *view;
+
                tepl_tab_group_set_active_tab (tab_group, tab);
+
+               view = tepl_tab_get_view (tab);
+               gtk_widget_grab_focus (GTK_WIDGET (view));
        }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]