"SfR Fresh" - the SfR Freeware/Shareware Archive 
As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers.
Alternatively you can here view or download the uninterpreted source code file.
That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
1 # OpenVerse Fun Panel
2 #
3 # this file initalizes the program and does any
4 # platform specific things/setup. It will then source
5 # supporting modules.
6 #
7 # Module Name - Fun Panel Setup
8 # Current Maintainter - Cruise <cruise@openverse.org>
9 # Sourced By - InitMain.tcl
10 #
11 # Copyright (C) 1999 David Gale <cruise@openverse.org>
12 # For more information visit http://OpenVerse.org/
13 #
14 # This program is free software; you can redistribute it and/or
15 # modify it under the terms of the GNU General Public License
16 # as published by the Free Software Foundation; either version 2
17 # of the License, or (at your option) any later version.
18 #
19 # This program is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
23 #
24 # You should have received a copy of the GNU General Public License
25 # along with this program; if not, write to the Free Software
26 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
27 # USA.
28
29 #
30 # These frames must be defined as other functions need to know where they
31 # should add items.
32 #
33 set MV(plugin_frame) ".menu.main.r.b"
34 set MV(avatar_menu) ".menu.main.m.b.anims"
35 set MV(names_menu) ".menu.main.m.b.names.mb"
36 set MV(passageways_menu) ".menu.main.m.a.bookmarks"
37 set MV(chat_entry) ".menu.main.r.a.chat.chat"
38 set MV(connect_button) ".menu.main.r.b.connect"
39
40 if [winfo exists .menu.main] {destroy .menu.main}
41
42 frame .menu.main
43 frame .menu.main.r
44 frame .menu.main.r.a
45 frame .menu.main.r.b
46 frame .menu.main.r.a.chat -relief raised -borderwidth 2
47 frame .menu.main.m -relief raised -borderwidth 2
48 frame .menu.main.m.a -relief sunken -borderwidth 2
49 frame .menu.main.m.b -relief sunken -borderwidth 2
50
51 button .menu.main.r.b.connect -text [Trns connect] -command Connect
52 button .menu.main.r.a.chat.send -text [Trns send] -command SendText
53 entry .menu.main.r.a.chat.chat
54 button .menu.main.m.a.quit -text [Trns quit] -command {exit}
55 button .menu.main.m.a.chat -text [Trns text_chat] -command ToggleText
56 button .menu.main.m.a.help -text [Trns help] -command "source \"$MV(helpdir)/$MV(help.file.main)\""
57 button .menu.main.m.a.setup -text [Trns setup] -command Setup
58 menubutton .menu.main.m.a.bookmarks -text [Trns passageways] -menu \
59 .menu.main.m.a.bookmarks.m -relief raised -borderwidth 2 \
60 -indicatoron 1
61 menu .menu.main.m.a.bookmarks.m
62 button .menu.main.m.b.avatars -text [Trns aved] -relief raised -borderwidth 2 \
63 -command AvEd
64 checkbutton .menu.main.m.b.anim -text [Trns animate] -variable MV(anim.stop) -relief raised \
65 -borderwidth 2 -offvalue 1 -onvalue 0 -command AnimateAvatar
66 menubutton .menu.main.m.b.anims -text [Trns avatars] -menu .menu.main.m.b.anims.m -relief \
67 raised -borderwidth 2 -indicatoron 1
68 menu .menu.main.m.b.anims.m
69 checkbutton .menu.main.m.b.sound -text [Trns sound] -variable MV(bell) -relief raised \
70 -borderwidth 2
71 frame .menu.main.m.b.names -relief raised -borderwidth 2
72 checkbutton .menu.main.m.b.names.cb -variable MV(names) -command ShowNames
73 menubutton .menu.main.m.b.names.mb -text [Trns names] -relief raised -borderwidth 2 \
74 -menu .menu.main.m.b.names.mb.m -indicatoron 1
75 menu .menu.main.m.b.names.mb.m
76
77 pack .menu.main -side top -fill both -expand y
78 pack .menu.main.m -side left
79 pack .menu.main.r -side left -fill both -expand y
80 pack .menu.main.r.a -side top -fill both -expand y
81 pack .menu.main.r.b -side top -fill both -expand y
82 pack .menu.main.m.a -side top -fill both -expand y
83 pack .menu.main.m.b -side bottom -fill both -expand y
84 pack .menu.main.m.a.quit .menu.main.m.a.chat .menu.main.m.a.help .menu.main.m.a.setup .menu.main.m.a.bookmarks -side left -fill both -expand y
85 pack .menu.main.m.b.avatars .menu.main.m.b.anim .menu.main.m.b.anims .menu.main.m.b.sound .menu.main.m.b.names -side left -fill both -expand y
86 pack .menu.main.m.b.names.cb .menu.main.m.b.names.mb -side left
87 pack .menu.main.r.a.chat -side left -fill x -expand y
88 pack .menu.main.r.a.chat.send -side left
89 pack .menu.main.r.a.chat.chat -side left -fill x -expand y
90 pack .menu.main.r.b.connect -side left -fill both -expand y
91
92 bind .menu.main.r.a.chat.chat <Return> SendText
93 bind .menu.main.r.a.chat.chat <Up> "ShowPrev .menu.main.r.a.chat.chat"
94 bind .menu.main.r.a.chat.chat <Down> "ShowNext .menu.main.r.a.chat.chat"
95 bind .menu.main.r.a.chat.chat <Key> "CheckLen .menu.main.r.a.chat.chat"
96
97 focus .menu.main.r.a.chat.chat
98
99 proc ColorMainButtons {} {
100 global MV
101
102 if $MV(use_windowmanager_colors) {return}
103
104 .menu.main configure -bg $MV(colors.frames.topbar.bg)
105 .menu.main.r.b.connect configure -bg $MV(colors.buttons.connect.bg) \
106 -fg $MV(colors.buttons.connect.fg) \
107 -activebackground $MV(colors.buttons.connect.abg) \
108 -activeforeground $MV(colors.buttons.connect.afg)
109 .menu.main.r.a.chat configure -bg $MV(colors.frames.chat.bg)
110 .menu.main.r.a.chat.send configure -bg $MV(colors.buttons.send.bg) \
111 -fg $MV(colors.buttons.send.fg) \
112 -activebackground $MV(colors.buttons.send.abg) \
113 -activeforeground $MV(colors.buttons.send.afg)
114 .menu.main.r.a.chat.chat configure -bg $MV(colors.buttons.entry.bg) -fg $MV(colors.buttons.entry.fg)
115 .menu.main.m configure -bg $MV(colors.frames.menu.bord.bg)
116 .menu.main.m.a configure -bg $MV(colors.frames.menu.top.bg)
117 .menu.main.m.b configure -bg $MV(colors.frames.menu.bot.bg)
118 .menu.main.m.a.quit configure -bg $MV(colors.buttons.quit.bg) \
119 -fg $MV(colors.buttons.quit.fg) \
120 -activebackground $MV(colors.buttons.quit.abg) \
121 -activeforeground $MV(colors.buttons.quit.afg)
122 .menu.main.m.a.chat configure -bg $MV(colors.buttons.textchat.bg) \
123 -fg $MV(colors.buttons.textchat.fg) \
124 -activebackground $MV(colors.buttons.textchat.abg) \
125 -activeforeground $MV(colors.buttons.textchat.afg)
126 .menu.main.m.a.help configure -bg $MV(colors.buttons.help.bg) \
127 -activebackground $MV(colors.buttons.help.abg) \
128 -activeforeground $MV(colors.buttons.help.afg) \
129 -fg $MV(colors.buttons.help.fg)
130 .menu.main.m.a.setup configure -bg $MV(colors.buttons.setup.bg) \
131 -fg $MV(colors.buttons.setup.fg) \
132 -activebackground $MV(colors.buttons.setup.abg) \
133 -activeforeground $MV(colors.buttons.setup.afg)
134 .menu.main.m.a.bookmarks configure -bg $MV(colors.buttons.passageways.bg) \
135 -fg $MV(colors.buttons.passageways.fg) \
136 -activebackground $MV(colors.buttons.passageways.abg) \
137 -activeforeground $MV(colors.buttons.passageways.afg)
138 .menu.main.m.b.avatars configure -bg $MV(colors.buttons.aved.bg) \
139 -fg $MV(colors.buttons.aved.fg) \
140 -activebackground $MV(colors.buttons.aved.abg) \
141 -activeforeground $MV(colors.buttons.aved.afg)
142 .menu.main.m.b.anim configure -bg $MV(colors.buttons.animate.bg) \
143 -fg $MV(colors.buttons.animate.fg) \
144 -activebackground $MV(colors.buttons.animate.abg) \
145 -activeforeground $MV(colors.buttons.animate.afg)
146 .menu.main.m.b.anims configure -bg $MV(colors.buttons.avatars.bg) \
147 -fg $MV(colors.buttons.avatars.fg) \
148 -activebackground $MV(colors.buttons.avatars.abg) \
149 -activeforeground $MV(colors.buttons.avatars.afg)
150 .menu.main.m.b.sound configure -bg $MV(colors.buttons.sound.bg) \
151 -fg $MV(colors.buttons.sound.fg) \
152 -activebackground $MV(colors.buttons.sound.abg) \
153 -activeforeground $MV(colors.buttons.sound.afg)
154 .menu.main.m.b.names configure -bg $MV(colors.frames.names.bg)
155 .menu.main.m.b.names.cb configure -bg $MV(colors.buttons.names.chk.bg) \
156 -fg $MV(colors.buttons.names.chk.fg) \
157 -activebackground $MV(colors.buttons.names.chk.abg) \
158 -activeforeground $MV(colors.buttons.names.chk.afg)
159 .menu.main.m.b.names.mb configure -bg $MV(colors.buttons.names.bg) \
160 -fg $MV(colors.buttons.names.fg) \
161 -activebackground $MV(colors.buttons.names.abg) \
162 -activeforeground $MV(colors.buttons.names.afg)
163 }
164
165 # Setup our Baloon Help!
166 if $MV(tooltips) {
167 Bubble::initBubble .menu.main.m.b.names [Trns names_help]
168 Bubble::initBubble .menu.main.m.a.chat [Trns textchat_help]
169 Bubble::initBubble .menu.main.m.a.quit [Trns quit_help]
170 Bubble::initBubble .menu.main.m.a.help [Trns help_help]
171 Bubble::initBubble .menu.main.m.a.setup [Trns setup_help]
172 Bubble::initBubble .menu.main.m.a.bookmarks [Trns passageways_help]
173 Bubble::initBubble .menu.main.m.b.avatars [Trns aved_help]
174 Bubble::initBubble .menu.main.m.b.anim [Trns animate_help]
175 Bubble::initBubble .menu.main.m.b.sound [Trns sound_help]
176 Bubble::initBubble .menu.main.r.b.connect [Trns panel_connect_help]
177 Bubble::initBubble .menu.main.r.a.chat.send [Trns send_help]
178 Bubble::initBubble .menu.main.m.b.anims [Trns avatars_help]
179 }
180
181 DoAvatars
182 DoBookmarks
183 DoNames
184 ColorMainButtons