]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/mixins/listctrl.py
Applied patch [ 1281902 ] fix for wxJoystick under Linux
[wxWidgets.git] / wxPython / wx / lib / mixins / listctrl.py
index 0a8bb8c6f041f273b3dfc0a84b1456ab6ee2fd52..2de4d3bbca64a9bdb3e51ca7f197f20f679677b5 100644 (file)
@@ -62,7 +62,7 @@ class ColumnSorterMixin:
         list = self.GetListCtrl()
         if not list:
             raise ValueError, "No wx.ListCtrl available"
-        self.Bind(wx.EVT_LIST_COL_CLICK, self.__OnColClick, list)
+        list.Bind(wx.EVT_LIST_COL_CLICK, self.__OnColClick, list)
 
 
     def SetColumnCount(self, newNumColumns):
@@ -209,7 +209,7 @@ class ListCtrlAutoWidthMixin:
 
             'minWidth' is the preferred minimum width for the last column.
         """
-        self.resizeColumn(self, minWidth)
+        self.resizeColumn(minWidth)
 
 
     def resizeColumn(self, minWidth):
@@ -226,7 +226,10 @@ class ListCtrlAutoWidthMixin:
 
             We automatically resize the last column in the list.
         """
-        wx.CallAfter(self._doResize)
+        if 'gtk2' in wx.PlatformInfo:
+            self._doResize()
+        else:
+            wx.CallAfter(self._doResize)
         event.Skip()