Fixed vessel change code in native gui
This commit is contained in:
1 parent
09387280fc
commit
db74fb6970
16 files changed
+192
-33
No files matched your search
+9
-1
@@ -49,6 +49,9 @@ class TasksView(View):
|
||||
self.entry['duedate'].set_placeholder_text(context.get_datefmt_placeholder())
|
||||
self.dt_duedate = DatePicker(self.entry['duedate'], self.button['duedate'], context.get_datefmt())
|
||||
|
||||
# subscribe to data change events
|
||||
self.context.subscribe("vessel_modified", self.vessel_modified)
|
||||
|
||||
def get_list_row(self):
|
||||
return (
|
||||
self.task.taskid,
|
||||
@@ -89,6 +92,11 @@ class TasksView(View):
|
||||
# restore previous selected row
|
||||
selection.select_iter(treeiter)
|
||||
|
||||
def vessel_modified(self, eventtype, data):
|
||||
self.tree['tasks'].get_selection().unselect_all()
|
||||
self.load_list()
|
||||
self.topwidget.set_visible_child(self.box['tasks'])
|
||||
|
||||
def clear_record(self):
|
||||
self.task.clear()
|
||||
self.entry['name'].set_text('')
|
||||
@@ -117,7 +125,7 @@ class TasksView(View):
|
||||
|
||||
def edit_record(self):
|
||||
self.entry['name'].set_text(self.task.taskname)
|
||||
combobox.activate_row(self.combo['project'], self.task.projid)
|
||||
combobox.activate_row(self.combo['project'], self.task.projid or -1)
|
||||
combobox.activate_row(self.combo['priority'], self.task.priority)
|
||||
self.entry['plandate'].set_text(self.format_date(self.task.plandate))
|
||||
self.entry['duedate'].set_text(self.format_date(self.task.duedate))
|
||||
|
||||
Reference in new issue
Block a user