Ticket #4292: 4292.diff
File 4292.diff, 2.4 KB (added by , 11 years ago) |
---|
-
src/interface/cmdline.h
17 17 enum t_option 18 18 { 19 19 logontype, 20 site 20 site, 21 local 21 22 }; 22 23 23 24 CCommandLine(int argc, wxChar** argv); -
src/interface/Mainfrm.cpp
2506 2506 return; 2507 2507 2508 2508 wxString site; 2509 wxString local; 2509 2510 if (pCommandLine->HasSwitch(CCommandLine::sitemanager)) 2510 2511 { 2511 2512 if (!COptions::Get()->GetOptionVal(OPTION_INTERFACE_SITEMANAGER_ON_STARTUP) != 0) … … 2529 2530 delete pData; 2530 2531 } 2531 2532 } 2533 else if ((local = pCommandLine->GetOption(CCommandLine::local)) != _T("")) 2534 { 2535 2536 if (!wxDir::Exists(local)) 2537 { 2538 wxString str = _("Path not found:"); 2539 str += _T("\n") + local; 2540 wxMessageBox(str, _("Syntax error in command line")); 2541 return; 2542 } 2543 2544 CState *pState = CContextManager::Get()->GetCurrentContext(); 2545 if (!pState) 2546 return; 2547 2548 pState->SetLocalDir(local); 2549 } 2550 2532 2551 2533 2552 wxString param = pCommandLine->GetParameter(); 2534 2553 if (param != _T("")) … … 2536 2555 wxString error; 2537 2556 2538 2557 CServer server; 2539 2558 2540 2559 wxString logontype = pCommandLine->GetOption(CCommandLine::logontype); 2541 2560 if (logontype == _T("ask")) 2542 2561 server.SetLogonType(ASK); -
src/interface/cmdline.cpp
6 6 m_parser.AddSwitch(_T("h"), _T("help"), _("Shows this help dialog"), wxCMD_LINE_OPTION_HELP); 7 7 m_parser.AddSwitch(_T("s"), _T("site-manager"), _("Start with opened Site Manager")); 8 8 m_parser.AddOption(_T("c"), _T("site"), _("Connect to specified Site Manager site")); 9 m_parser.AddOption(_T("a"), _T("local"), _("Starts the local site in the given path")); 9 10 10 11 wxString desc = wxString::Format(_("Logontype, can only be used together with FTP URL. Argument has to be either '%s' or '%s'"), _T("ask"), _T("interactive")); 11 12 m_parser.AddOption(_T("l"), _T("logontype"), desc); … … 55 56 if (m_parser.Found(_T("l"), &value)) 56 57 return value; 57 58 break; 59 case local: 60 if (m_parser.Found(_T("a"), &value)) 61 return value; 62 break; 58 63 } 59 64 60 65 return _T("");