TabView.setPagePinned

void setPagePinned(adw.tab_page.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 adw.tab_view.TabView.nPinnedPages pages in self 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.

adw.tab_bar.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. adw.tab_page.TabPage.indicatorIcon
  2. A spinner if adw.tab_page.TabPage.loading is TRUE
  3. adw.tab_page.TabPage.icon
  4. adw.tab_view.TabView.defaultIcon

adw.tab_overview.TabOverview will not show a thumbnail for pinned pages, and replace the close button with an unpin button. Unlike adw.tab_bar.TabBar, it will still display the page's title, icon and indicator separately.

Pinned pages cannot be closed by default, see adw.tab_view.TabView.closePage for how to override that behavior.

Changes the value of the adw.tab_page.TabPage.pinned property.

Parameters

pagea page of self
pinnedwhether page should be pinned