From 16319a10bbec332f6d173b5cca09e08d0196310c Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Sat, 16 May 2026 14:07:44 +0200 Subject: [PATCH] add new_notebook toolbar item --- application/src/main.rs | 2 ++ application/src/window.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/application/src/main.rs b/application/src/main.rs index 78ae303..82dfcda 100644 --- a/application/src/main.rs +++ b/application/src/main.rs @@ -133,10 +133,12 @@ impl Application for App { } fn create_toolbar(app: &AppContext) { + app.toolbar_item("new_notebook").icon("folder-new").action("new_notebook").create(); app.toolbar_item("go_back").icon("go-previous").action("go_back").create(); app.toolbar_item("go_forward").icon("go-next").action("go_forward").create(); app.toolbar_item("new_note").icon("document-new").action("new_note").create(); + app.toolbar_add_default("new_notebook", ToolbarItemPosition::SidebarRight); app.toolbar_add_default("go_back", ToolbarItemPosition::Left); app.toolbar_add_default("go_forward", ToolbarItemPosition::Left); app.toolbar_add_default("new_note", ToolbarItemPosition::Left); diff --git a/application/src/window.rs b/application/src/window.rs index 2880d3a..e32fee9 100644 --- a/application/src/window.rs +++ b/application/src/window.rs @@ -40,7 +40,7 @@ pub struct MainWindow { #[ui_actions] impl MainWindow { #[action] - pub fn my_action(&mut self, _event: &ActionEvent) { + pub fn new_notebook(&mut self, _event: &ActionEvent) { } } -- 2.47.3