From: Andrea Zagli Date: Tue, 23 Mar 2010 16:59:44 +0000 (+0100) Subject: Redefined GLADEDIR for win32. X-Git-Tag: 0.1.0~8 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=aa1050d0ae63d1865ecc9d413c33c227ca806f52;p=zakauthe%2Fplugins%2Fdb Redefined GLADEDIR for win32. --- 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; }