Removed unused NSD_LB_Clear macro parameter

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6911 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2017-09-29 17:41:00 +00:00
parent 9e9ab4029c
commit bd12125d7a
4 changed files with 13 additions and 22 deletions

View file

@ -666,7 +666,7 @@ SectionEnd</pre></blockquote>
<p>Deletes a string from a list box.</p>
<h3><a name="mref-lbclear">NSD_LB_Clear</a></h3>
<p><code>${NSD_LB_Clear} <i>listbox_HWND</i> <i>$output</i></code></p>
<p><code>${NSD_LB_Clear} <i>listbox_HWND</i></code></p>
<p>Deletes all strings from a list box.</p>
<h3><a name="mref-lbgetcount">NSD_LB_GetCount</a></h3>

View file

@ -130,7 +130,7 @@ Function LBAction
${EndIf}
Return
${Case} "Clear"
${NSD_LB_Clear} $1 ""
${NSD_LB_Clear} $1
Return
${EndSelect}

View file

@ -596,18 +596,6 @@ SendMessage ${CONTROL} ${CB_INSERTSTRING} -1 `STR:${STRING}`
!macroend
!define NSD_CB_Clear "!insertmacro _NSD_CB_Clear "
!macro _NSD_CB_Clear CONTROL STRING
SendMessage ${CONTROL} ${CB_RESETCONTENT} 0 0
!macroend
!define NSD_CB_GetCount `!insertmacro __NSD_CB_GetCount `
!macro __NSD_CB_GetCount CONTROL VAR
SendMessage ${CONTROL} ${CB_GETCOUNT} 0 0 ${VAR}
!macroend
!define NSD_CB_GetSelectionIndex `!insertmacro __NSD_CB_GetSelectionIndex `
!macro __NSD_CB_GetSelectionIndex CONTROL VAR
SendMessage ${CONTROL} ${CB_GETCURSEL} 0 0 ${VAR}
@ -633,6 +621,10 @@ SendMessage ${CONTROL} ${CB_SETITEMDATA} ${INDEX} ${DATA}
!define NSD_CB_DelItem `${__NSD_MkCtlCmd_WP} CB_DELETESTRING 0 `
!define NSD_CB_LimitText `${__NSD_MkCtlCmd_WP} CB_LIMITTEXT 0 `
!define /IfNDef NSD_CB_Clear `${__NSD_MkCtlCmd} CB_RESETCONTENT 0 0 `
!define /IfNDef NSD_CB_GetCount `${__NSD_MkCtlCmd_RV} CB_RESETCONTENT 0 0 `
;define /IfNDef NSD_CB_DelString ; /IfNDef to try to stay compatible with
;define /IfNDef NSD_CB_GetSelection ; the ListView header from the Wiki.
### ListBox ###
@ -661,10 +653,8 @@ SendMessage ${CONTROL} ${LB_INSERTSTRING} -1 `STR:${STRING}`
!define NSD_LB_DelString `!insertmacro __NSD_LB_DelString `
!macro __NSD_LB_DelString CONTROL STRING
Push $0
SendMessage ${CONTROL} ${LB_FINDSTRINGEXACT} -1 `STR:${STRING}` $0
SendMessage ${CONTROL} ${LB_DELETESTRING} $0 0
Pop $0
System::Call 'USER32::SendMessage(p${CONTROL},i${LB_FINDSTRINGEXACT},p-1,ts)p.s' `${STRING}`
System::Call 'USER32::SendMessage(p${CONTROL},i${LB_DELETESTRING},ps,p0)'
!macroend
@ -674,10 +664,7 @@ SendMessage ${CONTROL} ${LB_INSERTSTRING} -1 `STR:${STRING}`
!macroend
!define NSD_LB_Clear `!insertmacro __NSD_LB_Clear `
!macro __NSD_LB_Clear CONTROL VAR
SendMessage ${CONTROL} ${LB_RESETCONTENT} 0 0 ${VAR}
!macroend
!define NSD_LB_Clear `${__NSD_MkCtlCmd} LB_RESETCONTENT 0 0 `
!define NSD_LB_GetCount `!insertmacro __NSD_LB_GetCount `

View file

@ -10,6 +10,10 @@ Released on ??? ??rd, 20??
\b Added more NSD controls and macros (\W{http://sf.net/p/nsis/feature-requests/543}{RFE #543})
\S2{} Minor Changes
\b Removed unused NSD_LB_Clear macro parameter
\H{v3.02.1} 3.02.1
Released on July 31st, 2017