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 | |
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
-rw-r--r-- | plugins/SendScreenshotPlus/res/resource.rc | 6 | ||||
-rw-r--r-- | plugins/SendScreenshotPlus/src/CSend.h | 4 | ||||
-rw-r--r-- | plugins/SendScreenshotPlus/src/UMainForm.cpp | 30 | ||||
-rw-r--r-- | plugins/SendScreenshotPlus/src/resource.h | 4 |
4 files changed, 22 insertions, 22 deletions
diff --git a/plugins/SendScreenshotPlus/res/resource.rc b/plugins/SendScreenshotPlus/res/resource.rc index 1411ad00a4..8041020cc1 100644 --- a/plugins/SendScreenshotPlus/res/resource.rc +++ b/plugins/SendScreenshotPlus/res/resource.rc @@ -68,10 +68,10 @@ BEGIN COMBOBOX ID_cboxSendBy,148,117,75,84,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_HASSTRINGS | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP CONTROL "?",ID_btnAbout,"UInfoButtonClass",WS_TABSTOP | MBS_FLAT,3,145,16,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "E&xplore",ID_btnExplore,"UInfoButtonClass",WS_TABSTOP | MBS_FLAT,21,145,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "&Fill description textbox.",ID_btnDesc,"UInfoButtonClass",WS_TABSTOP | MBS_PUSHBUTTON|MBS_FLAT,39,145,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "Delete &after send",ID_btnDeleteAfterSend,"UInfoButtonClass",WS_TABSTOP | MBS_PUSHBUTTON|MBS_FLAT,57,145,16,14,WS_EX_NOACTIVATE | 0x10000000L + CONTROL "&Fill description textbox.",ID_chkDesc,"UInfoButtonClass",WS_TABSTOP | MBS_PUSHBUTTON|MBS_FLAT,39,145,16,14,WS_EX_NOACTIVATE | 0x10000000L + CONTROL "Delete &after send",ID_chkDeleteAfterSend,"UInfoButtonClass",WS_TABSTOP | MBS_PUSHBUTTON|MBS_FLAT,57,145,16,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "Open editor before sending",ID_chkEditor,"UInfoButtonClass",WS_TABSTOP | MBS_PUSHBUTTON|MBS_FLAT,75,145,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "Open again",ID_chkOpenAgain,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,147,57,9 + AUTOCHECKBOX "Open again",ID_chkOpenAgain,100,147,57,9 CONTROL "&Capture",ID_btnCapture,"UInfoButtonClass",WS_TABSTOP | MBS_DEFBUTTON,169,145,54,14,WS_EX_NOACTIVATE | 0x10000000L CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,139,231,1 END diff --git a/plugins/SendScreenshotPlus/src/CSend.h b/plugins/SendScreenshotPlus/src/CSend.h index e9e57a9199..1f1e4540f2 100644 --- a/plugins/SendScreenshotPlus/src/CSend.h +++ b/plugins/SendScreenshotPlus/src/CSend.h @@ -34,8 +34,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SS_DELETEAFTERSSEND 2 #define SS_DLG_AUTOSEND 1 //Button_Enable(GetDlgItem(Owner, ID_chkEmulateClick), TRUE); -#define SS_DLG_DELETEAFTERSSEND 2 //Button_Enable(GetDlgItem(Owner, ID_btnDeleteAfterSend), TRUE); -#define SS_DLG_DESCRIPTION 4 //Button_Enable(GetDlgItem(Owner, ID_btnDesc), TRUE); +#define SS_DLG_DELETEAFTERSSEND 2 //Button_Enable(GetDlgItem(Owner, ID_chkDeleteAfterSend), TRUE); +#define SS_DLG_DESCRIPTION 4 //Button_Enable(GetDlgItem(Owner, ID_chkDesc), TRUE); #define GC_RESULT_SUCCESS 200 #define GC_RESULT_WRONGVER 201 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... diff --git a/plugins/SendScreenshotPlus/src/resource.h b/plugins/SendScreenshotPlus/src/resource.h index a09b825c01..3a053f1f60 100644 --- a/plugins/SendScreenshotPlus/src/resource.h +++ b/plugins/SendScreenshotPlus/src/resource.h @@ -91,8 +91,8 @@ #define IDC_HEADERBAR 1734 #define ID_btnAbout 2001 #define ID_btnExplore 2002 -#define ID_btnDesc 2003 -#define ID_btnDeleteAfterSend 2004 +#define ID_chkDesc 2003 +#define ID_chkDeleteAfterSend 2004 #define ID_btnCapture 2005 #define ID_edtURL 2010 #define ID_bvlDesc 2011 |