def _on_response(self, dialog, response):
        '''Handle the dialog's "response" signal.'''

        self.__stop_detection()
        self.__stop_learning()

        # Reset the progress back for detection
        self.__progressbar_detect_basics.hide()
        self.__button_detect_basics.set_sensitive(True)

        if gtk.RESPONSE_OK == response:
            try:
                service = backend.get_service()

                # Get the entered basic information, 
                # so it will be written to the configuration file: 
                self.__remote.contributor = self.contributor_name
                self.__remote.vendor = self.vendor_name
                self.__remote.product = self.product_name

                self.__remote.update_configuration(service)
                service.ManageLircDaemon('restart')

            except dbus.DBusException, ex:
                show_message(self.__dialog,
                             _('Cannot Save Custom Configuration'),
                             ex.message)

                dialog.stop_emission('response')
        def report_failure(message, sender=None):
            '''Handle failures reported by the service backend.'''

            show_message(self.__dialog, _('Learning of Key Code Failed'), message)

            self.__learning_driver = None
            self.__stop_learning()
        def report_failure(message):
            '''Handle failures reported by the service backend.'''

            self.__detection_driver = None
            self.__progressbar_detect_basics.hide()
            self.__button_detect_basics.set_sensitive(True)
            show_message(self.__dialog, _('Remote Configuration Failed'), message)

            if service:
                service.ManageLircDaemon('start')
        def request_action(message, details=None, sender=None):
            '''Forward actions requests from the service backend to the user.'''

            self.__progressbar_detect_basics.set_text(message)
            self.__progressbar_detect_basics.set_fraction(0)

            if details:
                # TODO: This dialog should probably have a cancel button.
                response_buttons = (
                    (gtk.RESPONSE_ACCEPT, _('_Start'), gtk.STOCK_EXECUTE),
                )

                show_message(self.__dialog, message, details,
                             message_type=gtk.MESSAGE_INFO,
                             buttons=response_buttons)

            driver.Proceed()