1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
|
proc ConfigureInterface {} {
set gen_bg gray
set gen_fg black
set gen_darker_bg gray66
set gen_darker_fg black
set gen_active_bg gray66
set gen_active_fg $gen_fg
set gen_font -*-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-*
set gen_bold_font -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*
set gen_menu_font -*-helvetica-bold-o-normal-*-14-*-*-*-*-*-*-*
set gen_italic_font -*-helvetica-bold-o-normal-*-14-*-*-*-*-*-*-*
set circus_menu_font -*-helvetica-bold-o-normal-*-10-*-*-*-*-*-*-*
# general stuff, everything gets these defaults unless otherwise specified
#-------------------------------------------------------------------------
option add *font $gen_font
option add *background $gen_bg
option add *foreground $gen_fg
option add *activeBackground $gen_active_bg
option add *activeForeground $gen_active_fg
option add *disabledForeground gray45
option add *anchor w
option add *highlightThickness 0
# buttons
#--------
option add *Button.borderWidth 2
option add *Button.anchor c
# check buttons
#--------------
option add *Checkbutton.selector red
option add *Checkbutton.borderWidth 2
option add *Checkbutton.relief flat
# radio buttons
#--------------
option add *Radiobutton.selector yellow
option add *Radiobutton.borderWidth 2
option add *Radiobutton.relief flat
# entries
#--------
option add *Entry.relief sunken
option add *Entry.background $gen_darker_bg
option add *Entry.foreground black
option add *Entry.insertBackground black
option add *Entry.font -*-courier-medium-r-*-*-14-*-*-*-*-*-*-*
# labels
#-------
option add *Label.anchor w
option add *Label.borderWidth 0
# labelframe
#-----------
option add *Labelframe.borderWidth 2
# listboxs
#---------
option add *Listbox.background $gen_darker_bg
# menus
#------
option add *Menu*font $circus_menu_font
# menus buttons
#--------------
option add *Menubutton*font $circus_menu_font
# scales
#-------
option add *Scale.foreground $gen_fg
option add *Scale.activeForeground $gen_active_bg
option add *Scale.background $gen_bg
option add *Scale.sliderForeground $gen_bg
option add *Scale.sliderBackground $gen_darker_bg
option add *Scale.font $gen_italic_font
# scrollbars
option add *Scrollbar.foreground $gen_bg
option add *Scrollbar.activeForeground $gen_active_bg
option add *Scrollbar.background $gen_darker_bg
option add *Scrollbar.relief sunken
# Set some fonts. 6x13 is nice, small and readable
option add *Label.font 6x13
option add *Checkbutton.font 6x13
option add *Text.font 6x13
option add *Entry.font 6x13
option add *Menu.font 6x13
option add *Combo.font 6x13
. configure -bg $gen_bg
}
ConfigureInterface
#
# We need these extra bindings
bind Button <3> {
tkButtonDown %W
}
bind Button <ButtonRelease-3> {
tkButtonRaise %W
}
proc tkButtonRaise w {
global tkPriv
if {$w == $tkPriv(buttonWindow)} {
set tkPriv(buttonWindow) ""
$w config -relief $tkPriv(relief)
}
}
#
# Some systems have problems with backspace/delete keys.. *sigh*
bind Entry <Delete> {
if [%W selection present] {
%W delete sel.first sel.last
} else {
tkEntryBackspace %W
}
}
bind Text <Delete> {
if {[%W tag nextrange sel 1.0 end] != ""} {
%W delete sel.first sel.last
} elseif [%W compare insert != 1.0] {
%W delete insert-1c
%W see insert
}
}
#
# Binding for those who want listboxes to immediately select the mousecursos
#bind Listbox <Motion> {
# %W selection clear 0 end
# %W selection set @%x,%y
#}
#
# But it also disables most other motion-related bindings :(
#
# Keys for inserting ^B ^V ^_ and ^O for bold, inverse, underline and reset
bind Entry <Control-b> {
%W insert insert \x02
}
bind Entry <Control-c> {
%W insert insert \x03
}
bind Entry <Control-g> {
%W insert insert \x07
}
bind Entry <Control-o> {
%W insert insert \x0f
}
bind Entry <Control-v> {
%W insert insert \x16
}
bind Entry <Shift-Control-underscore> {
%W insert insert \x1f
}
set nick cIRCuser
set ircname "cIRCus 0.42 - \x02http://www.nijenrode.nl/~ivo/circus/\x02"
set notify { VladDrac Liesje }
set scriptdir "scripts"
set dccdownloaddir "/usr/src"
set notifyinterval 30
set ircserver {
irc.linpeople.org
irc.sci.kun.nl
irc.xs4all.nl
irc.pi.net:6660
irc.pi.net:6667
irc.pi.net:6669
irc.pi.net:7000
xgw.dal.net:7000
}
set TRANSPARENT_GIF_COLOR grey
global nick ircname ircserver notifyinterval notify TRANSPARENT_GIF_COLOR
global ircport scriptdir dccdlownloaddir
|