name "BLHelper - Choose BioLegato Helper Applications"
icon "$BIRCH/public_html/images/birch_black_ico.png"
tip "Set environment variables that tell BioLegato which programs to use for opening various kinds of files."

# - - - - - - - - Text Editor - - - - - - - - - - 
panel
    var "texteditor"
        type        combobox
        label       "Text Editor "
<REPLACE defaultnum=BL_TextEditor>
        choices
<REPLACE list=BL_TextEditor>        
            "Custom command" "%customtext%"
    var "customtext"
        type        text
<REPLACE defaulttext=BL_TextEditor>
            
    var "TestEdit"
        type    button
        label   "Test"
        shell   "%texteditor% $BIRCH/admin/BLHelper/sample.txt"
        close   true

    var "SetEdit"
        type    button
        label   "Save"
        shell   "$BIRCH/script/BLHelper.py --setvar BL_TextEditor='%TEXTEDITOR%' --platform $BIRCH_PLATFORM --birchdir $BIRCH"
        close   true

# - - - - - - - - Web Browser - - - - - - - - - -
panel
    var "browser"
        type        combobox
        label       "Web Browser "
<REPLACE defaultnum=BL_Browser> 
        choices
<REPLACE list=BL_Browser> 
            "Custom command" "%custombrowser%"

    var "custombrowser"
        type        text
<REPLACE defaulttext=BL_Browser> 
            
    var "TestBrowser"
        type    button
        label   "Test"
        shell   "%browser% $BIRCH/admin/BLHelper/sample.html"
        close   true

    var "SetBrowser"
        type    button
        label   "Save"
        shell   "$BIRCH/script/BLHelper.py --setvar BL_Browser='%BROWSER%' --platform $BIRCH_PLATFORM --birchdir $BIRCH"
        close   true

# - - - - - - - - PDF Viewer - - - - - - - - - -
panel
    var "pdfviewer"
        type        combobox
        label       "PDF Viewer "
<REPLACE defaultnum=BL_PDFViewer> 
        choices
<REPLACE list=BL_PDFViewer> 
            "Custom command" "%custompdf%"
    var "custompdf"
        type        text
<REPLACE defaulttext=BL_PDFViewer> 
            
    var "TestPDF"
        type    button
        label   "Test"
        shell   "%PDFVIEWER% $BIRCH/admin/BLHelper/sample.pdf"
        close   true

    var "SetPDF"
        type    button
        label   "Save"
        shell   "$BIRCH/script/BLHelper.py --setvar BL_PDFViewer='%PDFVIEWER%' --platform $BIRCH_PLATFORM --birchdir $BIRCH"
        close   true

# - - - - - - - - PostScript Viewer - - - - - - - - - -
panel
    var "psviewer"
        type        combobox
        label       "PostScript Viewer "
<REPLACE defaultnum=BL_PSViewer> 
        choices
<REPLACE list=BL_PSViewer> 
            "Custom command" "%customps%"
    var "customps"
        type        text
<REPLACE defaulttext=BL_PSViewer> 
            
    var "TestPS"
        type    button
        label   "Test"
        shell   "%PSVIEWER% $BIRCH/admin/BLHelper/sample.ps"
        close   true

    var "SetPS"
        type    button
        label   "Save"
        shell   "$BIRCH/script/BLHelper.py --setvar BL_PSViewer='%PSVIEWER%' --platform $BIRCH_PLATFORM --birchdir $BIRCH"
        close   true

# - - - - - - - - Terminal - - - - - - - - - -
panel
    var "terminal"
        type        combobox
        label       "Terminal emulator "
<REPLACE defaultnum=BL_Terminal> 
        choices
<REPLACE list=BL_Terminal> 
            "Custom command" "%customterm%"
    var "customterm"
        type        text
<REPLACE defaulttext=BL_Terminal> 
            
    var "TestTerm"
        type    button
        label   "Test"
        shell   "%TERMINAL% 'echo SUCCEEDED; sleep 5 '"
        close   true

    var "SetTerm"
        type    button
        label   "Save"
        shell   "$BIRCH/script/BLHelper.py --setvar BL_Terminal='%TERMINAL%' --platform $BIRCH_PLATFORM --birchdir $BIRCH"
        close   true

# - - - - - - - - Image Viewer - - - - - - - - - -
panel
    var "imageviewer"
        type        combobox
        label       "Image Viewer "
<REPLACE defaultnum=BL_ImageViewer> 
        choices
<REPLACE list=BL_ImageViewer> 
            "Custom command" "%customimage%"
    var "customimage"
        type        text
<REPLACE defaulttext=BL_ImageViewer> 
            
    var "TestImage"
        type    button
        label   "Test"
        shell   "%IMAGEVIEWER% $BIRCH/admin/BLHelper/sample.png"
        close   true

    var "SetImage"
        type    button
        label   "Save"
        shell   "$BIRCH/script/BLHelper.py --setvar BL_ImageViewer='%IMAGEVIEWER%' --platform $BIRCH_PLATFORM --birchdir $BIRCH"
        close   true

# - - - - - - - - Document Viewer - - - - - - - - - -
panel
    var "documentviewer"
        type        combobox
        label       "Document Viewer "
<REPLACE defaultnum=BL_Document> 
        choices
<REPLACE list=BL_Document> 
            "Custom command" "%customdoc%"
    var "customdoc"
        type        text
<REPLACE defaulttext=BL_Document> 
            
    var "TestDocument"
        type    button
        label   "Test"
        shell   "%DOCUMENTVIEWER% $BIRCH/admin/BLHelper/sample.doc"
        close   true

    var "SetDocument"
        type    button
        label   "Save"
        shell   "$BIRCH/script/BLHelper.py --setvar BL_Document='%DOCUMENTVIEWER%' --platform $BIRCH_PLATFORM --birchdir $BIRCH"
        close   true

# - - - - - - - - Spreadsheet - - - - - - - - - -
panel
    var "spreadsheet"
        type        combobox
        label       "Spreadsheet "
<REPLACE defaultnum=BL_Spreadsheet> 
        choices
<REPLACE list=BL_Spreadsheet> 
            "Custom command" "%customspreadsheet%"
    var "customspreadsheet"
        type        text
<REPLACE defaulttext=BL_Spreadsheet> 
            
    var "TestDocument"
        type    button
        label   "Test"
        shell   "%SPREADSHEET% $BIRCH/admin/BLHelper/sample.csv"
        close   true

    var "SetImage"
        type    button
        label   "Save"
        shell   "$BIRCH/script/BLHelper.py --setvar BL_Spreadsheet='%SPREADSHEET%' --platform $BIRCH_PLATFORM --birchdir $BIRCH"
        close   true

panel        
    var "Help"
        type    button
        label   "Help"
        shell "$BL_Browser $BIRCH/doc/BIRCH/birchadmin/HelperApps.html"
        close false

