diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-11-27 02:33:28 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-11-27 02:34:24 +0100 |
commit | 085f2d7eef0d77e06977d095927789bf948538a4 (patch) | |
tree | ba38258f577146505a7ec6850ddd0bbcaac95b5b /fastiv.c | |
parent | b97ac26cfb97377a2416f854fb07b12441d39c0b (diff) | |
download | fiv-085f2d7eef0d77e06977d095927789bf948538a4.tar.gz fiv-085f2d7eef0d77e06977d095927789bf948538a4.tar.xz fiv-085f2d7eef0d77e06977d095927789bf948538a4.zip |
Use GFile a bit more
Diffstat (limited to 'fastiv.c')
-rw-r--r-- | fastiv.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -311,13 +311,17 @@ spawn_path(const char *path) } static void -on_item_activated(G_GNUC_UNUSED FastivBrowser *browser, const char *path, +on_item_activated(G_GNUC_UNUSED FastivBrowser *browser, GFile *location, GtkPlacesOpenFlags flags, G_GNUC_UNUSED gpointer data) { - if (flags == GTK_PLACES_OPEN_NEW_WINDOW) - spawn_path(path); - else - open(path); + gchar *path = g_file_get_path(location); + if (path) { + if (flags == GTK_PLACES_OPEN_NEW_WINDOW) + spawn_path(path); + else + open(path); + g_free(path); + } } static gboolean |