# OpenVerse NotFun Panel # # this file initalizes the program and does any # platform specific things/setup. It will then source # supporting modules. # # Module Name - NotFun Panel Setup # Sourced By - InitMain.tcl # # Copyright (C) 1999 David Gale # For more information visit http://www.openverse.com/ # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. # Register some things set MV(panel_cleanup) "notfun_panel_cleanup" set MV(panel_event) [lunion $MV(panel_event) "notfun_panel_event"] # This panel's cleanup proc proc notfun_panel_cleanup {} { global MV destroy .menu.border destroy .menu.main rename notfun_panel_event "" set MV(panel_event) [ldifference $MV(panel_event) "notfun_panel_event"] set MV(panel_cleanup) "" } # This panel's handler for various events proc notfun_panel_event {event args} { # Handle events switch -- $event { "aved-open" {.menu.main.m.aved configure -relief sunken} "aved-close" {.menu.main.m.aved configure -relief flat} "textchat-open" {.menu.main.m.text configure -relief sunken} "textchat-close" {.menu.main.m.text configure -relief flat} "connecting" { .menu.main.m.connect configure -image img::chat::connect_create } "connect" { .menu.main.m.connect configure -command Disconnect\ -image img::chat::connect_yes } "disconnect" { .menu.main.m.connect configure -command Connect\ -image img::chat::connect_no }} } set MV(plugin_frame) ".menu.main.plugins" set MV(chat_entry) ".menu.main.chat.chat" set MV(names_menu) ".menu.main.m.names.m" set MV(avatar_menu) ".menu.main.m.av.m" set MV(passageways_menu) ".menu.main.m.ov.m" set MV(swallowchat) 0 set MV(chatframe) "" frame .menu.border -borderwidth 1 -relief raised frame .menu.main -borderwidth 1 -relief flat frame .menu.main.m frame .menu.main.chat -relief flat -borderwidth 0 frame .menu.main.plugins menubutton .menu.main.m.ov -text [Trns OpenVerse] -menu .menu.main.m.ov.m\ -underline 0 menu .menu.main.m.ov.m -tearoff $MV(tearoff_menus) .menu.main.m.ov.m add cascade -label [Trns passageways]\ -menu .menu.main.m.ov.m.m menu .menu.main.m.ov.m.m -tearoff $MV(tearoff_menus) .menu.main.m.ov.m add command -label [Trns text_chat] -command ToggleText .menu.main.m.ov.m add command -label [Trns setup] -command Setup .menu.main.m.ov.m add checkbutton -label [Trns sound] -variable MV(bell) .menu.main.m.ov.m add separator .menu.main.m.ov.m add command -label [Trns quit] -command exit menubutton .menu.main.m.av -text [Trns avatars] -menu .menu.main.m.av.m\ -underline 0 menu .menu.main.m.av.m -tearoff $MV(tearoff_menus) .menu.main.m.av.m add checkbutton -label [Trns animate] -offvalue 1 -onvalue 0\ -variable MV(anim.stop) -command AnimateAvatar .menu.main.m.av.m add cascade -label [Trns avatars] -menu .menu.main.m.av.m.m menu .menu.main.m.av.m.m -tearoff $MV(tearoff_menus) .menu.main.m.av.m add separator .menu.main.m.av.m add command -label [Trns aved_long] -command AvEd menubutton .menu.main.m.names -text [Trns users] -menu .menu.main.m.names.m\ -underline 0 menu .menu.main.m.names.m -tearoff $MV(tearoff_menus) .menu.main.m.names.m add checkbutton -label [Trns show_nametags]\ -variable MV(names) -command ShowNames .menu.main.m.names.m add cascade -label [Trns names]\ -menu .menu.main.m.names.m.m menu .menu.main.m.names.m.m -tearoff $MV(tearoff_menus) menubutton .menu.main.m.help -text [Trns help] -relief flat -underline 0\ -menu .menu.main.m.help.m menu .menu.main.m.help.m -tearoff $MV(tearoff_menus) .menu.main.m.help.m add command -label [Trns about_openverse]\ -command "source \"$MV(helpdir)/$MV(help.file.about)\"" .menu.main.m.help.m add command -label [Trns openverse_help]\ -command "source \"$MV(helpdir)/$MV(help.file.main)\"" .menu.main.m.help.m add command -label [Trns technical_help]\ -command "source \"$MV(helpdir)/$MV(help.file.technical)\"" .menu.main.m.help.m add command -label [Trns faq]\ -command "source \"$MV(helpdir)/$MV(help.file.faq)\"" button .menu.main.m.jump -image img::chat::jump -borderwidth 1\ -command "SendToServer \"EFFECT jump\"" -relief flat -width 20\ -height 20 -highlightthickness 0 button .menu.main.m.shiver -image img::chat::shiver -borderwidth 1\ -command "SendToServer \"EFFECT shiver\"" -relief flat\ -width 20 -height 20 -highlightthickness 0 button .menu.main.m.push -image img::chat::push -borderwidth 1\ -command "SendToServer \"PUSH 100\"" -relief flat\ -width 20 -height 20 -highlightthickness 0 button .menu.main.m.aved -image img::chat::aved -borderwidth 1\ -command AvEd -relief flat -width 20 -height 20\ -highlightthickness 0 button .menu.main.m.text -image img::chat::text_chat -borderwidth 1\ -command ToggleText -relief flat -width 20 -height 20\ -highlightthickness 0 button .menu.main.m.connect -borderwidth 1 -relief flat -width 20 -height 20\ -highlightthickness 0 entry .menu.main.chat.chat -relief sunken -borderwidth 1 -highlightthickness 0 button .menu.main.chat.send -image img::chat::send -borderwidth 1\ -command {SendText .menu.main.chat.chat} -relief flat\ -width 20 -height 20 -highlightthickness 0 if {$MV(sock) == -1} { .menu.main.m.connect configure -command Connect -image\ img::chat::connect_no } else { .menu.main.m.connect configure -command Disconnect -image\ img::chat::connect_yes } if $MV(tooltips) { Bubble::initBubble .menu.main.m.jump [Trns "jump"] Bubble::initBubble .menu.main.m.shiver [Trns "shiver"] Bubble::initBubble .menu.main.m.push [Trns "push"] Bubble::initBubble .menu.main.m.aved [Trns "aved_long"] Bubble::initBubble .menu.main.m.text [Trns "openverse_text_chat"] Bubble::initBubble .menu.main.m.connect [Trns "panel_connect_help"] Bubble::initBubble .menu.main.chat.send [Trns "send_help"] } pack .menu.border -side top -fill both -expand 1 pack .menu.main -fill both -expand 1 -in .menu.border pack .menu.main.m -side left -fill x -expand 0 pack .menu.main.chat -side left -fill x -expand 1 pack .menu.main.plugins -side right pack .menu.main.chat.send -side right pack .menu.main.chat.chat -side right -fill both -expand y pack .menu.main.m.ov .menu.main.m.av .menu.main.m.names .menu.main.m.help\ .menu.main.m.jump .menu.main.m.shiver .menu.main.m.push\ .menu.main.m.aved .menu.main.m.text .menu.main.m.connect\ -side left -fill both bind .menu.main.chat.chat {SendText .menu.main.chat.chat} bind .menu.main.chat.chat {ShowPrev .menu.main.chat.chat} bind .menu.main.chat.chat {ShowNext .menu.main.chat.chat} bind .menu.main.chat.chat {CheckLen .menu.main.chat.chat} focus .menu.main.chat.chat proc ColorMainButtons {} { global MV if $MV(use_windowmanager_colors) return # Uhh, isn't this proc supposed to do something? } DoAvatars DoBookmarks DoNames ColorMainButtons # Set some window parameters wm geometry . "" wm resizable . 0 0 # vim:syntax=tcl