Geography : geoevents : adding year in popup + bug correction.

svn: r17560
This commit is contained in:
Serge Noiraud 2011-05-25 21:07:07 +00:00
parent 75620e7713
commit 660b101fb2

View File

@ -296,7 +296,7 @@ class GeoEvents(GeoGraphyView):
event = dbstate.db.get_event_from_handle(obj) event = dbstate.db.get_event_from_handle(obj)
self._createmap_for_one_event(event) self._createmap_for_one_event(event)
self.sort = sorted(self.place_list, self.sort = sorted(self.place_list,
key=operator.itemgetter(3, 4) key=operator.itemgetter(3, 4, 6)
) )
self._create_markers() self._create_markers()
@ -326,29 +326,11 @@ class GeoEvents(GeoGraphyView):
event, lat, lon, prevmark) event, lat, lon, prevmark)
itemoption.append(center) itemoption.append(center)
if mark[0] != oldplace: if mark[0] != oldplace:
if message != "":
add_item = gtk.MenuItem(message)
add_item.show()
menu.append(add_item)
itemoption = gtk.Menu()
itemoption.set_title(message)
itemoption.show()
add_item.set_submenu(itemoption)
modify = gtk.MenuItem(_("Edit Event"))
modify.show()
modify.connect("activate", self.edit_event,
event, lat, lon, mark)
itemoption.append(modify)
center = gtk.MenuItem(_("Center on this place"))
center.show()
center.connect("activate", self.center_here,
event, lat, lon, mark)
itemoption.append(center)
message = "%s :" % mark[0] message = "%s :" % mark[0]
self.add_place_bubble_message(event, lat, lon, self.add_place_bubble_message(event, lat, lon,
marks, menu, message, mark) marks, menu, message, mark)
oldplace = mark[0] oldplace = mark[0]
message = "%s : %s" % (gen.lib.EventType( mark[7] ), mark[5] ) message = "(%s) %s : %s" % (mark[6], gen.lib.EventType( mark[7] ), mark[5] )
prevmark = mark prevmark = mark
add_item = gtk.MenuItem(message) add_item = gtk.MenuItem(message)
add_item.show() add_item.show()