patches for release 0.14.2
- From: Kurt Maute <kurt maute us>
- To: Planner-Dev <planner-dev-list gnome org>
- Subject: patches for release 0.14.2
- Date: Mon, 20 Nov 2006 19:49:22 -0500
Hi All,
I'm getting ready to release v0.14.2 of Planner - with 2 important
patches:
* fix for bug 358415 crash in gantt view, contributed by Arthur
Petitpierre and mdpoole trolius org.
* fix for --with-database compile problems relating to different
versions of libgda. I committed a patch from bug 353213 for v0.14.1
which allowed planner to be built with libgda-2.0, but fails for
previous versions. I've attached the patch, which I haven't committed
yet - its basically a bunch of #ifdef's in the sql modules allowing for
the differences in parameters and function names. I expect we can
remove them when libgda-2.0 becomes the more widely distributed version.
Pls have a look and provide feedback if you have any (or if anyone has
other critical patches that should be included in this release). I'd
like to commit and release this weekend or sooner. Bugzilla is getting
filled with all the crash reports from bullet 1.
Oh, and don't try to compile with libgda-1.9.103 or higher (use 1.9.102
or lower). There are even more changes in the functions that cause
problems for Planner.
tnx!
--
Kurt Maute <kurt maute us>
? planner/planner-0.14.2.tar.gz
? planner/docs/user-guide/eu/Makefile
? planner/docs/user-guide/eu/Makefile.in
? planner/docs/user-guide/eu/omf_timestamp
? planner/docs/user-guide/eu/planner-eu.omf.out
? planner/po/stamp-it
Index: planner/acinclude.m4
===================================================================
RCS file: /cvs/gnome/planner/acinclude.m4,v
retrieving revision 1.3
diff -u -B -p -r1.3 acinclude.m4
--- planner/acinclude.m4 16 Oct 2005 14:36:10 -0000 1.3
+++ planner/acinclude.m4 21 Nov 2006 00:41:41 -0000
@@ -27,7 +27,7 @@ AC_DEFUN([PLANNER_COMPILE_WARNINGS],[
maximum|error)
warning_flags="-Wall -Wunused -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
CFLAGS="$warning_flags $CFLAGS"
- for option in -Wno-sign-compare -Wno-pointer-sign; do
+ for option in -Wno-sign-compare -Wno-pointer-sign -Wno-return-type; do
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $option"
AC_MSG_CHECKING([whether gcc understands $option])
Index: planner/configure.in
===================================================================
RCS file: /cvs/gnome/planner/configure.in,v
retrieving revision 1.76
diff -u -B -p -r1.76 configure.in
--- planner/configure.in 18 Nov 2006 17:05:41 -0000 1.76
+++ planner/configure.in 21 Nov 2006 00:41:41 -0000
@@ -83,13 +83,22 @@ dnl -----------
AC_ARG_ENABLE(database, [ --enable-database=[no/yes] enable database support [default=no]], enable_database="$enableval", enable_database=no)
if test "x$enable_database" = "xyes" ; then
- PKG_CHECK_MODULES(GDA, libgda-2.0 >= 1.0)
+ PKG_CHECK_MODULES(GDA, libgda >= 1.0)
use_gda=yes
else
use_gda=no
fi
AM_CONDITIONAL(HAVE_GDA, test x$use_gda = xyes)
+
+if test "x$enable_database" = "xyes" ; then
+ PKG_CHECK_MODULES(GDA, libgda-2.0 >= 1.0)
+ have_gda2=yes
+else
+ have_gda2=no
+fi
+
+AM_CONDITIONAL(HAVE_GDA2, test x$have_gda2 = xyes)
dnl -----------------------------------------------------------
Index: planner/libplanner/mrp-sql.c
===================================================================
RCS file: /cvs/gnome/planner/libplanner/mrp-sql.c,v
retrieving revision 1.14
diff -u -B -p -r1.14 mrp-sql.c
--- planner/libplanner/mrp-sql.c 24 Sep 2006 17:25:26 -0000 1.14
+++ planner/libplanner/mrp-sql.c 21 Nov 2006 00:41:42 -0000
@@ -188,10 +188,16 @@ sql_execute_query (GdaConnection *con, g
{
GdaCommand *cmd;
GdaDataModel *res = NULL;
+#ifdef HAVE_GDA2
GError *error;
+#endif
cmd = gda_command_new (query, GDA_COMMAND_TYPE_SQL, STOP_ON_ERR);
- res = gda_connection_execute_single_command (con, cmd, NULL, &error);
+#ifdef HAVE_GDA2
+ res = gda_connection_execute_single_command (con, cmd, NULL, &error);
+#else
+ res = gda_connection_execute_single_command (con, cmd, NULL);
+#endif
gda_command_free (cmd);
return res;
}
@@ -199,6 +205,7 @@ sql_execute_query (GdaConnection *con, g
static const gchar *
sql_get_last_error (GdaConnection *connection)
{
+#ifdef HAVE_GDA2
GList *list;
GdaConnectionEvent *error;
const gchar *error_txt;
@@ -212,7 +219,21 @@ sql_get_last_error (GdaConnection *conne
/* FIXME: Poor user, she won't get localized messages */
error_txt = gda_connection_event_get_description (error);
+#else
+ GList *list;
+ GdaError *error;
+ const gchar *error_txt;
+
+ g_return_val_if_fail (GDA_IS_CONNECTION (connection),
+ _("Can't connect to database server"));
+
+ list = (GList *) gda_connection_get_errors (connection);
+ error = (GdaError *) g_list_last (list)->data;
+
+ /* FIXME: Poor user, she won't get localized messages */
+ error_txt = gda_error_get_description (error);
+#endif
return error_txt;
}
@@ -2167,15 +2188,26 @@ mrp_sql_load_project (MrpStorageSQL *sto
data->root_task = mrp_task_new ();
db_txt = g_strdup_printf ("HOST=%s;DATABASE=%s", host, database);
+#ifdef HAVE_GDA2
gda_config_save_data_source (dsn_name,
provider,
db_txt,
"planner project", login, password, FALSE);
+#else
+ gda_config_save_data_source (dsn_name,
+ provider,
+ db_txt,
+ "planner project", login, password);
+#endif
g_free (db_txt);
client = gda_client_new ();
+#ifdef HAVE_GDA2
data->con = gda_client_open_connection (client, dsn_name, NULL, NULL, 0, error);
+#else
+ data->con = gda_client_open_connection (client, dsn_name, NULL, NULL, 0);
+#endif
if (!GDA_IS_CONNECTION (data->con)) {
g_warning (_("Connection to database '%s' failed.\n"), database);
@@ -3611,15 +3643,26 @@ mrp_sql_save_project (MrpStorageSQL *st
data->project = storage->project;
db_txt = g_strdup_printf ("HOST=%s;DATABASE=%s", host, database);
+#ifdef HAVE_GDA2
gda_config_save_data_source (dsn_name,
provider,
db_txt,
"planner project", user, password, FALSE);
+#else
+ gda_config_save_data_source (dsn_name,
+ provider,
+ db_txt,
+ "planner project", user, password);
+#endif
g_free (db_txt);
client = gda_client_new ();
- data->con = gda_client_open_connection (client, dsn_name, NULL, NULL, 0, error);
+#ifdef HAVE_GDA2
+ data->con = gda_client_open_connection (client, dsn_name, NULL, NULL, 0, error);
+#else
+ data->con = gda_client_open_connection (client, dsn_name, NULL, NULL, 0);
+#endif
data->revision = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (data->project),
REVISION));
Index: planner/src/planner-sql-plugin.c
===================================================================
RCS file: /cvs/gnome/planner/src/planner-sql-plugin.c,v
retrieving revision 1.29
diff -u -B -p -r1.29 planner-sql-plugin.c
--- planner/src/planner-sql-plugin.c 23 Sep 2006 18:31:46 -0000 1.29
+++ planner/src/planner-sql-plugin.c 21 Nov 2006 00:41:42 -0000
@@ -106,10 +106,16 @@ sql_execute_query (GdaConnection *con, g
{
GdaCommand *cmd;
GdaDataModel *res;
- GError *error;
+#ifdef HAVE_GDA2
+ GError *error;
+#endif
cmd = gda_command_new (query, GDA_COMMAND_TYPE_SQL, STOP_ON_ERR);
+#ifdef HAVE_GDA2
res = gda_connection_execute_single_command (con, cmd, NULL, &error);
+#else
+ res = gda_connection_execute_single_command (con, cmd, NULL);
+#endif
gda_command_free (cmd);
return res;
@@ -118,6 +124,7 @@ sql_execute_query (GdaConnection *con, g
static const gchar *
sql_get_last_error (GdaConnection *connection)
{
+#ifdef HAVE_GDA2
GList *list;
GdaConnectionEvent *error;
const gchar *error_txt;
@@ -132,6 +139,22 @@ sql_get_last_error (GdaConnection *conne
/* FIXME: Poor user, she won't get localized messages */
error_txt = gda_connection_event_get_description (error);
+#else
+ GList *list;
+ GdaError *error;
+ const gchar *error_txt;
+
+ list = (GList *) gda_connection_get_errors (connection);
+
+ if (list == NULL) {
+ return _("No errors reported.");
+ }
+
+ error = (GdaError *) g_list_last (list)->data;
+
+ /* FIXME: Poor user, she won't get localized messages */
+ error_txt = gda_error_get_description (error);
+#endif
return error_txt;
}
@@ -595,7 +618,9 @@ create_database (const gchar *dsn_name
/* FIXME: In postgresql we use template1 as the connection database */
gchar *init_database = "template1";
gchar *query;
+#ifdef HAVE_GDA2
GError *error;
+#endif
dsn = gda_config_find_data_source (dsn_name);
cnc_string_orig = dsn->cnc_string;
@@ -608,7 +633,11 @@ create_database (const gchar *dsn_name
gda_config_save_data_source_info (dsn);
client = gda_client_new ();
+#ifdef HAVE_GDA2
conn = gda_client_open_connection (client, dsn_name, NULL, NULL, 0, &error);
+#else
+ conn = gda_client_open_connection (client, dsn_name, NULL, NULL, 0);
+#endif
if (conn == NULL) {
g_warning ("Can't connect to database server in order to check/create the database: %s", cnc_string_orig);
} else {
@@ -652,9 +681,15 @@ sql_get_tested_connection (const gchar
{
GdaConnection *conn;
gchar *str;
+#ifdef HAVE_GDA2
GError *error;
+#endif
+#ifdef HAVE_GDA2
conn = gda_client_open_connection (client, dsn_name, NULL, NULL, 0, &error);
+#else
+ conn = gda_client_open_connection (client, dsn_name, NULL, NULL, 0 );
+#endif
if (conn == NULL) {
if (!create_database (dsn_name, host, db_name, plugin)) {
@@ -663,7 +698,11 @@ sql_get_tested_connection (const gchar
show_error_dialog (plugin, str);
conn = NULL;
} else {
+#ifdef HAVE_GDA2
conn = gda_client_open_connection (client, dsn_name, NULL, NULL, 0, &error);
+#else
+ conn = gda_client_open_connection (client, dsn_name, NULL, NULL, 0 );
+#endif
}
}
@@ -715,10 +754,17 @@ sql_plugin_retrieve_project_id (PlannerP
gchar *filename;
db_txt = g_strdup_printf ("HOST=%s;DATABASE=%s",server,database);
+#ifdef HAVE_GDA2
gda_config_save_data_source (dsn_name,
provider,
db_txt,
"planner project", login, password, FALSE);
+#else
+ gda_config_save_data_source (dsn_name,
+ provider,
+ db_txt,
+ "planner project", login, password);
+#endif
g_free (db_txt);
client = gda_client_new ();
@@ -1113,10 +1159,17 @@ sql_plugin_save (GtkAction *action,
}
db_txt = g_strdup_printf ("HOST=%s;DATABASE=%s",server,database);
+#ifdef HAVE_GDA2
gda_config_save_data_source (dsn_name,
provider,
db_txt,
"planner project", login, password, FALSE);
+#else
+ gda_config_save_data_source (dsn_name,
+ provider,
+ db_txt,
+ "planner project", login, password);
+#endif
g_free (db_txt);
client = gda_client_new ();
conn = sql_get_tested_connection (dsn_name, server, database, client, plugin);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]