mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
implement tab pin action
This commit is contained in:
parent
575ef01802
commit
fb8ef48917
2 changed files with 5 additions and 9 deletions
|
|
@ -113,10 +113,10 @@ impl Tab {
|
|||
|
||||
// Toggle pin status for active tab
|
||||
pub fn pin(&self) {
|
||||
if let Some(id) = self.widget.current_page_keyword() {
|
||||
if let Some(item) = self.index.borrow().get(&id) {
|
||||
item.pin(); // toggle
|
||||
}
|
||||
if let Some(page) = self.widget.gobject().selected_page() {
|
||||
self.widget
|
||||
.gobject()
|
||||
.set_page_pinned(&page, !page.is_pinned()); // toggle
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue