diff --git a/src/gtk/common/config.c b/src/gtk/common/config.c index 53a5ce8..61ed912 100644 --- a/src/gtk/common/config.c +++ b/src/gtk/common/config.c @@ -35,8 +35,18 @@ #include #ifdef WIN32 + #include #define WIN_REGISTRY_ENABLED 1 + + #ifndef KEY_WOW64_64KEY + #define KEY_WOW64_64KEY 0x0100 + #endif // KEY_WOW64_64KEY + + #ifndef KEY_WOW64_32KEY + #define KEY_WOW64_32KEY 0x0200 + #endif // KEY_WOW64_64KEY + #endif // WIN32 /*--[ Globals ]--------------------------------------------------------------------------------------*/ @@ -469,13 +479,53 @@ void configuration_deinit(void) gchar * build_data_filename(const gchar *first_element, ...) { - va_list args; - GString * result; - const gchar * element; + static const gchar * datadir = NULL; + const gchar * appname[] = { g_get_application_name(), PACKAGE_NAME }; + GString * result = NULL; + const gchar * element; + va_list args; + + if(datadir) + result = g_string_new(datadir); #if defined( WIN_REGISTRY_ENABLED ) + if(!result) + { + // No predefined datadir, search registry + int p; + + for(p=0;pstr); + } va_start(args, first_element); diff --git a/ui/00default.xml b/ui/00default.xml index f02429a..b48e2f0 100644 --- a/ui/00default.xml +++ b/ui/00default.xml @@ -37,7 +37,7 @@ Extended attributes for 'save' actions: * overwrite='yes' to always overwrite file - * filename='PATH' to save to a predefined file (no user save dialog) + * filename='PATH' to save to a predefined file whithout user interaction ---> @@ -45,7 +45,7 @@ - + -- libgit2 0.21.2