Browse Source

implement close all tabs action

master
yggverse 2 months ago
parent
commit
738203aaab
  1. 2
      src/browser/main/mod.rs
  2. 7
      src/browser/main/tab/mod.rs

2
src/browser/main/mod.rs

@ -35,7 +35,7 @@ impl Main { @@ -35,7 +35,7 @@ impl Main {
}
pub fn tab_close_all(&self) {
self.tab.close();
self.tab.close_all();
}
pub fn tab_pin(&self) {

7
src/browser/main/tab/mod.rs

@ -58,10 +58,11 @@ impl Tab { @@ -58,10 +58,11 @@ impl Tab {
self.widget.remove_page(self.widget.current_page());
}
/* @TODO
pub fn close_all(&self) {
todo!()
}*/
while let Some(page_number) = self.widget.current_page() {
self.widget.remove_page(Some(page_number));
}
}
pub fn pin(&self) -> bool {
todo!()

Loading…
Cancel
Save