mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
update comments
This commit is contained in:
parent
5058c1be8a
commit
71f7cbcd2b
@ -33,18 +33,20 @@ impl Widget {
|
|||||||
// Actions
|
// Actions
|
||||||
|
|
||||||
/// Close page at given `position`, `None` to close selected page (if available)
|
/// Close page at given `position`, `None` to close selected page (if available)
|
||||||
|
/// * this action does not close pinned pages
|
||||||
pub fn close(&self, position: Option<i32>) {
|
pub fn close(&self, position: Option<i32>) {
|
||||||
if let Some(page) = self.page(position) {
|
if let Some(page) = self.page(position) {
|
||||||
self.gobject.close_page(&page);
|
self.gobject.close_page(&page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Close all pages, including selected one
|
/// Close all pages
|
||||||
|
/// * this action does not close pinned pages
|
||||||
pub fn close_all(&self) {
|
pub fn close_all(&self) {
|
||||||
// @TODO skip pinned or make confirmation alert (GTK>=4.10)
|
// @TODO skip pinned or make confirmation alert (GTK>=4.10)
|
||||||
if let Some(selected_page) = self.gobject.selected_page() {
|
if let Some(selected_page) = self.gobject.selected_page() {
|
||||||
self.gobject.close_other_pages(&selected_page);
|
self.gobject.close_other_pages(&selected_page);
|
||||||
self.close(None);
|
self.gobject.close_page(&selected_page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user