[Dextrose] [PATCH][Dx2][sugar] Add lease expiration reminder
Martin Abente
martin.abente.lahaye at gmail.com
Fri Apr 29 20:31:15 EDT 2011
Add a new notification to remind users the
procedure to re-activate their laptops after
lease expiration.
Implements #2658
---
src/jarabe/desktop/homewindow.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/jarabe/desktop/homewindow.py b/src/jarabe/desktop/homewindow.py
index b98a105..f20bc64 100644
--- a/src/jarabe/desktop/homewindow.py
+++ b/src/jarabe/desktop/homewindow.py
@@ -40,6 +40,7 @@ _DBUS_SYSTEM_IFACE = 'org.sugarlabs.system'
_DBUS_SYSTEM_PATH = '/org/sugarlabs/system'
_SYSTEM_REBOOT_ID = -1
_SYSTEM_RELOGIN_ID = -2
+_SYSTEM_REMIND_ID = -3
_SYSTEM_TIMEOUT = 5
class HomeWindow(gtk.Window):
@@ -92,6 +93,8 @@ class HomeWindow(gtk.Window):
_DBUS_SYSTEM_IFACE)
systembus.add_signal_receiver(self.__relogin_cb, 'Relogin',
_DBUS_SYSTEM_IFACE)
+ systembus.add_signal_receiver(self.__remind_cb, 'Remind',
+ _DBUS_SYSTEM_IFACE)
def _system_alert(self, replaces_id, app_icon, message):
service = notifications.get_service()
@@ -110,6 +113,11 @@ class HomeWindow(gtk.Window):
_('Please, restart Sugar to take into account ' \
'new updates'))
+ def __remind_cb(self):
+ self._system_alert(_SYSTEM_REMIND_ID, 'school-server',
+ _('Please, connect to your school network within the next ' \
+ 'days in order to re-activate your laptop'))
+
def _deactivate_view(self, level):
group = palettegroup.get_group("default")
group.popdown()
--
1.7.4.4
More information about the Dextrose
mailing list