Eskil

Diff
Login

Differences From Artifact [4616cb4998]:

To Artifact [d962c7f674]:


485
486
487
488
489
490
491





492
493
494
495
496
497
498
499










500
501
502
503












504
505
506
507
508
509
510

    set arg $::eskil($top,edit,pluginname,$n)
    set pOpts {}
    if {$arg ne ""} {
        set res [LocatePlugin $arg]
        set pOpts [dict get $res opts]
    }





    # Look for declarations of command line options
    set t 0
    set ::eskil($top,edit,opts,$n) $pOpts
    foreach {name flag doc} $pOpts {
        ttk::label $w.l$t -text $name
        addBalloon $w.l$t $doc
        grid $w.l$t -sticky "w" -padx 3 -pady 3
        if {$flag} {










            ttk::checkbutton $w.s$t -text "On" \
                    -variable ::eskil($top,edit,$name,$n)
            grid $w.s$t -row $t -column 1 -sticky "w" -padx 3 -pady 3
        } else {












            ttk::entry $w.s$t \
                    -textvariable ::eskil($top,edit,$name,$n)
            grid $w.s$t -row $t -column 1 -sticky we -padx 3 -pady 3
        }
        incr t
    }
    grid columnconfigure $w 1 -weight 1







>
>
>
>
>








>
>
>
>
>
>
>
>
>
>




>
>
>
>
>
>
>
>
>
>
>
>







485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537

    set arg $::eskil($top,edit,pluginname,$n)
    set pOpts {}
    if {$arg ne ""} {
        set res [LocatePlugin $arg]
        set pOpts [dict get $res opts]
    }
    # Look for defaults on the command line
    set pArgv $::eskil(argv)
    if {[info exists ::eskil($top,pluginargv,$n)]} {
        lappend pArgv {*}$::eskil($top,pluginargv,$n)
    }
    # Look for declarations of command line options
    set t 0
    set ::eskil($top,edit,opts,$n) $pOpts
    foreach {name flag doc} $pOpts {
        ttk::label $w.l$t -text $name
        addBalloon $w.l$t $doc
        grid $w.l$t -sticky "w" -padx 3 -pady 3
        if {$flag} {
            # Initialise if given.
            if {[lsearch -exact $pArgv $name] >= 0} {
                set ::eskil($top,edit,$name,$n) 1
                # Move responsibility from global argv
                set ix [lsearch -exact $::eskil(argv) $name]
                if {$ix >= 0} {
                    set ::eskil(argv) [lreplace $::eskil(argv) $ix $ix]
                    lappend ::eskil($top,pluginargv,$n) $name
                }
            }
            ttk::checkbutton $w.s$t -text "On" \
                    -variable ::eskil($top,edit,$name,$n)
            grid $w.s$t -row $t -column 1 -sticky "w" -padx 3 -pady 3
        } else {
            # Initialise if given.
            set ix [lsearch -exact $pArgv $name]
            if {$ix >= 0} {
                set ::eskil($top,edit,$name,$n) [lindex $pArgv $ix+1]
                # Move responsibility from global argv
                set ix [lsearch -exact $::eskil(argv) $name]
                if {$ix >= 0} {
                    lappend ::eskil($top,pluginargv,$n) $name \
                            [lindex $::eskil(argv) $ix+1]
                    set ::eskil(argv) [lreplace $::eskil(argv) $ix $ix+1]
                }
            }
            ttk::entry $w.s$t \
                    -textvariable ::eskil($top,edit,$name,$n)
            grid $w.s$t -row $t -column 1 -sticky we -padx 3 -pady 3
        }
        incr t
    }
    grid columnconfigure $w 1 -weight 1