GAppLaunchContext: add environment-manipulating functions

Add functions for manipulating the environment under which a
GAppLaunchContext will launch its children, to avoid thread-related
bugs with using setenv() directly.

FIXME: win32 side isn't implemented yet

https://bugzilla.gnome.org/show_bug.cgi?id=659326
This commit is contained in:
Dan Winship
2011-10-15 16:59:59 -04:00
committed by Matthias Clasen
parent 117e534091
commit de834bed30
6 changed files with 231 additions and 92 deletions

View File

@@ -278,6 +278,15 @@ g_win32_app_info_launch (GAppInfo *appinfo,
}
#endif
/* FIXME: Need to do something with
* g_app_launch_context_get_environment()... ShellExecuteExW()
* doesn't have any way to pass an environment though. We need to
* either (a) update environment, ShellExecuteExW(), revert
* environment; or (b) find an API to figure out what app
* ShellExecuteExW() would launch, and then use g_spawn_async()
* instead.
*/
for (l = files; l != NULL; l = l->next)
{
char *path = g_file_get_path (l->data);