]> spindle.queued.net Git - midori/commitdiff
Fallback to the first browser if one is closed
authorAlexander Butenko <a.butenka@gmail.com>
Mon, 22 Feb 2010 17:53:00 +0000 (18:53 +0100)
committerChristian Dywan <christian@twotoasts.de>
Mon, 22 Feb 2010 18:03:45 +0000 (19:03 +0100)
We need to keep one browser as the default for commands
and opening files externally.

midori/midori-app.c

index 0bf21b1e7c02a2fdc02b489e7befe2afc1444b12..d8cb2d9f4f605c73251ebc906c618ab8facfeccc 100644 (file)
@@ -172,7 +172,10 @@ midori_browser_destroy_cb (MidoriBrowser* browser,
     g_signal_emit (app, signals[REMOVE_BROWSER], 0, browser);
     katze_array_remove_item (app->browsers, browser);
     if (!katze_array_is_empty (app->browsers))
+    {
+        app->browser = katze_array_get_nth_item (app->browsers, 0);
         return FALSE;
+    }
     midori_app_quit (app);
     return TRUE;
 }