From 73045f46580d799a89a99c91081143184c86b4db Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Fri, 3 Jan 2014 11:59:59 +0100 Subject: [PATCH] Changes to compile with gtk3. --- configure.ac | 6 +++--- src/aute_smbldap.c | 20 +++++++++----------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index ed5b8d2..665ea90 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([libaute-smbldap], [0.1.1], [azagli@libero.it]) +AC_INIT([libaute-smbldap], [0.5.0], [azagli@libero.it]) AC_CONFIG_SRCDIR([src/aute_smbldap.c]) AC_CONFIG_HEADER([config.h]) @@ -21,8 +21,8 @@ AC_PROG_CC AC_PROG_LIBTOOL # Checks for libraries. -PKG_CHECK_MODULES(LIBAUTESMBLDAP, [gtk+-2.0 >= 2.16.0 - libaute >= 0.1.1]) +PKG_CHECK_MODULES(LIBAUTESMBLDAP, [gtk+-3.0 >= 3.0.0 + libaute >= 0.2.0]) AC_SUBST(LIBAUTESMBLDAP_CFLAGS) AC_SUBST(LIBAUTESMBLDAP_LIBS) diff --git a/src/aute_smbldap.c b/src/aute_smbldap.c index 93210d5..526ac26 100644 --- a/src/aute_smbldap.c +++ b/src/aute_smbldap.c @@ -35,6 +35,7 @@ static GtkBuilder *gtkbuilder; static gchar *guifile; +static gchar *formdir; static LDAP *ldap; static gchar *base_dn; @@ -881,11 +882,7 @@ gchar gtkbuilder = gtk_builder_new (); #ifdef G_OS_WIN32 -#undef GUIDIR -#undef FORMDIR - - gchar *GUIDIR; - gchar *FORMDIR; + gchar *guidir; gchar *moddir; gchar *p; @@ -897,17 +894,18 @@ gchar && (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); + guidir = g_strdup (GUIDIR); + +#undef GUIDIR } else { - GUIDIR = g_build_filename (moddir, "share", "libaute-smbldap", "gui", NULL); - FORMDIR = g_build_filename (moddir, "share", "libaute-smbldap", "form", NULL); + guidir = g_build_filename (moddir, "share", PACKAGE, "gui", NULL); } + #endif - guifile = g_build_filename (GUIDIR, "autesmbldap.gui", NULL); + guifile = g_build_filename (guidir, "autesmbldap.gui", NULL); if (!gtk_builder_add_objects_from_file (gtkbuilder, guifile, g_strsplit ("diag_main", "|", -1), &error)) @@ -976,7 +974,7 @@ gchar } static void -autesmbldap_on_vbx_users_list_destroy (GtkObject *object, +autesmbldap_on_vbx_users_list_destroy (GtkWidget *object, gpointer user_data) { autesmbldap_disconnect_ssh (); -- 2.49.0