From: Digital X. <dig...@us...> - 2007-04-18 23:41:02
|
Update of /cvsroot/openrpg/openrpg1/orpg/gametree/nodehandlers In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28950/orpg/gametree/nodehandlers Modified Files: Tag: BRANCH-1-7-1 minilib.py Log Message: Fixed the Done Button in the Miniture Lib Index: minilib.py =================================================================== RCS file: /cvsroot/openrpg/openrpg1/orpg/gametree/nodehandlers/minilib.py,v retrieving revision 1.24 retrieving revision 1.24.2.1 diff -C2 -d -r1.24 -r1.24.2.1 *** minilib.py 4 Nov 2006 21:24:21 -0000 1.24 --- minilib.py 18 Apr 2007 23:41:01 -0000 1.24.2.1 *************** *** 206,210 **** return session = self.openrpg.get_component( COMPONENT_SESSION ) ! if (session.my_role() <> session.ROLE_GM) and (session.my_role()<>session.ROLE_PLAYER): self.openrpg.get_component("chat").InfoPost("You must be either a player or GM to use the miniature Layer") return --- 206,210 ---- return session = self.openrpg.get_component( COMPONENT_SESSION ) ! if (session.my_role() != session.ROLE_GM) and (session.my_role() != session.ROLE_PLAYER): self.openrpg.get_component("chat").InfoPost("You must be either a player or GM to use the miniature Layer") return *************** *** 311,315 **** box = wx.BoxSizer( wx.HORIZONTAL ) box.Add( wx.Button( self, OK_BUTTON, 'Add' ), 0, wx.EXPAND ) ! box.Add( wx.Button( self, ADD_BUTTON, 'Add No Lable' ), 0, wx.EXPAND ) box.Add( wx.Button( self, CANCEL_BUTTON, 'Done' ), 0, wx.EXPAND ) --- 311,315 ---- box = wx.BoxSizer( wx.HORIZONTAL ) box.Add( wx.Button( self, OK_BUTTON, 'Add' ), 0, wx.EXPAND ) ! box.Add( wx.Button( self, ADD_BUTTON, 'Add No Label' ), 0, wx.EXPAND ) box.Add( wx.Button( self, CANCEL_BUTTON, 'Done' ), 0, wx.EXPAND ) *************** *** 318,321 **** --- 318,322 ---- self.Bind(wx.EVT_BUTTON, self.on_ok, id=OK_BUTTON) self.Bind(wx.EVT_BUTTON, self.on_ok, id=ADD_BUTTON) + self.Bind(wx.EVT_BUTTON, self.on_close, id=CANCEL_BUTTON) self.SetSizer(self.sizer) self.SetAutoLayout(True) *************** *** 337,340 **** --- 338,344 ---- # self.list[ name ] = mini + def on_close(self, evt): + self.frame.Close() + def on_ok( self, evt ): """Event handler for the 'add' button. |