Make the mainwindow's version string shorter when
authorColin Leroy <colin@colino.net>
Wed, 20 Mar 2013 14:42:14 +0000 (15:42 +0100)
committerColin Leroy <colin@colino.net>
Wed, 20 Mar 2013 14:42:14 +0000 (15:42 +0100)
not using maintainer mode

configure.ac
src/common/version.h.in
src/mainwindow.c

index cb318b6001426dce506452a209eded61f0c48942..4c4b18dd7688eb61f1c3b1683b1cf627e51d116a 100644 (file)
@@ -17,8 +17,6 @@ MAJOR_VERSION=`echo $GIT_VERSION | cut -f1 -d- | cut -f1 -d.`
 MINOR_VERSION=`echo $GIT_VERSION | cut -f1 -d- | cut -f2 -d.`
 MICRO_VERSION=`echo $GIT_VERSION | cut -f1 -d- | cut -f3 -d.`
 EXTRA_VERSION=`echo $GIT_VERSION | cut -f2 -d-`
-HASH_VERSION=`echo $GIT_VERSION | cut -f3 -d-`
-DIRTY_VERSION=`echo $GIT_VERSION | cut -f4 -d-`
 
 if test \( "x$EXTRA_VERSION" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}git${EXTRA_VERSION}
@@ -167,7 +165,7 @@ fi
 CFLAGS="$CFLAGS -Wall"
 
 if test $USE_MAINTAINER_MODE = yes; then
-       CFLAGS="-g -Wall -Wno-pointer-sign"
+       CFLAGS="-g -Wall -Wno-pointer-sign -DUSE_MAINTAINER_MODE"
 fi
 
 pthread_name=
index 071b2066471818a30ed5c5ec0a59400a95bce720..957a5cd9db7f0f82cbf3ff954861ff00198014e1 100644 (file)
                                          (((guint32)c) <<  8) |  ((guint32)d)      )
 
 #define PACKAGE                        "@PACKAGE@"
+#define PACKAGE_FRIENDLY       "Claws Mail"
 #define VERSION                        "@VERSION@"
-#define PROG_VERSION           "Claws Mail "VERSION
+#define RELEASE_VERSION                "@MAJOR_VERSION@.@MINOR_VERSION@.@MICRO_VERSION@"
+#define PROG_VERSION           PACKAGE_FRIENDLY" "VERSION_GIT_FULL
+#ifdef USE_MAINTAINER_MODE
+#define PROG_VERSION_FRIENDLY  PROG_VERSION
+#else
+#define PROG_VERSION_FRIENDLY  PACKAGE_FRIENDLY" "RELEASE_VERSION
+#endif
 #define VERSION_NUMERIC                MAKE_NUMERIC_VERSION(@MAJOR_VERSION@, @MINOR_VERSION@, \
                                                     @MICRO_VERSION@, @EXTRA_VERSION@)
 #define VERSION_GIT_FULL       "@GIT_VERSION@"
-#define VERSION_GIT_HASH       "@HASH_VERSION@"
-
 #endif /* __VERSION_H__ */
index 5398ba26d13b9082f95c5cc9a6d22e198ea9ea90..c72e200002bb4bfd93108e9d2fbb8d5c8c88e482 100644 (file)
@@ -1605,7 +1605,7 @@ MainWindow *main_window_create()
 
        /* main window */
        window = GTK_WIDGET(gtkut_window_new(GTK_WINDOW_TOPLEVEL, "mainwindow"));
-       gtk_window_set_title(GTK_WINDOW(window), PROG_VERSION);
+       gtk_window_set_title(GTK_WINDOW(window), PROG_VERSION_FRIENDLY);
        gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
 #ifdef GENERIC_UMPC
        prefs_common.layout_mode = SMALL_LAYOUT;
@@ -2802,9 +2802,9 @@ static void main_window_show_cur_account(MainWindow *mainwin)
                           : _("none"));
 
        if (cur_account)
-               buf = g_strdup_printf("%s - %s", ac_name, PROG_VERSION);
+               buf = g_strdup_printf("%s - %s", ac_name, PROG_VERSION_FRIENDLY);
        else
-               buf = g_strdup(PROG_VERSION);
+               buf = g_strdup(PROG_VERSION_FRIENDLY);
        gtk_window_set_title(GTK_WINDOW(mainwin->window), buf);
        g_free(buf);