Tcl-Tk-Tkwidget-treectrl
view release on metacpan or search on metacpan
demos/firefox.tcl view on Meta::CPAN
# Saved Passwords
set I [$T item create]
$T item style set $I C0 styFrame
if {$::clip} {
set wClip [frame $T.clip$I -background red]
set f [frame $wClip.f$I -borderwidth 0 -background $bg]
} else {
set f [frame $T.f$I -borderwidth 0 -background $bg]
}
set fLeft [frame $f.fLeft -borderwidth 0 -background $bg]
text $fLeft.t1 -background $textBg -borderwidth 0 -highlightthickness 0 \
-width 10 -height 1 -wrap word -cursor ""
$fLeft.t1 insert end "Login information for web pages can be kept in the\
Password Manager so that you do not need to re-enter your login\
details every time you visit."
bindtags $fLeft.t1 TextWrapBindTag
if {$::tile} {
$::checkbuttonCmd $fLeft.cb1 -text "Remember Passwords" \
-variable ::DemoFirefoxPrivacy::Priv(cbvar,$fLeft.cb1) -style DemoCheckbutton
} else {
checkbutton $fLeft.cb1 -background $bg -highlightthickness 0 \
-text "Remember Passwords" -variable ::DemoFirefoxPrivacy::Priv(cbvar,$fLeft.cb1)
}
set Priv(cbvar,$fLeft.cb1) 1
pack $fLeft.t1 -side top -expand yes -fill x -pady {0 6}
pack $fLeft.cb1 -side top -anchor w
set fRight [frame $f.fRight -borderwidth 0 -background $bg]
$::buttonCmd $fRight.b1 -text "View Saved Passwords"
$::buttonCmd $fRight.b2 -text "Change Master Password..."
pack $fRight.b1 -side top -expand yes -fill x
pack $fRight.b2 -side top -expand yes -fill x -pady {8 0}
pack $fLeft -side left -expand yes -fill x
pack $fRight -side right -padx 12 -anchor n
if {$::clip} {
$T item element configure $I C0 eWindow -window $wClip
} else {
$T item element configure $I C0 eWindow -window $f
}
$T item lastchild "root child 2" $I
# Download Manager History
set I [$T item create]
$T item style set $I C0 styFrame
if {$::clip} {
set wClip [frame $T.clip$I -background red]
set f [frame $wClip.f$I -borderwidth 0 -background $bg]
} else {
set f [frame $T.f$I -borderwidth 0 -background $bg]
}
text $f.t1 -background $textBg -borderwidth 0 -highlightthickness 0 \
-width 10 -height 1 -wrap word -cursor ""
$f.t1 insert end "The Download Manager keeps track of recently downloaded files."
bindtags $f.t1 TextWrapBindTag
set f1 [frame $f.f1 -borderwidth 0 -background $bg]
label $f1.l1 -background $bg -text "Remove files from the Download Manager:"
if {$::tile} {
ttk::combobox $f1.mb1 -values {
"Upon successful download"
"When firefox exits"
Manually
} -state readonly -width [string length "Upon successful download"]
$f1.mb1 current 2
} else {
menubutton $f1.mb1 -indicatoron yes -menu $f1.mb1.m -text Manually \
-width [string length "Upon successful download"] -justify left
set m [menu $f1.mb1.m -tearoff no]
foreach label {
"Upon successful download"
"When firefox exits"
Manually} {
$m add command -label $label -command [list $f1.mb1 configure\
-text $label]
}
}
pack $f1.l1 -side left
pack $f1.mb1 -side left -padx {8 10}
pack $f.t1 -side top -expand yes -fill x -padx {0 10}
pack $f1 -side top -anchor w
if {$::clip} {
$T item element configure $I C0 eWindow -window $wClip
} else {
$T item element configure $I C0 eWindow -window $f
}
$T item lastchild "root child 3" $I
# Cookies
set I [$T item create]
$T item style set $I C0 styFrame
if {$::clip} {
set wClip [frame $T.clip$I -background red]
set f [frame $wClip.f$I -borderwidth 0 -background $bg]
} else {
set f [frame $T.f$I -borderwidth 0 -background $bg]
}
text $f.t1 -background $textBg -borderwidth 0 -highlightthickness 0 \
-width 10 -height 1 -wrap word -cursor ""
$f.t1 insert end "Cookies are pieces of information stored by web pages\
on your computer. They are used to remember login information and\
other data."
bindtags $f.t1 TextWrapBindTag
set fLeft [frame $f.fLeft -borderwidth 0 -background $bg]
if {$::tile} {
$::checkbuttonCmd $fLeft.cb1 -style DemoCheckbutton \
-text "Allow sites to set cookies" -variable ::DemoFirefoxPrivacy::Priv(cbvar,$fLeft.cb1)
} else {
checkbutton $fLeft.cb1 -background $bg -highlightthickness 0 \
-text "Allow sites to set cookies" -variable ::DemoFirefoxPrivacy::Priv(cbvar,$fLeft.cb1)
}
set Priv(cbvar,$fLeft.cb1) 1
if {$::tile} {
$::checkbuttonCmd $fLeft.cb2 -style DemoCheckbutton \
-text "for the originating web site only" \
-variable ::DemoFirefoxPrivacy::Priv(cbvar,$fLeft.cb2)
} else {
checkbutton $fLeft.cb2 -background $bg -highlightthickness 0 \
-text "for the originating web site only" \
-variable ::DemoFirefoxPrivacy::Priv(cbvar,$fLeft.cb2)
}
set Priv(cbvar,$fLeft.cb2) 0
pack $fLeft.cb1 -side top -anchor w
pack $fLeft.cb2 -side top -anchor w -padx {20 0}
set fRight [frame $f.fRight -borderwidth 0 -background $bg]
$::buttonCmd $fRight.b1 -text "Exceptions"
$::buttonCmd $fRight.b2 -text "View Cookies"
pack $fRight.b1 -side left -padx {0 10}
pack $fRight.b2 -side left
set f1 [frame $fLeft.f1 -borderwidth 0 -background $bg]
label $f1.l1 -background $bg -text "Keep Cookies:"
if {$::tile} {
ttk::combobox $f1.mb1 -values {
"until they expire"
"until I close Firefox"
"ask me every time"
} -state readonly -width [string length "until I close Firefox"]
$f1.mb1 current 0
} else {
menubutton $f1.mb1 -indicatoron yes -menu $f1.mb1.m \
-text "until they expire" \
-width [string length "until I close Firefox"] -justify left
set m [menu $f1.mb1.m -tearoff no]
foreach label {
"until they expire"
"until I close Firefox"
"ask me every time"
} {
$m add command -label $label -command [list $f1.mb1 configure -text $label]
}
}
pack $f1.l1 -side left
pack $f1.mb1 -side left -padx {8 0}
pack $f1 -side top -anchor w
pack $f.t1 -side top -expand yes -fill x -padx {0 10} -pady {0 8}
pack $fLeft -side left -expand yes -fill x
pack $fRight -side right -padx 14 -anchor n
if {$::clip} {
$T item element configure $I C0 eWindow -window $wClip
} else {
$T item element configure $I C0 eWindow -window $f
}
$T item lastchild "root child 4" $I
# Cache
set I [$T item create]
$T item style set $I C0 styFrame
if {$::clip} {
set wClip [frame $T.clip$I -background red]
set f [frame $wClip.f$I -borderwidth 0 -background $bg]
} else {
set f [frame $T.f$I -borderwidth 0 -background $bg]
}
text $f.t1 -background $textBg -borderwidth 0 -highlightthickness 0 \
-width 10 -height 1 -wrap word -cursor ""
$f.t1 insert end "Pages you view are stored in the cache for quicker\
viewing later on."
bindtags $f.t1 TextWrapBindTag
set f1 [frame $f.f1 -borderwidth 0 -background $bg]
label $f1.l1 -background $bg -text "Use up to:"
$::entryCmd $f1.e1 -width 10
$f1.e1 insert end 50000
label $f1.l2 -background $bg -text "KB of disk space for the cache." \
-background $bg
pack $f1.l1 -side left
pack $f1.e1 -side left -padx 8
pack $f1.l2 -side left
pack $f.t1 -side top -expand yes -fill x -padx {0 10}
pack $f1 -side top -anchor w
if {$::clip} {
$T item element configure $I C0 eWindow -window $wClip
} else {
( run in 1.975 second using v1.01-cache-2.11-cpan-2398b32b56e )