[Xfce4-commits] <midori:master> Don't destroy the current tab if it is last and blank

Christian Dywan noreply at xfce.org
Tue Jul 19 22:08:01 CEST 2011


Updating branch refs/heads/master
         to 92e23d9d4edf0efff8e5234d0c92f07aa41dfcf0 (commit)
       from 868dd3abf0400ad983e050f1da30ee86c1aa04f4 (commit)

commit 92e23d9d4edf0efff8e5234d0c92f07aa41dfcf0
Author: André Stösel <andre at stoesel.de>
Date:   Tue Jul 19 21:57:27 2011 +0200

    Don't destroy the current tab if it is last and blank
    
    If you hit the shortcut for closing tabs over a long time
    (to close all tabs), Midori hangs for some seconds.

 midori/midori-browser.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 8df0c6c..3f96210 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -2385,6 +2385,11 @@ _action_tab_close_activate (GtkAction*     action,
                             MidoriBrowser* browser)
 {
     GtkWidget* widget = midori_browser_get_current_tab (browser);
+    if (gtk_notebook_get_nth_page (GTK_NOTEBOOK (browser->notebook), 1) == NULL &&
+        midori_view_is_blank (MIDORI_VIEW (widget)))
+    {
+        return;
+    }
     gtk_widget_destroy (widget);
 }
 



More information about the Xfce4-commits mailing list