From 76330b91b4231b371ff7bd50b786ef616962c91c Mon Sep 17 00:00:00 2001 From: Taiko2k Date: Fri, 28 Jan 2022 17:33:18 +1300 Subject: [PATCH] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 806e667..67533d1 100644 --- a/README.md +++ b/README.md @@ -358,6 +358,12 @@ For this there are multiple new concepts we need to introduce: So, we click a MenuButton, which shows a Popover that was generated from a MenuModel that is composed of Actions. +First make sure `Gio` is added to the list of things we're importing from `gi.repository`: + +```python +from gi.repository import Gtk, Adw, Gio +``` + ```python # Create a new "Action" action = Gio.SimpleAction.new("something", None) @@ -367,7 +373,7 @@ So, we click a MenuButton, which shows a Popover that was generated from a MenuM # Create a new menu, containing that action menu = Gio.Menu.new() - menu.append("Do Something", "win.something") # Or you would do app.grape if you had attached the + menu.append("Do Something", "win.something") # Or you would do app.something if you had attached the # action to the application # Create a popover