X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c1f6b54a50c5b761157b6f152413c6fbb837237..32485259c1342115488d219776dfebeb3d4d81b1:/wxPython/src/_listctrl.i diff --git a/wxPython/src/_listctrl.i b/wxPython/src/_listctrl.i index 48a9f0ac31..15b4ef2b3a 100644 --- a/wxPython/src/_listctrl.i +++ b/wxPython/src/_listctrl.i @@ -345,7 +345,7 @@ EVT_LIST_SET_INFO = wx._deprecated(EVT_LIST_SET_INFO) static int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) { int retval = 0; PyObject* func = (PyObject*)funcPtr; - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); PyObject* args = Py_BuildValue("(ii)", item1, item2); PyObject* result = PyEval_CallObject(func, args); @@ -666,7 +666,8 @@ details in the second return value (see wx.LIST_HITTEST flags.)", ""); %Rename(InsertImageStringItem, long, InsertItem(long index, const wxString& label, int imageIndex)); // For list view mode (only), inserts a column. - %Rename(InsertColumnInfo, long, InsertColumn(long col, wxListItem& info)); + %Rename(InsertColumnItem, long, InsertColumn(long col, wxListItem& info)); + %pythoncode { InsertColumnInfo = InsertColumnItem } long InsertColumn(long col, const wxString& heading, @@ -717,7 +718,7 @@ details in the second return value (see wx.LIST_HITTEST flags.)", ""); def IsSelected(self, idx): '''return True if the item is selected''' - return self.GetItemState(idx, wx.LIST_STATE_SELECTED) != 0 + return (self.GetItemState(idx, wx.LIST_STATE_SELECTED) & wx.LIST_STATE_SELECTED) != 0 def SetColumnImage(self, col, image): item = self.GetColumn(col)