From: Christian Dywan Date: Mon, 26 Apr 2010 21:42:43 +0000 (+0200) Subject: Implement midori_app_get_browser in MidoriApp X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64b6f6ce6d0655c0a090cf4262182a61657cebfa;p=midori Implement midori_app_get_browser in MidoriApp --- diff --git a/midori/midori-app.c b/midori/midori-app.c index 0758bb2e..d4cfd16b 100644 --- a/midori/midori-app.c +++ b/midori/midori-app.c @@ -1,5 +1,5 @@ /* - Copyright (C) 2008-2009 Christian Dywan + Copyright (C) 2008-2010 Christian Dywan This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -1146,6 +1146,7 @@ midori_app_create_browser (MidoriApp* app) "history", app->history, NULL); } + /** * midori_app_get_browsers: * @app: a #MidoriApp @@ -1163,6 +1164,26 @@ midori_app_get_browsers (MidoriApp* app) return katze_array_get_items (app->browsers); } + +/** + * midori_app_get_browser: + * @app: a #MidoriApp + * + * Determines the current browser, which is the one that was + * last focussed. + * + * Return value: the current #MidoriBrowser + * + * Since: 0.2.5 + **/ +MidoriBrowser* +midori_app_get_browser (MidoriApp* app) +{ + g_return_val_if_fail (MIDORI_IS_APP (app), NULL); + + return app->browser; +} + /** * midori_app_quit: * @app: a #MidoriApp diff --git a/midori/midori-app.h b/midori/midori-app.h index 8eeef4af..c9a10e0c 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); +MidoriBrowser* +midori_app_get_browser (MidoriApp* app); + GList* midori_app_get_browsers (MidoriApp* app);