annotate orpg/main.py @ 27:51428d30c59e ornery-orc

Traipse 'OpenRPG' {091003-00} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc''s main goal is to offer more advanced features and enhance the productivity of the user. Update Summary: Adds menu changes to draw attention to important updates, errors, or other events. Traipse URL is now included in the repos tab and is set as default. Fixes Copy for Windows and Linux (finally!!) users. Fixes incomplete update to Grid and List nodes. Fixes incomplete update to Chat Commands. Fixes problems with Remote Image Upload. Fixes Drop and Drag of Minis to Map. CherryPy can now use any image in the webfiles/ folder and sub-folders. CherryPy can now Drop and Drag Minis to the Map. Minor changes to Update Manager's GUI. Expert recommendation warning added to Revision Update. Step down compatibility with open_rpg & component added to orpgCore. Fixes CherryPit misspelling. Makes Traipse Suite 'Attention' item portable, and executes it on 'Critical' debug notices. Adds incomplete Shift + Enter to Text Entry, currently creates a 'Critical' warning. New default Lobby Map, designed for Traipse. Feel free to change it. Updates to Server GUI: * Admin can Ban from Backend. * Admin can Modify Ban List and Un Ban users. * Server GUI finds your Lobby Name * New users default as Lurker unless a Role is set Cleaner TraipseSuiteAttention portability and clean up in Main. Die Roll Commands addition from Core code allowing Math Ordering with ()'s New About Dialog. A more uniform About Dialog. Corrects image loading of duplicate images.
author sirebral
date Sat, 03 Oct 2009 18:49:37 -0500
parents 97265586402b
children ff154cf3350c
rev   line source
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1 #!/usr/bin/env python
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
2 # Copyright (C) 2000-2001 The OpenRPG Project
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
3 #
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
4 # openrpg-dev@lists.sourceforge.net
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
5 #
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
6 # This program is free software; you can redistribute it and/or modify
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
7 # it under the terms of the GNU General Public License as published by
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
8 # the Free Software Foundation; either version 2 of the License, or
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
9 # (at your option) any later version.
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
10 #
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
11 # This program is distributed in the hope that it will be useful,
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
14 # GNU General Public License for more details.
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
15 #
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
16 # You should have received a copy of the GNU General Public License
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
17 # along with this program; if not, write to the Free Software
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
18 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
19 # --
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
20 #
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
21 # File: main.py
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
22 # Author: Chris Davis
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
23 # Maintainer:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
24 # Version:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
25 # $Id: main.py,v 1.153 2008/01/24 03:52:03 digitalxero Exp $
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
26 #
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
27 # Description: This is the main entry point of the oprg application
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
28 #
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
29
10
5df1340bda13 Big patch! Linux GUI, Fetching Dict., Init2, Streaming lining.
sirebral
parents: 4
diff changeset
30 __version__ = "$Id: main.py,v 1.154 2009/07/19 03:52:03 madmathlabs Exp $"
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
31
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
32 from orpg.orpg_wx import *
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
33 from orpg.orpgCore import *
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
34 from orpg_version import *
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
35 from orpg.orpg_windows import *
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
36
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
37 import wx.py
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
38 from orpg import minidom
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
39 import orpg.player_list
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
40 import orpg.tools.pluginui as pluginUI
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
41 import orpg.tools.aliaslib
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
42 import orpg.tools.toolBars
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
43 import orpg.tools.orpg_sound
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
44 import orpg.tools.rgbhex
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
45 import orpg.gametree.gametree
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
46 import orpg.chat.chatwnd
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
47 import orpg.networking.gsclient
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
48 import orpg.networking.mplay_client
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
49 import orpg.mapper.map
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
50 import orpg.mapper.images
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
51
14
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
52 import upmana.updatemana
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
53 import upmana.manifest as manifest
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
54
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
55 from orpg.dirpath import dir_struct
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
56 from orpg.dieroller.utils import DiceManager
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
57 from orpg.tools.orpg_settings import settings
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
58 from orpg.tools.validate import validate
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
59 from orpg.tools.passtool import PassTool
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
60 from orpg.tools.orpg_log import logger, crash
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
61 from orpg.tools.decorators import debugging
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
62 from orpg.tools.metamenus import MenuBarEx
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
63
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
64 #from xml.etree.ElementTree import ElementTree, Element
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
65 #from xml.etree.ElementTree import fromstring, tostring
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
66 from orpg.orpg_xml import xml #to be replaced by etree
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
67
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
68
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
69 ####################################
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
70 ## Main Frame
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
71 ####################################
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
72
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
73
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
74 class orpgFrame(wx.Frame):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
75 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
76 def __init__(self, parent, id, title):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
77 wx.Frame.__init__(self, parent, id, title, wx.Point(100, 100), wx.Size(600,420), style=wx.DEFAULT_FRAME_STYLE)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
78 self.validate = component.get("validate")
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
79 logger.debug("Enter orpgFrame")
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
80 self.rgb = orpg.tools.rgbhex.RGBHex()
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
81 self._mgr = AUI.AuiManager(self)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
82
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
83 # Determine which icon format to use
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
84 icon = None
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
85 if wx.Platform == '__WXMSW__': icon = wx.Icon(dir_struct["icon"]+'d20.ico', wx.BITMAP_TYPE_ICO)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
86 else: icon = wx.Icon(dir_struct["icon"]+"d20.xpm", wx.BITMAP_TYPE_XPM)
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
87 self.SetIcon( icon )
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
88
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
89 # create session
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
90 call_backs = {"on_receive":self.on_receive,
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
91 "on_mplay_event":self.on_mplay_event,
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
92 "on_group_event":self.on_group_event,
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
93 "on_player_event":self.on_player_event,
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
94 "on_status_event":self.on_status_event,
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
95 "on_password_signal":self.on_password_signal,
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
96 "orpgFrame":self}
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
97 self.settings = component.get('settings') #Arbitrary until settings updated with Core.
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
98 self.session = orpg.networking.mplay_client.mplay_client(self.settings.get_setting("player"), call_backs)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
99 self.poll_timer = wx.Timer(self, wx.NewId())
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
100 self.Bind(wx.EVT_TIMER, self.session.poll, self.poll_timer)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
101 self.poll_timer.Start(100)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
102 self.ping_timer = wx.Timer(self, wx.NewId())
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
103 self.Bind(wx.EVT_TIMER, self.session.update, self.ping_timer)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
104
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
105 # create roller manager
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
106 self.DiceManager = DiceManager(settings.get_setting("dieroller"))
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
107 component.add('DiceManager', self.DiceManager)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
108
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
109 #create password manager --SD 8/03
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
110 self.password_manager = component.get('password_manager')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
111 component.add("session", self.session)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
112 component.add('frame', self)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
113
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
114 # build frame windows
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
115 self.build_menu()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
116 self.build_gui()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
117 self.build_hotkeys()
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
118
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
119 logger.debug("GUI Built")
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
120 component.add("chat",self.chat)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
121 component.add("map",self.map)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
122 component.add("alias", self.aliaslib)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
123
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
124 logger.debug("openrpg components all added")
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
125 self.tree.load_tree(settings.get_setting("gametree"))
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
126 logger.debug("Tree Loaded")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
127 self.players.size_cols()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
128
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
129 #Load the Plugins This has to be after the chat component has been added
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
130 component.add('pluginmenu', self.pluginMenu)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
131 self.pluginsFrame.Start()
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
132 logger.debug("plugins reloaded and startup plugins launched")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
133 self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
134
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
135 #Load Update Manager
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
136 component.add('updatemana', self.updateMana)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
137 logger.debug("update manager reloaded")
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
138 self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
139
14
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
140 #Load Update Manager
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
141 component.add('debugconsole', self.debugger)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
142 logger.debug("debugger window")
14
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
143 self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
144
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
145 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
146 def post_show_init(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
147 """Some Actions need to be done after the main fram is drawn"""
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
148 self.players.size_cols()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
149
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
150 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
151 def get_activeplugins(self):
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
152 try: tmp = self.pluginsFrame.get_activeplugins()
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
153 except: tmp = {}
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
154 return tmp
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
155
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
156 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
157 def get_startplugins(self):
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
158 try: tmp = self.pluginsFrame.get_startplugins()
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
159 except: tmp = {}
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
160 return tmp
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
161
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
162 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
163 def on_password_signal(self,signal,type,id,data):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
164 try:
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
165 msg = ["DEBUG: password response= ",
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
166 str(signal),
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
167 " (T:",
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
168 str(type),
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
169 " #",
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
170 str(id),
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
171 ")"]
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
172 logger.debug("".join(msg))
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
173 id = int(id)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
174 type = str(type)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
175 data = str(data)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
176 signal = str(signal)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
177 if signal == "fail":
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
178 if type == "server": self.password_manager.ClearPassword("server", 0)
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
179 elif type == "admin": self.password_manager.ClearPassword("admin", int(id))
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
180 elif type == "room": self.password_manager.ClearPassword("room", int(id))
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
181 else: pass
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
182 except: traceback.print_exc()
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
183
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
184 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
185 def build_menu(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
186 menu = \
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
187 [[
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
188 ['&OpenRPG'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
189 [' &Settings\tCtrl-S'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
190 [' -'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
191 [' Tab Styles'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
192 [' Slanted'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
193 [' Colorful', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
194 [' Black and White', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
195 [' Aqua', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
196 [' Custom', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
197 [' Flat'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
198 [' Black and White', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
199 [' Aqua', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
200 [' Custom', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
201 [' NewMap'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
202 [' -'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
203 [' &Exit']
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
204 ],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
205 [
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
206 ['&Game Server'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
207 [' &Browse Servers\tCtrl-B'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
208 [' -'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
209 [' Server Heartbeat', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
210 [' -'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
211 [' &Start Server']
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
212 ],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
213 [
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
214 ['&Tools'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
215 [' Logging Level'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
216 [' Debug', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
217 [' Note', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
218 [' Info', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
219 [' General', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
220 [' -'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
221 [' Password Manager', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
222 [' -'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
223 [' Sound Toolbar', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
224 [' Dice Bar\tCtrl-D', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
225 [' Map Bar', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
226 [' Status Bar\tCtrl-T', "check"],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
227 ],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
228 [
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
229 ['&Help'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
230 [' &About'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
231 [' Online User Guide'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
232 [' Change Log'],
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
233 [' Report a Bug']
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
234 ]]
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
235
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
236 self.mainmenu = MenuBarEx(self, menu)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
237 if settings.get_setting('Heartbeat') == '1':
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
238 self.mainmenu.SetMenuState("GameServerServerHeartbeat", True)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
239
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
240 tabtheme = settings.get_setting('TabTheme') #This change is stable. TaS.
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
241 self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedColorful", tabtheme == 'slanted&colorful')
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
242 self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedBlackandWhite", tabtheme == 'slanted&bw')
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
243 self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedAqua", tabtheme == 'slanted&aqua')
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
244 self.mainmenu.SetMenuState("OpenRPGTabStylesFlatBlackandWhite", tabtheme == 'flat&bw')
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
245 self.mainmenu.SetMenuState("OpenRPGTabStylesFlatAqua", tabtheme == 'flat&aqua')
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
246 self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedCustom", tabtheme == 'customslant')
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
247 self.mainmenu.SetMenuState("OpenRPGTabStylesFlatCustom", tabtheme == 'customflat')
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
248
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
249 lvl = int(settings.get_setting('LoggingLevel'))
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
250 if lvl & ORPG_DEBUG: self.mainmenu.SetMenuState("ToolsLoggingLevelDebug", True)
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
251 if lvl & ORPG_DEBUG: self.mainmenu.SetMenuState("ToolsLoggingLevelNote", True)
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
252 if lvl & ORPG_INFO: self.mainmenu.SetMenuState("ToolsLoggingLevelInfo", True)
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
253 if lvl & ORPG_GENERAL: self.mainmenu.SetMenuState("ToolsLoggingLevelGeneral", True)
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
254
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
255 self.pluginMenu = wx.Menu()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
256 item = wx.MenuItem(self.pluginMenu, wx.ID_ANY, "Control Panel", "Control Panel")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
257 self.Bind(wx.EVT_MENU, self.OnMB_PluginControlPanel, item)
14
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
258
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
259 self.pluginMenu.AppendItem(item)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
260 self.pluginMenu.AppendSeparator()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
261 self.mainmenu.Insert(2, self.pluginMenu, "&Plugins")
14
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
262
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
263 # Traipse Suite of Additions.
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
264 self.traipseSuite = wx.Menu()
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
265 self.mainmenu.Insert(5, self.traipseSuite, "&Traipse Suite")
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
266
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
267 mana = wx.MenuItem(self.traipseSuite, wx.ID_ANY, "Update Manager", "Update Manager")
14
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
268 self.Bind(wx.EVT_MENU, self.OnMB_UpdateManagerPanel, mana)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
269 self.traipseSuite.AppendItem(mana)
14
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
270
27
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
271 self.debugConsole = wx.MenuItem(self.traipseSuite, -1, "Debug Console", "Debug Console")
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
272 self.Bind(wx.EVT_MENU, self.OnMB_DebugConsole, self.debugConsole)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
273 self.traipseSuite.AppendItem(self.debugConsole)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
274
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
275 def TraipseSuiteWarn(self, menuitem):
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
276 ### Beta ### Allows for the reuse of the 'Attention' menu.
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
277 ### component.get('frame').TraipseSuiteWarn('item') ### Portable
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
278 self.mainmenu.Replace(8, self.traipseSuite, '&Traipse Suite!')
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
279 if menuitem == 'debug':
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
280 if self.debugger.IsShown() == True:
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
281 self.mainmenu.Replace(8, self.traipseSuite, '&Traipse Suite')
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
282 else:
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
283 self.debugConsole.SetBitmap(wx.Bitmap(dir_struct["icon"] + 'spotlight.png'))
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
284 self.traipseSuite.RemoveItem(self.debugConsole)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
285 self.traipseSuite.AppendItem(self.debugConsole)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
286
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
287 def TraipseSuiteWarnCleanup(self, menuitem):
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
288 ### Beta ### Allows for portable cleanup of the 'Attention' menu.
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
289 ### component.get('frame').TraipseSuiteWarnCleanup('item') ### Portable
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
290 self.mainmenu.Replace(8, self.traipseSuite, '&Traipse Suite')
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
291 if menuitem == 'debug':
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
292 self.traipseSuite.RemoveItem(self.debugConsole)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
293 self.debugConsole.SetBitmap(wx.Bitmap(dir_struct["icon"] + 'clear.gif'))
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
294 self.traipseSuite.AppendItem(self.debugConsole)
14
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
295
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
296
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
297 #################################
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
298 ## All Menu Events
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
299 #################################
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
300 #Tab Styles Menus
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
301 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
302 def SetTabStyles(self, *args, **kwargs):
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
303
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
304 tabtheme = settings.get_setting('TabTheme') #This change is stable. TaS.
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
305 self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedColorful", tabtheme == 'slanted&colorful')
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
306 self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedBlackandWhite", tabtheme == 'slanted&bw')
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
307 self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedAqua", tabtheme == 'slanted&aqua')
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
308 self.mainmenu.SetMenuState("OpenRPGTabStylesFlatBlackandWhite", tabtheme == 'flat&bw')
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
309 self.mainmenu.SetMenuState("OpenRPGTabStylesFlatAqua", tabtheme == 'flat&aqua')
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
310 self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedCustom", tabtheme == 'customslant')
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
311 self.mainmenu.SetMenuState("OpenRPGTabStylesFlatCustom", tabtheme == 'customflat')
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
312
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
313 if kwargs.has_key('style'): newstyle = kwargs['style']
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
314 else:
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
315 try: newstyle = args[1]
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
316 except: logger.general('Invalid Syntax for orpgFrame->SetTabStyles(self, *args, **kwargs)'); return
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
317 if kwargs.has_key('menu'): menu = kwargs['menu']
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
318 else:
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
319 try: menu = args[0]
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
320 except: logger.general('Invalid Syntax for orpgFrame->SetTabStyles(self, *args, **kwargs)'); return
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
321
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
322 if kwargs.has_key('graidentTo'): graidentTo = kwargs['graidentTo']
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
323 else: graidentTo = None
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
324 if kwargs.has_key('graidentFrom'): graidentFrom = kwargs['graidentFrom']
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
325 else: graidentFrom = None
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
326 if kwargs.has_key('textColor'): textColor = kwargs['textColor']
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
327 else: textColor = None
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
328
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
329 #Run though the current tabbed window list and remove those that have been closed
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
330 tabbedwindows = component.get("tabbedWindows")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
331 new = []
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
332 for wnd in tabbedwindows:
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
333 try: style = wnd.GetWindowStyleFlag(); new.append(wnd)
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
334 except: pass
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
335 tabbedwindows = new
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
336 component.add("tabbedWindows", tabbedwindows)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
337
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
338 #Run though the new list and set the proper styles
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
339 tabbg = settings.get_setting('TabBackgroundGradient')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
340 (red, green, blue) = self.rgb.rgb_tuple(tabbg)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
341
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
342 for wnd in tabbedwindows:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
343 style = wnd.GetWindowStyleFlag()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
344 # remove old tabs style
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
345 mirror = ~(FNB.FNB_VC71 | FNB.FNB_VC8 | FNB.FNB_FANCY_TABS | FNB.FNB_COLORFUL_TABS)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
346 style &= mirror
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
347 style |= newstyle
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
348 wnd.SetWindowStyleFlag(style)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
349 wnd.SetTabAreaColour(wx.Color(red, green, blue))
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
350 if graidentTo != None: wnd.SetGradientColourTo(graidentTo)
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
351 if graidentFrom != None: wnd.SetGradientColourFrom(graidentFrom)
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
352 if textColor != None: wnd.SetNonActiveTabTextColour(textColor)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
353 wnd.Refresh()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
354
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
355 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
356 def OnMB_OpenRPGNewMap(self):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
357 pass #Not Implemented yet!
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
358
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
359 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
360 def OnMB_OpenRPGTabStylesSlantedColorful(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
361 if self.mainmenu.GetMenuState("OpenRPGTabStylesSlantedColorful"):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
362 settings.set_setting('TabTheme', 'slanted&colorful')
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
363 self.SetTabStyles("OpenRPGTabStylesSlantedColorful", FNB.FNB_VC8|FNB.FNB_COLORFUL_TABS)
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
364 else: self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedColorful", True)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
365
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
366 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
367 def OnMB_OpenRPGTabStylesSlantedBlackandWhite(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
368 if self.mainmenu.GetMenuState("OpenRPGTabStylesSlantedBlackandWhite"):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
369 settings.set_setting('TabTheme', 'slanted&bw')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
370 self.SetTabStyles("OpenRPGTabStylesSlantedBlackandWhite",
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
371 FNB.FNB_VC8, graidentTo=wx.WHITE, graidentFrom=wx.WHITE, textColor=wx.BLACK)
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
372 else: self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedBlackandWhite", True)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
373
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
374 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
375 def OnMB_OpenRPGTabStylesSlantedAqua(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
376 if self.mainmenu.GetMenuState("OpenRPGTabStylesSlantedAqua"):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
377 settings.set_setting('TabTheme', 'slanted&aqua')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
378 self.SetTabStyles("OpenRPGTabStylesSlantedAqua", FNB.FNB_VC8,
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
379 graidentTo=wx.Color(0, 128, 255), graidentFrom=wx.WHITE, textColor=wx.BLACK)
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
380 else: self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedAqua", True)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
381
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
382 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
383 def OnMB_OpenRPGTabStylesSlantedCustom(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
384 if self.mainmenu.GetMenuState("OpenRPGTabStylesSlantedCustom"):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
385 settings.set_setting('TabTheme', 'customslant')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
386 gfrom = settings.get_setting('TabGradientFrom')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
387 (fred, fgreen, fblue) = self.rgb.rgb_tuple(gfrom)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
388 gto = settings.get_setting('TabGradientTo')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
389 (tored, togreen, toblue) = self.rgb.rgb_tuple(gto)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
390 tabtext = settings.get_setting('TabTextColor')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
391 (tred, tgreen, tblue) = self.rgb.rgb_tuple(tabtext)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
392 tabbg = settings.get_setting('TabBackgroundGradient')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
393 (red, green, blue) = self.rgb.rgb_tuple(tabbg)
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
394 self.SetTabStyles("OpenRPGTabStylesSlantedCustom", FNB.FNB_VC8,
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
395 graidentTo=wx.Color(tored, togreen, toblue), graidentFrom=wx.Color(fred, fgreen, fblue),
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
396 textColor=wx.Color(tred, tgreen, tblue))
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
397 else: self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedCustom", True)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
398
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
399 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
400 def OnMB_OpenRPGTabStylesFlatBlackandWhite(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
401 if self.mainmenu.GetMenuState("OpenRPGTabStylesFlatBlackandWhite"):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
402 settings.set_setting('TabTheme', 'flat&bw')
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
403 self.SetTabStyles("OpenRPGTabStylesFlatBlackandWhite", FNB.FNB_FANCY_TABS,
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
404 graidentTo=wx.WHITE, graidentFrom=wx.WHITE, textColor=wx.BLACK)
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
405 else: self.mainmenu.SetMenuState("OpenRPGTabStylesFlatBlackandWhite", True)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
406
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
407 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
408 def OnMB_OpenRPGTabStylesFlatAqua(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
409 if self.mainmenu.GetMenuState("OpenRPGTabStylesFlatAqua"):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
410 settings.set_setting('TabTheme', 'flat&aqua')
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
411 self.SetTabStyles("OpenRPGTabStylesFlatAqua", FNB.FNB_FANCY_TABS,
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
412 graidentTo=wx.Color(0, 128, 255), graidentFrom=wx.WHITE, textColor=wx.BLACK)
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
413 else: self.mainmenu.SetMenuState("OpenRPGTabStylesFlatAqua", True)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
414
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
415 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
416 def OnMB_OpenRPGTabStylesFlatCustom(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
417 if self.mainmenu.GetMenuState("OpenRPGTabStylesFlatCustom"):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
418 settings.set_setting('TabTheme', 'customflat')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
419 gfrom = settings.get_setting('TabGradientFrom')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
420 (fred, fgreen, fblue) = self.rgb.rgb_tuple(gfrom)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
421 gto = settings.get_setting('TabGradientTo')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
422 (tored, togreen, toblue) = self.rgb.rgb_tuple(gto)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
423 tabtext = settings.get_setting('TabTextColor')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
424 (tred, tgreen, tblue) = self.rgb.rgb_tuple(tabtext)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
425 tabbg = settings.get_setting('TabBackgroundGradient')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
426 (red, green, blue) = self.rgb.rgb_tuple(tabbg)
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
427 self.SetTabStyles("OpenRPGTabStylesFlatCustom", FNB.FNB_FANCY_TABS,
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
428 graidentTo=wx.Color(tored, togreen, toblue), graidentFrom=wx.Color(fred, fgreen, fblue),
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
429 textColor=wx.Color(tred, tgreen, tblue))
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
430 else: self.mainmenu.SetMenuState("OpenRPGTabStylesFlatCustom", True)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
431
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
432 #Window Menu
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
433 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
434 def OnMB_WindowsMenu(self, event):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
435 menuid = event.GetId()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
436 name = self.mainwindows[menuid]
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
437 if name == 'Alias Lib':
17
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
438 if self.aliaslib.IsShown(): self.aliaslib.Hide()
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
439 else: self.aliaslib.Show()
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
440 else:
17
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
441 if self._mgr.GetPane(name).IsShown(): self._mgr.GetPane(name).Hide()
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
442 else: self._mgr.GetPane(name).Show()
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
443 self._mgr.Update()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
444
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
445 #OpenRPG Menu
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
446 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
447 def OnMB_OpenRPGSettings(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
448 dlg = orpg.tools.orpg_settings.orpgSettingsWnd(self)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
449 dlg.Centre()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
450 dlg.ShowModal()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
451
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
452 def OnMB_OpenRPGExit(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
453 self.OnCloseWindow(0)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
454
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
455 #Game Server Menu
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
456 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
457 def OnMB_GameServerBrowseServers(self):
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
458 if self._mgr.GetPane("Browse Server Window").IsShown() == True: self._mgr.GetPane("Browse Server Window").Hide()
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
459 else: self._mgr.GetPane("Browse Server Window").Show()
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
460 self._mgr.Update()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
461
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
462 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
463 def OnMB_GameServerServerHeartbeat(self):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
464 if self.mainmenu.GetMenuState("GameServerServerHeartbeat"): settings.set_setting('Heartbeat', '1')
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
465 else: settings.set_setting('Heartbeat', '0')
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
466
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
467 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
468 def OnMB_GameServerStartServer(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
469 start_dialog = wx.ProgressDialog( "Server Loading", "Server Loading, Please Wait...", 1, self )
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
470 # Spawn the new process and close the stdout handle from it
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
471 start_dialog.Update( 0 )
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
472 # Adjusted following code to work with win32, can't test for Unix
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
473 # as per reported bug 586227
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
474 if wx.Platform == "__WXMSW__":
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
475 arg = '\"' + os.path.normpath(dir_struct["home"] + 'start_server_gui.py') + '\"'
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
476 args = ( sys.executable, arg )
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
477 else:
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
478 arg = dir_struct["home"] + 'start_server_gui.py'
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
479 args = (arg,arg)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
480 os.spawnv( os.P_NOWAIT, sys.executable, args )
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
481 start_dialog.Update( 1 )
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
482 start_dialog.Show(False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
483 start_dialog.Destroy()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
484
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
485 # Tools Menu
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
486 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
487 def OnMB_PluginControlPanel(self, evt):
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
488 if self.pluginsFrame.IsShown() == True: self.pluginsFrame.Hide()
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
489 else: self.pluginsFrame.Show()
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
490
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
491 @debugging
14
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
492 def OnMB_UpdateManagerPanel(self, evt):
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
493 if self.updateMana.IsShown() == True: self.updateMana.Hide()
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
494 else: self.updateMana.Show()
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
495
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
496 @debugging
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
497 def OnMB_DebugConsole(self, evt):
27
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
498 self.TraipseSuiteWarnCleanup('debug') ### Beta ###
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
499 if self.debugger.IsShown() == True: self.debugger.Hide()
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
500 else: self.debugger.Show()
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
501
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
502 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
503 def OnMB_ToolsLoggingLevelDebug(self):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
504 lvl = logger.log_level
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
505 if self.mainmenu.GetMenuState("ToolsLoggingLevelDebug"): lvl |= ORPG_DEBUG
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
506 else: lvl &= ~ORPG_DEBUG
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
507 logger.log_level = lvl
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
508 settings.set('LoggingLevel', lvl)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
509
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
510 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
511 def OnMB_ToolsLoggingLevelNote(self):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
512 lvl = logger.log_level
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
513 if self.mainmenu.GetMenuState("ToolsLoggingLevelNote"): lvl |= ORPG_DEBUG
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
514 else: lvl &= ~ORPG_DEBUG
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
515 logger.log_level = lvl
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
516 settings.set('LoggingLevel', lvl)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
517
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
518 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
519 def OnMB_ToolsLoggingLevelInfo(self):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
520 lvl = logger.log_level
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
521 if self.mainmenu.GetMenuState("ToolsLoggingLevelInfo"): lvl |= ORPG_INFO
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
522 else: lvl &= ~ORPG_INFO
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
523 logger.log_level = lvl
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
524 settings.set('LoggingLevel', lvl)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
525
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
526 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
527 def OnMB_ToolsLoggingLevelGeneral(self):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
528 lvl = logger.log_level
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
529 if self.mainmenu.GetMenuState("ToolsLoggingLevelGeneral"): lvl |= ORPG_GENERAL
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
530 else: lvl &= ~ORPG_GENERAL
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
531 logger.log_level = lvl
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
532 settings.set('LoggingLevel', lvl)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
533
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
534 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
535 def OnMB_ToolsPasswordManager(self):
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
536 if self.mainmenu.GetMenuState("ToolsPasswordManager"): self.password_manager.Enable()
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
537 else: self.password_manager.Disable()
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
538
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
539 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
540 def OnMB_ToolsStatusBar(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
541 if self._mgr.GetPane("Status Window").IsShown() == True:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
542 self.mainmenu.SetMenuState("ToolsStatusBar", False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
543 self._mgr.GetPane("Status Window").Hide()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
544 else:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
545 self.mainmenu.SetMenuState("ToolsStatusBar", True)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
546 self._mgr.GetPane("Status Window").Show()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
547 self._mgr.Update()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
548
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
549 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
550 def OnMB_ToolsSoundToolbar(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
551 if self._mgr.GetPane("Sound Control Toolbar").IsShown() == True:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
552 self.mainmenu.SetMenuState("ToolsSoundToolbar", False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
553 self._mgr.GetPane("Sound Control Toolbar").Hide()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
554 else:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
555 self.mainmenu.SetMenuState("ToolsSoundToolbar", True)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
556 self._mgr.GetPane("Sound Control Toolbar").Show()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
557 self._mgr.Update()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
558
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
559 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
560 def OnMB_ToolsDiceBar(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
561 if self._mgr.GetPane("Dice Tool Bar").IsShown() == True:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
562 self.mainmenu.SetMenuState("ToolsDiceBar", False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
563 self._mgr.GetPane("Dice Tool Bar").Hide()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
564 else:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
565 self.mainmenu.SetMenuState("ToolsDiceBar", True)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
566 self._mgr.GetPane("Dice Tool Bar").Show()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
567 self._mgr.Update()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
568
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
569 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
570 def OnMB_ToolsMapBar(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
571 if self._mgr.GetPane("Map Tool Bar").IsShown() == True:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
572 self.mainmenu.SetMenuState("ToolsMapBar", False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
573 self._mgr.GetPane("Map Tool Bar").Hide()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
574 else:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
575 self.mainmenu.SetMenuState("ToolsMapBar", True)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
576 self._mgr.GetPane("Map Tool Bar").Show()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
577 self._mgr.Update()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
578
14
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
579 #Help Menu #Needs a custom Dialog because it is ugly on Windows
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
580 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
581 def OnMB_HelpAbout(self):
27
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
582 if self.AboutORPG.IsShown() == True: self.AboutORPG.Hide()
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
583 else: self.AboutORPG.Show()
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
584
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
585 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
586 def OnMB_HelpOnlineUserGuide(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
587 wb = webbrowser.get()
27
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
588 wb.open("http://www.assembla.com/wiki/show/traipse/User_Manual")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
589
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
590 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
591 def OnMB_HelpChangeLog(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
592 wb = webbrowser.get()
27
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
593 wb.open("http://www.assembla.com/spaces/milestones/index/traipse?spaces_tool_id=Milestones")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
594
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
595 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
596 def OnMB_HelpReportaBug(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
597 wb = webbrowser.get()
4
4b93aa8c46a2 Patch to main. Changes About Dialog and removes approot files which hurt location
sirebral
parents: 0
diff changeset
598 wb.open("http://www.assembla.com/spaces/tickets/index/traipse_dev?spaces_tool_id=Tickets")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
599
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
600
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
601 #################################
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
602 ## Build the GUI
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
603 #################################
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
604 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
605 def build_gui(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
606 self.Freeze()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
607 self.validate.config_file("layout.xml","default_layout.xml")
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
608
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
609 filename = dir_struct["user"] + "layout.xml"
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
610 temp_file = open(filename)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
611 txt = temp_file.read()
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
612 xml_dom = xml.parseXml(txt)._get_documentElement()
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
613 temp_file.close()
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
614
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
615 """ Would a component work better?
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
616 etree = ElementTree()
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
617 with open(dir_struct['user'] + 'layout.xml') as f:
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
618 etree.parse(f)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
619
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
620 base = etree.getroot()
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
621 """
17
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
622 self.windowsmenu = wx.Menu()
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
623 self.mainwindows = {}
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
624
27
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
625 # About Window
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
626 self.AboutORPG = AboutORPG(self)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
627
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
628 #Plugins Window
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
629 self.pluginsFrame = pluginUI.PluginFrame(self)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
630 component.add("plugins", self.get_activeplugins())
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
631 component.add("startplugs", self.get_startplugins())
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
632 logger.debug("Menu Created")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
633 h = int(xml_dom.getAttribute("height"))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
634 w = int(xml_dom.getAttribute("width"))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
635 posx = int(xml_dom.getAttribute("posx"))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
636 posy = int(xml_dom.getAttribute("posy"))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
637 maximized = int(xml_dom.getAttribute("maximized"))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
638 self.SetDimensions(posx, posy, w, h)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
639 logger.debug("Dimensions Set")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
640
27
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
641 # Update Manager
14
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
642 self.manifest = manifest.ManifestChanges()
17
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
643 self.updateMana = upmana.updatemana.updaterFrame(self,
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
644 "OpenRPG Update Manager Beta 0.8", component, self.manifest, True)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
645 logger.debug("Menu Created")
14
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
646 h = int(xml_dom.getAttribute("height"))
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
647 w = int(xml_dom.getAttribute("width"))
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
648 posx = int(xml_dom.getAttribute("posx"))
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
649 posy = int(xml_dom.getAttribute("posy"))
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
650 maximized = int(xml_dom.getAttribute("maximized"))
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
651 self.SetDimensions(posx, posy, w, h)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
652 logger.debug("Dimensions Set")
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
653
27
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
654 # Debug Console
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
655 self.debugger = orpg.tools.orpg_log.DebugConsole(self)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
656 logger.debug("Menu Created")
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
657 h = int(xml_dom.getAttribute("height"))
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
658 w = int(xml_dom.getAttribute("width"))
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
659 posx = int(xml_dom.getAttribute("posx"))
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
660 posy = int(xml_dom.getAttribute("posy"))
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
661 maximized = int(xml_dom.getAttribute("maximized"))
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
662 self.SetDimensions(posx, posy, w, h)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
663 logger.debug("Dimensions Set")
14
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
664
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
665 # Sound Manager
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
666 self.sound_player = orpg.tools.orpg_sound.orpgSound(self)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
667 component.add("sound", self.sound_player)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
668 wndinfo = AUI.AuiPaneInfo()
17
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
669 menuid = wx.NewId()
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
670 self.mainwindows[menuid] = "Sound Control Toolbar"
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
671 wndinfo.DestroyOnClose(False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
672 wndinfo.Name("Sound Control Toolbar")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
673 wndinfo.Caption("Sound Control Toolbar")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
674 wndinfo.Float()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
675 wndinfo.ToolbarPane()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
676 wndinfo.Hide()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
677 self._mgr.AddPane(self.sound_player, wndinfo)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
678 children = xml_dom._get_childNodes()
17
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
679 for c in children: self.build_window(c, self)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
680
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
681 # status window
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
682 self.status = status_bar(self)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
683 wndinfo = AUI.AuiPaneInfo()
17
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
684 menuid = wx.NewId()
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
685 self.mainwindows[menuid] = "Status Window"
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
686 wndinfo.DestroyOnClose(False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
687 wndinfo.Name("Status Window")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
688 wndinfo.Caption("Status Window")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
689 wndinfo.Float()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
690 wndinfo.ToolbarPane()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
691 wndinfo.Hide()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
692 self._mgr.AddPane(self.status, wndinfo)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
693 logger.debug("Status Window Created")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
694
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
695 # Create and show the floating dice toolbar
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
696 self.dieToolBar = orpg.tools.toolBars.DiceToolBar(self, callBack = self.chat.ParsePost)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
697 wndinfo = AUI.AuiPaneInfo()
17
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
698 menuid = wx.NewId()
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
699 self.mainwindows[menuid] = "Dice Tool Bar"
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
700 wndinfo.DestroyOnClose(False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
701 wndinfo.Name("Dice Tool Bar")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
702 wndinfo.Caption("Dice Tool Bar")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
703 wndinfo.Float()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
704 wndinfo.ToolbarPane()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
705 wndinfo.Hide()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
706 self._mgr.AddPane(self.dieToolBar, wndinfo)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
707 logger.debug("Dice Tool Bar Created")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
708
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
709 #Create the Map tool bar
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
710 self.mapToolBar = orpg.tools.toolBars.MapToolBar(self, callBack = self.map.MapBar)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
711 wndinfo = AUI.AuiPaneInfo()
17
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
712 menuid = wx.NewId()
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
713 self.mainwindows[menuid] = "Map Tool Bar"
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
714 wndinfo.DestroyOnClose(False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
715 wndinfo.Name("Map Tool Bar")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
716 wndinfo.Caption("Map Tool Bar")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
717 wndinfo.Float()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
718 wndinfo.ToolbarPane()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
719 wndinfo.Hide()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
720 self._mgr.AddPane(self.mapToolBar, wndinfo)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
721 logger.debug("Map Tool Bar Created")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
722
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
723 #Create the Browse Server Window #Turn into frame, as with others.
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
724 self.gs = orpg.networking.gsclient.game_server_panel(self)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
725 wndinfo = AUI.AuiPaneInfo()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
726 wndinfo.DestroyOnClose(False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
727 wndinfo.Name("Browse Server Window")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
728 wndinfo.Caption("Game Server")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
729 wndinfo.Float()
27
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
730 wndinfo.FloatingPosition((50,50))
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
731 wndinfo.Dockable(False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
732 wndinfo.MinSize(wx.Size(640,480))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
733 wndinfo.Hide()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
734 self._mgr.AddPane(self.gs, wndinfo)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
735 logger.debug("Game Server Window Created")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
736
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
737 #Create the Alias Lib Window
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
738 self.aliaslib = orpg.tools.aliaslib.AliasLib()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
739 self.aliaslib.Hide()
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
740 logger.debug("Alias Window Created")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
741 menuid = wx.NewId()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
742 self.windowsmenu.Append(menuid, "Alias Lib", kind=wx.ITEM_CHECK)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
743 self.windowsmenu.Check(menuid, False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
744 self.Bind(wx.EVT_MENU, self.OnMB_WindowsMenu, id=menuid)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
745 self.mainwindows[menuid] = "Alias Lib"
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
746 self.mainmenu.Insert(3, self.windowsmenu, 'Windows')
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
747 logger.debug("Windows Menu Done")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
748 self._mgr.Update()
17
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
749 if wx.VERSION_STRING > "2.8": self.Bind(AUI.EVT_AUI_PANE_CLOSE, self.onPaneClose)
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
750 else: self.Bind(AUI.EVT_AUI_PANECLOSE, self.onPaneClose)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
751 logger.debug("AUI Bindings Done")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
752
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
753 #Load the layout if one exists
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
754 layout = xml_dom.getElementsByTagName("DockLayout")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
755 try:
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
756 textnode = xml.safe_get_text_node(layout[0])
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
757 self._mgr.LoadPerspective(textnode._get_nodeValue())
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
758 except: pass
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
759 xml_dom.unlink()
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
760 logger.debug("Perspective Loaded")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
761 self._mgr.GetPane("Browse Server Window").Hide()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
762 self._mgr.Update()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
763 self.Maximize(maximized)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
764 logger.debug("GUI is all created")
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
765 self.Thaw()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
766
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
767 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
768 def do_tab_window(self,xml_dom,parent_wnd):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
769 #def do_tab_window(self, etreeEl, parent_wnd):
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
770 # if container window loop through childern and do a recursive call
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
771 temp_wnd = orpgTabberWnd(parent_wnd, style=FNB.FNB_ALLOW_FOREIGN_DND)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
772
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
773 children = xml_dom._get_childNodes()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
774 for c in children:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
775 wnd = self.build_window(c,temp_wnd)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
776 name = c.getAttribute("name")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
777 temp_wnd.AddPage(wnd, name, False)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
778
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
779 """
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
780 for c in etreeEl.getchildren():
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
781 wnd = self.build_window(c, temp_wnd)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
782 temp_wnd.AddPage(wnd, c.get('name'), False)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
783 """
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
784 return temp_wnd
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
785
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
786 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
787 def build_window(self, xml_dom, parent_wnd):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
788 name = xml_dom._get_nodeName()
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
789 if name == "DockLayout" or name == "dock": return
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
790 dirc = xml_dom.getAttribute("direction") #should NOT use dir, it is a built in function.
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
791 pos = xml_dom.getAttribute("pos")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
792 height = xml_dom.getAttribute("height")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
793 width = xml_dom.getAttribute("width")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
794 cap = xml_dom.getAttribute("caption")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
795 dockable = xml_dom.getAttribute("dockable")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
796 layer = xml_dom.getAttribute("layer")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
797
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
798 try: layer = int(layer); dockable = int(dockable)
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
799 except: layer = 0; dockable = 1
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
800
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
801 if name == "tab": temp_wnd = self.do_tab_window(xml_dom, parent_wnd)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
802 elif name == "map":
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
803 temp_wnd = orpg.mapper.map.map_wnd(parent_wnd, -1)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
804 self.map = temp_wnd
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
805 elif name == "tree":
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
806 temp_wnd = orpg.gametree.gametree.game_tree(parent_wnd, -1)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
807 self.tree = temp_wnd
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
808 if settings.get_setting('ColorTree') == '1':
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
809 self.tree.SetBackgroundColour(settings.get_setting('bgcolor'))
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
810 self.tree.SetForegroundColour(settings.get_setting('textcolor'))
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
811 else:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
812 self.tree.SetBackgroundColour('white')
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
813 self.tree.SetForegroundColour('black')
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
814
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
815 elif name == "chat":
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
816 temp_wnd = orpg.chat.chatwnd.chat_notebook(parent_wnd, wx.DefaultSize)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
817 self.chattabs = temp_wnd
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
818 self.chat = temp_wnd.MainChatPanel
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
819
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
820 elif name == "player":
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
821 temp_wnd = orpg.player_list.player_list(parent_wnd)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
822 self.players = temp_wnd
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
823 if settings.get_setting('ColorTree') == '1':
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
824 self.players.SetBackgroundColour(settings.get_setting('bgcolor'))
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
825 self.players.SetForegroundColour(settings.get_setting('textcolor'))
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
826 else:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
827 self.players.SetBackgroundColour('white')
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
828 self.players.SetForegroundColour('black')
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
829
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
830 if parent_wnd != self: return temp_wnd
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
831 menuid = wx.NewId()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
832 self.windowsmenu.Append(menuid, cap, kind=wx.ITEM_CHECK)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
833 self.windowsmenu.Check(menuid, True)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
834 self.Bind(wx.EVT_MENU, self.OnMB_WindowsMenu, id=menuid)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
835 self.mainwindows[menuid] = cap
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
836 wndinfo = AUI.AuiPaneInfo()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
837 wndinfo.DestroyOnClose(False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
838 wndinfo.Name(cap)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
839 wndinfo.FloatingSize(wx.Size(int(width), int(height)))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
840 wndinfo.BestSize(wx.Size(int(width), int(height)))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
841 wndinfo.Layer(int(layer))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
842 wndinfo.Caption(cap)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
843
10
5df1340bda13 Big patch! Linux GUI, Fetching Dict., Init2, Streaming lining.
sirebral
parents: 4
diff changeset
844 # Lambda here should work! (future dev)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
845 if dirc.lower() == 'top': wndinfo.Top()
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
846 elif dirc.lower() == 'bottom': wndinfo.Bottom()
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
847 elif dirc.lower() == 'left': wndinfo.Left()
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
848 elif dirc.lower() == 'right': wndinfo.Right()
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
849 elif dirc.lower() == 'center': wndinfo.Center(); wndinfo.CaptionVisible(False)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
850
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
851 if dockable != 1:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
852 wndinfo.Dockable(False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
853 wndinfo.Floatable(False)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
854 if pos != '' or pos != '0' or pos != None:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
855 wndinfo.Position(int(pos))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
856 wndinfo.Show()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
857 self._mgr.AddPane(temp_wnd, wndinfo)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
858 return temp_wnd
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
859
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
860 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
861 def onPaneClose(self, evt):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
862 pane = evt.GetPane()
17
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
863 #Arbitrary If ELIF fix. Items had incorrect ID's set. Finding correct ID will fix it for the iteration.
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
864 #Adding ID also fixed docking. Go figure.
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
865 if pane.name == 'Sound Control Toolbar': self.mainmenu.SetMenuState('ToolsSoundToolbar', False)
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
866 elif pane.name == 'Status Window': self.mainmenu.SetMenuState('ToolsStatusBar', False)
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
867 elif pane.name == 'Dice Tool Bar': self.mainmenu.SetMenuState('ToolsDiceBar', False)
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
868 elif pane.name == 'Map Tool Bar': self.mainmenu.SetMenuState('ToolsMapBar', False)
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
869 else:
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
870 for wndid, wname in self.mainwindows.iteritems():
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
871 #print pane.name, wname, wndid
265b987cce4f Traipse 'OpenRPG' {090813-00}
sirebral
parents: 14
diff changeset
872 if pane.name == wname: self.windowsmenu.Check(wndid, False); break
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
873 evt.Skip()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
874 self._mgr.Update()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
875
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
876 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
877 def saveLayout(self):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
878 filename = dir_struct["user"] + "layout.xml"
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
879 temp_file = open(filename)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
880 txt = temp_file.read()
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
881 xml_dom = xml.parseXml(txt)._get_documentElement()
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
882 temp_file.close()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
883 (x_size,y_size) = self.GetClientSize()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
884 (x_pos,y_pos) = self.GetPositionTuple()
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
885 if self.IsMaximized(): max = 1
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
886 else: max = 0
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
887 xml_dom.setAttribute("height", str(y_size))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
888 xml_dom.setAttribute("width", str(x_size))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
889 xml_dom.setAttribute("posx", str(x_pos))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
890 xml_dom.setAttribute("posy", str(y_pos))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
891 xml_dom.setAttribute("maximized", str(max))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
892 layout = xml_dom.getElementsByTagName("DockLayout")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
893 try:
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
894 textnode = xml.safe_get_text_node(layout[0])
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
895 textnode._set_nodeValue(str(self._mgr.SavePerspective()))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
896 except:
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
897 elem = minidom.Element('DockLayout')
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
898 elem.setAttribute("DO_NO_EDIT","True")
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
899 textnode = xml.safe_get_text_node(elem)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
900 textnode._set_nodeValue(str(self._mgr.SavePerspective()))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
901 xml_dom.appendChild(elem)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
902 temp_file = open(filename, "w")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
903 temp_file.write(xml_dom.toxml(1))
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
904 temp_file.close()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
905
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
906 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
907 def build_hotkeys(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
908 self.mainmenu.accel.xaccel.extend(self.chat.get_hot_keys())
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
909 self.mainmenu.accel.xaccel.extend(self.map.get_hot_keys())
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
910
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
911 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
912 def start_timer(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
913 self.poll_timer.Start(100)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
914 s = component.get('settings')
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
915 if s.get_setting("Heartbeat") == "1":
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
916 self.ping_timer.Start(1000*60)
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
917 logger.debug("starting heartbeat...", True)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
918
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
919 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
920 def kill_mplay_session(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
921 self.game_name = ""
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
922 self.session.start_disconnect()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
923
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
924 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
925 def quit_game(self, evt):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
926 dlg = wx.MessageDialog(self,"Exit gaming session?","Game Session",wx.YES_NO)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
927 if dlg.ShowModal() == wx.ID_YES:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
928 self.session.exitCondition.notifyAll()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
929 dlg.Destroy()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
930 self.kill_mplay_session()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
931
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
932 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
933 def on_status_event(self, evt):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
934 id = evt.get_id()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
935 status = evt.get_data()
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
936 if id == orpg.networking.mplay_client.STATUS_SET_URL: self.status.set_url(status)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
937
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
938 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
939 def on_player_event(self, evt):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
940 id = evt.get_id()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
941 player = evt.get_data()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
942 display_name = self.chat.chat_display_name(player)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
943 time_str = time.strftime("%H:%M", time.localtime())
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
944 if id == orpg.networking.mplay_client.PLAYER_NEW:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
945 self.players.add_player(player)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
946 self.chat.InfoPost(display_name + " (enter): " + time_str)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
947 elif id == orpg.networking.mplay_client.PLAYER_DEL:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
948 self.players.del_player(player)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
949 self.chat.InfoPost(display_name + " (exit): " + time_str)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
950 elif id == orpg.networking.mplay_client.PLAYER_UPDATE:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
951 self.players.update_player(player)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
952 self.players.Refresh()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
953
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
954 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
955 def on_group_event(self, evt):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
956 id = evt.get_id()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
957 data = evt.get_data()
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
958 if id == orpg.networking.mplay_client.GROUP_NEW: self.gs.add_room(data)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
959 elif id == orpg.networking.mplay_client.GROUP_DEL:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
960 self.password_manager.RemoveGroupData(data)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
961 self.gs.del_room(data)
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
962 elif id == orpg.networking.mplay_client.GROUP_UPDATE: self.gs.update_room(data)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
963
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
964 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
965 def on_receive(self, data, player):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
966 # see if we are ignoring this user
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
967 (ignore_id,ignore_name) = self.session.get_ignore_list()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
968 for m in ignore_id:
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
969 if m == player[2]: logger.debug("ignoring message from player:" + player[0], True); return
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
970
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
971 # ok we are not ignoring this message
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
972 #recvSound = "RecvSound" # this will be the default sound. Whisper will change this below
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
973 if player: display_name = self.chat.chat_display_name(player)
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
974 else: display_name = "Server Administrator"
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
975
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
976 if data[:5] == "<tree":
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
977 self.tree.on_receive_data(data,player)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
978 self.chat.InfoPost(display_name + " has sent you a tree node...")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
979
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
980 elif data[:4] == "<map": self.map.new_data(data)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
981
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
982 elif data[:5] == "<chat":
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
983 msg = orpg.chat.chat_msg.chat_msg(data)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
984 self.chat.post_incoming_msg(msg,player)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
985 else:
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
986 """
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
987 all this below code is for comptiablity with older clients and can
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
988 be removed after a bit
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
989 """
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
990 import warnings
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
991 warnings.warn("Getting here is bad, find out how and fix it",
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
992 DeprecationWarning, 2)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
993 if data[:3] == "/me":
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
994 """
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
995 This fixes the emote coloring to comply with what has been
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
996 asked for by the user population, not to mention, what I
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
997 committed to many moons ago. In doing so, Woody's scheme has
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
998 been tossed out. I'm sure Woody won't be happy but I'm
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
999 invoking developer priveledge to satisfy user request, not to
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1000 mention, this scheme actually makes more sense. In Woody's
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1001 scheme, a user could over-ride another users emote color. This
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1002 doesn't make sense, rather, people dictate their OWN colors...
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1003 which is as it should be in the first place and is as it has
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1004 been with normal text. In short, this makes sense and is
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1005 consistent.
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1006 """
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1007 data = data.replace( "/me", "" )
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1008 """
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1009 Check to see if we find the closing '>' for the font within the
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1010 first 22 values
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1011 """
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1012 index = data[:22].find( ">" )
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1013 if index == -1:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1014 data = "** " + self.chat.colorize( self.chat.infocolor, display_name + data ) + " **"
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1015
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1016 else:
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1017 """
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1018 This means that we found a valid font string, so we can
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1019 simply plug the name into the string between the start and
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1020 stop font delimiter
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1021 """
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1022 print "pre data = " + data
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1023 data = data[:22] + "** " + display_name + " " + data[22:] + " **"
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1024 print "post data = " + data
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1025
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1026 elif data[:2] == "/w":
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1027 data = data.replace("/w","")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1028 data = "<b>" + display_name + "</b> (whispering): " + data
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1029
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1030 else:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1031 # Normal text
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1032 if player: data = "<b>" + display_name + "</b>: " + data
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1033 else: data = "<b><i><u>" + display_name + "</u>-></i></b> " + data
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1034 self.chat.Post(data)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1035
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1036 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1037 def on_mplay_event(self, evt):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1038 id = evt.get_id()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1039 if id == orpg.networking.mplay_client.MPLAY_CONNECTED:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1040 self.chat.InfoPost("Game connected!")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1041 self.gs.set_connected(1)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1042 self.password_manager.ClearPassword("ALL")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1043
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1044 elif id == orpg.networking.mplay_client.MPLAY_DISCONNECTED:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1045 self.poll_timer.Stop()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1046 self.ping_timer.Stop()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1047 self.chat.SystemPost("Game disconnected!")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1048 self.players.reset()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1049 self.gs.set_connected(0)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1050 self.status.set_connect_status("Not Connected")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1051
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1052 ####Begin changes for Custom Exit Message by mDuo13######
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1053 elif id == orpg.networking.mplay_client.MPLAY_DISCONNECTING:
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1054 settings = component.get('settings')
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1055 custom_msg = settings.get_setting("dcmsg")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1056 custom_msg=custom_msg[:80]
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1057 if custom_msg[:3]=="/me": self.chat.send_chat_message(custom_msg[3:], 3)
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1058 else: self.chat.system_message(custom_msg)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1059 #####End Changes for Custom Exit Message by mDuo13
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1060
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1061 elif id== orpg.networking.mplay_client.MPLAY_GROUP_CHANGE:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1062 group = evt.get_data()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1063 self.chat.InfoPost("Moving to room '"+group[1]+"'..")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1064 if self.gs : self.gs.set_cur_room_text(group[1])
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1065 self.players.reset()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1066 elif id== orpg.networking.mplay_client.MPLAY_GROUP_CHANGE_F:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1067 self.chat.SystemPost("Room access denied!")
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1068
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1069 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1070 def OnCloseWindow(self, event):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1071 dlg = wx.MessageDialog(self, "Quit OpenRPG?", "OpenRPG", wx.YES_NO)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1072 if dlg.ShowModal() == wx.ID_YES:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1073 dlg.Destroy()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1074 self.closed_confirmed()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1075
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1076 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1077 def closed_confirmed(self):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1078 self.activeplugins = component.get('plugins')
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1079 self.aliaslib.OnMB_FileSave(None)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1080
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1081 #following lines added by mDuo13
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1082 #########plugin_disabled()#########
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1083 for plugin_fname in self.activeplugins.keys():
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1084 plugin = self.activeplugins[plugin_fname]
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1085 try: plugin.plugin_disabled()
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1086 except Exception, e:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1087 traceback.print_exc()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1088 #end mDuo13 added code
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1089 self.saveLayout()
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1090 try: settings.save()
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1091 except Exception:
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1092 logger.general("[WARNING] Error saving 'settings' component", True)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1093
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1094 try: self.map.pre_exit_cleanup()
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1095 except Exception:
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1096 logger.general("[WARNING] Map error pre_exit_cleanup()", True)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1097
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1098 try:
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1099 save_tree = string.upper(settings.get_setting("SaveGameTreeOnExit"))
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1100 if (save_tree != "0") and (save_tree != "False") and (save_tree != "NO"):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1101 self.tree.save_tree(settings.get_setting("gametree"))
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1102 except Exception:
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1103 logger.general("[WARNING] Error saving gametree", True)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1104
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1105 if self.session.get_status() == orpg.networking.mplay_client.MPLAY_CONNECTED: self.kill_mplay_session()
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1106
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1107 try:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1108 #Kill all the damn timers
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1109 self.sound_player.timer.Stop()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1110 del self.sound_player.timer
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1111 except Exception:
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1112 logger.general("sound didn't die properly.", True)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1113
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1114 try:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1115 self.poll_timer.Stop()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1116 self.ping_timer.Stop()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1117 self.chat.parent.chat_timer.Stop()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1118 self.map.canvas.zoom_display_timer.Stop()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1119 self.map.canvas.image_timer.Stop()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1120 self.status.timer.Stop()
10
5df1340bda13 Big patch! Linux GUI, Fetching Dict., Init2, Streaming lining.
sirebral
parents: 4
diff changeset
1121 del self.ping_timer; del self.poll_timer; del self.chat.parent.chat_timer
5df1340bda13 Big patch! Linux GUI, Fetching Dict., Init2, Streaming lining.
sirebral
parents: 4
diff changeset
1122 del self.map.canvas.zoom_display_timer; del self.map.canvas.image_timer; del self.status.timer
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1123 except Exception:
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1124 logger.general("some timer didn't die properly.", True)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1125
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1126 self._mgr.UnInit()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1127 mainapp = wx.GetApp()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1128 mainapp.ExitMainLoop()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1129 self.Destroy()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1130
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1131 try:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1132 if self.server_pipe != None:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1133 dlg = wx.ProgressDialog("Exit","Stoping server",2,self)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1134 dlg.Update(2)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1135 dlg.Show(True)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1136 self.server_pipe.write("\nkill\n")
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1137 logger.general("Killing Server process:", True)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1138 time.sleep(5)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1139 self.server_stop()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1140 self.server_pipe.close()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1141 self.std_out.close()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1142 self.server_thread.exit()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1143 dlg.Destroy()
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1144 logger.general("Server killed:", True)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1145 except Exception:
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1146 pass
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1147
27
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1148 ########################################
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1149 ## About Dialog class
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1150 ########################################
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1151 class AboutORPG(wx.Frame):
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1152 def __init__(self, parent):
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1153 super(AboutORPG, self).__init__(parent, -1, "About 'Traipse' OpenRPG")
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1154 icon = None
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1155 icon = wx.Icon(dir_struct["icon"]+'d20.ico', wx.BITMAP_TYPE_ICO)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1156 self.SetIcon( icon )
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1157 sizer = wx.GridBagSizer(hgap=1, vgap=1)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1158 height = 425; width = 350
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1159 self.About = wx.TextCtrl(self, -1, size=wx.DefaultSize, style=wx.TE_MULTILINE | wx.TE_READONLY)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1160 img = wx.Image(dir_struct['icon']+'splash.gif', wx.BITMAP_TYPE_ANY).ConvertToBitmap()
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1161 image = wx.StaticBitmap(self, -1, img, size=wx.DefaultSize)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1162 sizer.Add(image, (0,0), flag=wx.ALIGN_CENTER_HORIZONTAL|wx.ALL|wx.ADJUST_MINSIZE)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1163 sizer.Add(self.About, (1,0), flag=wx.EXPAND)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1164 self.SetSizer(sizer)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1165 self.SetAutoLayout(True)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1166 self.SetSize((width, height))
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1167 sizer.AddGrowableCol(0)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1168 sizer.AddGrowableCol(1)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1169 sizer.AddGrowableRow(1)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1170 self.Bind(wx.EVT_CLOSE, self.Min)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1171 self.Min(None)
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1172
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1173 description = "OpenRPG is a Virtual Game Table that allows users to connect via a network and play table "
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1174 description += "top games with friends. 'Traipse' is an OpenRPG distro that is easy to setup and provides superb "
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1175 description += "functionality. OpenRPG is originally designed by Chris Davis."
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1176
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1177 license = "OpenRPG is free software; you can redistribute it and/or modify it "
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1178 license += "under the terms of the GNU General Public License as published by the Free Software Foundation; "
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1179 license += "either version 2 of the License, or (at your option) any later version.\n\n"
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1180 license += "OpenRPG and Traipse 'OpenRPG' is distributed in the hope that it will be useful, but WITHOUT ANY "
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1181 license += "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1182 license += "See the GNU General Public License for more details. You should have received a copy of "
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1183 license += "the GNU General Public License along with Traipse 'OpenRPG'; if not, write to "
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1184 license += "the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA \n\n"
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1185 license += "'Traipse' and the 'Traipse' Logo are trademarks of Mad Mathematics Laboratories."
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1186
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1187 self.About.AppendText(description+'\n\n')
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1188 self.About.AppendText(license+'\n\n')
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1189 self.About.AppendText('OpenRPG Developers:\n')
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1190 orpg_devs = ['Thomas Baleno', 'Andrew Bennett', 'Lex Berezhny', 'Ted Berg',
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1191 'Bernhard Bergbauer', 'Chris Blocher', 'David Byron', 'Ben Collins-Sussman', 'Robin Cook', 'Greg Copeland',
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1192 'Chris Davis', 'Michael Edwards', 'Andrew Ettinger', 'Todd Faris', 'Dj Gilcrease',
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1193 'Christopher Hickman', 'Paul Hosking', 'Brian Manning', 'Scott Mackay', 'Jesse McConnell',
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1194 'Brian Osman', 'Rome Reginelli', 'Christopher Rouse', 'Dave Sanders', 'Tyler Starke', 'Mark Tarrabain']
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1195 for dev in orpg_devs:
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1196 self.About.AppendText(dev+'\n')
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1197
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1198 def Min(self, evt):
51428d30c59e Traipse 'OpenRPG' {091003-00}
sirebral
parents: 18
diff changeset
1199 self.Hide()
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1200
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1201 ########################################
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1202 ## Application class
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1203 ########################################
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1204 class orpgSplashScreen(wx.SplashScreen):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1205 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1206 def __init__(self, parent, bitmapfile, duration, callback):
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1207 wx.SplashScreen.__init__(self, wx.Bitmap(bitmapfile),
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1208 wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT, duration, None, -1)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1209 self.callback = callback
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1210 self.closing = False
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1211 self.Bind(wx.EVT_CLOSE, self.callback)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1212
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1213 class orpgApp(wx.App):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1214 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1215 def OnInit(self):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1216
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1217 component.add('log', logger)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1218 component.add('xml', xml)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1219 component.add('settings', settings)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1220 component.add('validate', validate)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1221 component.add("tabbedWindows", [])
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1222
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1223 logger._set_log_level = int(settings.get_setting('LoggingLevel'))
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1224 logger._set_log_to_console(False)
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1225
14
e8260c6cb309 Traipse 'OpenRPG' {090806-00}
sirebral
parents: 13
diff changeset
1226 self.manifest = manifest.ManifestChanges()
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1227
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1228 self.called = False
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1229 wx.InitAllImageHandlers()
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1230 self.splash = orpgSplashScreen(None, dir_struct["icon"] + 'splash13.jpg', 3000, self.AfterSplash)
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1231 self.Bind(wx.EVT_KEY_DOWN, self.OnKeyPress)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1232 self._crust = None
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1233 wx.Yield()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1234 return True
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1235
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1236 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1237 def OnKeyPress(self, evt):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1238 #Event handler
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1239 if evt.AltDown() and evt.CmdDown() and evt.KeyCode == ord('I'): self.ShowShell()
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1240 else: evt.Skip()
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1241
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1242 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1243 def ShowShell(self):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1244 #Show the PyCrust window.
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1245 if not self._crust:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1246 self._crust = wx.py.crust.CrustFrame(self.GetTopWindow())
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1247 self._crust.shell.interp.locals['app'] = self
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1248 win = wx.FindWindowAtPointer()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1249 self._crust.shell.interp.locals['win'] = win
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1250 self._crust.Show()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1251
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1252 @debugging
0
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1253 def AfterSplash(self,evt):
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1254 if not self.called:
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1255 self.splash.Hide()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1256 self.called = True
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1257 self.frame = orpgFrame(None, wx.ID_ANY, MENU_TITLE)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1258 self.frame.Raise()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1259 self.frame.Refresh()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1260 self.frame.Show(True)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1261 self.SetTopWindow(self.frame)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1262 #self.frame.show_dlgs()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1263 self.frame.post_show_init()
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1264 wx.CallAfter(self.splash.Close)
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1265 return True
4385a7d0efd1 Deleted and repushed it with the 'grumpy-goblin' branch. I forgot a y
sirebral
parents:
diff changeset
1266
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1267 @debugging
10
5df1340bda13 Big patch! Linux GUI, Fetching Dict., Init2, Streaming lining.
sirebral
parents: 4
diff changeset
1268 def OnExit_CleanUp(self):
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1269 logger.debug("Preforming cleanup\n")
13
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1270 try: del os.environ["OPENRPG_BASE"]
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1271 except: pass
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1272 try: os.remove(os.environ["OPENRPG_BASE"] + os.sep + 'orpg' + os.sep + 'dirpath' + os.sep + 'approot.py')
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1273 except: pass
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1274 try: os.remove(os.environ["OPENRPG_BASE"] + os.sep + 'orpg' + os.sep + 'dirpath' + os.sep + 'approot.pyc')
211ac836b6a0 {090731-00} Fixes problem with Name & Settings window, cleans code.
sirebral
parents: 10
diff changeset
1275 except: pass
10
5df1340bda13 Big patch! Linux GUI, Fetching Dict., Init2, Streaming lining.
sirebral
parents: 4
diff changeset
1276
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1277 @debugging
10
5df1340bda13 Big patch! Linux GUI, Fetching Dict., Init2, Streaming lining.
sirebral
parents: 4
diff changeset
1278 def OnExit(self):
5df1340bda13 Big patch! Linux GUI, Fetching Dict., Init2, Streaming lining.
sirebral
parents: 4
diff changeset
1279 self.OnExit_CleanUp()
4
4b93aa8c46a2 Patch to main. Changes About Dialog and removes approot files which hurt location
sirebral
parents: 0
diff changeset
1280 #Exit
18
97265586402b Traipse 'OpenRPG' {090827-00}
sirebral
parents: 17
diff changeset
1281 logger.debug("Main Application Exit\n\n")