Fallback to the first browser if one is closed

We need to keep one browser as the default for commands
and opening files externally.
This commit is contained in:
Alexander Butenko 2010-02-22 18:53:00 +01:00 committed by Christian Dywan
parent 8388e263c2
commit f3f53db4d7

View file

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