| 863 | } |
| 864 | |
| 865 | void 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 | |
| 906 | bool FileSystemPile::isValidToss(vector<BumpObject *> tossedObjs) |
| 907 | { |
nothing calls this directly
no test coverage detected