mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-05 16:04:15 +00:00
implement tab pin action
This commit is contained in:
parent
575ef01802
commit
fb8ef48917
@ -113,10 +113,10 @@ impl Tab {
|
|||||||
|
|
||||||
// Toggle pin status for active tab
|
// Toggle pin status for active tab
|
||||||
pub fn pin(&self) {
|
pub fn pin(&self) {
|
||||||
if let Some(id) = self.widget.current_page_keyword() {
|
if let Some(page) = self.widget.gobject().selected_page() {
|
||||||
if let Some(item) = self.index.borrow().get(&id) {
|
self.widget
|
||||||
item.pin(); // toggle
|
.gobject()
|
||||||
}
|
.set_page_pinned(&page, !page.is_pinned()); // toggle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,10 +56,6 @@ impl Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
pub fn pin(&self) {
|
|
||||||
//self.label.pin(!self.label.is_pinned()) // toggle
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn page_navigation_base(&self) {
|
pub fn page_navigation_base(&self) {
|
||||||
self.page.navigation_base()
|
self.page.navigation_base()
|
||||||
}
|
}
|
||||||
@ -169,7 +165,7 @@ impl Item {
|
|||||||
is_selected,
|
is_selected,
|
||||||
) {
|
) {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
let id = Database::last_insert_id(transaction);
|
let _id = Database::last_insert_id(transaction);
|
||||||
|
|
||||||
// Delegate save action to childs
|
// Delegate save action to childs
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user