From: Olaf Wintermann Date: Sat, 16 May 2026 12:07:44 +0000 (+0200) Subject: add new_notebook toolbar item X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=16319a10bbec332f6d173b5cca09e08d0196310c;p=note.git add new_notebook toolbar item --- 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) { } }