From ba6e65d0318d8a746aa6bc8774c12bfbd85b55b7 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Tue, 7 Jun 2011 16:41:43 +0200 Subject: [PATCH] Adjustments and bugfixes. --- configure.ac | 7 +++++-- data/libaute-smbldap/gui/autesmbldap.gui | 1 + src/aute_smbldap.c | 21 ++++++++++++++++++++- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index b2ed1ff..e4113cf 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,10 @@ AC_INIT([libaute-smbldap], [0.1.0], [azagli@libero.it]) AC_CONFIG_SRCDIR([src/aute_smbldap.c]) AC_CONFIG_HEADER([config.h]) -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE(-Wall) + +m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) + AM_MAINTAINER_MODE AC_CANONICAL_SYSTEM @@ -19,7 +22,7 @@ AC_PROG_LIBTOOL # Checks for libraries. PKG_CHECK_MODULES(LIBAUTESMBLDAP, [gtk+-2.0 >= 2.16.0 - libaute >= 0.1.0]) + libaute >= 0.1.0]) AC_SUBST(LIBAUTESMBLDAP_CFLAGS) AC_SUBST(LIBAUTESMBLDAP_LIBS) diff --git a/data/libaute-smbldap/gui/autesmbldap.gui b/data/libaute-smbldap/gui/autesmbldap.gui index 399d0cb..a4fd050 100644 --- a/data/libaute-smbldap/gui/autesmbldap.gui +++ b/data/libaute-smbldap/gui/autesmbldap.gui @@ -6,6 +6,7 @@ True Autenticazione True + center dialog diff --git a/src/aute_smbldap.c b/src/aute_smbldap.c index 3d71b00..b97b009 100644 --- a/src/aute_smbldap.c +++ b/src/aute_smbldap.c @@ -881,10 +881,29 @@ gchar #ifdef G_OS_WIN32 #undef GUIDIR +#undef FORMDIR gchar *GUIDIR; + gchar *FORMDIR; - GUIDIR = g_build_filename (g_win32_get_package_installation_directory_of_module (NULL), "share", "libaute-smbldap", "gui", NULL); + gchar *moddir; + gchar *p; + + moddir = g_win32_get_package_installation_directory_of_module (NULL); + + p = g_strrstr (moddir, g_strdup_printf ("%c", G_DIR_SEPARATOR)); + if (p != NULL + && (g_ascii_strcasecmp (p + 1, "src") == 0 + || g_ascii_strcasecmp (p + 1, ".libs") == 0)) + { + GUIDIR = g_build_filename ("/mingw", "share", "libaute-smbldap", "gui", NULL); + FORMDIR = g_build_filename ("/mingw", "share", "libaute-smbldap", "form", NULL); + } + else + { + GUIDIR = g_build_filename (moddir, "share", "libaute-smbldap", "gui", NULL); + FORMDIR = g_build_filename (moddir, "share", "libaute-smbldap", "form", NULL); + } #endif guifile = g_build_filename (GUIDIR, "autesmbldap.gui", NULL); -- 2.49.0