[Xfce4-commits] <midori:master> Switch to Tab Panel after activating it for the first time

Christian Dywan noreply at xfce.org
Mon Aug 23 19:40:01 CEST 2010


Updating branch refs/heads/master
         to 233ff2602de32f211f08d40c919f32c0081da2fb (commit)
       from 50af9f272e1a8937617a9dd5786c4e4f57560f6d (commit)

commit 233ff2602de32f211f08d40c919f32c0081da2fb
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Aug 22 21:19:14 2010 +0200

    Switch to Tab Panel after activating it for the first time

 extensions/tab-panel.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/extensions/tab-panel.c b/extensions/tab-panel.c
index 2d182d5..beabcda 100644
--- a/extensions/tab-panel.c
+++ b/extensions/tab-panel.c
@@ -498,6 +498,7 @@ tab_panel_app_add_browser_cb (MidoriApp*       app,
     GtkCellRenderer* renderer_text;
     GtkWidget* panel;
     GtkWidget* toolbar;
+    gint i;
     /* GtkToolItem* toolitem; */
 
     g_object_set (browser, "show-tabs", FALSE, NULL);
@@ -564,8 +565,10 @@ tab_panel_app_add_browser_cb (MidoriApp*       app,
     gtk_widget_show (GTK_WIDGET (toolitem));
     gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitem, -1); */
 
-    midori_panel_append_widget (MIDORI_PANEL (panel), treeview,
-                                STOCK_TAB_PANEL, _("Tab Panel"), toolbar);
+    i = midori_panel_append_widget (MIDORI_PANEL (panel), treeview,
+                                    STOCK_TAB_PANEL, _("Tab Panel"), toolbar);
+    if (gtk_widget_get_visible (GTK_WIDGET (browser)))
+        midori_panel_set_current_page (MIDORI_PANEL (panel), i);
     g_object_unref (panel);
 
     midori_browser_foreach (browser,



More information about the Xfce4-commits mailing list