Add midori_browser_get_nth_tab to obtain a particular tab by index
This commit is contained in:
parent
60d3def11c
commit
37b715e571
2 changed files with 26 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue