get project table column count from header row
This commit is contained in:
parent
3eaeaa8313
commit
15136b9c26
@ -46,7 +46,9 @@ class Window:
|
|||||||
|
|
||||||
def updateProjects(self):
|
def updateProjects(self):
|
||||||
self.projects = self.ds.getProjects()
|
self.projects = self.ds.getProjects()
|
||||||
self.projects_table = gtk.Table(rows = 2, columns = 9)
|
col_headers = ('Project',
|
||||||
|
'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun', 'Tot')
|
||||||
|
self.projects_table = gtk.Table(rows = 2, columns = len(col_headers))
|
||||||
|
|
||||||
new_project_combobox = gtk.combo_box_entry_new_text()
|
new_project_combobox = gtk.combo_box_entry_new_text()
|
||||||
project_names = self.projects.values()
|
project_names = self.projects.values()
|
||||||
@ -54,8 +56,6 @@ class Window:
|
|||||||
for project in project_names:
|
for project in project_names:
|
||||||
new_project_combobox.append_text(project)
|
new_project_combobox.append_text(project)
|
||||||
|
|
||||||
col_headers = ('Project',
|
|
||||||
'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun', 'Tot')
|
|
||||||
for i in range(len(col_headers)):
|
for i in range(len(col_headers)):
|
||||||
l = gtk.Label()
|
l = gtk.Label()
|
||||||
l.set_markup('<b>%s</b>' % col_headers[i])
|
l.set_markup('<b>%s</b>' % col_headers[i])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user