diff orpg/player_list.py @ 17:265b987cce4f ornery-orc

Traipse 'OpenRPG' {090813-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. **Announcement** Please download the location-patch.zip from http://www.assembla.com/wiki/show/traipse. The patch is ready to copy to your Traipse directory (includes files in their subfolders). The patch removes dependency on the OPENRPG_BASE system environment dictionary key. Update Summary: This update enhances the Updater tab. Player List and Game Server Menu Columns now have a minimum width and the software will refresh to that width on an update, if the column is too small. Also fixes problems with three character sheet nodes. *Arbitrary* fix to tool bar checks, docking passes tests though. Chat is now a multiline entry. CSS added to chat posts.
author sirebral
date Thu, 13 Aug 2009 13:14:10 -0500
parents 211ac836b6a0
children 97265586402b
line wrap: on
line diff
--- a/orpg/player_list.py	Sat Aug 08 00:35:09 2009 -0500
+++ b/orpg/player_list.py	Thu Aug 13 13:14:10 2009 -0500
@@ -95,7 +95,7 @@
         self.SetImageList( self._imageList, wx.IMAGE_LIST_SMALL )
         # Create our column headers
         self.InsertColumn( 0, "ID" )
-        self.InsertColumn( 1, "Player" )
+        self.InsertColumn( 1, "Player")
         self.InsertColumn( 2, "Status" )
 #---------------------------------------------------------
 # [START] Digitalxero Multi Whisper Group 1/1/05
@@ -192,6 +192,13 @@
 #
 #       Revised 8/03 to add support for password manager
 #---------------------------------------------------------
+
+    def AutoAdjust(self):
+        self.SetColumnWidth(0, -1)
+        if self.GetColumnWidth(1) < 75: self.SetColumnWidth(1, 75)
+        if self.GetColumnWidth(2) < 75: self.SetColumnWidth(2, 75)
+        self.Refresh()
+
     def on_menu_password( self, evt ):
         id = evt.GetId()
         self.session = open_rpg.get_component("session")
@@ -328,6 +335,7 @@
         roleString = None
         roleBase = "/role %d=%s"
         infoBase = "Attempting to assign the role of %s to (%d) %s..."
+
         # Do type specific processing
 	recycle_bin = {PLAYER_ROLE_LURKER: ROLE_LURKER, PLAYER_ROLE_PLAYER: ROLE_PLAYER, PLAYER_ROLE_GM: ROLE_GM}
 	if recycle_bin.has_key(id):
@@ -449,6 +457,7 @@
         if sound_file != '':
             sound_player = open_rpg.get_component('sound')
             sound_player.play(sound_file)
+        self.AutoAdjust()
 
     def del_player(self,player):
         i = self.FindItemData(-1,int(player[2]))
@@ -492,7 +501,7 @@
         self.SetStringItem(i,2,player[3])
         item = self.GetItem(i)
         self.colorize_player_list()
-        self.Refresh()
+        self.AutoAdjust()
 
     def colorize_player_list(self):
         session = open_rpg.get_component("session")