diff options
| -rw-r--r-- | src/setup.c | 15 | ||||
| -rw-r--r-- | src/setup.h | 1 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/setup.c b/src/setup.c index bb69993..d9b5ed3 100644 --- a/src/setup.c +++ b/src/setup.c @@ -41,16 +41,21 @@ find_setup_xml () { gchar *pth; gchar *cwd; - TGallerySetup *setup; + TGallerySetup *setup = NULL; - setup = NULL; cwd = g_get_current_dir (); - pth = g_build_filename (cwd, SETUP_XML, NULL); - g_free (cwd); - + /* Prefer setup2.xml over setup.xml but only in current working directory */ + pth = g_build_filename (cwd, SETUP_V2_XML, NULL); if (g_access (pth, R_OK) == 0) setup = parse_setup_xml (pth); g_free (pth); + if (! setup) { + pth = g_build_filename (cwd, SETUP_XML, NULL); + if (g_access (pth, R_OK) == 0) + setup = parse_setup_xml (pth); + g_free (pth); + } + g_free (cwd); if (! setup) { pth = g_build_filename (g_getenv ("HOME"), ".cgg", SETUP_XML, NULL); diff --git a/src/setup.h b/src/setup.h index 7ce2cd1..9e8f9dd 100644 --- a/src/setup.h +++ b/src/setup.h @@ -28,6 +28,7 @@ G_BEGIN_DECLS #define TARGET_IMAGE_DIR_PREFIX "_" #define SETUP_XML "setup.xml" +#define SETUP_V2_XML "setup2.xml" #define SETUP_NATIVE_VERSION 200 /* 2.0 */ |
