r19080 - gnucash/trunk - Bug #616696 - Development version warning string should not include hardcode version.

Geert Janssens gjanssens at code.gnucash.org
Wed Apr 28 09:23:27 EDT 2010


Author: gjanssens
Date: 2010-04-28 09:23:27 -0400 (Wed, 28 Apr 2010)
New Revision: 19080
Trac: http://svn.gnucash.org/trac/changeset/19080

Modified:
   gnucash/trunk/configure.in
   gnucash/trunk/doc/Makefile.am
   gnucash/trunk/doc/tip_of_the_day.list.in
   gnucash/trunk/src/gnome-utils/dialog-totd.c
Log:
Bug #616696 - Development version warning string should not include hardcode version.
Third revision.
- Stable Version changed into Stable Series (easier to track automatically)
- Modified motd code to deal with replacement strings
- Changed DEVELOPMENT release tip to separate the Stable Series number from the translatable string.

Modified: gnucash/trunk/configure.in
===================================================================
--- gnucash/trunk/configure.in	2010-04-27 20:46:46 UTC (rev 19079)
+++ gnucash/trunk/configure.in	2010-04-28 13:23:27 UTC (rev 19080)
@@ -32,7 +32,7 @@
 GNUCASH_MAJOR_VERSION=`echo $GNUCASH_VERSION_STRING | [ sed -e 's/^\([^\.]*\)\.\([^.]*\)\.\(.*\)$/\1/' ]`
 GNUCASH_MINOR_VERSION=`echo $GNUCASH_VERSION_STRING | [ sed -e 's/^\([^\.]*\)\.\([^.]*\)\.\(.*\)$/\2/' ]`
 GNUCASH_MICRO_VERSION=`echo $GNUCASH_VERSION_STRING | [ sed -e 's/^\([^\.]*\)\.\([^.]*\)\.\(.*\)$/\3/' ]`
-GNUCASH_LATEST_STABLE_VERSION="2.2.9"
+GNUCASH_LATEST_STABLE_SERIES=$GNUCASH_MAJOR_VERSION.$(($GNUCASH_MINOR_VERSION-($GNUCASH_MINOR_VERSION%2)))
 
 # save any user/environment optimization flags before we muck with them in
 # --enable-debug:
@@ -67,7 +67,7 @@
 AC_SUBST(GNUCASH_MAJOR_VERSION)
 AC_SUBST(GNUCASH_MINOR_VERSION)
 AC_SUBST(GNUCASH_MICRO_VERSION)
-AC_SUBST(GNUCASH_LATEST_STABLE_VERSION)
+AC_SUBST(GNUCASH_LATEST_STABLE_SERIES)
 
 AC_DEFINE_UNQUOTED(GNUCASH_MAJOR_VERSION, $GNUCASH_MAJOR_VERSION,
 	[GnuCash Major version number])
@@ -75,8 +75,8 @@
 	[GnuCash Minor version number])
 AC_DEFINE_UNQUOTED(GNUCASH_MICRO_VERSION, $GNUCASH_MICRO_VERSION,
 	[GnuCash Micro version number])
-AC_DEFINE_UNQUOTED(GNUCASH_LATEST_STABLE_VERSION, "$GNUCASH_LATEST_STABLE_VERSION",
-	[Most recent stable version of GnuCash])
+AC_DEFINE_UNQUOTED(GNUCASH_LATEST_STABLE_SERIES, "$GNUCASH_LATEST_STABLE_SERIES",
+	[Most recent stable GnuCash series])
 
 dnl Set of available languages.
 ALL_LINGUAS="ca cs da de el en_GB es_NI es eu fa fi fr he hu it ja ko lt lv_LV nb ne nl pl pt_BR pt ro ru rw sk sv ta tr uk vi zh_CN zh_TW"

Modified: gnucash/trunk/doc/Makefile.am
===================================================================
--- gnucash/trunk/doc/Makefile.am	2010-04-27 20:46:46 UTC (rev 19079)
+++ gnucash/trunk/doc/Makefile.am	2010-04-28 13:23:27 UTC (rev 19080)
@@ -58,8 +58,10 @@
 
 tip_of_the_day.list: tip_of_the_day.list.in Makefile
 	${CC} -E -P -x c -D'N_(x)=x' -o $@.tmp $<
-	cat -s $@.tmp | ${SED} -e 's/^ *\"\(.*\)\" *$$/\1/' \
-                           -e 's:@-GNUCASH_LATEST_STABLE_VERSION-@:${GNUCASH_LATEST_STABLE_VERSION}:g' > $@
+	cat -s $@.tmp | ${SED} -e 's/^ *"//' \
+	                       -e 's/" *$$//' \
+	                       -e 's/"* *[|] */|/' \
+                           -e 's:@-GNUCASH_LATEST_STABLE_SERIES-@:${GNUCASH_LATEST_STABLE_SERIES}:g' > $@
 	rm -f $@.tmp
 
 DISTCLEANFILES = gnc-prices.1 gnucash.1 tip_of_the_day.list

Modified: gnucash/trunk/doc/tip_of_the_day.list.in
===================================================================
--- gnucash/trunk/doc/tip_of_the_day.list.in	2010-04-27 20:46:46 UTC (rev 19079)
+++ gnucash/trunk/doc/tip_of_the_day.list.in	2010-04-28 13:23:27 UTC (rev 19080)
@@ -1,7 +1,7 @@
  N_( "Warning!! This is a DEVELOPMENT version of GnuCash. \
 It probably has lots of bugs and unstable features! \
 If you are looking for a stable personal finance application, \
-you should use the latest release of GnuCash @-GNUCASH_LATEST_STABLE_VERSION- at .")
+you should use the latest release of GnuCash %s.")|@-GNUCASH_LATEST_STABLE_SERIES-@
 
  N_( "The GnuCash online manual has lots of helpful information. \
 If you are upgrading from earlier versions of GnuCash, the section \

Modified: gnucash/trunk/src/gnome-utils/dialog-totd.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-totd.c	2010-04-27 20:46:46 UTC (rev 19079)
+++ gnucash/trunk/src/gnome-utils/dialog-totd.c	2010-04-28 13:23:27 UTC (rev 19080)
@@ -80,6 +80,8 @@
                     gint offset)
 {
     GtkWidget *textview;
+    gchar **tip_components, **tip_args;
+    gchar *tip;
 
     ENTER("widget %p, offset %d", widget, offset);
     current_tip_number += offset;
@@ -90,9 +92,14 @@
         current_tip_number = 0;
     gnc_gconf_set_int(GCONF_SECTION, KEY_CURRENT_TIP, current_tip_number, NULL);
 
+    tip_components = g_strsplit(tip_list[current_tip_number], "|", 0);
+    tip_args = &tip_components[1];
     textview = gnc_glade_lookup_widget(widget, "tip_textview");
+    tip = g_strdup_printf( _(tip_components[0]), tip_components[1]);
+    g_strfreev(tip_components);
     gtk_text_buffer_set_text(gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview)),
-                             _(tip_list[current_tip_number]), -1);
+                             tip, -1);
+    g_free(tip);
     LEAVE("");
 }
 



More information about the gnucash-changes mailing list