diff --git a/gramps/gui/editors/editprimary.py b/gramps/gui/editors/editprimary.py index be50437cc..d970cc444 100644 --- a/gramps/gui/editors/editprimary.py +++ b/gramps/gui/editors/editprimary.py @@ -298,12 +298,7 @@ class EditPrimary(ManagedWindow, DbGUIElement, metaclass=abc.ABCMeta): menu = Gtk.Menu.new_from_model(menu_model) menu.attach_to_widget(obj, None) menu.show_all() - if Gtk.MINOR_VERSION < 22: - # ToDo The following is reported to work poorly with Wayland - menu.popup(None, None, None, None, - event.button, event.time) - else: - menu.popup_at_pointer(event) + menu.popup_at_pointer(event) return True return False diff --git a/gramps/gui/filters/sidebar/_sidebarfilter.py b/gramps/gui/filters/sidebar/_sidebarfilter.py index ad39398fc..b8b140bc8 100644 --- a/gramps/gui/filters/sidebar/_sidebarfilter.py +++ b/gramps/gui/filters/sidebar/_sidebarfilter.py @@ -35,10 +35,7 @@ _RETURN = Gdk.keyval_from_name("Return") _KP_ENTER = Gdk.keyval_from_name("KP_Enter") class SidebarFilter(DbGUIElement): - if Gtk.get_minor_version() > 17: - _FILTER_WIDTH = -1 - else: - _FILTER_WIDTH = 20 + _FILTER_WIDTH = -1 _FILTER_ELLIPSIZE = Pango.EllipsizeMode.END def __init__(self, dbstate, uistate, namespace): diff --git a/gramps/gui/utils.py b/gramps/gui/utils.py index c8cd36692..d8da593de 100644 --- a/gramps/gui/utils.py +++ b/gramps/gui/utils.py @@ -574,15 +574,7 @@ def get_link_color(context): """ Find the link color for the current theme. """ - from gi.repository import Gtk - - if Gtk.get_minor_version() > 11: - col = context.get_color(Gtk.StateFlags.LINK) - else: - found, col = context.lookup_color('link_color') - if not found: - col.parse('blue') - + col = context.get_color(Gtk.StateFlags.LINK) return rgb_to_hex((col.red, col.green, col.blue)) diff --git a/gramps/gui/views/listview.py b/gramps/gui/views/listview.py index 4032d10dd..89184d56e 100644 --- a/gramps/gui/views/listview.py +++ b/gramps/gui/views/listview.py @@ -1000,12 +1000,7 @@ class ListView(NavigationView): popup_menu = Gtk.Menu.new_from_model(menu) popup_menu.attach_to_widget(obj, None) popup_menu.show_all() - if Gtk.MINOR_VERSION < 22: - # ToDo The following is reported to work poorly with Wayland - popup_menu.popup(None, None, None, None, - event.button, event.time) - else: - popup_menu.popup_at_pointer(event) + popup_menu.popup_at_pointer(event) return True return False diff --git a/gramps/gui/views/tags.py b/gramps/gui/views/tags.py index 2588b429a..7894a259b 100644 --- a/gramps/gui/views/tags.py +++ b/gramps/gui/views/tags.py @@ -276,12 +276,8 @@ class Tags(DbGUIElement): popup_menu = Gtk.Menu.new_from_model(menu) popup_menu.attach_to_widget(button, None) popup_menu.show_all() - if Gtk.MINOR_VERSION < 22: - # ToDo The following is reported to work poorly with Wayland - popup_menu.popup(None, None, cb_menu_position, button, 0, 0) - else: - popup_menu.popup_at_widget(button, Gdk.Gravity.SOUTH, - Gdk.Gravity.NORTH_WEST, None) + popup_menu.popup_at_widget(button, Gdk.Gravity.SOUTH, + Gdk.Gravity.NORTH_WEST, None) def cb_organize_tags(self, *action): """ diff --git a/gramps/gui/widgets/grampletpane.py b/gramps/gui/widgets/grampletpane.py index 25b81866d..61dd7e7be 100644 --- a/gramps/gui/widgets/grampletpane.py +++ b/gramps/gui/widgets/grampletpane.py @@ -1510,13 +1510,8 @@ class GrampletPane(Gtk.ScrolledWindow): popup_menu = Gtk.Menu.new_from_model(menu) popup_menu.attach_to_widget(obj, None) popup_menu.show_all() - if Gtk.MINOR_VERSION < 22: - # ToDo The following is reported to work poorly with Wayland - popup_menu.popup(None, None, None, None, - event.button, event.time) - else: - popup_menu.popup_at_pointer(event) - return True + popup_menu.popup_at_pointer(event) + return True return False def set_inactive(self): diff --git a/gramps/gui/widgets/validatedcomboentry.py b/gramps/gui/widgets/validatedcomboentry.py index e2520251a..ffcd64370 100644 --- a/gramps/gui/widgets/validatedcomboentry.py +++ b/gramps/gui/widgets/validatedcomboentry.py @@ -72,11 +72,7 @@ class ValidatedComboEntry(Gtk.ComboBox): self._entry.set_width_chars(width) # - if Gtk.get_minor_version() < 13: - dummy_event = Gdk.Event() - dummy_event.type = Gdk.EventType.NOTHING - else: - dummy_event = Gdk.Event() + dummy_event = Gdk.Event() self._entry.start_editing(dummy_event) # self.add(self._entry) diff --git a/gramps/plugins/lib/maps/geography.py b/gramps/plugins/lib/maps/geography.py index 9740c75a8..05e754ad0 100644 --- a/gramps/plugins/lib/maps/geography.py +++ b/gramps/plugins/lib/maps/geography.py @@ -873,14 +873,6 @@ class GeoGraphyView(OsmGps, NavigationView): Print or save the view that is currently shown """ dummy_obj = obj - if Gtk.MAJOR_VERSION == 3 and Gtk.MINOR_VERSION < 11: - from gramps.gui.dialog import WarningDialog - WarningDialog( - _("You can't use the print functionality"), - _("Your Gtk version is too old."), - parent=self.uistate.window) - return - req = self.osm.get_allocation() widthpx = req.width heightpx = req.height