+ if ( m_frame->CreateWatcherIfNecessary() )
+ {
+ if ( !m_dirToWatch.empty() )
+ m_frame->AddEntry(wxFSWPath_Dir, m_dirToWatch);
+ }
+ }
+
+ virtual void OnInitCmdLine(wxCmdLineParser& parser)
+ {
+ wxApp::OnInitCmdLine(parser);
+ parser.AddParam("directory to watch",
+ wxCMD_LINE_VAL_STRING,
+ wxCMD_LINE_PARAM_OPTIONAL);
+ }
+
+ virtual bool OnCmdLineParsed(wxCmdLineParser& parser)
+ {
+ if ( !wxApp::OnCmdLineParsed(parser) )
+ return false;
+
+ if ( parser.GetParamCount() )
+ m_dirToWatch = parser.GetParam();
+
+ return true;