Fix Gtk deprecation Menu.set_title
This commit is contained in:
parent
17f4d93363
commit
0f925a86f5
@ -640,7 +640,6 @@ class EditPerson(EditPrimary):
|
||||
"""
|
||||
self.imgmenu = Gtk.Menu()
|
||||
menu = self.imgmenu
|
||||
menu.set_title(_("Media Object"))
|
||||
obj = self.db.get_media_from_handle(photo.get_reference_handle())
|
||||
if obj:
|
||||
add_menuitem(menu, _("View"), photo,
|
||||
|
@ -84,7 +84,6 @@ class Photo(Gtk.EventBox):
|
||||
elif is_right_click(event):
|
||||
if self.handle and self.uistate:
|
||||
self.menu = Gtk.Menu()
|
||||
self.menu.set_title(_("Media Object"))
|
||||
add_menuitem(self.menu, _("Make Active Media"), widget,
|
||||
lambda obj: self.uistate.set_active(self.handle, "Media"))
|
||||
self.menu.popup(None, None, None, None, event.button, event.time)
|
||||
|
@ -139,7 +139,6 @@ class GeoEvents(Gramplet, DbGUIElement):
|
||||
"""
|
||||
self.menu = Gtk.Menu()
|
||||
menu = self.menu
|
||||
menu.set_title(_('Edit'))
|
||||
title = _('Edit the event')
|
||||
add_item = Gtk.MenuItem(label=title)
|
||||
add_item.connect("activate", self.edit_event, treeview)
|
||||
|
@ -405,7 +405,6 @@ class GeoGraphyView(OsmGps, NavigationView):
|
||||
|
||||
self.changemap = Gtk.Menu()
|
||||
changemap = self.changemap
|
||||
changemap.set_title(title)
|
||||
changemap.show()
|
||||
add_item.set_submenu(changemap)
|
||||
# show in the map menu all available providers
|
||||
@ -885,7 +884,6 @@ class GeoGraphyView(OsmGps, NavigationView):
|
||||
menu.append(add_item)
|
||||
self.itemoption = Gtk.Menu()
|
||||
itemoption = self.itemoption
|
||||
itemoption.set_title(message)
|
||||
itemoption.show()
|
||||
add_item.set_submenu(itemoption)
|
||||
modify = Gtk.MenuItem(label=_("Edit Place"))
|
||||
|
@ -568,7 +568,6 @@ class GeoClose(GeoGraphyView):
|
||||
"""
|
||||
self.newmenu = Gtk.Menu()
|
||||
menu = self.newmenu
|
||||
menu.set_title("person")
|
||||
events = []
|
||||
message = ""
|
||||
oldplace = ""
|
||||
@ -613,7 +612,6 @@ class GeoClose(GeoGraphyView):
|
||||
menu.append(add_item)
|
||||
self.itemoption = Gtk.Menu()
|
||||
itemoption = self.itemoption
|
||||
itemoption.set_title(message)
|
||||
itemoption.show()
|
||||
add_item.set_submenu(itemoption)
|
||||
modify = Gtk.MenuItem(label=_("Edit Event"))
|
||||
|
@ -379,7 +379,6 @@ class GeoEvents(GeoGraphyView):
|
||||
def bubble_message(self, event, lat, lon, marks):
|
||||
self.menu = Gtk.Menu()
|
||||
menu = self.menu
|
||||
menu.set_title("events")
|
||||
message = ""
|
||||
oldplace = ""
|
||||
prevmark = None
|
||||
@ -390,7 +389,6 @@ class GeoEvents(GeoGraphyView):
|
||||
menu.append(add_item)
|
||||
self.itemoption = Gtk.Menu()
|
||||
itemoption = self.itemoption
|
||||
itemoption.set_title(message)
|
||||
itemoption.show()
|
||||
add_item.set_submenu(itemoption)
|
||||
modify = Gtk.MenuItem(label=_("Edit Event"))
|
||||
@ -424,7 +422,6 @@ class GeoEvents(GeoGraphyView):
|
||||
menu.append(add_item)
|
||||
self.itemoption = Gtk.Menu()
|
||||
itemoption = self.itemoption
|
||||
itemoption.set_title(message)
|
||||
itemoption.show()
|
||||
add_item.set_submenu(itemoption)
|
||||
modify = Gtk.MenuItem(label=_("Edit Event"))
|
||||
@ -461,7 +458,6 @@ class GeoEvents(GeoGraphyView):
|
||||
menu.append(add_item)
|
||||
self.itemoption = Gtk.Menu()
|
||||
itemoption = self.itemoption
|
||||
itemoption.set_title(_("Centering on Place"))
|
||||
itemoption.show()
|
||||
add_item.set_submenu(itemoption)
|
||||
oldplace = ""
|
||||
|
@ -758,7 +758,6 @@ class GeoFamClose(GeoGraphyView):
|
||||
"""
|
||||
self.menu = Gtk.Menu()
|
||||
menu = self.menu
|
||||
menu.set_title("family")
|
||||
events = []
|
||||
message = ""
|
||||
oldplace = ""
|
||||
@ -802,7 +801,6 @@ class GeoFamClose(GeoGraphyView):
|
||||
menu.append(add_item)
|
||||
self.itemoption = Gtk.Menu()
|
||||
itemoption = self.itemoption
|
||||
itemoption.set_title(message)
|
||||
itemoption.show()
|
||||
add_item.set_submenu(itemoption)
|
||||
modify = Gtk.MenuItem(label=_("Edit Event"))
|
||||
|
@ -494,7 +494,6 @@ class GeoFamily(GeoGraphyView):
|
||||
"""
|
||||
self.menu = Gtk.Menu()
|
||||
menu = self.menu
|
||||
menu.set_title("family")
|
||||
message = ""
|
||||
oldplace = ""
|
||||
prevmark = None
|
||||
|
@ -637,7 +637,6 @@ class GeoMoves(GeoGraphyView):
|
||||
"""
|
||||
self.menu = Gtk.Menu()
|
||||
menu = self.menu
|
||||
menu.set_title("descendance")
|
||||
events = []
|
||||
message = ""
|
||||
oldplace = ""
|
||||
@ -680,7 +679,6 @@ class GeoMoves(GeoGraphyView):
|
||||
menu.append(add_item)
|
||||
self.itemoption = Gtk.Menu()
|
||||
itemoption = self.itemoption
|
||||
itemoption.set_title(message)
|
||||
itemoption.show()
|
||||
add_item.set_submenu(itemoption)
|
||||
modify = Gtk.MenuItem(label=_("Edit Event"))
|
||||
|
@ -485,7 +485,6 @@ class GeoPerson(GeoGraphyView):
|
||||
def bubble_message(self, event, lat, lon, marks):
|
||||
self.menu = Gtk.Menu()
|
||||
menu = self.menu
|
||||
menu.set_title("person")
|
||||
message = ""
|
||||
oldplace = ""
|
||||
prevmark = None
|
||||
@ -496,7 +495,6 @@ class GeoPerson(GeoGraphyView):
|
||||
menu.append(add_item)
|
||||
self.itemoption = Gtk.Menu()
|
||||
itemoption = self.itemoption
|
||||
itemoption.set_title(message)
|
||||
itemoption.show()
|
||||
message = ""
|
||||
add_item.set_submenu(itemoption)
|
||||
@ -517,7 +515,6 @@ class GeoPerson(GeoGraphyView):
|
||||
menu.append(add_item)
|
||||
self.itemoption = Gtk.Menu()
|
||||
itemoption = self.itemoption
|
||||
itemoption.set_title(message)
|
||||
itemoption.show()
|
||||
message = ""
|
||||
add_item.set_submenu(itemoption)
|
||||
@ -559,7 +556,6 @@ class GeoPerson(GeoGraphyView):
|
||||
menu.append(add_item)
|
||||
self.itemoption = Gtk.Menu()
|
||||
itemoption = self.itemoption
|
||||
itemoption.set_title(message)
|
||||
itemoption.show()
|
||||
add_item.set_submenu(itemoption)
|
||||
modify = Gtk.MenuItem(label=_("Edit Event"))
|
||||
|
@ -480,7 +480,6 @@ class GeoPlaces(GeoGraphyView):
|
||||
def bubble_message(self, event, lat, lon, marks):
|
||||
self.menu = Gtk.Menu()
|
||||
menu = self.menu
|
||||
menu.set_title("places")
|
||||
message = ""
|
||||
prevmark = None
|
||||
for mark in marks:
|
||||
@ -490,7 +489,6 @@ class GeoPlaces(GeoGraphyView):
|
||||
menu.append(add_item)
|
||||
self.itemoption = Gtk.Menu()
|
||||
itemoption = self.itemoption
|
||||
itemoption.set_title(message)
|
||||
itemoption.show()
|
||||
add_item.set_submenu(itemoption)
|
||||
modify = Gtk.MenuItem(label=_("Edit Place"))
|
||||
@ -516,7 +514,6 @@ class GeoPlaces(GeoGraphyView):
|
||||
menu.append(add_item)
|
||||
self.itemoption = Gtk.Menu()
|
||||
itemoption = self.itemoption
|
||||
itemoption.set_title(message)
|
||||
itemoption.show()
|
||||
add_item.set_submenu(itemoption)
|
||||
modify = Gtk.MenuItem(label=_("Edit Place"))
|
||||
@ -553,7 +550,6 @@ class GeoPlaces(GeoGraphyView):
|
||||
menu.append(add_item)
|
||||
self.itemoption = Gtk.Menu()
|
||||
itemoption = self.itemoption
|
||||
itemoption.set_title(_("Centering on Place"))
|
||||
itemoption.show()
|
||||
add_item.set_submenu(itemoption)
|
||||
oldplace = ""
|
||||
|
Loading…
Reference in New Issue
Block a user