Permalink
Browse files

[TABLE] Rename __add_criterion() to add_criterion()

  • Loading branch information...
1 parent f52ab14 commit 932366b0fac03b8ea5cfcfb94b1b92ac468aa2c3 @oso committed Sep 22, 2011
Showing with 8 additions and 9 deletions.
  1. +8 −9 ui/table.py
View
@@ -25,11 +25,9 @@ def __init__(self, criteria=None, parent=None):
self.setColumnWidth(1, 60)
self.setColumnWidth(2, 100)
- if criteria == None:
- return
-
- for criterion in criteria:
- self.add(criterion)
+ if criteria != None:
+ for criterion in criteria:
+ self.add(criterion)
def __add_headers(self):
item = QtGui.QTableWidgetItem()
@@ -152,15 +150,16 @@ def criteria_enabled(self):
class profiles_table(QtGui.QTableWidget):
- def __init__(self, criteria, parent=None):
+ def __init__(self, criteria=None, parent=None):
super(QtGui.QTableWidget, self).__init__(parent)
self.parent = parent
self.col_crit = {}
- for criterion in criteria:
- self.__add_criterion(criterion)
+ if criteria != None:
+ for criterion in criteria:
+ self.add_criterion(criterion)
- def __add_criterion(self, criterion):
+ def add_criterion(self, criterion):
col = self.columnCount()
self.insertColumn(col)
item = QtGui.QTableWidgetItem()

0 comments on commit 932366b

Please sign in to comment.