diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/gtk-demo/main.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c index d0acf2733..422abdb08 100644 --- a/demos/gtk-demo/main.c +++ b/demos/gtk-demo/main.c @@ -28,6 +28,31 @@ struct _CallbackData GtkTreePath *path; }; +#ifdef G_OS_WIN32 + +#undef DEMOCODEDIR + +static char * +get_democodedir (void) +{ + static char *result = NULL; + + if (result == NULL) + { + result = g_win32_get_package_installation_directory (NULL, NULL); + if (result == NULL) + result = "unknown-location"; + + result = g_strconcat (result, "\\share\\gtk-2.0\\demo", NULL); + } + + return result; +} + +#define DEMOCODEDIR get_democodedir () + +#endif + /** * demo_find_file: * @base: base filename |