From aa1050d0ae63d1865ecc9d413c33c227ca806f52 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Tue, 23 Mar 2010 17:59:44 +0100 Subject: [PATCH] Redefined GLADEDIR for win32. --- .gitignore | 1 + src/aute_db.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 58cfcfa..a41bfdd 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ stamp-h1 tests/test tools/aute-db-mkpwd *.tar.gz +*.exe \ No newline at end of file diff --git a/src/aute_db.c b/src/aute_db.c index c5260fe..d7c7b40 100644 --- a/src/aute_db.c +++ b/src/aute_db.c @@ -191,8 +191,18 @@ gchar error = NULL; GtkBuilder *gtkbuilder = gtk_builder_new (); - if (!gtk_builder_add_from_file (gtkbuilder, GLADEDIR "/autedb.glade", &error)) + +#ifdef G_OS_WIN32 +#undef GLADEDIR + + gchar *GLADEDIR; + + GLADEDIR = g_build_filename (g_win32_get_package_installation_directory_of_module (NULL), "share", "libaute-db", "glade", NULL); +#endif + + if (!gtk_builder_add_from_file (gtkbuilder, g_build_filename (GLADEDIR, "autedb.glade", NULL), &error)) { + g_error ("Impossibile trovare il file di definizione dell'interfaccia utente."); return NULL; } -- 2.49.0