Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.cancel_report_button = builder.get_object("cancel_report_button")
self.recipient_entry = builder.get_object("recipient_entry")
self.tasks_infobar = builder.get_object("tasks_infobar")
self.tasks_infobar.connect('response', lambda *args: self.tasks_infobar.hide())
self.tasks_infobar_label = builder.get_object("tasks_infobar_label")
self.infobar = builder.get_object("report_infobar")
self.infobar.connect('response', lambda *args: self.infobar.hide())
self.infobar_label = builder.get_object("infobar_label")
self.headerbar = builder.get_object('headerbar')
self.time_label = builder.get_object('time_label')
self.task_entry = TaskEntry()
swap_widget(builder, 'task_entry', self.task_entry)
self.task_entry.grab_focus() # I specified this in the .ui file but it gets ignored
self.add_button = builder.get_object('add_button')
self.add_button.grab_default() # I specified this in the .ui file but it gets ignored
self.log_view = LogView()
swap_widget(builder, 'log_view', self.log_view)
self.bind_property('timelog', self.task_entry, 'timelog', GObject.BindingFlags.DEFAULT)
self.bind_property('timelog', self.log_view, 'timelog', GObject.BindingFlags.DEFAULT)
self.bind_property('showing_today', self.log_view, 'showing_today', GObject.BindingFlags.DEFAULT)
self.bind_property('date', self.log_view, 'date', GObject.BindingFlags.DEFAULT)
self.bind_property('detail_level', self.log_view, 'detail_level', GObject.BindingFlags.SYNC_CREATE)
self.bind_property('time_range', self.log_view, 'time_range', GObject.BindingFlags.SYNC_CREATE)
self.task_entry.bind_property('text', self.log_view, 'current_task', GObject.BindingFlags.DEFAULT)
self.bind_property('subtitle', self.headerbar, 'subtitle', GObject.BindingFlags.DEFAULT)
self.task_pane = builder.get_object("task_pane")
self.task_list = TaskList()
swap_widget(builder, 'task_list', self.task_list)
self.task_list.connect('row-activated', self.task_list_row_activated)
self.bind_property('tasks', self.task_list, 'tasks', GObject.BindingFlags.DEFAULT)