[hotssh/wip/libssh] window: Switch to newly created tabs
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hotssh/wip/libssh] window: Switch to newly created tabs
- Date: Thu, 7 Nov 2013 01:45:47 +0000 (UTC)
commit 57b4ad04ff8f50ecdc817b4b2ade63d4b928d250
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]