add project combobox not restricted to column 1
This commit is contained in:
parent
e8ae65e22d
commit
cf448b0689
@ -69,7 +69,8 @@ class Window:
|
||||
col_headers = ('Project',
|
||||
'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun', 'Tot')
|
||||
rows = 3 + len(projects_to_show)
|
||||
self.projects_table = gtk.Table(rows = rows, columns = len(col_headers))
|
||||
columns = len(col_headers)
|
||||
self.projects_table = gtk.Table(rows = rows, columns = columns)
|
||||
|
||||
for i in range(len(col_headers)):
|
||||
l = gtk.Label()
|
||||
@ -98,6 +99,7 @@ class Window:
|
||||
|
||||
# Add project row
|
||||
self.new_project_combobox = gtk.combo_box_entry_new_text()
|
||||
self.new_project_combobox.set_size_request(250, -1)
|
||||
self.new_project_combobox.connect("key-release-event",
|
||||
self.project_key_press_event)
|
||||
project_names = self.projects.values()
|
||||
@ -106,11 +108,10 @@ class Window:
|
||||
self.new_project_combobox.append_text(project)
|
||||
self.add_project_button = gtk.Button('Add')
|
||||
self.add_project_button.connect('clicked', self.add_project_event)
|
||||
self.projects_table.attach(self.new_project_combobox, 0, 1,
|
||||
rows - 1, rows)
|
||||
hbox = gtk.HBox()
|
||||
hbox.pack_start(self.new_project_combobox, expand = False)
|
||||
hbox.pack_start(self.add_project_button, expand = False)
|
||||
self.projects_table.attach(hbox, 1, 9, rows - 1, rows)
|
||||
self.projects_table.attach(hbox, 0, columns, rows - 1, rows)
|
||||
self.projects_table.set_row_spacings(3)
|
||||
|
||||
self.projects_container.pack_start(self.projects_table)
|
||||
|
Loading…
x
Reference in New Issue
Block a user