diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-11-16 14:02:26 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-11-16 14:57:02 +0100 |
commit | 6eec8e7360aaa7db9aec9d9247d38060633041fd (patch) | |
tree | 602ea55f019131eb42ebc9a1270405fe94ddaef1 | |
parent | c4d58cb9ad154f536447f842d0f3026af3e4c976 (diff) | |
download | fiv-6eec8e7360aaa7db9aec9d9247d38060633041fd.tar.gz fiv-6eec8e7360aaa7db9aec9d9247d38060633041fd.tar.xz fiv-6eec8e7360aaa7db9aec9d9247d38060633041fd.zip |
Fix adding images to the list of recent files
-rw-r--r-- | fastiv.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -153,7 +153,12 @@ open(const gchar *path) return; } - gtk_recent_manager_add_item(gtk_recent_manager_get_default(), path); + gchar *uri = g_filename_to_uri(path, NULL, NULL); + if (uri) { + gtk_recent_manager_add_item(gtk_recent_manager_get_default(), path); + g_free(uri); + } + gtk_window_set_title(GTK_WINDOW(g.window), path); gtk_stack_set_visible_child(GTK_STACK(g.stack), g.view_scroller); |