MCPcopy Create free account
hub / github.com/bumptop/BumpTop / onWidgetClick

Method onWidgetClick

trunk/win/Source/BT_FileSystemPile.cpp:865–904  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

863}
864
865void FileSystemPile::onWidgetClick(BumpObject * widget)
866{
867 if (widget == launchOwnerWidget)
868 {
869 // launch the owner
870 getOwner()->onLaunch();
871
872 // Close the pile's grid view. Done as a convenience, because the
873 // user will now likely deal with the folder in explorer.
874 // Special case: don't do it for a grid that is pinned to the wall
875 if (!isPinned())
876 {
877 if (!_onGridCloseHandler.empty())
878 _onGridCloseHandler();
879 close();
880 }
881 }
882 else if (widget == launchExternalWidget)
883 {
884 // In the Live Mesh demo version, gridded piles that are pinned to the
885 // wall have an extra widget which launches a second instance of
886 // BumpTop pointed to the Live Mesh folder
887
888 QString program = winOS->GetExecutableDirectory().absolutePath() + "/BumpTop.exe";
889 consoleWrite(QString("Launching %1...\n").arg(program));
890 QStringList arguments;
891 arguments << "-childProcess" << "-d" << getOwner()->getTargetPath();
892 if (scnManager->childProcess)
893 {
894 scnManager->childProcess->kill();
895 SAFE_DELETE(scnManager->childProcess);
896 }
897 scnManager->childProcess = new QProcess();
898 scnManager->childProcess->start(program, arguments);
899 }
900 else
901 {
902 Pile::onWidgetClick(widget);
903 }
904}
905
906bool FileSystemPile::isValidToss(vector<BumpObject *> tossedObjs)
907{

Callers

nothing calls this directly

Calls 10

consoleWriteFunction · 0.85
getTargetPathMethod · 0.80
closeFunction · 0.50
QStringFunction · 0.50
onLaunchMethod · 0.45
emptyMethod · 0.45
argMethod · 0.45
killMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected