diff --git a/midori/midori-browser.c b/midori/midori-browser.c index c69f219b..d6114e7f 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -6067,6 +6067,28 @@ midori_browser_get_current_page (MidoriBrowser* browser) return gtk_notebook_get_current_page (GTK_NOTEBOOK (browser->notebook)); } +/** + * midori_browser_get_nth_tab: + * @browser: a #MidoriBrowser + * @page: the index of a tab + * + * Retrieves the tab at the position @page. + * + * If there is no page present at all, %NULL is returned. + * + * Return value: the selected page, or -1 + * + * Since: 0.1.9 + **/ +GtkWidget* +midori_browser_get_nth_tab (MidoriBrowser* browser, + gint page) +{ + g_return_val_if_fail (MIDORI_IS_BROWSER (browser), NULL); + + return gtk_notebook_get_nth_page (GTK_NOTEBOOK (browser->notebook), page); +} + /** * midori_browser_set_current_tab: * @browser: a #MidoriBrowser diff --git a/midori/midori-browser.h b/midori/midori-browser.h index 49d475d6..08340280 100644 --- a/midori/midori-browser.h +++ b/midori/midori-browser.h @@ -122,6 +122,10 @@ midori_browser_set_current_page (MidoriBrowser* browser, gint midori_browser_get_current_page (MidoriBrowser* browser); +GtkWidget* +midori_browser_get_nth_tab (MidoriBrowser* browser, + gint n); + void midori_browser_set_current_tab (MidoriBrowser* browser, GtkWidget* widget);