[Xfce4-commits] <midori:master> Fix regression causing wrong tab URL "ghost" in urlbar

Christian Dywan noreply at xfce.org
Thu Jul 19 02:28:02 CEST 2012


Updating branch refs/heads/master
         to 7c5410468f1c2eb54f962c7ccaba3c351c5b7781 (commit)
       from 31fe130f87ffbe373e2b696de555719b3e4af07b (commit)

commit 7c5410468f1c2eb54f962c7ccaba3c351c5b7781
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Jul 19 01:27:48 2012 +0200

    Fix regression causing wrong tab URL "ghost" in urlbar

 midori/midori-browser.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 7a30766..d137765 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -8054,6 +8054,8 @@ midori_browser_get_current_tab (MidoriBrowser* browser)
 {
     #ifdef HAVE_GRANITE
     GraniteWidgetsTab* tab;
+    #else
+    gint n;
     #endif
 
     g_return_val_if_fail (MIDORI_IS_BROWSER (browser), NULL);
@@ -8063,8 +8065,8 @@ midori_browser_get_current_tab (MidoriBrowser* browser)
         GRANITE_WIDGETS_DYNAMIC_NOTEBOOK (browser->notebook));
     return tab ? granite_widgets_tab_get_page (tab) : NULL;
     #else
-    return midori_browser_get_nth_tab (browser,
-        midori_browser_get_current_page (browser));
+    n = midori_browser_get_current_page (browser);
+    return (n >= 0) ? midori_browser_get_nth_tab (browser, n) : NULL;
     #endif
 }
 


More information about the Xfce4-commits mailing list