/************************************************************************ * * * SCS 2 - UPLOAD INTERFACE * * * * * * * ************************************************************************/ /* protos */ proto UPLOADCENTER_LaunchUploadProcess = fun [Struct_UploadInfo] I ;; proto UPLOAD_mainIC = fun [Struct_UploadInfo] I ;; var GUI_bUploadOpened = 0 ;; var UPLOAD_bPackagesLoaded = 0 ;; var UPLOAD_HostDownloadedFile = "dms/scs2/gui/upload/HostingProviderDownloadedList.txt" ;; struct Struct_HostingProvider = [ Name : S , URLHomepage : S , URLUpload : S , sLogin : S , sPassword : S ] mkHostingProvider ;; /* Definition of SITE INFO STRUCTURE */ struct Struct_UploadInfo = [ m_Channel : Chn , /* channel */ ctrl_Container : ObjContainer , /* container */ ctrl_HostListLabel : CompText , /* Displaying : " Hosting providers list :" */ ctrl_HostList : CompList , /* Hosting providers list */ ctrl_buttonREFRESH : CompRollOver , /* button REFRESH */ ctrl_NoSelectionLabel : CompText , /* Displaying : " Select a provider on your left" */ ctrl_HostNameLabel : CompText , /* Displaying host name */ ctrl_GoHomepage : CompRollOver , /* Go to hosting provider homepage button */ ctrl_UrlLabel : CompText , /* Displaying : "URL" */ ctrl_Url : CompText , ctrl_LoginLabel : CompText , /* Displaying : "Login" */ ctrl_Login : CompText , ctrl_PasswordLabel : CompText , /* Displaying : "Password" */ ctrl_Password : CompText , ctrl_buttonUPLOAD : CompRollOver , /* button UPLOAD (OK) */ ctrl_buttonCLOSE : CompRollOver , /* button CLOSE */ m_HostingProviderList : [Struct_HostingProvider r1] ,/* Stores infos on hosting providers */ m_CurrentHostingProvider : Struct_HostingProvider , m_DMSfileToUpload : S , m_IsUploadInProgress : I , /* 1 if upload already launched */ ctrl_StatusBarLabel : CompText /* Reporting current activity */ ] mkUploadInfo ;; typeof UploadInfo = Struct_UploadInfo ;; fun UPLOAD_SetStatusBarMessage(Info, txt) = { _SETcompText Info.ctrl_StatusBarLabel txt nil nil CT_NOCHANGE; _PAINTcontainer Info.ctrl_Container ; 0 } ;; proto UPLOAD_OnUploadProcessTerminated = fun [Struct_UploadInfo I] I ;; fun UPLOAD_OnStopButtonClick(comprollover, Info, posx, posy, btn, mask) = { /* Must abort uploading */ UPLOAD_OnUploadProcessTerminated Info 0 ; 0 } ;; fun UPLOAD_OnPreLaunchUpload(Info,site) = { let SITE_GetFileName site -> filename in if filename == nil then nil else if Info.m_IsUploadInProgress then { ERRORS_AddError 1 53 (_locSCS "errorlabel-UPLOADERROR" (_locSCS "upload-UPLOADALRINPROGRESS" nil )::nil); 0 } else { set Info.m_DMSfileToUpload = filename ; set Info.m_IsUploadInProgress = 1 ; let _GETcontainerExPositionSize Info.ctrl_Container -> [_ _ wbox hbox] in let Info.m_Channel -> chan in let Info.ctrl_Container -> cont in let wbox/2+10 -> posmiddle in let wbox-posmiddle-15 -> middlex in let _GETstringSize scsgui.SCSGUIsmallFont (_locSCS "upload-STOPBUTTON" nil) -> [upbuttonw _] in { GRAPHICDRESSING_DScompRollOver Info.ctrl_buttonUPLOAD ; set Info.ctrl_buttonUPLOAD = GRAPHICDRESSING_CRcompRollOverWithText chan cont nil [posmiddle+(middlex-upbuttonw-30)/2 hbox-60] OBJ_VISIBLE|OBJ_ENABLE 0 upbuttonw+30 22 scsgui.SCSGUIsmallFont (_locSCS "upload-STOPBUTTON" nil) GD_DEFAULT_TEXT_BUTTON_COLOR ; _CBcompRollOverClick Info.ctrl_buttonUPLOAD @UPLOAD_OnStopButtonClick Info ; _PAINTcontainer Info.ctrl_Container ; 0 } ; SCSGUI_OpenLoadingDialogBox (_locSCS "upload-WAITFORUPLOAD" nil); UPLOAD_SetStatusBarMessage Info (_locSCS "upload-UPLOADINPROGRESS" nil) ; UPLOADCENTER_LaunchUploadProcess Info ; 0 } ; 0 } ;; fun UPLOAD_OnUploadButtonClick(comprollover, Info, posx, posy, btn, mask) = { /* Must validate site before uploading */ /* 1. site must be saved first and site properties correctly filled in */ /* Arkeon - Put the current login in REGISTERKEY of scs.ini for upload validation */ PARAMS_SetS SCSparameters "REGISTERKEY" Info.m_CurrentHostingProvider.sLogin; let SELECT_GetSite -> site in let SITE_GetFileName site -> filename in let (SITE_GetModificationState site) || (filename == nil) -> bNotSaved in let (PARAMS_GetI SCSparameters "SAVE_SITE_BEFORE_UPLOAD") -> bMustSave in if bNotSaved then { if !bMustSave then { ERRORS_AddError 1 53 (_locSCS "errorlabel-UPLOADERROR" (_locSCS "upload-MUSTSAVESITE" nil )::nil); 0 } else { GUI_SaveSite site 0 ; UPLOAD_OnPreLaunchUpload Info site ; 0 } ; } else UPLOAD_OnPreLaunchUpload Info site ; 0 } ;; fun UPLOAD_OnUploadProcessTerminated(Info, code) = /* code = 0 --> error = 1 --> no problem */ { /*if Info.m_IsUploadInProgress == 0 then nil else*/ { set Info.m_IsUploadInProgress = 0 ; SCSGUI_CloseLoadingDialogBox; if code == 0 then /* problem */ { UPLOAD_SetStatusBarMessage Info (_locSCS "upload-UPLOADFAILED" nil) ; 0 } else /* OK */ { UPLOAD_SetStatusBarMessage Info (_locSCS "upload-UPLOADSUCCESS" nil) ; 0 } ; /* upload button is back */ if Info.ctrl_buttonUPLOAD != nil then { GRAPHICDRESSING_DScompRollOver Info.ctrl_buttonUPLOAD ; 1 } else nil ; let _GETcontainerExPositionSize Info.ctrl_Container -> [_ _ wbox hbox] in let Info.m_Channel -> chan in let Info.ctrl_Container -> cont in let wbox/2+10 -> posmiddle in let wbox-posmiddle-15 -> middlex in let _GETstringSize scsgui.SCSGUIsmallFont (_locSCS "upload-UPLOADBUTTON" nil) -> [upbuttonw _] in { set Info.ctrl_buttonUPLOAD = GRAPHICDRESSING_CRcompRollOverWithText chan cont nil [posmiddle+(middlex-upbuttonw-30)/2 hbox-60] OBJ_VISIBLE|OBJ_ENABLE 0 upbuttonw+30 22 scsgui.SCSGUIsmallFont (_locSCS "upload-UPLOADBUTTON" nil) GD_DEFAULT_TEXT_BUTTON_COLOR ; _CBcompRollOverClick Info.ctrl_buttonUPLOAD @UPLOAD_OnUploadButtonClick Info ; _PAINTcontainer Info.ctrl_Container ; 0 } ; } ; 0 } ;; fun UPLOAD_DestroyHostInfoControls (Info) = { if Info.ctrl_HostNameLabel != nil then (GRAPHICDRESSING_DScompText Info.ctrl_HostNameLabel ; set Info.ctrl_HostNameLabel = nil ; 0) else nil ; if Info.ctrl_GoHomepage != nil then (GRAPHICDRESSING_DScompRollOver Info.ctrl_GoHomepage ; set Info.ctrl_GoHomepage = nil ; 0) else nil ; if Info.ctrl_UrlLabel != nil then (GRAPHICDRESSING_DScompText Info.ctrl_UrlLabel ; set Info.ctrl_UrlLabel = nil ; 0) else nil ; if Info.ctrl_Url != nil then (GRAPHICDRESSING_DScompText Info.ctrl_Url ; set Info.ctrl_Url = nil ; 0) else nil ; if Info.ctrl_LoginLabel != nil then (GRAPHICDRESSING_DScompText Info.ctrl_LoginLabel ; set Info.ctrl_LoginLabel = nil ; 0) else nil ; if Info.ctrl_Login != nil then (GRAPHICDRESSING_DScompText Info.ctrl_Login ; set Info.ctrl_Login = nil ; 0) else nil ; if Info.ctrl_PasswordLabel != nil then (GRAPHICDRESSING_DScompText Info.ctrl_PasswordLabel ; set Info.ctrl_PasswordLabel = nil ; 0) else nil ; if Info.ctrl_Password != nil then (GRAPHICDRESSING_DScompText Info.ctrl_Password ; set Info.ctrl_Password = nil ; 0) else nil ; if Info.ctrl_buttonUPLOAD != nil then (GRAPHICDRESSING_DScompRollOver Info.ctrl_buttonUPLOAD ; set Info.ctrl_buttonUPLOAD = nil ; 0) else nil ; if Info.ctrl_StatusBarLabel != nil then (GRAPHICDRESSING_DScompText Info.ctrl_StatusBarLabel ; set Info.ctrl_StatusBarLabel = nil ; 0) else nil ; _PAINTcontainer Info.ctrl_Container ; 0 } ;; fun UPLOAD_EnableUpload(Info) = { GRAPHICDRESSING_ShowCompRollOver Info.ctrl_buttonUPLOAD 1 ; 0 } ;; fun UPLOAD_DisableUpload(Info) = { GRAPHICDRESSING_ShowCompRollOver Info.ctrl_buttonUPLOAD 0 ; 0 } ;; fun UPLOAD_OnGoToWebPageButtonClick(comprollover, Info, posx, posy, btn, mask) = { _openbrowserhttp Info.m_CurrentHostingProvider.URLHomepage ; 0 } ;; fun UPLOAD_BuildProviderListFromFile (hostStrList) = { if (hostStrList == nil) then nil else let hostStrList -> [[sKey1 [sName _]] Lnext1] in let Lnext1 -> [[sKey2 [sURLHome _]] Lnext2] in let Lnext2 -> [[sKey3 [sURLupload _]] Lnext] in if (strcmpi sKey1 "Name") then nil else if (strcmpi sKey2 "URLhomepage") then nil else if (strcmpi sKey3 "URLupload") then nil else let mkHostingProvider [nil nil nil nil nil] -> newHost in { /* Creates a new HostingProvider struct & adds it to the current list */ set newHost.Name = sName ; set newHost.URLHomepage = sURLHome ; set newHost.URLUpload = sURLupload ; listcat newHost::nil (UPLOAD_BuildProviderListFromFile Lnext) ; } ; };; fun UPLOAD_FillHostingProviderCompListWith (HostList) = { if HostList == nil then nil else let _GETcompListCount UploadInfo.ctrl_HostList -> pos in let HostList -> [host Lnext] in { _ADDcompList UploadInfo.ctrl_HostList pos [host.Name nil] ; UPLOAD_FillHostingProviderCompListWith Lnext ; } ; 1 } ;; fun UPLOAD_UpdateHostingProviderList (filename) = { if UploadInfo == nil then nil else let UploadInfo.ctrl_HostList -> cplist in { set UploadInfo.m_HostingProviderList = UPLOAD_BuildProviderListFromFile (strextr _getpack _checkpack filename) ; _RSTcompList cplist ; UPLOAD_FillHostingProviderCompListWith UploadInfo.m_HostingProviderList ; _PAINTcontainer UploadInfo.ctrl_Container ; } ; 1 } ;; fun UPLOAD_CheckUploadReadiness(Info) = { if Info.m_CurrentHostingProvider.URLUpload != nil && (strcmp "" Info.m_CurrentHostingProvider.URLUpload) && Info.m_CurrentHostingProvider.sLogin != nil && (strcmp "" Info.m_CurrentHostingProvider.sLogin) && Info.m_CurrentHostingProvider.sPassword != nil && (strcmp "" Info.m_CurrentHostingProvider.sPassword) then { UPLOAD_SetStatusBarMessage Info (_locSCS "upload-HITUPLOAD" nil ) ; UPLOAD_EnableUpload Info ; } else UPLOAD_DisableUpload Info ; 0 } ;; fun UPLOAD_OnButtonRefreshClick(comprollover, Info, posx, posy, btn, mask) = { if Info.m_IsUploadInProgress then nil else { UPLOAD_DestroyHostInfoControls Info ; SCSGUI_OpenLoadingDialogBox (_locSCS "upload-WAITFORREFRESH" nil); set Info.m_IsUploadInProgress = 1 ; UPLOAD_mainIC Info ; } ; 0 } ;; fun UPLOAD_OnCompTextLoginValidation(comptext, Info, type, svalue) = { set Info.m_CurrentHostingProvider.sLogin = svalue ; UPLOAD_CheckUploadReadiness Info ; 0 } ;; fun UPLOAD_OnCompTextURLValidation(comptext, Info, type, svalue) = { set Info.m_CurrentHostingProvider.URLUpload = svalue ; UPLOAD_CheckUploadReadiness Info ; 0 } ;; fun UPLOAD_OnCompTextPasswordValidation(comptext, Info, type, svalue) = { set Info.m_CurrentHostingProvider.sPassword = svalue ; UPLOAD_CheckUploadReadiness Info ; 0 } ;; fun UPLOAD_OnHostingProviderListClick (complist, Info, index) = { if Info == nil then nil else { GRAPHICDRESSING_ShowCompText Info.ctrl_NoSelectionLabel 0 ; let _GETcontainerExPositionSize Info.ctrl_Container -> [_ _ wbox hbox] in let Info.m_Channel -> chan in let Info.ctrl_Container -> cont in let wbox/2+10 -> posmiddle in let wbox-posmiddle-15 -> middlex in let _GETcompListClicked Info.ctrl_HostList -> [index [txtlist _]] in let nth_list Info.m_HostingProviderList index -> Host in { set Info.m_CurrentHostingProvider = Host ; /* Hosting provider name label */ if Info.ctrl_HostNameLabel != nil then { GRAPHICDRESSING_DScompText Info.ctrl_HostNameLabel ; } else nil ; set Info.ctrl_HostNameLabel = GRAPHICDRESSING_CRcompText chan cont nil [10+(wbox-50)/2+20 40] OBJ_ENABLE|OBJ_VISIBLE|CT_LEFT|CT_LABEL|CT_WORDWRAP OBJ_CONTAINER_UNCLICK|OBJ_CONTAINER_MOVE|OBJ_CONTAINER_KEYUP|OBJ_CONTAINER_KEYDOWN wbox-(15+(wbox-50)/2+20)-20 20 txtlist (_CRfont chan 16 0 0 "Arial") [GD_DEFAULT_TEXT_COLOR nil 0 0] nil ; /* Go to web site button */ if Info.ctrl_GoHomepage != nil then { GRAPHICDRESSING_ShowCompRollOver Info.ctrl_GoHomepage 1 ; 1 } else let _GETstringSize scsgui.SCSGUIsmallFont (_locSCS "upload-GOTOWEBSITE" nil) -> [websitew _] in { set Info.ctrl_GoHomepage = GRAPHICDRESSING_CRcompRollOverWithText chan cont nil [wbox-websitew-40 65] OBJ_VISIBLE|OBJ_ENABLE 0 websitew+30 20 scsgui.SCSGUIsmallFont (_locSCS "upload-GOTOWEBSITE" nil) GD_DEFAULT_TEXT_BUTTON_COLOR ; _CBcompRollOverClick Info.ctrl_GoHomepage @UPLOAD_OnGoToWebPageButtonClick Info ; 0 } ; /* URL control */ set Info.ctrl_UrlLabel = UTILSGUI_SetOrCreateText chan cont GUI_LABEL Info.ctrl_UrlLabel (_locSCS "upload-URL" nil) [posmiddle 90] [middlex 20] nil nil ; set Info.ctrl_Url = UTILSGUI_SetOrCreateText chan cont GUI_TEXT Info.ctrl_Url Host.URLUpload [posmiddle 110] [middlex 20] nil nil ; _CBcompTextValidation Info.ctrl_Url @UPLOAD_OnCompTextURLValidation Info CT_VALIDENTER|CT_VALIDCLICK ; /* Login control */ set Info.ctrl_LoginLabel = UTILSGUI_SetOrCreateText chan cont GUI_LABEL Info.ctrl_LoginLabel (_locSCS "upload-LOGIN" nil) [posmiddle 165] [middlex/3 20] nil nil ; set Info.ctrl_Login = UTILSGUI_SetOrCreateText chan cont GUI_TEXT Info.ctrl_Login Host.sLogin [posmiddle+middlex/3 160] [2*middlex/3 20] nil nil ; _CBcompTextValidation Info.ctrl_Login @UPLOAD_OnCompTextLoginValidation Info CT_VALIDENTER|CT_VALIDCLICK ; /* Password control */ set Info.ctrl_PasswordLabel = UTILSGUI_SetOrCreateText chan cont GUI_LABEL Info.ctrl_PasswordLabel (_locSCS "upload-PASSWORD" nil) [posmiddle 185] [middlex/3 20] nil nil ; if Info.ctrl_Password != nil then { GRAPHICDRESSING_ShowCompText Info.ctrl_Password 1 ; 1 } else { set Info.ctrl_Password = GRAPHICDRESSING_CRcompText chan cont nil [posmiddle+middlex/3 180] OBJ_ENABLE|OBJ_VISIBLE|CT_LEFT|CT_EDITLINE|CT_PASSWORD OBJ_CONTAINER_UNCLICK|OBJ_CONTAINER_MOVE 2*middlex/3 20 Host.sPassword (_CRfont chan 14 0 0 "Arial") [GD_DEFAULT_TEXT_COLOR nil 0 0] nil ; _CBcompTextValidation Info.ctrl_Password @UPLOAD_OnCompTextPasswordValidation Info CT_VALIDENTER|CT_VALIDCLICK ; 0 } ; /* upload button */ if Info.ctrl_buttonUPLOAD != nil then { GRAPHICDRESSING_ShowCompRollOver Info.ctrl_buttonUPLOAD 1 ; 1 } else let _GETstringSize scsgui.SCSGUIsmallFont (_locSCS "upload-UPLOADBUTTON" nil) -> [upbuttonw _] in { set Info.ctrl_buttonUPLOAD = GRAPHICDRESSING_CRcompRollOverWithText chan cont nil [posmiddle+(middlex-upbuttonw-30)/2 hbox-60] OBJ_VISIBLE|OBJ_ENABLE 0 upbuttonw+30 22 scsgui.SCSGUIsmallFont (_locSCS "upload-UPLOADBUTTON" nil) GD_DEFAULT_TEXT_BUTTON_COLOR ; _CBcompRollOverClick Info.ctrl_buttonUPLOAD @UPLOAD_OnUploadButtonClick Info ; 0 } ; /* Status message */ if Info.ctrl_StatusBarLabel != nil then { GRAPHICDRESSING_DScompText Info.ctrl_StatusBarLabel ; } else nil ; set Info.ctrl_StatusBarLabel = GRAPHICDRESSING_CRcompText chan cont nil [posmiddle hbox-145] OBJ_ENABLE|OBJ_VISIBLE|CT_CENTER|CT_LABEL|CT_WORDWRAP OBJ_CONTAINER_UNCLICK|OBJ_CONTAINER_MOVE|OBJ_CONTAINER_KEYUP|OBJ_CONTAINER_KEYDOWN middlex 85 " " (_CRfont chan 16 0 0 "Arial") [GD_DEFAULT_TEXT_COLOR nil 0 0] nil ; UPLOAD_SetStatusBarMessage Info (_locSCS "upload-ENTERLOGIN" nil ) ; UPLOAD_CheckUploadReadiness Info ; _PAINTcontainer cont ; } ; 1 } ; 1 ; } ;; fun UPLOAD_Release (Inf) = { if Inf == nil then nil else { GRAPHICDRESSING_DScompText Inf.ctrl_HostListLabel ; GRAPHICDRESSING_DScompList Inf.ctrl_HostList ; GRAPHICDRESSING_DScompRollOver Inf.ctrl_buttonREFRESH ; GRAPHICDRESSING_DScompText Inf.ctrl_HostNameLabel ; GRAPHICDRESSING_DScompRollOver Inf.ctrl_GoHomepage ; GRAPHICDRESSING_DScompText Inf.ctrl_UrlLabel ; GRAPHICDRESSING_DScompText Inf.ctrl_Url ; GRAPHICDRESSING_DScompText Inf.ctrl_LoginLabel ; GRAPHICDRESSING_DScompText Inf.ctrl_Login ; GRAPHICDRESSING_DScompText Inf.ctrl_PasswordLabel ; GRAPHICDRESSING_DScompText Inf.ctrl_Password ; GRAPHICDRESSING_DScompRollOver Inf.ctrl_buttonUPLOAD ; GRAPHICDRESSING_DScompRollOver Inf.ctrl_buttonCLOSE ; SCSGUI_CloseLoadingDialogBox; set GUI_bUploadOpened = 0 ; set Inf.ctrl_Container = nil ; set Inf.m_DMSfileToUpload = nil ; set Inf.m_CurrentHostingProvider = nil ; set Inf.m_HostingProviderList = nil ; set Inf.m_IsUploadInProgress= 0 ; if Inf.ctrl_Container == nil then nil else _DScontainer Inf.ctrl_Container ; } ; 1 ; } ;; fun UPLOAD_OnConnectDialogBoxClosed(comprollover, param, posx, posy, btn, mask) = { let param -> [cont buttonvalue Info] in if Info.m_IsUploadInProgress then nil else { _DScontainer cont ; UPLOAD_Release UploadInfo ; set UploadInfo = nil ; } ; 0 } ;; fun UPLOAD_OpenConnectDialogBox() = { if UPLOAD_bPackagesLoaded == 1 then nil else { set UPLOAD_bPackagesLoaded = 1 ; /* Load needed packages */ _load "dms/lib/httpon/_mconnectlib.pkg" ; _load "dms/lib/httpon/_mhttpont.pkg" ; _load "dms/lib/httpon/_mhttponc.pkg" ; _load "dms/lib/httpon/_mhttponprec.pkg" ; _load "dms/lib/httpon/_mhttponcom.pkg" ; _load "dms/lib/httpon/_mhttpons.pkg" ; _load "dms/scs2/gui/upload/scs.UploadSite.pkg" ; /* needed for refreshing hosting providers list */ _load "dms/scs2/gui/upload/ListeHeb_Client.pkg" ; } ; if GUI_bUploadOpened then nil else { UPLOAD_Release UploadInfo ; set GUI_bUploadOpened = 1 ; /* Show up popup site options */ let WINMANAG_OnlyShow POPUPWIN_SITEOPTIONS -> _ in let WINMANAG_SearchWindow POPUPWIN_SITEOPTIONS -> optcont in let _GETcontainerExPositionSize optcont -> [_ _ ocw ocy] in /* creates upload popup */ let _GETscreenSize -> [wscreen hscreen] in let 420 -> wbox in let 360 -> hbox in let (wscreen-wbox-ocw)/2 -> posx in let (hscreen-hbox)/2 -> posy in let _SIZEEXcontainer optcont posx+wbox posy ocw ocy -> _ in let _channel -> chan in let GD_COMPLIST_HIGHLIGHT_TRANSPARENCY -> colortransp in let GD_COMPLIST_TEXT_COLOR -> txtcolor in let GD_COMPLIST_HIGHLIGHT_COLOR -> highlightcolor in let GRAPHICDRESSING_CRcontainer chan GUI_GetMainContainer [posx posy wbox hbox] [wbox hbox wbox hbox] GD_DEFAULT_BACKGROUNDCOLOR (_locSCS "upload-DBOXTITLE" nil) GD_FONT_BOLD [GD_WINDOWS_TITLE_COLOR1 0 1 0x50] GDWIN_CLOSE_BUTTON|GDWIN_BORDERS [nil nil nil] -> [cont compTitle compMin compMax compClose _] in /* Choose Hosting provider label control */ let UTILSGUI_SetOrCreateText chan cont GUI_LABEL nil (_locSCS "upload-HOSTPROVIDERLABEL" nil) [30 40] [wbox-50 20] nil nil -> labelchoosehost in /* hosting providers list */ let GRAPHICDRESSING_CRcompList chan cont nil [15 60] OBJ_ENABLE|OBJ_VISIBLE|LST_LEFT|LST_HIGHLIGHT_SELECTED|LST_HIGHLIGHT_CLICKED OBJ_CONTAINER_UNCLICK|OBJ_KEYBOARD|OBJ_CONTAINER_MOVE (wbox-50)/2 hbox-130 10 LST_VERTICAL scsgui.SCSGUIfont 0 [txtcolor nil 0 0] [highlightcolor colortransp] -> cplist in /* Refresh button */ let _GETstringSize scsgui.SCSGUIsmallFont (_locSCS "upload-REFRESHBUTTON" nil) -> [refreshw _] in let GRAPHICDRESSING_CRcompRollOverWithText chan cont nil [((15+(wbox-50)/2)-(refreshw+30))/2 hbox-60] OBJ_VISIBLE|OBJ_ENABLE 0 refreshw+30 22 scsgui.SCSGUIsmallFont (_locSCS "upload-REFRESHBUTTON" nil) GD_DEFAULT_TEXT_BUTTON_COLOR -> buttonrefresh in /* no selection label control */ let UTILSGUI_SetOrCreateText chan cont GUI_LABEL nil (_locSCS "upload-NOHOSTSELECTED" nil) [wbox/2+20 100] [wbox/2-40 hbox-150] nil nil -> labelnoselection in /* let _GETstringSize scsgui.SCSGUIsmallFont (_locSCS "buttonname-CLOSE" nil) -> [closew _] in let GRAPHICDRESSING_CRcompRollOverWithText chan cont nil [(wbox-closew-30)/2 hbox-35] OBJ_VISIBLE|OBJ_ENABLE|OBJ_LW_FLEX|OBJ_RW_FLEX OBJ_KEYBOARD|OBJ_CONTAINER_MOVE closew+30 23 scsgui.SCSGUIfont (_locSCS "buttonname-CLOSE" nil) GD_DEFAULT_TEXT_BUTTON_COLOR -> buttonclose in*/ { set UploadInfo = mkUploadInfo [ chan cont labelchoosehost cplist buttonrefresh labelnoselection nil nil nil nil nil nil nil nil nil nil nil nil nil 0 nil ] ; UTILSGUI_MoveWithBackground cont nil; POPUPWIN_HideWhenDestroy cont nil; _CBcompRollOverClick compClose @UPLOAD_OnConnectDialogBoxClosed [cont GDBOX_CANCEL UploadInfo]; /* _CBcompRollOverClick buttonclose @UPLOAD_OnConnectDialogBoxClosed [cont GDBOX_OK UploadInfo] ;*/ _CBcompRollOverClick buttonrefresh @UPLOAD_OnButtonRefreshClick UploadInfo ; _CBcompListClick cplist @UPLOAD_OnHostingProviderListClick UploadInfo ; UPLOAD_OnButtonRefreshClick buttonrefresh UploadInfo 0 0 0 nil ; _PAINTcontainer _SHOWcontainer cont CONTAINER_UNHIDDEN ; } ; } ; 1 ; } ;;