diff options
author | Nickolay V. Shmyrev <nshmyrev@yandex.ru> | 2009-05-03 08:21:17 (GMT) |
---|---|---|
committer | Nickolay V. Shmyrev <nshmyrev@yandex.ru> | 2009-05-03 08:21:17 (GMT) |
commit | 28ffb1e81e22421674091f6ad73613684bad12de (patch) | |
tree | 5f7da21bf328c220ce35b99b73e8e94d5692a7a8 /shell/ev-window-title.c | |
parent | 4a0680e34b63098c3d8b6a48b613958acd3e47a9 (diff) |
[ui] Escape URIs for display
Uses uri escaping function to make more sensible URI's to display them.
Fixes GNOME bug #581064.
Diffstat (limited to 'shell/ev-window-title.c')
-rw-r--r-- | shell/ev-window-title.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/shell/ev-window-title.c b/shell/ev-window-title.c index 9cfd865..baafa74 100644 --- a/shell/ev-window-title.c +++ b/shell/ev-window-title.c @@ -20,6 +20,7 @@ #include <config.h> #include "ev-window-title.h" #include "ev-backends-manager.h" +#include "ev-utils.h" #include <string.h> #include <gio/gio.h> @@ -71,14 +72,14 @@ ev_window_title_new (EvWindow *window) static char * get_filename_from_uri (const char *uri) { - GFile *file; char *filename; + char *basename; - file = g_file_new_for_uri (uri); - filename = g_file_get_basename (file); - g_object_unref (file); + filename = escape_uri_for_display (uri); + basename = g_path_get_basename (filename); + g_free(filename); - return filename; + return basename; } /* Some docs report titles with confusing extensions (ex. .doc for pdf). |