diff src/myframe.cpp @ 38:044cc2f5af81 v2.4 v2.7

small fix.
author pyon@macmini
date Thu, 24 Nov 2011 22:26:15 +0900
parents 3b54f3deeed9
children ce5b61376fd0
line wrap: on
line diff
--- a/src/myframe.cpp	Fri Nov 18 20:46:12 2011 +0900
+++ b/src/myframe.cpp	Thu Nov 24 22:26:15 2011 +0900
@@ -1,5 +1,5 @@
 // Filename   : myframe.cpp
-// Last Change: 18-Nov-2011.
+// Last Change: 24-Nov-2011.
 //
 
 #include "main.h"
@@ -7,6 +7,7 @@
 #include "param.h"
 #include "dndfile.h"
 #include "marksheet.h"
+#include "dirview.h"
 
 #define LOGO_W  288
 #define LOGO_H   86
@@ -47,7 +48,7 @@
 	wxMenuItem* m_menuItemAutoDetect;
 	m_menuItemAutoDetect = new wxMenuItem( m_menuFile, ID_MENUITEMAUTOD, wxString( wxT("自動検知\tF2") ) , wxEmptyString, wxITEM_CHECK );
 	m_menuFile->Append( m_menuItemAutoDetect );
-    m_menuItemAutoDetect->Check(true);
+    m_menuItemAutoDetect->Check(false);
 
 	m_menuFile->AppendSeparator();    // ----
 	wxMenuItem* m_menuItemParam;
@@ -458,7 +459,6 @@
     // 本処理
     m_listCtrlView->DeleteAllItems();
     m_imageList->RemoveAll();
-    wxListItem item;
     m_textCtrlGuess->SetBackgroundColour(*wxWHITE);
 
     if ( by_autodetect ) pd->Update( 0, wxT("処理開始") );
@@ -493,7 +493,7 @@
 
             // 氏名画像を表示
             wxImage name_image;
-            name_image  = marksheet.GetSubImage( wxRect( wxPoint(300,550), wxSize(640,190) ) );
+            name_image = marksheet.GetSubImage( wxRect( wxPoint(300,550), wxSize(640,190) ) );
             wxBitmap name_bmp  = ( name_image.Scale( LOGO_W, LOGO_H, wxIMAGE_QUALITY_HIGH ) );
             m_bitmapName->SetBitmap( name_bmp );
 
@@ -532,7 +532,7 @@
     // 選択したものは青い画像を使う
     long i = -1;
     for ( ;; ) {
-        i = m_listCtrlView->GetNextItem(i, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
+        i = m_listCtrlView->GetNextItem( i, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED );
         if ( i == -1 ) break;
         m_listCtrlView->SetItemImage( i, i+m_listCtrlView->GetItemCount() );
     }
@@ -545,7 +545,7 @@
 void MyFrame::OnItemSelected(wxListEvent& event)
 {
     int i = event.GetIndex();
-    int m = m_listCtrlView->GetSelectedItemCount();
+    int m = m_listCtrlView->GetItemCount();
     m_listCtrlView->SetItemImage( i, i+m );    // 青い画像
 
     if ( m != 1 ) {
@@ -719,8 +719,10 @@
     item.SetMask(wxLIST_MASK_TEXT);
     m_listCtrlHhsDir->GetItem( item );
     hhsdir.Append( item.GetText() );
-    wxString execmd = wxT("explorer ") + hhsdir;
-    wxExecute( execmd );
+
+    DirViewFrame* dvf = new DirViewFrame( this, wxID_ANY, wxEmptyString );
+    dvf->m_dir = hhsdir;
+    dvf->Show(true);
 }
 
 /* 以下,定型もの ***********************************************/