Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAjay Garg <ajay@activitycentral.com>2012-08-30 13:33:59 (GMT)
committer Ajay Garg <ajay@activitycentral.com>2012-08-30 13:33:59 (GMT)
commit2563b25ec36cea7f4e7691f081a41020b78f9639 (patch)
treea141f08abd0700e944d1932ce1fe33629e0c57ec
parentb46b58dd8196ab8bcfcc56f2fc5ee503bf2d4e66 (diff)
ac#2266: Displaying the "upgrade version" in the control panel (UY).
-rw-r--r--rpms/sugar/0132-ac-2266-Displaying-the-upgrade-version-in-the-contro.patch178
1 files changed, 178 insertions, 0 deletions
diff --git a/rpms/sugar/0132-ac-2266-Displaying-the-upgrade-version-in-the-contro.patch b/rpms/sugar/0132-ac-2266-Displaying-the-upgrade-version-in-the-contro.patch
new file mode 100644
index 0000000..be146dc
--- /dev/null
+++ b/rpms/sugar/0132-ac-2266-Displaying-the-upgrade-version-in-the-contro.patch
@@ -0,0 +1,178 @@
+From 0776ba7c0405a3bd1323f9788ea1c6a0764dde74 Mon Sep 17 00:00:00 2001
+From: Ajay Garg <ajay@activitycentral.com>
+Date: Thu, 30 Aug 2012 19:01:10 +0530
+Subject: [PATCH] ac#2266: Displaying the "upgrade version" in the control panel (UY).
+Organization: Sugar Labs Foundation
+Signed-off-by: Ajay Garg <ajay@activitycentral.com>
+---
+
+Copying the patches from
+ https://git.ceibal.edu.uy/dx3-osbuilder-uy/dx3-osbuilder-uy/blobs/dx3-uy/scripts/parches/01-uy-changes.patch
+ https://git.ceibal.edu.uy/dx3-osbuilder-uy/dx3-osbuilder-uy/blobs/dx3-uy/scripts/parches/02-uy-changes.patch
+ https://git.ceibal.edu.uy/dx3-osbuilder-uy/dx3-osbuilder-uy/blobs/dx3-uy/scripts/parches/03-uy-changes.patch
+
+into dx3 osbuilder (bleeding-edge).
+
+
+ bin/sugar-session | 6 ++++
+ extensions/cpsection/aboutcomputer/model.py | 26 +++++++++++++++++
+ extensions/cpsection/aboutcomputer/view.py | 40 +++++++++++++++++++++++++++
+ 3 files changed, 72 insertions(+), 0 deletions(-)
+
+diff --git a/bin/sugar-session b/bin/sugar-session
+index c2e3bff..7881aea 100755
+--- a/bin/sugar-session
++++ b/bin/sugar-session
+@@ -125,6 +125,11 @@ def setup_notification_service_cb():
+ from jarabe.model import notifications
+ notifications.init()
+
++def show_notifications_cb():
++ from ceibal.notifier import Notifier
++ n = Notifier()
++ n.show_messages_from_shell()
++
+ def setup_file_transfer_cb():
+ from jarabe.model import filetransfer
+ filetransfer.init()
+@@ -193,6 +198,7 @@ def file_monitor_changed_cb(monitor, one_file, other_file, event_type):
+ (one_file.get_path() == os.path.expanduser('~/.sugar/journal_created')):
+ if event_type == gio.FILE_MONITOR_EVENT_CREATED:
+ gobject.idle_add(setup_frame_cb)
++ gobject.idle_add(show_notifications_cb)
+ MONITOR_ACTION_TAKEN = True
+
+ def arrange_for_setup_frame_cb():
+diff --git a/extensions/cpsection/aboutcomputer/model.py b/extensions/cpsection/aboutcomputer/model.py
+index 27237e8..e9276b9 100644
+--- a/extensions/cpsection/aboutcomputer/model.py
++++ b/extensions/cpsection/aboutcomputer/model.py
+@@ -1,4 +1,5 @@
+ # Copyright (C) 2008 One Laptop Per Child
++# Copyright (C) 2010 Plan Ceibal <comunidad@plan.ceibal.edu.uy>
+ #
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+@@ -18,6 +19,8 @@
+ import os
+ import logging
+ import re
++import ConfigParser
++import time
+ import subprocess
+ from gettext import gettext as _
+ import errno
+@@ -321,3 +324,26 @@ def get_last_updated_on_field():
+ # Everything should be fine (hopefully :-) )
+ return last_update_readable_format
+
++def get_plazo():
++ from ceibal import env
++ path_plazo = env.get_security_root()
++ try:
++ plazo = _read_file(os.path.join(path_plazo, "blacklist")).split("\n")[0].strip()
++ plazo = time.strftime( "%d-%m-%Y",time.strptime(plazo,'%Y%m%d'))
++ except:
++ plazo = _not_available
++
++ return plazo
++
++def get_act():
++ from ceibal import env
++ path_act = env.get_updates_root()
++ parser = ConfigParser.ConfigParser()
++ salida = parser.read(os.path.join(path_act, "mi_version"))
++ if salida == []:
++ version = _not_available
++ else:
++ version = ''
++ for seccion in parser.sections():
++ version = "%s%s: %s\n" %(version,seccion,parser.get(seccion,'version'))
++ return version
+diff --git a/extensions/cpsection/aboutcomputer/view.py b/extensions/cpsection/aboutcomputer/view.py
+index 75b79df..1aaef6b 100644
+--- a/extensions/cpsection/aboutcomputer/view.py
++++ b/extensions/cpsection/aboutcomputer/view.py
+@@ -79,6 +79,7 @@ class AboutComputer(SectionView):
+ vbox_identity.pack_start(box_identity, expand=False)
+ box_identity.show()
+
++ """
+ box_lease = gtk.HBox(spacing=style.DEFAULT_SPACING)
+ label_lease = gtk.Label(_('Lease: '))
+ label_lease.set_alignment(1, 0)
+@@ -93,6 +94,7 @@ class AboutComputer(SectionView):
+ label_lease_ver.show()
+ vbox_identity.pack_start(box_lease, expand=False)
+ box_lease.show()
++ """
+
+ self._vbox.pack_start(vbox_identity, expand=False)
+ vbox_identity.show()
+@@ -170,6 +172,7 @@ class AboutComputer(SectionView):
+ box_software.pack_start(box_firmware, expand=False)
+ box_firmware.show()
+
++ """ It's not needed for Ceibal
+ box_wireless_fw = gtk.HBox(spacing=style.DEFAULT_SPACING)
+ label_wireless_fw = gtk.Label(_('Wireless Firmware:'))
+ label_wireless_fw.set_alignment(1, 0)
+@@ -185,11 +188,47 @@ class AboutComputer(SectionView):
+ label_wireless_fw_no.show()
+ box_software.pack_start(box_wireless_fw, expand=False)
+ box_wireless_fw.show()
++ """
++
++ ##################### PLAZO ####################
++ box_plazo = gtk.HBox(spacing=style.DEFAULT_SPACING)
++ label_plazo = gtk.Label(_('Plazo:'))
++ label_plazo.set_alignment(1, 0)
++ label_plazo.modify_fg(gtk.STATE_NORMAL,
++ style.COLOR_SELECTION_GREY.get_gdk_color())
++ box_plazo.pack_start(label_plazo, expand=False)
++ self._group.add_widget(label_plazo)
++ label_plazo.show()
++ label_plazo_no = gtk.Label(self._model.get_plazo())
++ label_plazo_no.set_alignment(0, 0)
++ box_plazo.pack_start(label_plazo_no, expand=False)
++ label_plazo_no.show()
++ box_software.pack_start(box_plazo, expand=False)
++ box_plazo.show()
++
++ ######### VERSION DE ACTUALIZACION ##############
++
++ box_act = gtk.HBox(spacing=style.DEFAULT_SPACING)
++ label_act = gtk.Label(_('VersiĆ³n de ActualizaciĆ³n:'))
++ label_act.set_alignment(1, 0)
++ label_act.modify_fg(gtk.STATE_NORMAL,
++ style.COLOR_SELECTION_GREY.get_gdk_color())
++ box_act.pack_start(label_act, expand=False)
++ self._group.add_widget(label_act)
++ label_act.show()
++ label_act_no = gtk.Label(self._model.get_act())
++ label_act_no.set_alignment(0, 0)
++ box_act.pack_start(label_act_no, expand=False)
++ label_act_no.show()
++ box_software.pack_start(box_act, expand=False)
++ box_act.show()
++
+
+ # Try to fetch "Last Updated On" field from the model.
+ # If the field is not empty, display it.
+ # At present, the field is returned empty, only if "root-access"
+ # is disabled on the target-machine.
++ """
+ last_updated_on_field = self._model.get_last_updated_on_field()
+ if last_updated_on_field:
+ box_last_updated_on = gtk.HBox(spacing=style.DEFAULT_SPACING)
+@@ -207,6 +246,7 @@ class AboutComputer(SectionView):
+ label_last_updated_on_field.show()
+ box_software.pack_start(box_last_updated_on, expand=False)
+ box_last_updated_on.show()
++ """
+
+ self._vbox.pack_start(box_software, expand=False)
+ box_software.show()
+--
+1.7.4.4
+