#!/usr/bin/env python
#
# $Id: wcc_options.py,v 1.3 2001/11/03 11:05:22 doughellmann Exp $
#
# Copyright 2001 Doug Hellmann.
#
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose and without fee is hereby
# granted, provided that the above copyright notice appear in all
# copies and that both that copyright notice and this permission
# notice appear in supporting documentation, and that the name of Doug
# Hellmann not be used in advertising or publicity pertaining to
# distribution of the software without specific, written prior
# permission.
#
# DOUG HELLMANN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
# NO EVENT SHALL DOUG HELLMANN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
"""Defines options for WhackyChat client.
"""
__rcs_info__ = {
#
# Creation Information
#
'module_name' : '$RCSfile: wcc_options.py,v $',
'rcs_id' : '$Id: wcc_options.py,v 1.3 2001/11/03 11:05:22 doughellmann Exp $',
'creator' : 'Doug Hellmann <doug@hellfly.net>',
'project' : 'PmwContribD',
'created' : 'Sun, 01-Apr-2001 13:21:50 EDT',
#
# Current Information
#
'author' : '$Author: doughellmann $',
'version' : '$Revision: 1.3 $',
'date' : '$Date: 2001/11/03 11:05:22 $',
}
#
# Import system modules
#
import os
#
# Import Local modules
#
import UserPrefs
#
# Module
#
class hermesrc(UserPrefs.UserPrefs):
depricated = (
'datefg',
'datebg',
'datefont',
'dateunderline',
'fromfg',
'frombg',
'fromfont',
'fromunderline',
'messagefg',
'messagebg',
'messagefont',
'messageunderline',
'urlfg',
'urlbg',
'urlfont',
'urlunderline',
)
order = (
'nickname',
'email',
'hostname',
'port',
'uid',
'password',
'ignoreself',
'ringbell',
'clearwindow',
'webbrowser',
'senddisposition',
'arprefix',
'araway',
'hideaway',
'arna',
'hidena',
'aroccupied',
'hideoccupied',
'ardnd',
'hidednd',
'arprivacy',
'hideprivacy',
'dateface',
'fromface',
'urlface',
'messageface',
)
clearOptions = (
'Always Clear',
'Always Keep',
'Ask',
)
enumValues = {
'clearwindow':clearOptions,
}
try:
default_nickname = os.environ['USER']
except KeyError:
default_nickname = 'Anonymous Coward'
allowedValues = {
'nickname' : ('string', default_nickname,
'Your Whacky Chat moniker'),
'email' : ('string', '',
'Your email address'),
'uid' : ('integer', 0,
'Your WIMD user ID'),
'password' : ('password', '',
'Your WIMD password'),
'hostname' : ('string', 'localhost',
'WIMD server host'),
'port' : ('integer', 2980,
'WIMD server port'),
'ignoreself' : ('boolean', 0,
'Ignore yourself in the active user list?'),
'ringbell' : ('boolean', 1,
'Ring a bell when\nmessages come in?'),
'clearwindow': ('enum', 'Always Keep',
'Clear chat window on close?'),
'webbrowser' : ('string', 'netscape -remote "openURL(%s, new-window)"',
'Command to run a web browser'),
'senddisposition': ('boolean', 1,
'Auto-reply for default dispositions?'),
'arprefix' : ('text',
'** Automatic Response **\n\n',
'Auto-reply prefix'),
'araway' : ('text',
'I am away from my chat client right now.|I will see your message when I return.',
'Auto-reply: Away'),
'hideaway' : ('boolean', 1,
'Store messages when status is\n"Away"'),
'arna' : ('text',
'I am not available to chat right now.|I will see your message when I return.',
'Auto-reply: Not Available'),
'hidena' : ('boolean', 1,
'Store messages when status is\n"N/A"'),
'aroccupied' : ('text',
'I am occupied right now.|I will see your message when I return.',
'Auto-reply: Occupied'),
'hideoccupied' : ('boolean', 1,
'Store messages when status is\n"Occupied"'),
'ardnd' : ('text',
"I have turned on the 'Do not disturb' sign temporarily.|I will receive your message when I have activated my chat client again.",
'Auto-reply: Do not disturb'),
'hidednd' : ('boolean', 1,
'Store messages when status is\n"Do not disturb"'),
'arprivacy' : ('text',
'I have activated my chat client\'s privacy mode.|Your message will be delivered when I have signed online again.',
'Auto-reply: Privacy'),
'hideprivacy' : ('boolean', 1,
'Store messages when status is\n"Privacy"'),
'dateface' : ('font',
'(("Helvetica",),{"foreground":"green","background":"black",})',
'Message date appearance'),
'messageface' : ('font',
'(("Helvetica",),{"foreground":"black","background":"lightgrey",})',
'Message text appearance'),
'urlface' : ('font',
'(("Helvetica",),{"foreground":"blue","background":"lightgrey",})',
'Url appearance'),
'fromface' : ('font',
'(("Helvetica",),{"foreground":"red","background":"lightgrey",})',
'From appearance'),
}
|