Added version display to menu


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@787 a1c6a512-1295-4272-9138-f99709370657
diff --git a/apps/main_menu.c b/apps/main_menu.c
index e3eb240..3231218 100644
--- a/apps/main_menu.c
+++ b/apps/main_menu.c
@@ -25,6 +25,7 @@
 #include "kernel.h"
 #include "main_menu.h"
 #include "sound_menu.h"
+#include "version.h"
 
 #ifdef HAVE_LCD_BITMAP
 #include "screensaver.h"
@@ -85,7 +86,6 @@
 
 void show_splash(void)
 {
-    int i;
     char *rockbox = "ROCKbox!";
     lcd_clear_display();
 
@@ -99,11 +99,19 @@
     lcd_update();
 }
 
+void version(void)
+{
+    lcd_clear_display();
+    lcd_puts(0,0,appsversion);
+    lcd_update();
+    sleep(HZ);
+}
+
 void main_menu(void)
 {
     int m;
     enum {
-        Tetris, Screen_Saver, Splash, Credits, Sound
+        Tetris, Screen_Saver, Splash, Credits, Sound, Version
     };
 
     /* main menu */
@@ -114,7 +122,8 @@
         { Screen_Saver, "Screen Saver", screensaver },
 #endif
         { Splash,       "Splash",       show_splash },
-        { Credits,      "Credits",      show_credits }
+        { Credits,      "Credits",      show_credits },
+        { Version,      "Version",      version }
     };
 
     m=menu_init( items, sizeof items / sizeof(struct menu_items) );
diff --git a/apps/version.h b/apps/version.h
index 6837752..b60d1ca 100644
--- a/apps/version.h
+++ b/apps/version.h
@@ -1 +1,25 @@
+/***************************************************************************
+ *             __________               __   ___.
+ *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
+ *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
+ *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
+ *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
+ *                     \/            \/     \/    \/            \/
+ * $Id$
+ *
+ * Copyright (C) 2002 Björn Stenberg
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+#ifndef _VERSION_H_
+#define _VERSION_H_
+
 #define APPSVERSION "0.1"
+extern char appsversion[];
+
+#endif