From: Christian Dywan Date: Sun, 25 Apr 2010 16:48:04 +0000 (+0200) Subject: Expose browsers in MidoriApp as GList X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=102810842f05fb14b4d6d1c936b1e470078a5f16;p=midori Expose browsers in MidoriApp as GList --- diff --git a/midori/midori-app.c b/midori/midori-app.c index 29910036..0758bb2e 100644 --- a/midori/midori-app.c +++ b/midori/midori-app.c @@ -1146,7 +1146,23 @@ midori_app_create_browser (MidoriApp* app) "history", app->history, NULL); } +/** + * midori_app_get_browsers: + * @app: a #MidoriApp + * + * Retrieves the browsers as a list. + * + * Return value: a newly allocated #Glist of #MidoriBrowser + * + * Since: 0.2.5 + **/ +GList* +midori_app_get_browsers (MidoriApp* app) +{ + g_return_val_if_fail (MIDORI_IS_APP (app), NULL); + return katze_array_get_items (app->browsers); +} /** * midori_app_quit: * @app: a #MidoriApp diff --git a/midori/midori-app.h b/midori/midori-app.h index 7c280967..8eeef4af 100644 --- a/midori/midori-app.h +++ b/midori/midori-app.h @@ -65,6 +65,9 @@ midori_app_add_browser (MidoriApp* app, MidoriBrowser* midori_app_create_browser (MidoriApp* app); +GList* +midori_app_get_browsers (MidoriApp* app); + void midori_app_quit (MidoriApp* app);