From 0f925a86f56af36bb6d033d5e725d72202ee5532 Mon Sep 17 00:00:00 2001 From: prculley Date: Fri, 13 Sep 2019 16:43:56 -0500 Subject: [PATCH] Fix Gtk deprecation Menu.set_title --- gramps/gui/editors/editperson.py | 1 - gramps/gui/widgets/photo.py | 1 - gramps/plugins/gramplet/coordinates.py | 1 - gramps/plugins/lib/maps/geography.py | 2 -- gramps/plugins/view/geoclose.py | 2 -- gramps/plugins/view/geoevents.py | 4 ---- gramps/plugins/view/geofamclose.py | 2 -- gramps/plugins/view/geofamily.py | 1 - gramps/plugins/view/geomoves.py | 2 -- gramps/plugins/view/geoperson.py | 4 ---- gramps/plugins/view/geoplaces.py | 4 ---- 11 files changed, 24 deletions(-) diff --git a/gramps/gui/editors/editperson.py b/gramps/gui/editors/editperson.py index fc05f3625..beb8d2154 100644 --- a/gramps/gui/editors/editperson.py +++ b/gramps/gui/editors/editperson.py @@ -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, diff --git a/gramps/gui/widgets/photo.py b/gramps/gui/widgets/photo.py index fd22c7f54..079768074 100644 --- a/gramps/gui/widgets/photo.py +++ b/gramps/gui/widgets/photo.py @@ -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) diff --git a/gramps/plugins/gramplet/coordinates.py b/gramps/plugins/gramplet/coordinates.py index b46387104..db1bfe14e 100644 --- a/gramps/plugins/gramplet/coordinates.py +++ b/gramps/plugins/gramplet/coordinates.py @@ -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) diff --git a/gramps/plugins/lib/maps/geography.py b/gramps/plugins/lib/maps/geography.py index f5bd6f4f4..026a12194 100644 --- a/gramps/plugins/lib/maps/geography.py +++ b/gramps/plugins/lib/maps/geography.py @@ -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")) diff --git a/gramps/plugins/view/geoclose.py b/gramps/plugins/view/geoclose.py index 827b08b6d..d3aac4e2c 100644 --- a/gramps/plugins/view/geoclose.py +++ b/gramps/plugins/view/geoclose.py @@ -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")) diff --git a/gramps/plugins/view/geoevents.py b/gramps/plugins/view/geoevents.py index f5f60ab28..a0b3bc025 100644 --- a/gramps/plugins/view/geoevents.py +++ b/gramps/plugins/view/geoevents.py @@ -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 = "" diff --git a/gramps/plugins/view/geofamclose.py b/gramps/plugins/view/geofamclose.py index 5fa461424..39cd524ce 100644 --- a/gramps/plugins/view/geofamclose.py +++ b/gramps/plugins/view/geofamclose.py @@ -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")) diff --git a/gramps/plugins/view/geofamily.py b/gramps/plugins/view/geofamily.py index e1ad9c3d8..5402e3c2d 100644 --- a/gramps/plugins/view/geofamily.py +++ b/gramps/plugins/view/geofamily.py @@ -494,7 +494,6 @@ class GeoFamily(GeoGraphyView): """ self.menu = Gtk.Menu() menu = self.menu - menu.set_title("family") message = "" oldplace = "" prevmark = None diff --git a/gramps/plugins/view/geomoves.py b/gramps/plugins/view/geomoves.py index a428aacdd..405828aa1 100644 --- a/gramps/plugins/view/geomoves.py +++ b/gramps/plugins/view/geomoves.py @@ -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")) diff --git a/gramps/plugins/view/geoperson.py b/gramps/plugins/view/geoperson.py index 3bd7c6b5e..523ae1169 100644 --- a/gramps/plugins/view/geoperson.py +++ b/gramps/plugins/view/geoperson.py @@ -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")) diff --git a/gramps/plugins/view/geoplaces.py b/gramps/plugins/view/geoplaces.py index 24bcd648c..d054a9100 100644 --- a/gramps/plugins/view/geoplaces.py +++ b/gramps/plugins/view/geoplaces.py @@ -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 = ""