|
From: <xue...@us...> - 2003-09-07 11:31:12
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv12284
Modified Files:
CBP.nsh
Log Message:
All macro definitions moved outside functions (to simplify coverage tests).
Index: CBP.nsh
===================================================================
RCS file: /cvsroot/popfile/windows/CBP.nsh,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** CBP.nsh 10 Aug 2003 19:35:35 -0000 1.21
--- CBP.nsh 7 Sep 2003 11:31:07 -0000 1.22
***************
*** 685,688 ****
--- 685,739 ----
#==============================================================================================
+ ;--------------------------------------------------------------------------------------
+ ; Macros used by 'CBP_CreateINIfile' (outside the function to simplify coverage tests)
+ ;--------------------------------------------------------------------------------------
+
+ ; Basic macro used to create the INI file
+
+ !macro CBP_WRITE_INI SECTION KEY VALUE
+ WriteINIStr "$PLUGINSDIR\${CBP_C_INIFILE}" "${SECTION}" "${KEY}" "${VALUE}"
+ !macroend
+
+ ; Macro used to define a standard control for the custom page
+ ; (used for ComboBoxes, the GroupBox and the info Labels)
+
+ !macro CBP_DEFINE_CONTROL FIELD TYPE TEXT LEFT RIGHT TOP BOTTOM
+ !insertmacro CBP_WRITE_INI "${FIELD}" "Type" "${TYPE}"
+
+ StrCmp "${TYPE}" "ComboBox" 0 +3
+ ; ComboBox control
+ !insertmacro CBP_WRITE_INI "${FIELD}" "ListItems" "${TEXT}"
+ goto +2
+
+ ; GroupBox or Label control
+ !insertmacro CBP_WRITE_INI "${FIELD}" "Text" "${TEXT}"
+
+ ; Remainder is common to "ComboBox", "GroupBox" and "Label" controls
+ !insertmacro CBP_WRITE_INI "${FIELD}" "Left" "${LEFT}"
+ !insertmacro CBP_WRITE_INI "${FIELD}" "Right" "${RIGHT}"
+ !insertmacro CBP_WRITE_INI "${FIELD}" "Top" "${TOP}"
+ !insertmacro CBP_WRITE_INI "${FIELD}" "Bottom" "${BOTTOM}"
+ !macroend
+
+ ; Macro used to define a label which holds one of the 8 bucket names
+
+ !macro CBP_DEFINE_BN_TEXT FIELD TEXT ROW
+ !insertmacro CBP_DEFINE_CONTROL "${FIELD}" \
+ "Label" \
+ "${TEXT}" \
+ "${CBP_BN_NAME_LEFT}" "${CBP_BN_NAME_RIGHT}" \
+ "${CBP_BN_${ROW}_TOP}" "${CBP_BN_${ROW}_BOTTOM}"
+ !macroend
+
+ ; Macro used to define a checkbox for marking a bucket name for deletion
+
+ !macro CBP_DEFINE_BN_REMOVE FIELD ROW
+ !insertmacro CBP_DEFINE_CONTROL "${FIELD}" \
+ "CheckBox" \
+ "$(PFI_LANG_CBP_IO_REMOVE)" \
+ "${CBP_BN_REMOVE_LEFT}" "${CBP_BN_REMOVE_RIGHT}" \
+ "${CBP_BN_${ROW}_TOP}" "${CBP_BN_${ROW}_BOTTOM}"
+ !macroend
+
Function CBP_CreateINIfile
***************
*** 760,810 ****
!define CBP_BN_ROW_8_BOTTOM 118
- ; Basic macro used to create the INI file
-
- !macro CBP_WRITE_INI SECTION KEY VALUE
- WriteINIStr "$PLUGINSDIR\${CBP_C_INIFILE}" "${SECTION}" "${KEY}" "${VALUE}"
- !macroend
-
- ; Macro used to define a standard control for the custom page
- ; (used for ComboBoxes, the GroupBox and the info Labels)
-
- !macro CBP_DEFINE_CONTROL FIELD TYPE TEXT LEFT RIGHT TOP BOTTOM
- !insertmacro CBP_WRITE_INI "${FIELD}" "Type" "${TYPE}"
-
- StrCmp "${TYPE}" "ComboBox" 0 +3
- ; ComboBox control
- !insertmacro CBP_WRITE_INI "${FIELD}" "ListItems" "${TEXT}"
- goto +2
-
- ; GroupBox or Label control
- !insertmacro CBP_WRITE_INI "${FIELD}" "Text" "${TEXT}"
-
- ; Remainder is common to "ComboBox", "GroupBox" and "Label" controls
- !insertmacro CBP_WRITE_INI "${FIELD}" "Left" "${LEFT}"
- !insertmacro CBP_WRITE_INI "${FIELD}" "Right" "${RIGHT}"
- !insertmacro CBP_WRITE_INI "${FIELD}" "Top" "${TOP}"
- !insertmacro CBP_WRITE_INI "${FIELD}" "Bottom" "${BOTTOM}"
- !macroend
-
- ; Macro used to define a label which holds one of the 8 bucket names
-
- !macro CBP_DEFINE_BN_TEXT FIELD TEXT ROW
- !insertmacro CBP_DEFINE_CONTROL "${FIELD}" \
- "Label" \
- "${TEXT}" \
- "${CBP_BN_NAME_LEFT}" "${CBP_BN_NAME_RIGHT}" \
- "${CBP_BN_${ROW}_TOP}" "${CBP_BN_${ROW}_BOTTOM}"
- !macroend
-
- ; Macro used to define a checkbox for marking a bucket name for deletion
-
- !macro CBP_DEFINE_BN_REMOVE FIELD ROW
- !insertmacro CBP_DEFINE_CONTROL "${FIELD}" \
- "CheckBox" \
- "$(PFI_LANG_CBP_IO_REMOVE)" \
- "${CBP_BN_REMOVE_LEFT}" "${CBP_BN_REMOVE_RIGHT}" \
- "${CBP_BN_${ROW}_TOP}" "${CBP_BN_${ROW}_BOTTOM}"
- !macroend
-
#----------------------------------------------------------------------------------------------
# Now create the INI file for the "Create Buckets" custom page
--- 811,814 ----
***************
*** 1006,1010 ****
#==============================================================================================
! Function CBP_CreateBucketsPage
; The CBP_CreateBucketsPage function creates a custom page which uses the CBP_HandleUserInput
--- 1010,1016 ----
#==============================================================================================
! ;------------------------------------------------------------------------------------------
! ; Macros used by 'CBP_CreateBucketsPage' (outside the function to simplify coverage tests)
! ;------------------------------------------------------------------------------------------
; The CBP_CreateBucketsPage function creates a custom page which uses the CBP_HandleUserInput
***************
*** 1032,1035 ****
--- 1038,1043 ----
!undef CBP_L_TEMP
!macroend
+
+ Function CBP_CreateBucketsPage
!insertmacro CBP_HUI_SharedDefs
***************
*** 1191,1195 ****
Function CBP_HandleUserInput
! !insertmacro CBP_HUI_SharedDefs ; this macro is defined in CBP_CreateBucketsPage
; Check the user input... starting with the "Remove" check boxes as deletion has higher
--- 1199,1203 ----
Function CBP_HandleUserInput
! !insertmacro CBP_HUI_SharedDefs ; defined just before the 'CBP_CreateBucketsPage' function
; Check the user input... starting with the "Remove" check boxes as deletion has higher
***************
*** 1340,1344 ****
Return
! !insertmacro CBP_HUI_SharedUnDefs ; this macro is defined in CBP_CreateBucketsPage
FunctionEnd
--- 1348,1352 ----
Return
! !insertmacro CBP_HUI_SharedUnDefs ; defined just before the 'CBP_CreateBucketsPage' function
FunctionEnd
|