Mercurial > mercurial > hgweb_searcher03.cgi
diff src/myframe.cpp @ 11:dfcf8c973219
Implement Cache maker.
author | pyon@macmini |
---|---|
date | Wed, 07 May 2014 20:38:57 +0900 |
parents | 29021e6e1ebe |
children | 52958cd4a073 |
line wrap: on
line diff
--- a/src/myframe.cpp Mon Apr 28 18:14:04 2014 +0900 +++ b/src/myframe.cpp Wed May 07 20:38:57 2014 +0900 @@ -1,5 +1,5 @@ // Filename : myframe.cpp -// Last Change: 28-Apr-2014. +// Last Change: 02-May-2014. // #include "main.h" #include "db.h" @@ -8,6 +8,7 @@ #include "hist.h" #include "preview.h" #include "index.h" +#include "cache.h" #include "param.h" #include "marksheet.h" #include "myframe.h" @@ -226,6 +227,9 @@ wxMenuItem* m_menuItemIndex = new wxMenuItem( m_menuFile, ID_MNINDEX, wxString( wxT("インデックス\tF11") ) , wxT("Update index"), wxITEM_NORMAL ); m_menuFile->Append( m_menuItemIndex ); + wxMenuItem* m_menuItemCache = new wxMenuItem( m_menuFile, ID_MNCACHE, wxString( wxT("キャッシュ\tF9") ) , wxT("Make cache"), wxITEM_NORMAL ); + m_menuFile->Append( m_menuItemCache ); + m_menuFile->AppendSeparator(); // ---- wxMenuItem* m_menuItemBkup = new wxMenuItem( m_menuFile, ID_MNDBBKUP, wxString( wxT("DBバックアップ(&B)") ) , wxT("Backup databases"), wxITEM_NORMAL ); @@ -342,6 +346,7 @@ EVT_MENU( wxID_EXIT, MyFrame::OnQuit ) EVT_MENU( ID_MNBPNT, MyFrame::OnBPrintMode ) EVT_MENU( ID_MNINDEX, MyFrame::OnIndex ) + EVT_MENU( ID_MNCACHE, MyFrame::OnCache ) EVT_MENU( ID_MNDBBKUP, MyFrame::OnDBBackup ) EVT_MENU( ID_MNMASKPARAM, MyFrame::OnMaskParam ) EVT_MENU( ID_MNMARKPARAM, MyFrame::OnMarkParam ) @@ -552,6 +557,17 @@ index->SetRootdir( rootdir ); index->ShowModal(); } +/* キャッシュ作成ダイアログ */ +void MyFrame::OnCache( wxCommandEvent& WXUNUSED(event) ) +{ + wxString rootdir; + config->SetPath( wxT("/Index") ); + config->Read( wxT("rootdir"), &rootdir ); + + CacheDialog* cache = new CacheDialog( this, wxID_ANY, wxT("キャッシュ作成"), wxDefaultPosition, wxDefaultSize, wxCAPTION|wxSTAY_ON_TOP ); + cache->Setting( rootdir, THUMB_W, THUMB_H ); + cache->ShowModal(); +} /* マークシートパラメータ設定ダイアログ */ void MyFrame::OnMarkParam( wxCommandEvent& WXUNUSED(event) ) {