diff options
author | René Schümann <white06tiger@gmail.com> | 2014-12-25 00:31:21 +0000 |
---|---|---|
committer | René Schümann <white06tiger@gmail.com> | 2014-12-25 00:31:21 +0000 |
commit | e7198780400e52d809f6829edbac625a96c770f0 (patch) | |
tree | 1d78b84441302c4493c79e85a1e6d5716035751c /plugins/SendScreenshotPlus/src/UMainForm.cpp | |
parent | a58980cb6fcfb7fb81696a72546c1fc4c82ed4f0 (diff) |
SendSS:
* resource cosmetics (and logical change as button != checkbox)
ID_btnDesc => ID_chkDesc
ID_btnDeleteAfterSend => ID_chkDeleteAfterSend
* unified some checkbox related code while we are at it^^ (UMainForm.cpp)
git-svn-id: http://svn.miranda-ng.org/main/trunk@11611 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SendScreenshotPlus/src/UMainForm.cpp')
-rw-r--r-- | plugins/SendScreenshotPlus/src/UMainForm.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp index 644316f4b2..812a9fca16 100644 --- a/plugins/SendScreenshotPlus/src/UMainForm.cpp +++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp @@ -337,16 +337,16 @@ void TfrmMain::wmInitdialog(WPARAM wParam, LPARAM lParam) { SetWindowText(hCtrl, hIcon ? _T("") : _T("...")); } - if (hCtrl = GetDlgItem(m_hWnd, ID_btnDesc)) { - SendDlgItemMessage(m_hWnd, ID_btnDesc, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Fill description textbox."), MBBF_TCHAR); + if (hCtrl = GetDlgItem(m_hWnd, ID_chkDesc)) { + SendDlgItemMessage(m_hWnd, ID_chkDesc, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Fill description textbox."), MBBF_TCHAR); HICON hIcon = GetIconBtn(m_opt_btnDesc ? ICO_BTN_DESKON : ICO_BTN_DESK); SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon); SetWindowText(hCtrl, hIcon ? _T("") : _T("D")); SendMessage(hCtrl, BM_SETCHECK, m_opt_btnDesc ? BST_CHECKED : BST_UNCHECKED, NULL); } - if (hCtrl = GetDlgItem(m_hWnd, ID_btnDeleteAfterSend)) { - SendDlgItemMessage(m_hWnd, ID_btnDeleteAfterSend, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Delete after send"), MBBF_TCHAR); + if (hCtrl = GetDlgItem(m_hWnd, ID_chkDeleteAfterSend)) { + SendDlgItemMessage(m_hWnd, ID_chkDeleteAfterSend, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Delete after send"), MBBF_TCHAR); HICON hIcon = GetIconBtn(m_opt_btnDeleteAfterSend ? ICO_BTN_DELON : ICO_BTN_DEL); SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon); SetWindowText(hCtrl, hIcon ? _T("") : _T("X")); @@ -406,24 +406,24 @@ void TfrmMain::wmCommand(WPARAM wParam, LPARAM lParam) { case ID_btnExplore: TfrmMain::btnExploreClick(); break; - case ID_btnDesc:{ + case ID_chkDesc:{ m_opt_btnDesc=!m_opt_btnDesc; HICON hIcon=GetIconBtn(m_opt_btnDesc?ICO_BTN_DESKON:ICO_BTN_DESK); SendMessage((HWND)lParam,BM_SETIMAGE,IMAGE_ICON,(LPARAM)hIcon); break;} - case ID_btnDeleteAfterSend:{ - m_opt_btnDeleteAfterSend = (m_opt_btnDeleteAfterSend == 0); + case ID_chkDeleteAfterSend:{ + m_opt_btnDeleteAfterSend=!m_opt_btnDeleteAfterSend; HICON hIcon=GetIconBtn(m_opt_btnDeleteAfterSend?ICO_BTN_DELON:ICO_BTN_DEL); SendMessage((HWND)lParam,BM_SETIMAGE,IMAGE_ICON,(LPARAM)hIcon); if(m_cSend) m_cSend->m_bDeleteAfterSend=m_opt_btnDeleteAfterSend; break;} case ID_chkEditor:{ - m_opt_chkEditor = Button_GetCheck((HWND)lParam); + m_opt_chkEditor=!m_opt_chkEditor; HICON hIcon=GetIconBtn(m_opt_chkEditor?ICO_BTN_EDITON:ICO_BTN_EDIT); SendMessage((HWND)lParam,BM_SETIMAGE,IMAGE_ICON,(LPARAM)hIcon); break;} case ID_chkOpenAgain: - m_opt_chkOpenAgain = Button_GetCheck((HWND)lParam); + m_opt_chkOpenAgain=Button_GetCheck((HWND)lParam); break; case ID_btnCapture: TfrmMain::btnCaptureClick(); @@ -866,13 +866,13 @@ void TfrmMain::cboxSendByChange() { } bState = (itemFlag & SS_DLG_DELETEAFTERSSEND); hIcon = GetIconBtn(m_opt_btnDeleteAfterSend ? ICO_BTN_DELON : ICO_BTN_DEL); - SendDlgItemMessage(m_hWnd, ID_btnDeleteAfterSend, BM_SETIMAGE, IMAGE_ICON, (LPARAM)(bState ? hIcon : 0)); - Button_Enable(GetDlgItem(m_hWnd, ID_btnDeleteAfterSend), bState); + SendDlgItemMessage(m_hWnd, ID_chkDeleteAfterSend, BM_SETIMAGE, IMAGE_ICON, (LPARAM)(bState ? hIcon : 0)); + Button_Enable(GetDlgItem(m_hWnd, ID_chkDeleteAfterSend), bState); bState = (itemFlag & SS_DLG_DESCRIPTION); hIcon = GetIconBtn(m_opt_btnDesc ? ICO_BTN_DESKON : ICO_BTN_DESK); - SendDlgItemMessage(m_hWnd, ID_btnDesc, BM_SETIMAGE, IMAGE_ICON, (LPARAM)(bState ? hIcon : 0)); - Button_Enable(GetDlgItem(m_hWnd, ID_btnDesc), bState); + SendDlgItemMessage(m_hWnd, ID_chkDesc, BM_SETIMAGE, IMAGE_ICON, (LPARAM)(bState ? hIcon : 0)); + Button_Enable(GetDlgItem(m_hWnd, ID_chkDesc), bState); } //--------------------------------------------------------------------------- @@ -1089,7 +1089,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib) { db_set_dw(NULL,SZ_SENDSS,"FileNumber",FileNumber); mir_free(m_pszFile); m_pszFile=ret; mir_free(m_pszFileDesc); - if(IsWindowEnabled(GetDlgItem(m_hWnd,ID_btnDesc)) && m_opt_btnDesc){ + if(IsWindowEnabled(GetDlgItem(m_hWnd,ID_chkDesc)) && m_opt_btnDesc){ m_pszFileDesc=pszFileDesc; }else{ mir_free(pszFileDesc); @@ -1111,7 +1111,7 @@ void TfrmMain::FormClose() { if(m_opt_tabCapture==2){ /// existing file TCHAR description[1024]; GetDlgItemText(m_hwndTabPage, ID_edtCaption, description, SIZEOF(description)); - if(!IsWindowEnabled(GetDlgItem(m_hWnd,ID_btnDesc)) || !m_opt_btnDesc) + if(!IsWindowEnabled(GetDlgItem(m_hWnd,ID_chkDesc)) || !m_opt_btnDesc) *description='\0'; if(m_cSend) { m_cSend->m_bDeleteAfterSend = false; /// well... guess it's better to not delete existing files for now... |