[evince/gnome-3-38] Shell: Unescape tooltip URI in Recent Documents view
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/gnome-3-38] Shell: Unescape tooltip URI in Recent Documents view
- Date: Sun, 24 Jan 2021 01:53:24 +0000 (UTC)
commit 2ab4aaf5e3b2ea28b0963b99d073db357cf0e1ed
Author: Santurysim <santurysim gmail com>
Date: Tue Oct 27 21:53:25 2020 +0300
Shell: Unescape tooltip URI in Recent Documents view
Currently, Evince shows escaped URIs of files in "Recent documents"
view.
However, non-ASCII in URI symbols are not shown correctly.
To fix this, unescape URI before setting it as tooltip text.
shell/ev-recent-view.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/shell/ev-recent-view.c b/shell/ev-recent-view.c
index 8b909558..7a426d37 100644
--- a/shell/ev-recent-view.c
+++ b/shell/ev-recent-view.c
@@ -205,6 +205,7 @@ on_query_tooltip_event (GtkWidget *widget,
GtkTreeIter iter;
GtkTreePath *path = NULL;
gchar *uri;
+ gchar *uri_unescaped;
model = gtk_icon_view_get_model (GTK_ICON_VIEW (priv->view));
if (!gtk_icon_view_get_tooltip_context (GTK_ICON_VIEW (priv->view),
@@ -216,9 +217,12 @@ on_query_tooltip_event (GtkWidget *widget,
EV_RECENT_VIEW_COLUMN_URI, &uri,
-1);
- gtk_tooltip_set_text (tooltip, uri);
+ uri_unescaped = g_uri_unescape_string (uri, NULL);
g_free (uri);
+ gtk_tooltip_set_text (tooltip, uri_unescaped);
+ g_free (uri_unescaped);
+
gtk_icon_view_set_tooltip_item (GTK_ICON_VIEW (priv->view),
tooltip, path);
gtk_tree_path_free (path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]