[hotssh] window: Switch to newly created tabs
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hotssh] window: Switch to newly created tabs
- Date: Tue, 12 Nov 2013 14:09:12 +0000 (UTC)
commit 0d343127b77365992fdd7fa62e6a140b11904ed4
Author: Colin Walters <walters verbum org>
Date: Wed Nov 6 20:45:19 2013 -0500
window: Switch to newly created tabs
src/hotssh-win.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/hotssh-win.c b/src/hotssh-win.c
index 10ad3a1..248c222 100644
--- a/src/hotssh-win.c
+++ b/src/hotssh-win.c
@@ -131,6 +131,7 @@ hotssh_win_append_tab (HotSshWindow *self, gboolean new_channel)
HotSshWindowPrivate *priv = hotssh_window_get_instance_private (self);
GtkWidget *label;
HotSshTab *tab;
+ int idx;
if (new_channel)
{
@@ -146,12 +147,11 @@ hotssh_win_append_tab (HotSshWindow *self, gboolean new_channel)
g_object_set_data ((GObject*)tab, "window", self);
label = create_tab_label (self, tab);
- gtk_notebook_append_page ((GtkNotebook*)priv->main_notebook,
- (GtkWidget*)tab,
- (GtkWidget*)label);
-
- gtk_widget_show_all (priv->main_notebook);
-
+ idx = gtk_notebook_append_page ((GtkNotebook*)priv->main_notebook,
+ (GtkWidget*)tab,
+ (GtkWidget*)label);
+ gtk_widget_show_all (tab);
+ gtk_notebook_set_current_page ((GtkNotebook*)priv->main_notebook, idx);
gtk_widget_grab_focus ((GtkWidget*)tab);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]