Geography: the menu is coming back.

svn: r20362
This commit is contained in:
Serge Noiraud 2012-09-10 21:42:20 +00:00
parent 83ca2b4969
commit 8df38776a5
2 changed files with 5 additions and 13 deletions

View File

@ -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):

View File

@ -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)