def __create_command_toolbar(self): self.command_toolbar = ScanCommandToolbar() self.command_toolbar.command_entry.connect( 'activate', lambda x: self.toolbar.scan_button.clicked()) self.command_entry_changed_handler = \ self.command_toolbar.command_entry.connect( 'changed', self._command_entry_changed)
def __create_command_toolbar(self): """Assigns several events to the command toolbar, including activate on scan button being clicked.""" self.command_toolbar = ScanCommandToolbar() self.command_toolbar.command_entry.connect( 'activate', lambda x: self.toolbar.scan_button.clicked()) # If you modify the command field entry at all, it will clear the profile, target fields # so as to not use a profile when you change the command manually, but instead just run # the command given in the field. self.command_toolbar.command_entry.connect('key-press-event', self.clear_profile_target)