aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2008-11-08 01:11:10 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-11-08 01:11:10 +0800
commit39f06164edde0443b23baf6aea29edf5974ea868 (patch)
tree0fb8d386923ad0aa89a9b6712d1876a4092c7e09
parent93f24c38ae89c207e60a2af2c2eb6639d26a1372 (diff)
downloadgsoc2013-evolution-39f06164edde0443b23baf6aea29edf5974ea868.tar.gz
gsoc2013-evolution-39f06164edde0443b23baf6aea29edf5974ea868.tar.zst
gsoc2013-evolution-39f06164edde0443b23baf6aea29edf5974ea868.zip
** Fixes bug #557581
2008-11-07 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #557581 * configure.in: Break up the version definitions such that we can calculate the latest stable version and pass a STABLE_VERSION definition to shell/main.c. * shell/main.c: Replace DEVELOPMENT with STABLE_VERSION, which actually defines the latest stable version (e.g. 2.24). STABLE_VERSION is only defined if the current version is _unstable_ (e.g. 2.25). * shell/main.c (show_development_warning): Use STABLE_VERSION instead of hard-coding the version number. svn path=/trunk/; revision=36761
-rw-r--r--ChangeLog9
-rw-r--r--configure.in27
-rw-r--r--shell/ChangeLog12
-rw-r--r--shell/main.c19
4 files changed, 49 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index f25062dc72..7266005b67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-11-07 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #557581
+
+ * configure.in:
+ Break up the version definitions such that we can calculate the
+ latest stable version and pass a STABLE_VERSION definition to
+ shell/main.c.
+
2008-11-07 Sankar P <psankar@novell.com>
* Makefile.am:
diff --git a/configure.in b/configure.in
index 9a88caaf5a..bcca179425 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,17 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
-AC_INIT(evolution, 2.25.2, http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution)
+m4_define([evo_major_version], [2])
+m4_define([evo_minor_version], [25])
+m4_define([evo_micro_version], [2])
+m4_define([evo_version],
+ [evo_major_version.evo_minor_version.evo_micro_version])
+m4_define([evo_stable_version],
+ [m4_if(m4_eval(evo_minor_version % 2), [1],
+ [evo_major_version.m4_eval(evo_minor_version - 1)],
+ [evo_version])])
+
+AC_INIT(evolution, [evo_version], http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution)
AC_CONFIG_SRCDIR(README)
# Some requirements have versioned package names
@@ -52,6 +62,11 @@ ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
dnl Initialize maintainer mode
AM_MAINTAINER_MODE
+if test "$evo_version" != "$evo_stable_version"; then
+ AC_DEFINE(STABLE_VERSION, ["evo_stable_version"],
+ [Define to the latest stable version if this version is unstable])
+fi
+
dnl *************************************************************************************************
dnl Base Version
dnl
@@ -74,16 +89,6 @@ UPGRADE_REVISION=0
AC_SUBST(UPGRADE_REVISION)
AC_DEFINE_UNQUOTED(UPGRADE_REVISION, "$UPGRADE_REVISION", [The number of times we've upgraded since the BASE_VERSION release])
-dnl *************************************************************************************************
-dnl Development mode
-dnl
-dnl The controls whether things like the development warning in shell/main.c are displayed.
-dnl
-dnl This should be set to 0 for stable releases and 1 for unstable releases
-dnl *************************************************************************************************
-AC_DEFINE(DEVELOPMENT, 1, [If we are in development mode or not])
-AC_SUBST(DEVELOPMENT)
-
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 4ba417f5d8..307de5bf79 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,15 @@
+2008-11-07 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #557581
+
+ * main.c:
+ Replace DEVELOPMENT with STABLE_VERSION, which actually defines
+ the latest stable version (e.g. 2.24). STABLE_VERSION is only
+ defined if the current version is _unstable_ (e.g. 2.25).
+
+ * main.c (show_development_warning):
+ Use STABLE_VERSION instead of hard-coding the version number.
+
2008-10-30 Matthew Barnes <mbarnes@redhat.com>
* importer/evolution-importer-client.h:
diff --git a/shell/main.c b/shell/main.c
index 86a02f7471..116f5a1fd3 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -88,6 +88,11 @@
#define SKIP_WARNING_DIALOG_KEY \
"/apps/evolution/shell/skip_warning_dialog"
+/* STABLE_VERSION is only defined for development versions. */
+#ifdef STABLE_VERSION
+#define DEVELOPMENT 1
+#endif
+
static EShell *shell = NULL;
/* Command-line options. */
@@ -95,7 +100,7 @@ static gboolean start_online = FALSE;
static gboolean start_offline = FALSE;
static gboolean setup_only = FALSE;
static gboolean killev = FALSE;
-#if DEVELOPMENT
+#ifdef DEVELOPMENT
static gboolean force_migrate = FALSE;
#endif
static gboolean disable_eplugin = FALSE;
@@ -181,7 +186,7 @@ kill_old_dataserver (void)
#endif
-#if DEVELOPMENT
+#ifdef DEVELOPMENT
/* Warning dialog to scare people off a little bit. */
@@ -229,7 +234,7 @@ show_development_warning(void)
"\n"
"We hope that you enjoy the results of our hard work, and we\n"
"eagerly await your contributions!\n"),
- "2.22.1");
+ STABLE_VERSION);
label = gtk_label_new (text);
g_free(text);
@@ -475,7 +480,7 @@ static const GOptionEntry options[] = {
{ "force-shutdown", '\0', 0, G_OPTION_ARG_NONE, &killev,
N_("Forcibly shut down all Evolution components"), NULL },
#endif
-#if DEVELOPMENT
+#ifdef DEVELOPMENT
{ "force-migrate", '\0', 0, G_OPTION_ARG_NONE, &force_migrate,
N_("Forcibly re-migrate from Evolution 1.4"), NULL },
#endif
@@ -554,7 +559,7 @@ main (int argc, char **argv)
#endif
GConfClient *client;
-#if DEVELOPMENT
+#ifdef DEVELOPMENT
gboolean skip_warning_dialog;
#endif
GnomeProgram *program;
@@ -613,7 +618,7 @@ main (int argc, char **argv)
client = gconf_client_get_default ();
-#if DEVELOPMENT
+#ifdef DEVELOPMENT
if (force_migrate) {
destroy_config (client);
@@ -670,7 +675,7 @@ main (int argc, char **argv)
e_plugin_load_plugins();
}
-#if DEVELOPMENT
+#ifdef DEVELOPMENT
skip_warning_dialog = gconf_client_get_bool (
client, SKIP_WARNING_DIALOG_KEY, NULL);