Skip to content
Permalink
Browse files
Show busy on register to school server
School server registration can take a few seconds, depending on network
activity.  Worst case is when there is no school server on an adhoc
network.

Show the shell is busy.  A busy cursor does not work for touchscreens,
so an alert is used.  This is in keeping with the alert already used
when a register to school server finishes.

Test case: connect to an adhoc network, then try to register.  A busy
message will appear, then some time later a failure message will appear.
  • Loading branch information
quozl authored and godiard committed Dec 10, 2014
1 parent 726aaee commit 7d3f55e
Showing 1 changed file with 9 additions and 0 deletions.
@@ -372,6 +372,14 @@ def _get_selected(self, query):
return selected

def __register_activate_cb(self, icon):
alert = Alert()
alert.props.title = _('Registration')
alert.props.msg = _('Please wait, searching for your school server.')
self._box.add_alert(alert)
GObject.idle_add(self.__register)

def __register(self):
self._box.remove_alert()
alert = Alert()
try:
schoolserver.register_laptop()
@@ -388,6 +396,7 @@ def __register_activate_cb(self, icon):

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

def __register_alert_response_cb(self, alert, response_id):
self._box.remove_alert()

0 comments on commit 7d3f55e

Please sign in to comment.