From 06e541ca4d7c71756a952ac16bf2f1106ad31e4c Mon Sep 17 00:00:00 2001 From: Julian Hofer Date: Fri, 27 Oct 2023 20:44:40 +0200 Subject: [PATCH] Add Sabrina's changes --- book/src/actions.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/book/src/actions.md b/book/src/actions.md index 2ed65697397c..194630c8aaf4 100644 --- a/book/src/actions.md +++ b/book/src/actions.md @@ -34,7 +34,7 @@ The answer is that it is so common to add actions to windows and applications th - "app" for actions global to the application, and - "win" for actions tied to an application window. -We can add a action group to any widget via the method [`insert_action_group`](https://gtk-rs.org/gtk4-rs/stable/latest/docs/gtk4/prelude/trait.WidgetExt.html#method.insert_action_group). +We can add an action group to any widget via the method [`insert_action_group`](https://gtk-rs.org/gtk4-rs/stable/latest/docs/gtk4/prelude/trait.WidgetExt.html#method.insert_action_group). Let's add our action to the action group "custom-group" and add the group then to our window. The action entry isn't specific to our window anymore, the first parameter of the "activate" callback is of type `SimpleActionGroup` instead of `ApplicationWindow`. This means we have to clone `window` into the closure. @@ -53,7 +53,7 @@ Filename: listings/actions/7/window/mod.rs @@ -309,5 +309,5 @@ Filename: