set_page_pinned


Description:

public void set_page_pinned (TabPage page, bool pinned)

Pins or unpins page.

Pinned pages are guaranteed to be placed before all non-pinned pages; at any given moment the first [property@TabView:n-pinned-pages] pages in this are guaranteed to be pinned.

When a page is pinned or unpinned, it's automatically reordered: pinning a page moves it after other pinned pages; unpinning a page moves it before other non-pinned pages.

Pinned pages can still be reordered between each other.

[class@TabBar] will display pinned pages in a compact form, never showing the title or close button, and only showing a single icon, selected in the following order:

  1. [property@TabPage:indicator-icon]
  2. A spinner if [property@TabPage:loading] is `TRUE`
  3. [property@TabPage:icon]
  4. [property@TabView:default-icon]

Pinned pages cannot be closed by default, see [signal@TabView:HdyTabView:close-page] for how to override that behavior.

Parameters:

this

a tab view

page

a page of this

pinned

whether page should be pinned