comparison orpg/networking/mplay_server_gui.py @ 228:24769389a7ba alpha

Traipse Alpha 'OpenRPG' {100612-01} 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 (Preparing to close updates) New Features: New to Map, can re-order Grid, Miniatures, and Whiteboard layer draw order Fixes: Fix to InterParse that was causing an Infernal Loop with Namespace Internal Fix to XML data, removed old Minidom and switched to Element Tree Fix to Server that was causing eternal attempt to find a Server ID, in Register Rooms thread Fix to metaservers.xml file not being created
author sirebral
date Sat, 12 Jun 2010 04:38:29 -0500
parents 29cf1a17ca16
children cc7629ab526d
comparison
equal deleted inserted replaced
225:2c6db2043764 228:24769389a7ba
656 self.mainMenu.Enable(2, True) 656 self.mainMenu.Enable(2, True)
657 self.mainMenu.Enable(4, True) 657 self.mainMenu.Enable(4, True)
658 wx.EndBusyCursor() 658 wx.EndBusyCursor()
659 else: self.show_error("Server is already running.", "Error Starting Server") 659 else: self.show_error("Server is already running.", "Error Starting Server")
660 660
661 def OnStop(self, event = None): 661 def OnStop(self, event=None):
662 """ Stop server. """ 662 """ Stop server. """
663 if self.STATUS == SERVER_RUNNING: 663 if self.STATUS == SERVER_RUNNING:
664 self.OnUnregister() 664 self.OnUnregister(event)
665 self.server.stop() 665 self.server.stop()
666 self.STATUS = SERVER_STOPPED 666 self.STATUS = SERVER_STOPPED
667 self.sb.SetStatusText("Stopped", 3) 667 if event != 'Quit':
668 self.SetTitle(__appname__ + "- (stopped) - (unregistered)") 668 self.sb.SetStatusText("Stopped", 3)
669 self.mainMenu.Enable(1, True) 669 self.SetTitle(__appname__ + "- (stopped) - (unregistered)")
670 self.mainMenu.Enable(2, False) 670 self.mainMenu.Enable(1, True)
671 self.mainMenu.Enable(4, False) 671 self.mainMenu.Enable(2, False)
672 self.mainMenu.Enable(5, False) 672 self.mainMenu.Enable(4, False)
673 self.conns.DeleteAllItems() 673 self.mainMenu.Enable(5, False)
674 self.conns.DeleteAllItems()
674 675
675 def OnRegister(self, event = None): 676 def OnRegister(self, event = None):
676 """ Call into mplay_server's register() function. 677 """ Call into mplay_server's register() function.
677 This will begin registerThread(s) to keep server 678 This will begin registerThread(s) to keep server
678 registered with configured metas 679 registered with configured metas
693 and result in the server being de-listed 694 and result in the server being de-listed
694 from all metas 695 from all metas
695 """ 696 """
696 wx.BeginBusyCursor() 697 wx.BeginBusyCursor()
697 self.server.server.unregister() 698 self.server.server.unregister()
698 self.sb.SetStatusText("Unregistered", 4) 699 if event != 'Quit':
699 self.mainMenu.Enable(5, False) 700 self.sb.SetStatusText("Unregistered", 4)
700 self.mainMenu.Enable(4, True) 701 self.mainMenu.Enable(5, False)
701 #self.mainMenu.Enable( 2, True ) 702 self.mainMenu.Enable(4, True)
702 self.SetTitle(__appname__ + "- (running) - (unregistered)") 703 #self.mainMenu.Enable( 2, True )
704 self.SetTitle(__appname__ + "- (running) - (unregistered)")
703 wx.EndBusyCursor() 705 wx.EndBusyCursor()
704 706
705 def ModifyBanList(self, event): 707 def ModifyBanList(self, event):
706 if self.BanListDialog.IsShown() == True: self.BanListDialog.Hide() 708 if self.BanListDialog.IsShown() == True: self.BanListDialog.Hide()
707 else: self.BanListDialog.Show() 709 else: self.BanListDialog.Show()
724 dlg.Destroy() 726 dlg.Destroy()
725 self.ExitConfirmed() 727 self.ExitConfirmed()
726 728
727 def ExitConfirmed(self, event=None): 729 def ExitConfirmed(self, event=None):
728 """ Quit the program. """ 730 """ Quit the program. """
729 self.OnStop() 731 self.OnStop('Quit')
730 self.BanListDialog.Destroy() 732 self.BanListDialog.Destroy()
731 wx.CallAfter(self.Destroy) 733 wx.CallAfter(self.Destroy)
732 734
733 class BanListDialog(wx.Frame): 735 class BanListDialog(wx.Frame):
734 def __init__(self, parent): 736 def __init__(self, parent):