Ignore:
Timestamp:
Jun 14, 2016, 4:14:19 PM (5 years ago)
Author:
Herwig Bauernfeind
Message:

GUITools: EVFSGUI: Start implementinig client side Samba configuration settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/evfsgui/evfsgui.vrx

    r910 r924  
    16961696    w = VRLoad( "TDL_1", VRWindowPath(), "SW_SETTINGS" )
    16971697    ok = VRMethod( "TDL_1", "InsertPage", w,"+ "NLVGetMessage(47)" ")
     1698    w = VRLoad( "TDL_1", VRWindowPath(), "SW_SMBCONF" )
     1699    ok = VRMethod( "TDL_1", "InsertPage", w,"- "NLVGetMessage(47)" ")
    16981700    if options.!debug == 1 then say time()' _TabbedDialogSetup done'
    16991701return
     
    17681770    end
    17691771    if options.!debug == 1 then say time()' _UserCredUpdate done'
     1772return
     1773
     1774/*:VRX         CB_client_lanman_auth_Click
     1775*/
     1776CB_client_lanman_auth_Click:
     1777    advanced.!smbconfchanged = 1
     1778return
     1779
     1780/*:VRX         CB_client_plaintext_auth_Click
     1781*/
     1782CB_client_plaintext_auth_Click:
     1783    advanced.!smbconfchanged = 1
     1784return
     1785
     1786/*:VRX         CB_client_use_spnego_Click
     1787*/
     1788CB_client_use_spnego_Click:
     1789    advanced.!smbconfchanged = 1
     1790return
     1791
     1792/*:VRX         CB_client_use_spnego_principal_Click
     1793*/
     1794CB_client_use_spnego_principal_Click:
     1795    advanced.!smbconfchanged = 1
    17701796return
    17711797
     
    30403066    ok = VRset("GB_GLOBAL2", "Width", rpane_width - marginx2 )
    30413067
    3042     ok = VRset("GB_LOGGING", "Left",  margin )
    3043     ok = VRset("GB_LOGGING", "Top",   margin * 3 + VRGet("GB_GLOBAL2","Height") /* 245 + (margin * 3) + VRGet("GB_GLOBAL2","Height") */ )
    3044     ok = VRset("GB_LOGGING", "Width", rpane_width - marginx2 )
    3045 
    3046     ok = VRset("GB_GUI","Left",   margin )
    3047     ok = VRset("GB_GUI","Top",    /* 245 + */ (margin * 4) + VRGet("GB_GLOBAL2","Height") + VRGet("GB_LOGGING","Height"))
    3048     ok = VRset("GB_GUI","Width",  rpane_width - marginx2 )
     3068    ok = VRset("GB_RESOLUTION", "Left",  margin )
     3069    ok = VRset("GB_RESOLUTION", "Top",   margin * 3 + VRGet("GB_GLOBAL2","Height") /* 245 + (margin * 3) + VRGet("GB_GLOBAL2","Height") */ )
     3070    ok = VRset("GB_RESOLUTION", "Width", rpane_width - marginx2 )
     3071
     3072    ok = VRset("GB_LOGGING","Left",   margin )
     3073    ok = VRset("GB_LOGGING","Top",    /* 245 + */ (margin * 4) + VRGet("GB_GLOBAL2","Height") + VRGet("GB_RESOLUTION","Height"))
     3074    ok = VRset("GB_LOGGING","Width",  rpane_width - marginx2 )
    30493075
    30503076    ok = VRset("PB_SETTINGS_APPLY", "Left", margin )
     
    30573083    ok = VRset("PB_SETTINGS_HELP", "Top",  pane_height - pbtn_height - marginx2)
    30583084    ok = VRset("PB_SETTINGS_HELP", "Height", pbtn_height)
     3085
     3086    /* SMB.CONF Settings page */
     3087    ok = VRSet("GB_SMBCONFX", "Top",     margin /* x2 */     )
     3088    ok = VRSet("GB_SMBCONFX", "Left",    margin /* x2 */  /* split_left + 60 */ )
     3089    ok = VRset("GB_SMBCONFX", "Height",  pane_height     )
     3090    ok = VRset("GB_SMBCONFX", "Width",   rpane_width     )
     3091
     3092    ok = VRset("GB_SMBCONF2", "Left",  margin )
     3093    ok = VRset("GB_SMBCONF2", "Top",   marginx2 )
     3094    ok = VRset("GB_SMBCONF2", "Width", rpane_width - marginx2 )
     3095    ok = VRset("GB_SMBCONF2", "Height",  pane_height - (margin * 7) - pbtn_height /* - 245 */ )
     3096
     3097    ok = VRset("PB_SMBCONF_APPLY", "Left", margin )
     3098    ok = VRset("PB_SMBCONF_APPLY", "Top",  pane_height - pbtn_height - marginx2      )
     3099    ok = VRset("PB_SMBCONF_APPLY", "Height", pbtn_height)
     3100    ok = VRset("PB_SMBCONF_UNDO", "Left", VRGet("PB_CONDET_SAVE","Width") + marginx2)
     3101    ok = VRset("PB_SMBCONF_UNDO", "Top",  pane_height - pbtn_height - marginx2      )
     3102    ok = VRset("PB_SMBCONF_UNDO", "Height", pbtn_height)
     3103    ok = VRset("PB_SMBCONF_HELP", "Left", rpane_width - marginx2 - VRGet("PB_CONDET_HELP","Width") + 24)
     3104    ok = VRset("PB_SMBCONF_HELP", "Top",  pane_height - pbtn_height - marginx2)
     3105    ok = VRset("PB_SMBCONF_HELP", "Height", pbtn_height)
    30593106
    30603107    /* DOne with pages */
     
    44034450return
    44044451
     4452/*:VRX         PB_SMBCONF_APPLY_Click
     4453*/
     4454PB_SMBCONF_APPLY_Click:
     4455    if advanced.!smbconfchanged = 1 then do
     4456        client_lanman_auth          = VRGet("CB_client_lanman_auth","Set")
     4457        client_plaintext_auth       = VRGet("CB_client_plaintext_auth","Set")
     4458        client_use_spnego           = VRGet("CB_client_use_spnego","Set")
     4459        client_use_spnego_principal = VRGet("CB_client_use_spnego_principal","Set")
     4460
     4461        handle = IniOpen('global', samba.!smbconf)
     4462        call IniSet 'client lanman auth',          YesNo(client_lanman_auth), handle
     4463        call IniSet 'client plaintext auth',       YesNo(client_plaintext_auth), handle
     4464        call IniSet 'client use spnego',           YesNo(client_use_spnego), handle
     4465        call IniSet 'client use spnego principal', YesNo(client_use_spnego_principal), handle
     4466
     4467        call IniSave handle
     4468        call IniClose handle
     4469        advanced.!smbconfchanged = 0
     4470        ok = VRSet("PB_SMBCONF_UNDO","Enabled", 0)
     4471    end
     4472return
     4473
     4474/*:VRX         PB_SMBCONF_HELP_Click
     4475*/
     4476PB_SMBCONF_HELP_Click:
     4477    CALL VRMethod 'SW_SETTINGS', 'InvokeHelp'
     4478return
     4479
     4480/*:VRX         PB_SMBCONF_UNDO_Click
     4481*/
     4482PB_SMBCONF_UNDO_Click:
     4483    call SW_SETTINGS_Init_Content
     4484return
     4485
    44054486/*:VRX         PB_SMBTREE_CONNECT_Click
    44064487*/
     
    52705351return
    52715352
     5353/*:VRX         SW_SMBCONF_Close
     5354*/
     5355SW_SMBCONF_Close:
     5356    call SW_SMBCONF_Fini
     5357return
     5358
     5359/*:VRX         SW_SMBCONF_Create
     5360*/
     5361SW_SMBCONF_Create:
     5362    call SW_SMBCONF_Init
     5363return
     5364
     5365/*:VRX         SW_SMBCONF_Fini
     5366*/
     5367SW_SMBCONF_Fini:
     5368    window = VRInfo( "Window" )
     5369    call VRDestroy window
     5370    drop window
     5371return
     5372/*:VRX         SW_SMBCONF_Init
     5373*/
     5374SW_SMBCONF_Init:
     5375   
     5376    /* Buttons */
     5377    call NLVSetText "PB_SMBCONF_APPLY",  "Caption", 122
     5378    call NLVSetText "PB_SMBCONF_UNDO",   "Caption", 123
     5379    call NLVSetText "PB_SMBCONF_HELP",   "Caption", 4
     5380
     5381return
     5382
     5383/*:VRX         SW_SMBCONF_Init_Content
     5384*/
     5385SW_SMBCONF_Init_Content:
     5386    call _SmbConfCreateShadowCopy
     5387
     5388    client_lanman_auth          = ZeroOne(IniGet('client lanman auth', 'global', samba.!shadowsmbconf))
     5389    client_plaintext_auth       = ZeroOne(IniGet('client plaintext auth', 'global', samba.!shadowsmbconf))
     5390    client_use_spnego           = ZeroOne(IniGet('client use spnego', 'global', samba.!shadowsmbconf))
     5391    client_use_spnego_principal = ZeroOne(IniGet('client use spnego principal', 'global', samba.!shadowsmbconf))
     5392
     5393    ok = VRSet("CB_client_lanman_auth","Set",client_lanman_auth)
     5394    ok = VRSet("CB_client_plaintext_auth","Set",client_plaintext_auth)
     5395    ok = VRSet("CB_client_use_spnego","Set",client_use_spnego)
     5396    ok = VRSet("CB_client_use_spnego_principal","Set",client_use_spnego_principal)
     5397
     5398    advanced.!smbconfchanged = 0
     5399return
     5400
    52725401/*:VRX         SW_SMBTREE_Close
    52735402*/
     
    53265455        when page = 5 then do /* Settings */
    53275456            call SW_SETTINGS_Init_Content
     5457        end
     5458        when page = 6 then do /* SMB.CONF */
     5459            call SW_SMBCONF_Init_Content
    53285460        end
    53295461        otherwise nop
     
    54065538return
    54075539
     5540/*:VRX         YesNo
     5541*/
     5542YesNo: procedure
     5543    if arg(1) = 1 then answer = "Yes"
     5544                  else answer = "No"
     5545return answer
     5546
     5547/*:VRX         ZeroOne
     5548*/
     5549ZeroOne: procedure
     5550    if translate(arg(1)) = "YES" then answer = 1
     5551                                 else answer = 0
     5552return answer
Note: See TracChangeset for help on using the changeset viewer.