From be11466b35fa759f9a9686ddf783741c0da6fc5e Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Wed, 7 Feb 2018 16:32:18 +0000 Subject: [PATCH] Add tooltip to links in styled text editor Fixes #10179. --- gramps/gui/widgets/styledtexteditor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gramps/gui/widgets/styledtexteditor.py b/gramps/gui/widgets/styledtexteditor.py index 2dc10905f..602d0f556 100644 --- a/gramps/gui/widgets/styledtexteditor.py +++ b/gramps/gui/widgets/styledtexteditor.py @@ -62,7 +62,7 @@ from ..spell import Spell from ..display import display_url from ..utils import SystemFonts, get_primary_mask, get_link_color from gramps.gen.config import config -from gramps.gen.constfunc import has_display +from gramps.gen.constfunc import has_display, mac from ..actiongroup import ActionGroup #------------------------------------------------------------------------- @@ -315,7 +315,9 @@ class StyledTextEditor(Gtk.TextView): if url.startswith("gramps://"): obj_class, prop, value = url[9:].split("/") display = simple_access.display(obj_class, prop, value) or url - return display + return display + ((_("\nCommand-Click to follow link") if mac() else + _("\nCtrl-Click to follow link")) + if self.get_editable() else '') def on_button_release_event(self, widget, event): """