def on_state_changed(self, state):
super(GoToDefinitionMode, self).on_state_changed(state)<EOL>if state:<EOL><INDENT>self.editor.mouse_moved.connect(self._on_mouse_moved)<EOL>self.editor.mouse_released.connect(self._on_mouse_released)<EOL>self.editor.add_action(self.action_goto, sub_menu='<STR_LIT>')<EOL>self.editor.mouse_double_clicked.connect(<EOL>self._timer.cancel_requests)<EOL><DEDENT>else:<EOL><INDENT>self.editor.mouse_moved.disconnect(self._on_mouse_moved)<EOL>self.editor.mouse_released.disconnect(self._on_mouse_released)<EOL>self.editor.remove_action(self.action_goto, sub_menu='<STR_LIT>')<EOL>self.editor.mouse_double_clicked.disconnect(<EOL>self._timer.cancel_requests)<EOL><DEDENT>
Connects/disconnects slots to/from signals when the mode state
changed.