diff --git a/ctl_adm.py b/ctl_adm.py index 0e4ed4c..9907a65 100644 --- a/ctl_adm.py +++ b/ctl_adm.py @@ -97,7 +97,9 @@ def ClearAll(self): def GetToolTipText(self, tid): - return self.GetItemText(tid, self.getToolTipCol) + if self.getToolTipCol: + return self.GetItemText(tid, self.getToolTipCol) + return None def GetSelection(self): lst=[] @@ -215,8 +217,7 @@ def UpdateRow(self, row, values, icon=-1): vals=[] for colInfo in self.colInfos: vals.append(colInfo.GetVal(values)) - for col in range(1, self.GetColumnCount()): - self.SetStringItem(row, col, vals[col]) + self.SetItemRow(row, vals) self.SetItemImage(row, icon) @@ -287,12 +288,11 @@ def GetValue(self): l.append(self.GetItemTuple(i)) return l - def SetItem(self, row, val, image=None): + def SetItemRow(self, row, val, image=None): if isinstance(val, tuple): val=list(val) - for col in range(len(val)): - self.SetStringItem(row, col, str(val[col])) + self.SetItem(row, col, str(val[col])) if image != None: self.SetItemImage(row, image) diff --git a/modImap/Mailbox.py b/modImap/Mailbox.py index 72701b0..f1702e9 100644 --- a/modImap/Mailbox.py +++ b/modImap/Mailbox.py @@ -342,7 +342,7 @@ def editAcl(self, index=-1): acl=dlg.GetAcl() if index >= 0: if acl: - lbAcl.SetStringItem(index, 1, acl) + lbAcl.SetItem(index, 1, acl) else: lbAcl.DeleteItem(index) elif acl: diff --git a/modLdap/Group.py b/modLdap/Group.py index f042ebd..091482f 100644 --- a/modLdap/Group.py +++ b/modLdap/Group.py @@ -301,7 +301,7 @@ def OnAddMember(self, evt): cr=candidates[i].split() uid=cr[0] row=lv.AppendItem(-1, uid) - lv.SetStringItem(row, 1, " ".join(cr[1:])) + lv.SetItem(row, 1, " ".join(cr[1:])) lv.SetItemData(row, -1) uids.append(uid)