Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-11-09 23:35:49 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-11-09 23:35:49 (GMT)
commit95c6e9a3620563d9238cb177234b67651d3fb31d (patch)
tree75a79cb19d5e75b881ffca759eda869d4f1e38e0
parentc7cf792629bff723f55facca935f60739aa28226 (diff)
use busy cursor instead of alert
-rw-r--r--AbacusActivity.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/AbacusActivity.py b/AbacusActivity.py
index 3180c60..f9518ae 100644
--- a/AbacusActivity.py
+++ b/AbacusActivity.py
@@ -29,7 +29,7 @@ from sugar3.activity.widgets import ActivityToolbarButton
from sugar3.activity.widgets import StopButton
from sugar3.graphics.toolbarbox import ToolbarButton
from sugar3.graphics.toolbutton import ToolButton
-from sugar3.graphics.alert import NotifyAlert
+# from sugar3.graphics.alert import NotifyAlert
from sugar3.graphics import style
from gettext import gettext as _
@@ -315,6 +315,9 @@ class AbacusActivity(activity.Activity):
def _notify_new_abacus(self, prompt):
''' Loading a new abacus can be slooow, so alert the user. '''
+ # a busy cursor is adequate
+ self.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
+ '''
alert = NotifyAlert(3)
alert.props.title = prompt
alert.props.msg = _('A new abacus is loading.')
@@ -325,6 +328,7 @@ class AbacusActivity(activity.Activity):
alert.connect('response', _notification_alert_response_cb, self)
self.add_alert(alert)
alert.show()
+ '''
def _select_abacus(self, abacus):
''' Notify the user of an expected delay and then... '''
@@ -336,11 +340,12 @@ class AbacusActivity(activity.Activity):
return
self._notify_new_abacus(NAMES[abacus])
- # Give the alert time to load
+ # Give the cursor/alert time to load
GObject.timeout_add(1000, self._switch_modes, abacus)
def _switch_modes(self, abacus):
''' Display the selected abacus '''
+ _logger.debug('switching modes to %s', abacus)
# Save current value
value = int(float(self.abacus.mode.value()))
if abacus == 'custom':
@@ -352,6 +357,7 @@ class AbacusActivity(activity.Activity):
self.abacus.mode.set_value_from_number(value)
self.abacus.mode.label(self.abacus.generate_label())
self._label.set_text(NAMES[abacus])
+ self.get_window().set_cursor(None)
def _rods_spin_cb(self, button=None):
return