diff options
author | George Hazan <ghazan@miranda.im> | 2020-03-22 15:23:41 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-03-22 15:23:41 +0300 |
commit | bd9554ed8e8ba1e4be8d0ba5a0600cacbf95a950 (patch) | |
tree | ae602e7bc468c6532161c30739d267860ea4c3f6 | |
parent | 9de48904e749acbe412856579ea4463365f2fd78 (diff) |
SendScreenShot:
- fixes #2272 (main dialog doesn't restore cloud service correctly);
- CloudService doesn't apply default settings correctly
-rw-r--r-- | plugins/SendScreenshotPlus/src/UMainForm.cpp | 4 | ||||
-rw-r--r-- | protocols/CloudFile/src/services.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp index 9db52a35ef..04b274cce2 100644 --- a/plugins/SendScreenshotPlus/src/UMainForm.cpp +++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp @@ -300,6 +300,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM) } // init SendBy combo box + UPLOAD_INFO *pDefault = nullptr; { hCtrl = GetDlgItem(m_hWnd, ID_cboxSendBy); ComboBox_ResetContent(hCtrl); @@ -338,6 +339,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM) for (int i = 0; i < ComboBox_GetCount(hCtrl); i++) { UPLOAD_INFO *p = (UPLOAD_INFO*)ComboBox_GetItemData(hCtrl, i); if (p && p->sendBy == m_opt_cboxSendBy) { + pDefault = p; ComboBox_SetCurSel(hCtrl, i); break; } @@ -385,7 +387,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM) SetWindowText(hCtrl, TranslateT("&Capture")); SendMessage(hCtrl, BUTTONSETDEFAULT, 1, NULL); } - cboxSendByChange(nullptr); // enable disable controls + cboxSendByChange((pDefault) ? pDefault->param : nullptr); // enable disable controls TranslateDialogDefault(m_hWnd); } diff --git a/protocols/CloudFile/src/services.cpp b/protocols/CloudFile/src/services.cpp index e0a01fbfba..f568f2f68c 100644 --- a/protocols/CloudFile/src/services.cpp +++ b/protocols/CloudFile/src/services.cpp @@ -67,7 +67,7 @@ INT_PTR Upload(WPARAM wParam, LPARAM lParam) if (accountName == nullptr) return 2; - CCloudService *service = FindService(uploadData->accountName); + CCloudService *service = FindService(accountName); if (service == nullptr) return 3; |