From 54496a074a4a2556e72ce80bf2ca98eeab24694c Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Fri, 12 Feb 2010 15:57:46 +0100 Subject: [PATCH] Correzioni varie. Testata senza l'utlizzo di libconfi. --- .gitignore | 4 ++++ configure.ac | 2 +- data/Makefile.am | 2 +- data/{libautedb => libaute-db}/Makefile.am | 0 .../glade/Makefile.am | 0 .../glade/autedb.glade | 0 src/aute_db.c | 2 +- tests/test.c | 18 ++++++++++++++---- 8 files changed, 21 insertions(+), 7 deletions(-) rename data/{libautedb => libaute-db}/Makefile.am (100%) rename data/{libautedb => libaute-db}/glade/Makefile.am (100%) rename data/{libautedb => libaute-db}/glade/autedb.glade (100%) diff --git a/.gitignore b/.gitignore index 08f49ef..48688c9 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,7 @@ missing *.o *.la *~ +config.h +stamp-h1 +tests/test +tools/aute-db-mkpwd diff --git a/configure.ac b/configure.ac index ef11dcc..d53ff4f 100644 --- a/configure.ac +++ b/configure.ac @@ -25,7 +25,7 @@ PKG_CHECK_MODULES(LIBAUTEDB, [gtk+-2.0 >= 2.16.0 AC_SUBST(LIBAUTEDB_CFLAGS) AC_SUBST(LIBAUTEDB_LIBS) -PKG_CHECK_MODULES(LIBCONFI, [libconfi >= 0.0.2], AC_DEFINE(HAVE_LIBCONFI, [1], [libconfi is present]), have_libconfi=yes) +PKG_CHECK_MODULES(LIBCONFI, [libconfi >= 0.0.2], [AC_DEFINE(HAVE_LIBCONFI, [1], [libconfi is present]), have_libconfi=yes], have_libconfi=no) AM_CONDITIONAL(HAVE_LIBCONFI, test x"$have_libconfi" = "xyes") AC_SUBST(LIBCONFI_CFLAGS) diff --git a/data/Makefile.am b/data/Makefile.am index f327fab..cffdde5 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = libautedb +SUBDIRS = libaute-db EXTRA_DIST = autedb_confi_schema.xml \ autedb.sql diff --git a/data/libautedb/Makefile.am b/data/libaute-db/Makefile.am similarity index 100% rename from data/libautedb/Makefile.am rename to data/libaute-db/Makefile.am diff --git a/data/libautedb/glade/Makefile.am b/data/libaute-db/glade/Makefile.am similarity index 100% rename from data/libautedb/glade/Makefile.am rename to data/libaute-db/glade/Makefile.am diff --git a/data/libautedb/glade/autedb.glade b/data/libaute-db/glade/autedb.glade similarity index 100% rename from data/libautedb/glade/autedb.glade rename to data/libaute-db/glade/autedb.glade diff --git a/src/aute_db.c b/src/aute_db.c index 31e0f68..85a38b5 100644 --- a/src/aute_db.c +++ b/src/aute_db.c @@ -165,7 +165,7 @@ static gchar "WHERE codice = '%s'", gdaex_strescape (cifra_password (password_nuova), NULL), gdaex_strescape (utente, NULL)); - if (gdaex_execute (gdao, sql) == -1) + if (gdaex_execute (gdaex, sql) == -1) { /* TO DO */ g_warning ("Errore durante la modifica della password."); diff --git a/tests/test.c b/tests/test.c index a2ec033..46d470d 100644 --- a/tests/test.c +++ b/tests/test.c @@ -1,5 +1,5 @@ /* - * Copyright (C)2005 Andrea Zagli + * Copyright (C) 2010 Andrea Zagli * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,9 +23,19 @@ int main (int argc, char **argv) { - gtk_init (&argc, &argv); + Aute *aute; + GSList *params; - g_fprintf (stderr, "Utente %s\n", aute_autentica (NULL)); + gtk_init (&argc, &argv); - return 0; + aute = aute_new (); + + params = g_slist_append (params, argv[1]); + params = g_slist_append (params, argv[2]); + + aute_set_config (aute, params); + + g_fprintf (stderr, "Utente %s\n", aute_autentica (aute)); + + return 0; } -- 2.49.0