diff src/about.cpp @ 21:a2ad87cad48b

Enhanced the convenience of Cache dialog.
author pyon@macmini
date Wed, 17 Dec 2014 00:52:43 +0900
parents 7ac7d28699af
children
line wrap: on
line diff
--- a/src/about.cpp	Mon Dec 08 19:47:42 2014 +0900
+++ b/src/about.cpp	Wed Dec 17 00:52:43 2014 +0900
@@ -1,5 +1,5 @@
 // Filename   : about.cpp
-// Last Change: 17-Oct-2013.
+// Last Change: 15-Dec-2014.
 //
 
 #include "common.h"
@@ -19,7 +19,7 @@
 	m_bitmap = new wxStaticBitmap( this, wxID_ANY, bmp, wxDefaultPosition, wxDefaultSize, 0 );
 	bSizerOK->Add( m_bitmap, 0, wxALL, 5 );
 	
-	m_staticTextDesc = new wxStaticText( this, wxID_ANY, wxT("我に自由を!\rLet me free !"), wxDefaultPosition, wxSize(-1,50), 0 );
+	m_staticTextDesc = new wxStaticText( this, wxID_ANY, wxT("我に自由を!\rLet me free !"), wxDefaultPosition, wxSize( -1, 50 ), 0 );
 	bSizerOK->Add( m_staticTextDesc, 0, wxALL|wxALIGN_CENTRE, 5 );
 	
 	m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -27,6 +27,10 @@
 	bSizerOK->Add( m_buttonOK, 0, wxALL|wxALIGN_BOTTOM, 5 );
 	
 	bSizer->Add( bSizerOK, 0, wxEXPAND, 5 );
+
+    wxString build;
+	m_staticTextBuild = new wxStaticText( this, wxID_ANY, build.Format( wxT("Build with %s\n") wxT("running under %s."), wxVERSION_STRING, wxGetOsDescription().c_str() ), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizer->Add( m_staticTextBuild, 0, wxALL, 5 );
 	
 	m_richText = new wxRichTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxVSCROLL|wxBORDER_NONE|wxWANTS_CHARS );
 	bSizer->Add( m_richText, 1, wxEXPAND|wxALL, 5 );
@@ -47,7 +51,7 @@
 {
     wxTextFile textfile;
     textfile.Open( wxGetCwd() + wxFILE_SEP_PATH + wxT("Changes") );
-    for ( int i=0; i<textfile.GetLineCount(); i++ ) {
+    for ( int i = 0; i < textfile.GetLineCount(); i++ ) {
         if ( textfile[i].StartsWith( wxT("version")) ) {
             m_richText->BeginBold();
             m_richText->BeginFontSize(16);
@@ -56,22 +60,23 @@
             m_richText->EndTextColour();
             m_richText->EndFontSize();
             m_richText->EndBold();
-            m_richText->Newline();
         }
         else if ( textfile[i].StartsWith( wxT("20")) ) {    // year
-            m_richText->BeginAlignment( wxTEXT_ALIGNMENT_RIGHT );
+            m_richText->WriteText( wxT("\t\t") );
             m_richText->BeginItalic();
             m_richText->WriteText( textfile[i] );
             m_richText->EndItalic();
-            m_richText->EndAlignment();
             m_richText->Newline();
         }
         else if ( textfile[i].StartsWith( wxT("----")) ) {
             m_richText->WriteText( textfile[i] );
             m_richText->Newline();
         }
+        else if ( textfile[i].IsEmpty() ) {
+            m_richText->Newline();
+        }
         else {
-            m_richText->BeginSymbolBullet( wxT("* "), 60, 0, wxTEXT_ATTR_BULLET_STYLE_SYMBOL );
+            m_richText->BeginSymbolBullet( '*', 60, 0, wxTEXT_ATTR_BULLET_STYLE_SYMBOL );
             m_richText->WriteText( textfile[i] );
             m_richText->EndSymbolBullet();
             m_richText->Newline();