MCPcopy Create free account
hub / github.com/MediaArea/MediaInfo / M_File_ExportClick

Method M_File_ExportClick

Source/GUI/VCL/GUI_Main.cpp:1388–1417  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1386
1387//---------------------------------------------------------------------------
1388void __fastcall TMainF::M_File_ExportClick(TObject *Sender)
1389{
1390 #ifndef MEDIAINFOGUI_EXPORT_NO
1391 Ztring Name;
1392 if (!ExportF)
1393 {
1394 ExportF=new TExportF(this);
1395 }
1396 if (ExportF->Name->Text.Length()==0)
1397 {
1398 //No initial name
1399 if (FileOpenDialog1->DefaultFolder.Length()==0)
1400 {
1401 Name=Prefs->BaseFolder;
1402 Name.resize(Name.size()-1);
1403 Name=Name.substr(0, Name.rfind(__T("\\"))+1); //Folder of MediaInfo
1404
1405 //If only one file, use folder and filename of that file with added suffix
1406 if (I->Count_Get()==1) {
1407 Name=I->Get(0, Stream_General, 0, __T("CompleteName")).c_str();
1408 Name.append(__T(".MediaInfo."));
1409 }
1410 }
1411 else
1412 Name=GUI_Text(FileOpenDialog1->DefaultFolder);
1413 }
1414
1415 ExportF->Run(*I, Name);
1416 #endif
1417}
1418
1419//---------------------------------------------------------------------------
1420void __fastcall TMainF::M_File_ExitClick(TObject *Sender)

Callers

nothing calls this directly

Calls 3

Count_GetMethod · 0.45
GetMethod · 0.45
RunMethod · 0.45

Tested by

no test coverage detected