]> spindle.queued.net Git - midori/commitdiff
Reduce notebook alloc timeout and update each time
authorChristian Dywan <christian@twotoasts.de>
Sat, 10 Dec 2011 18:27:05 +0000 (19:27 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 10 Dec 2011 18:27:05 +0000 (19:27 +0100)
midori/midori-browser.c

index 5117d6fd8a57f20aa405a674f62a1a946b58d291..76283b4feb9103be4eb8efe57b50cd1cb8b0f97b 100644 (file)
@@ -1527,10 +1527,13 @@ midori_browser_notebook_size_allocate_cb (GtkWidget*     widget,
                                           GdkRectangle*  allocation,
                                           MidoriBrowser* browser)
 {
-    if (browser->notebook_alloc_timeout > 0)
+    if (!gtk_notebook_get_show_tabs (GTK_NOTEBOOK (browser->notebook)))
         return;
 
-    browser->notebook_alloc_timeout = g_timeout_add_full (G_PRIORITY_LOW, 2500,
+    if (browser->notebook_alloc_timeout > 0)
+        g_source_remove (browser->notebook_alloc_timeout);
+
+    browser->notebook_alloc_timeout = g_timeout_add_full (G_PRIORITY_LOW, 250,
         (GSourceFunc)midori_browser_notebook_alloc_timeout, browser, NULL);
 }