| 57 | } |
| 58 | |
| 59 | bool CrashDialog::onCommand(HWND hwnd, WPARAM wParam, LPARAM lParam ) |
| 60 | { |
| 61 | // Process Buttons |
| 62 | switch (LOWORD(wParam)) |
| 63 | { |
| 64 | // update the type |
| 65 | case IDNO: |
| 66 | winOS->ExitBumpTop(); |
| 67 | break; |
| 68 | case IDOK: |
| 69 | break; |
| 70 | case IDC_RESET_BUMPTOP_SETTINGS: |
| 71 | _resetBumpTopSettings = (BST_CHECKED == SendMessage(GetDlgItem(hwnd, IDC_RESET_BUMPTOP_SETTINGS), BM_GETCHECK, 0, 0)); |
| 72 | return false; |
| 73 | case IDC_SEND_FEEDBACK: |
| 74 | _sendFeedback = (BST_CHECKED == SendMessage(GetDlgItem(hwnd, IDC_SEND_FEEDBACK), BM_GETCHECK, 0, 0)); |
| 75 | return false; |
| 76 | default: |
| 77 | return false; |
| 78 | } |
| 79 | |
| 80 | QString dumpFileName; |
| 81 | QString errorMessage; |
| 82 | |
| 83 | // Variables used to read input |
| 84 | uint maxChar = 65536; |
| 85 | TCHAR buf[65536]; |
| 86 | |
| 87 | // Specify dump file name |
| 88 | dumpFileName = native(QFileInfo(winOS->GetDataDirectory(), "Bump.dmp")); |
| 89 | |
| 90 | // Get the email address |
| 91 | GetWindowText(GetDlgItem(hwnd, IDC_CRASHBOX_EMAIL), buf, maxChar); |
| 92 | QString email(QString::fromUtf16((const ushort *) buf)); |
| 93 | |
| 94 | // Get the comments |
| 95 | memset(buf, 0, maxChar); |
| 96 | GetWindowText(GetDlgItem(hwnd, IDC_CRASHBOX_DLG_EDIT), buf, maxChar); |
| 97 | QString enteredText(QString::fromUtf16((const ushort *) buf)); |
| 98 | |
| 99 | if (_sendFeedback && EmailCrashReport("feedback@bumptop.com", "Crash Report", enteredText, email, dumpFileName)) |
| 100 | { |
| 101 | errorMessage = WinOSStr->getString("ErrorInfoSent"); |
| 102 | dlgManager->clearState(); |
| 103 | dlgManager->setPrompt(BtUtilStr->getString("FeedbackSent")); |
| 104 | dlgManager->promptDialog(DialogOK); |
| 105 | } |
| 106 | else |
| 107 | errorMessage = QString(WinOSStr->getString("ErrorConnectBumpHQ")).arg(dumpFileName); |
| 108 | |
| 109 | if (_resetBumpTopSettings) |
| 110 | { |
| 111 | Key_ResetBumpTopSettings(); |
| 112 | Key_DeleteSceneFiles(); |
| 113 | |
| 114 | // Rename default theme folder |
| 115 | QDir userDefaultThemePath = winOS->GetUserThemesDirectory(true); |
| 116 | QDir themesDir = winOS->GetUserApplicationDataPath() / "Themes"; |
nothing calls this directly
no test coverage detected