Revision: 4209
Author: janne.t.harkonen
Date: Thu Sep 30 02:30:38 2010
Log: show add employee status after the new employee is selected from list
http://code.google.com/p/robotframework/source/detail?r=4209
Modified:
/trunk/proto/atdd-tutorial-berlin-2010/src/vacalc/ui.py
=======================================
--- /trunk/proto/atdd-tutorial-berlin-2010/src/vacalc/ui.py Thu Sep 30
02:19:39 2010
+++ /trunk/proto/atdd-tutorial-berlin-2010/src/vacalc/ui.py Thu Sep 30
02:30:38 2010
@@ -105,6 +105,7 @@
self._create_start_date_editor()
self._create_save_button()
self._create_vacation_display()
+ self._adding_employee = False
def _create_status_label(self):
self._status_label = JLabel(name='status_label',
@@ -142,6 +143,10 @@
self._name_editor.setText(employee.name)
self._start_date_editor.setText(str(employee.startdate))
self._save_button.setVisible(False)
+ if self._adding_employee:
+ self._adding_employee = False
+ else:
+ self._status_label.setText('')
self._display.setVisible(True)
self._display.setModel(VacationTableModel(employee))
self._header.setVisible(True)
@@ -152,6 +157,7 @@
self._save_button.setVisible(True)
self._display.setVisible(False)
self._header.setVisible(False)
+ self._adding_employee = True
def _save_button_pushed(self, event):
self._employees.add(self._name_editor.getText(),