From: <sir...@us...> - 2003-03-03 15:37:11
|
Update of /cvsroot/btplusplus/BT++/src/DlgMain In directory sc8-pr-cvs1:/tmp/cvs-serv20564/src/DlgMain Modified Files: DlgMain.py Log Message: - Reimplemented grid move up/down. Now also handels moving of selections of multiple items. - Added images for move up/down. - Implemented resizing grid columns. - Fixed error with offscreen bitmap allocation(for grid). - Sizes and/or positions of the main window (DlgMain) and the grids columns are now saved. Index: DlgMain.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/DlgMain/DlgMain.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DlgMain.py 2 Mar 2003 16:36:28 -0000 1.5 --- DlgMain.py 3 Mar 2003 15:37:07 -0000 1.6 *************** *** 6,9 **** --- 6,10 ---- from Images import GetIcon from MaxSizer import MaxSizer + from Version import CurrentVersion from TabTrans.TabTrans import TabTrans *************** *** 23,27 **** def __init__(self): ! wxFrame.__init__(self, None, -1, 'BitTorrent++', size = wxSize(800,450))#, style = wxCAPTION | wxSYSTEM_MENU | wxMINIMIZE_BOX ) self.SetIcon( GetIcon('Icon_Small') ) --- 24,33 ---- def __init__(self): ! wxFrame.__init__( self, ! None, ! -1, ! 'BitTorrent++ v' + CurrentVersion, ! size = wxSize(Config.Get('GUI', 'WndSizeX'), ! Config.Get('GUI', 'WndSizeY')) ) self.SetIcon( GetIcon('Icon_Small') ) *************** *** 44,48 **** self.SetSizer(sizer) ! self.Center(wxBOTH) ########################################################################################################### --- 50,61 ---- self.SetSizer(sizer) ! ! posx = Config.Get('GUI', 'WndPosX') ! posy = Config.Get('GUI', 'WndPosY') ! ! if posx == -1 and posy == -1: ! self.Center(wxBOTH) ! else: ! self.MoveXY(posx, posy) ########################################################################################################### *************** *** 64,67 **** --- 77,92 ---- return + # Save window position and size + posx, posy = self.GetPositionTuple() + sizex, sizey = self.GetSizeTuple() + + Config.Set('GUI', 'WndPosX', posx) + Config.Set('GUI', 'WndPosY', posy) + + Config.Set('GUI', 'WndSizeX', sizex) + Config.Set('GUI', 'WndSizeY', sizey) + + Config.Save() + if wxPlatform == '__WXMSW__': self.Bar.Destroy() |