@xiota commented on this pull request.
- }
+ + if (!gtk_tree_model_iter_has_child(model, &iter)) + { + if (gtk_tree_model_iter_parent(model, &parent, &iter)) + utf8_path = build_path(&parent); + else + utf8_path = build_path(NULL); + } + else + utf8_path = build_path(&iter); + + locale_path = utils_get_locale_from_utf8(utf8_path); + if (locale_path) + { + command = g_strconcat ("xdg-open "", locale_path, """, NULL);
I added ifdefs to change the command based on platform. I don't have a Mac or Windows to test.
Left the `system()` command alone because it's supposed to be standard C. Geany has [`spawn_async()`](https://www.geany.org/manual/reference/spawn_8h.html), but it looks more complicated to use.