Contrib/ExperienceUI/XPUI.nsh
changeset 4 6e80a6828d0a
parent 3 b081db857e2f
child 5 1fdcff916039
equal deleted inserted replaced
3:b081db857e2f 4:6e80a6828d0a
   253     !endif
   253     !endif
   254   !endif
   254   !endif
   255   
   255   
   256 !macroend
   256 !macroend
   257 
   257 
       
   258 !macro XPUI_CONTROL_SKIN_PAGE_NOTRANS HWND
       
   259   
       
   260   !ifndef XPUI_EXTERNAL_SKINNER
       
   261     !insertmacro XPUI_CONTROL_SKIN ${HWND}
       
   262   !endif
       
   263   
       
   264 !macroend
       
   265 
   258 !macro XPUI_PAGECOLOR_INIT ID
   266 !macro XPUI_PAGECOLOR_INIT ID
   259 
   267 
   260   Push $XPUI_HWND
   268   Push $XPUI_HWND
   261   FindWindow $XPUI_HWND "#32770" "" $HWNDPARENT
   269   FindWindow $XPUI_HWND "#32770" "" $HWNDPARENT
   262   GetDlgItem $XPUI_HWND $XPUI_HWND ${ID}
   270   GetDlgItem $XPUI_HWND $XPUI_HWND ${ID}
   380   !verbose ${XPUI_VERBOSE}
   388   !verbose ${XPUI_VERBOSE}
   381   !insertmacro XPUI_CREATEID
   389   !insertmacro XPUI_CREATEID
   382   StrCmp $XPUI_ABORTED 1 `` +2
   390   StrCmp $XPUI_ABORTED 1 `` +2
   383   Abort
   391   Abort
   384   WriteINIStr `$PLUGINSDIR\${FILE}` `Settings` `RTL` `$(^RTL)`
   392   WriteINIStr `$PLUGINSDIR\${FILE}` `Settings` `RTL` `$(^RTL)`
   385   InstallOptions::initDialog /NOUNLOAD `$PLUGINSDIR\${FILE}`
   393 
   386   Pop $XPUI_HWND
   394   !insertmacro XPUI_INSTALLOPTIONS_INITDIALOG `${FILE}`
   387   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_HWND
       
   388   LockWindow on
       
   389   StrCpy $XPUI_TEMP2 1199
       
   390   XPUI.loop.setctl.${XPUI_UNIQUEID}:
       
   391   IntOp $XPUI_TEMP2 $XPUI_TEMP2 + 1
       
   392   GetDlgItem $XPUI_TEMP1 $XPUI_HWND $XPUI_TEMP2
       
   393   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
   394   IntCmp $XPUI_TEMP2 ${XPUI_INSTALLOPTIONS_MAXFIELD} `` XPUI.loop.setctl.${XPUI_UNIQUEID}
       
   395   GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1018
       
   396   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
   397   SetBrandingImage /IMGID=1019 /RESIZETOFIT "$PLUGINSDIR\page.bmp"
       
   398   LockWindow off
       
   399   InstallOptions::show
   395   InstallOptions::show
   400   !verbose pop
   396   !verbose pop
   401 !macroend
   397 !macroend
   402 
   398 
   403 !macro XPUI_INSTALLOPTIONS_DISPLAY_RETURN FILE
   399 !macro XPUI_INSTALLOPTIONS_DISPLAY_RETURN FILE
   405   !verbose ${XPUI_VERBOSE}
   401   !verbose ${XPUI_VERBOSE}
   406   !insertmacro XPUI_CREATEID
   402   !insertmacro XPUI_CREATEID
   407   StrCmp $XPUI_ABORTED 1 `` +2
   403   StrCmp $XPUI_ABORTED 1 `` +2
   408   Abort
   404   Abort
   409   WriteINIStr `$PLUGINSDIR\${FILE}` `Settings` `RTL` `$(^RTL)`
   405   WriteINIStr `$PLUGINSDIR\${FILE}` `Settings` `RTL` `$(^RTL)`
   410   InstallOptions::initDialog /NOUNLOAD `$PLUGINSDIR\${FILE}`
   406 
   411   Pop $XPUI_HWND
   407   !insertmacro XPUI_INSTALLOPTIONS_INITDIALOG `${FILE}` 
   412   LockWindow on
       
   413   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_HWND
       
   414   StrCpy $XPUI_TEMP2 1199
       
   415   XPUI.loop.setctl.${XPUI_UNIQUEID}:
       
   416   IntOp $XPUI_TEMP2 $XPUI_TEMP2 + 1
       
   417   GetDlgItem $XPUI_TEMP1 $XPUI_HWND $XPUI_TEMP2
       
   418   StrCmp $XPUI_TEMP1 0 XPUI.done
       
   419   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
   420   IntCmp $XPUI_TEMP2 ${XPUI_INSTALLOPTIONS_MAXFIELD} XPUI.done.${XPUI_UNIQUEID} XPUI.loop.setctl.${XPUI_UNIQUEID}
       
   421   XPUI.done.${XPUI_UNIQUEID}:
       
   422   SetBrandingImage /IMGID=1019 /RESIZETOFIT "$PLUGINSDIR\page.bmp"
       
   423   LockWindow off
       
   424   InstallOptions::show
   408   InstallOptions::show
   425   !verbose pop
   409   !verbose pop
   426 !macroend
   410 !macroend
   427 
   411 
   428 !macro XPUI_INSTALLOPTIONS_INITDIALOG FILE
   412 !macro XPUI_INSTALLOPTIONS_INITDIALOG FILE
   434   WriteINIStr `$PLUGINSDIR\${FILE}` `Settings` `RTL` `$(^RTL)`
   418   WriteINIStr `$PLUGINSDIR\${FILE}` `Settings` `RTL` `$(^RTL)`
   435   InstallOptions::initDialog /NOUNLOAD `$PLUGINSDIR\${FILE}`
   419   InstallOptions::initDialog /NOUNLOAD `$PLUGINSDIR\${FILE}`
   436   Pop $XPUI_HWND
   420   Pop $XPUI_HWND
   437   LockWindow on
   421   LockWindow on
   438   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_HWND
   422   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_HWND
   439   StrCpy $XPUI_TEMP2 1199
   423   
       
   424   Push $R0
       
   425   Push $R1
       
   426   
       
   427   StrCpy $R0 0
       
   428   StrCpy $R1 1199
       
   429   
       
   430   ; $R0 = field count
       
   431   ; $R1 = control count
       
   432   ; $XPUI_TEMP2 = total field count
       
   433   
       
   434   ReadINIStr $XPUI_TEMP2 `$PLUGINSDIR\${FILE}` "Settings" "NumFields"
       
   435   
   440   XPUI.loop.setctl.${XPUI_UNIQUEID}:
   436   XPUI.loop.setctl.${XPUI_UNIQUEID}:
   441   IntOp $XPUI_TEMP2 $XPUI_TEMP2 + 1
   437     
   442   GetDlgItem $XPUI_TEMP1 $XPUI_HWND $XPUI_TEMP2
   438     IntOp $R0 $R0 + 1
   443   StrCmp $XPUI_TEMP1 0 XPUI.done.${XPUI_UNIQUEID}
   439     IntOp $R1 $R1 + 1
   444   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
   440     
   445   IntCmp $XPUI_TEMP2 ${XPUI_INSTALLOPTIONS_MAXFIELD} XPUI.done.${XPUI_UNIQUEID} XPUI.loop.setctl.${XPUI_UNIQUEID}
   441     ReadINIStr $XPUI_TEMP1 `$PLUGINSDIR\${FILE}` "Field $R0" "Type"
   446   XPUI.done.${XPUI_UNIQUEID}:
   442     StrCmp $XPUI_TEMP1 "Text"        XPUI.SkinNoTrans.${XPUI_UNIQUEID}
       
   443     StrCmp $XPUI_TEMP1 "Password"    XPUI.SkinNoTrans.${XPUI_UNIQUEID}
       
   444     StrCmp $XPUI_TEMP1 "Listbox"     XPUI.SkinNoTrans.${XPUI_UNIQUEID}
       
   445     StrCmp $XPUI_TEMP1 "Combobox"    XPUI.SkinNoTrans.${XPUI_UNIQUEID}
       
   446     StrCmp $XPUI_TEMP1 "Droplist"    XPUI.SkinNoTrans.${XPUI_UNIQUEID}
       
   447     
       
   448     StrCmp $XPUI_TEMP1 "FileRequest" XPUI.SkinMulti.${XPUI_UNIQUEID}
       
   449     StrCmp $XPUI_TEMP1 "DirRequest"  XPUI.SkinMulti.${XPUI_UNIQUEID}
       
   450     
       
   451       GetDlgItem $XPUI_TEMP1 $XPUI_HWND $R1
       
   452       !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
   453       Goto XPUI.SkinDone.${XPUI_UNIQUEID}
       
   454       
       
   455     XPUI.SkinNoTrans.${XPUI_UNIQUEID}:
       
   456       GetDlgItem $XPUI_TEMP1 $XPUI_HWND $R1
       
   457       !insertmacro XPUI_CONTROL_SKIN_PAGE_NOTRANS $XPUI_TEMP1
       
   458       Goto XPUI.SkinDone.${XPUI_UNIQUEID}
       
   459       
       
   460     XPUI.SkinMulti.${XPUI_UNIQUEID}:
       
   461       GetDlgItem $XPUI_TEMP1 $XPUI_HWND $R1
       
   462       !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
   463       IntOp $R1 $R1 + 1
       
   464       GetDlgItem $XPUI_TEMP1 $XPUI_HWND $R1
       
   465       !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
   466       Goto XPUI.SkinDone.${XPUI_UNIQUEID}
       
   467     
       
   468     XPUI.SkinDone.${XPUI_UNIQUEID}:
       
   469     
       
   470     IntCmp $R0 $XPUI_TEMP1 0 XPUI.loop.setctl.${XPUI_UNIQUEID}
       
   471     
       
   472   Pop $R1
       
   473   Pop $R0
       
   474     
   447   SetBrandingImage /IMGID=1019 /RESIZETOFIT "$PLUGINSDIR\page.bmp"
   475   SetBrandingImage /IMGID=1019 /RESIZETOFIT "$PLUGINSDIR\page.bmp"
   448   LockWindow off
   476   LockWindow off
   449   Push $XPUI_HWND
   477   Push $XPUI_HWND
   450   !verbose pop
   478   !verbose pop
   451 !macroend
   479 !macroend