Changeset af7ba61 in sasview


Ignore:
Timestamp:
Jun 11, 2011 11:23:14 AM (14 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
228a8bb
Parents:
18e430a
Message:

check the wx version on MAC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/data_panel.py

    r234a3fa raf7ba61  
    1313import os 
    1414import wx 
     15# Check version 
     16toks = wx.__version__.split('.') 
     17if int(toks[1]) < 9: 
     18    wx_version = 8 
     19else: 
     20    wx_version = 9 
    1521import sys 
    1622import warnings 
     
    7682    def __init__(self, parent,*args, **kwds): 
    7783        #agwstyle is introduced in wx.2.8.11 but is not working for mac 
    78         if IS_MAC: 
     84        if IS_MAC and wx_version < 9: 
    7985            try: 
    8086                kwds['style'] = STYLE_FLAG 
    8187                CT.CustomTreeCtrl.__init__(self, parent, *args, **kwds) 
    8288            except: 
    83                 kwds['style'] = wx.RAISED_BORDER|wx.TR_HAS_BUTTONS|wx.TR_HIDE_ROOT|\ 
    84                     wx.WANTS_CHARS|wx.TR_HAS_VARIABLE_ROW_HEIGHT 
     89                del kwds['style'] 
    8590                CT.CustomTreeCtrl.__init__(self, parent, *args, **kwds) 
    8691        else: 
Note: See TracChangeset for help on using the changeset viewer.