From 8df38776a55566ad072e8522ed920e03f038601b Mon Sep 17 00:00:00 2001 From: Serge Noiraud Date: Mon, 10 Sep 2012 21:42:20 +0000 Subject: [PATCH] Geography: the menu is coming back. svn: r20362 --- src/plugins/lib/maps/geography.py | 5 ++++- src/plugins/lib/maps/osmGps.py | 13 +------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/plugins/lib/maps/geography.py b/src/plugins/lib/maps/geography.py index 5a47b3dc4..69b21d346 100644 --- a/src/plugins/lib/maps/geography.py +++ b/src/plugins/lib/maps/geography.py @@ -317,7 +317,10 @@ class GeoGraphyView(OsmGps, NavigationView): changemapitem.connect("activate", self.change_map, map) changemap.append(changemapitem) menu.show() - menu.popup(None, None, None, None, 0, event.time) + menu.popup(None, None, + lambda menu, data: (event.get_root_coords()[0], + event.get_root_coords()[1], True), + None, event.button, event.time) return 1 def add_specific_menu(self, menu, event, lat, lon): diff --git a/src/plugins/lib/maps/osmGps.py b/src/plugins/lib/maps/osmGps.py index 449a99183..2d58412b3 100644 --- a/src/plugins/lib/maps/osmGps.py +++ b/src/plugins/lib/maps/osmGps.py @@ -320,18 +320,7 @@ class OsmGps(): self.end_selection = current self.zone_selection = False elif event.button == 3 and event.type == Gdk.EventType.BUTTON_PRESS: - # I don't see the menu. Why ? - #self.build_nav_menu(osm, event, lat, lon ) - menu = Gtk.Menu() - menu.set_title(_('Map Menu')) - - add_item = Gtk.MenuItem(label="title") - add_item.connect("activate", self.config_crosshair, event, lat , lon) - add_item.show() - menu.append(add_item) - menu.show() - menu.popup(None, None, None, None, event.button, event.time) - return 1 + self.build_nav_menu(osm, event, lat, lon ) else: self.save_center(lat, lon)