Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-view.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c
index 7f77726..fe84912 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -1363,9 +1363,13 @@ handle_link_over_xy (EvView *view, gint x, gint y)
if (link) {
char *msg = tip_from_link (view, link);
- ev_tooltip_set_position (EV_TOOLTIP (view->link_tooltip), x, y);
- ev_tooltip_set_text (EV_TOOLTIP (view->link_tooltip), msg);
- ev_tooltip_activate (EV_TOOLTIP (view->link_tooltip));
+ if (msg && g_utf8_validate (msg, -1, NULL)) {
+ EvTooltip *tooltip = EV_TOOLTIP (view->link_tooltip);
+
+ ev_tooltip_set_position (tooltip, x, y);
+ ev_tooltip_set_text (tooltip, msg);
+ ev_tooltip_activate (tooltip);
+ }
g_free (msg);
ev_view_set_cursor (view, EV_VIEW_CURSOR_LINK);