From: Christian Dywan Date: Sun, 25 Apr 2010 16:58:28 +0000 (+0200) Subject: Expose tabs in MidoriBrowser as GList X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7044bb70c4b097f799e62bdb932e4113774faaea;p=midori Expose tabs in MidoriBrowser as GList --- diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 12227714..ac770d8b 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -7613,6 +7613,24 @@ midori_browser_get_current_tab (MidoriBrowser* browser) return NULL; } +/** + * midori_browser_get_tabs: + * @browser: a #MidoriBrowser + * + * Retrieves the tabs as a list. + * + * Return value: a newly allocated #GList of #MidoriView + * + * Since: 0.2.5 + **/ +GList* +midori_browser_get_tabs (MidoriBrowser* browser) +{ + g_return_val_if_fail (MIDORI_IS_BROWSER (browser), NULL); + + return gtk_container_get_children (GTK_CONTAINER (browser->notebook)); +} + /** * midori_browser_get_proxy_items: * @browser: a #MidoriBrowser diff --git a/midori/midori-browser.h b/midori/midori-browser.h index 2bd4c432..d0bb9707 100644 --- a/midori/midori-browser.h +++ b/midori/midori-browser.h @@ -133,6 +133,9 @@ midori_browser_set_current_tab (MidoriBrowser* browser, GtkWidget* midori_browser_get_current_tab (MidoriBrowser* browser); +GList* +midori_browser_get_tabs (MidoriBrowser* browser); + KatzeArray* midori_browser_get_proxy_items (MidoriBrowser* browser);