Example #1
0
 def __register_activate_cb(self, icon):
     alert = Alert()
     try:
         schoolserver.register_laptop()
     except RegisterError, e:
         alert.props.title = _('Registration Failed')
         alert.props.msg = '%s' % e
Example #2
0
 def __register_activate_cb(self, icon):
     alert = Alert()
     try:
         schoolserver.register_laptop()
     except RegisterError, e:
         alert.props.title = _('Registration Failed')
         alert.props.msg = '%s' % e
Example #3
0
 def __register(self):
     self._box.remove_alert()
     alert = Alert()
     try:
         schoolserver.register_laptop()
     except RegisterError, e:
         alert.props.title = _('Registration Failed')
         alert.props.msg = '%s' % e
Example #4
0
 def __register(self):
     self._box.remove_alert()
     alert = ErrorAlert()
     try:
         schoolserver.register_laptop()
     except RegisterError, e:
         alert.props.title = _('Registration Failed')
         alert.props.msg = '%s' % e
Example #5
0
    def __register(self):
        self._box.remove_alert()
        alert = ErrorAlert()
        try:
            schoolserver.register_laptop()
        except RegisterError as e:
            alert.props.title = _('Registration Failed')
            alert.props.msg = '%s' % e
        else:
            alert.props.title = _('Registration Successful')
            alert.props.msg = _('You are now registered '
                                'with your school server.')

        alert.connect('response', self.__register_alert_response_cb)
        self._box.add_alert(alert)
        return False
Example #6
0
    def __register(self):
        self._box.remove_alert()
        alert = ErrorAlert()
        try:
            schoolserver.register_laptop()
        except RegisterError as e:
            alert.props.title = _('Registration Failed')
            alert.props.msg = '%s' % e
        else:
            alert.props.title = _('Registration Successful')
            alert.props.msg = _('You are now registered '
                                'with your school server.')

        alert.connect('response', self.__register_alert_response_cb)
        self._box.add_alert(alert)
        return False
Example #7
0
    def __register_activate_cb(self, icon):
        alert = Alert()
        try:
            schoolserver.register_laptop()
        except RegisterError as e:
            alert.props.title = _('Registration Failed')
            alert.props.msg = '%s' % e
        else:
            alert.props.title = _('Registration Successful')
            alert.props.msg = _('You are now registered '
                                'with your school server.')

        ok_icon = Icon(icon_name='dialog-ok')
        alert.add_button(Gtk.ResponseType.OK, _('Ok'), ok_icon)

        self._box.add_alert(alert)
        alert.connect('response', self.__register_alert_response_cb)