Change CWD before spawning applications in ThunarLauncher.
Before launching files with a GAppInfo, ThunarLauncher now changes the current working directory of the Thunar process to its own current directory, which usually also is the current directory of the window. It remembers the original directory Thunar was launched from and resets the CWD right after the files have been launched. This is done transparently by adding a function thunar_g_app_info_launch() that handles the CWD state internally. It calls another new function, thunar_util_change_working_directory() that is based on getcwd/_getcwd (the latter being used on Windows) and chdir().
Showing with 155 additions and 39 deletions