MCPcopy Create free account
hub / github.com/WinMerge/winmerge / OnFileOpenProject

Method OnFileOpenProject

Src/MainFrm.cpp:2359–2374  ·  view source on GitHub ↗

* @brief Open project-file. */

Source from the content-addressed store, hash-verified

2357 * @brief Open project-file.
2358 */
2359void CMainFrame::OnFileOpenProject()
2360{
2361 String sFilepath;
2362
2363 // get the default projects path
2364 String strProjectPath = GetOptionsMgr()->GetString(OPT_PROJECTS_PATH);
2365 if (!SelectFile(GetSafeHwnd(), sFilepath, true, strProjectPath.c_str(), _T(""),
2366 _("WinMerge Project Files (*.WinMerge)|*.WinMerge||")))
2367 return;
2368
2369 strProjectPath = paths::GetParentPath(sFilepath);
2370 // store this as the new project path
2371 GetOptionsMgr()->SaveOption(OPT_PROJECTS_PATH, strProjectPath);
2372
2373 theApp.LoadAndOpenProjectFile(sFilepath);
2374}
2375
2376/**
2377 * @brief Receive command line from another instance.

Callers

nothing calls this directly

Calls 6

SelectFileFunction · 0.85
GetParentPathFunction · 0.85
GetOptionsMgrFunction · 0.70
GetStringMethod · 0.45
SaveOptionMethod · 0.45

Tested by

no test coverage detected