diff options
author | Christopher Davis <christopherdavis@gnome.org> | 2022-08-21 12:53:28 -0400 |
---|---|---|
committer | Marcus Lundblad <ml@dfupdate.se> | 2022-08-26 20:08:10 +0000 |
commit | 04f52721ce685b0dc3571bbd58627b7f40af4177 (patch) | |
tree | 5f6d5792fd4d02f925bd27477b13a4f404cd5904 /data/ui | |
parent | b49dda4af9e9e8150cf2f1082d919b8f9a6847e7 (diff) | |
download | gnome-maps-04f52721ce685b0dc3571bbd58627b7f40af4177.tar.gz |
general: Rework context menu
The context menu had a few papercuts after the port, notably
placement. The code was also a bit hard to follow - the actions
were declared in mainWindow.js, but defined in contextMenu.js.
This commit removes the ContextMenu class, and instead builds
and displays the popover in mapView.js. This also allows
us to move our actions to mapView.js using a custom action group.
The placement is also fixed.
Diffstat (limited to 'data/ui')
-rw-r--r-- | data/ui/context-menu.ui | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/data/ui/context-menu.ui b/data/ui/context-menu.ui index 07100c3e..2904df1b 100644 --- a/data/ui/context-menu.ui +++ b/data/ui/context-menu.ui @@ -4,34 +4,30 @@ <section> <item> <attribute name="label" translatable="yes">Route from here</attribute> - <attribute name="action">win.route-from-here</attribute> + <attribute name="action">view.route-from-here</attribute> </item> <item> <attribute name="label" translatable="yes">Add intermediate destination</attribute> - <attribute name="action">win.add-intermediate-destination</attribute> + <attribute name="action">view.add-intermediate-destination</attribute> </item> <item> <attribute name="label" translatable="yes">Route to here</attribute> - <attribute name="action">win.route-to-here</attribute> + <attribute name="action">view.route-to-here</attribute> </item> </section> <section> <item> <attribute name="label" translatable="yes">What's here?</attribute> - <attribute name="action">win.whats-here</attribute> + <attribute name="action">view.whats-here</attribute> </item> <item> <attribute name="label" translatable="yes">Copy location</attribute> - <attribute name="action">win.copy-location</attribute> + <attribute name="action">view.copy-location</attribute> </item> <item> <attribute name="label" translatable="yes">Add to OpenStreetMap</attribute> - <attribute name="action">win.add-osm-location</attribute> + <attribute name="action">view.add-osm-location</attribute> </item> </section> </menu> - <template class="Gjs_ContextMenu" parent="GtkPopoverMenu"> - <property name="menu-model">context-menu</property> - <property name="has-arrow">False</property> - </template> </interface> |