diff options
author | Ajay Garg <ajay@activitycentral.com> | 2012-08-30 13:04:07 (GMT) |
---|---|---|
committer | Ajay Garg <ajay@activitycentral.com> | 2012-08-30 13:04:07 (GMT) |
commit | b46b58dd8196ab8bcfcc56f2fc5ee503bf2d4e66 (patch) | |
tree | f3e462cb5da9102174b67602a4a36fef662a6f66 | |
parent | fae6b3d83f8ff06b0fe7ffd142018107dec2dc8f (diff) |
ac#2265: Displaying the laptop "model" in the control panel (UY).
-rw-r--r-- | rpms/sugar/0131-ac-2265-Displaying-the-laptop-model-in-the-control-p.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/rpms/sugar/0131-ac-2265-Displaying-the-laptop-model-in-the-control-p.patch b/rpms/sugar/0131-ac-2265-Displaying-the-laptop-model-in-the-control-p.patch new file mode 100644 index 0000000..8bcec1c --- /dev/null +++ b/rpms/sugar/0131-ac-2265-Displaying-the-laptop-model-in-the-control-p.patch @@ -0,0 +1,72 @@ +From 1cd84e13e0bad7fb9e7ede1261c338c0dd031ad0 Mon Sep 17 00:00:00 2001 +From: Ajay Garg <ajay@activitycentral.com> +Date: Thu, 30 Aug 2012 18:29:04 +0530 +Subject: [PATCH] ac#2265: Displaying the laptop "model" in the control panel (UY). +Organization: Sugar Labs Foundation +Signed-off-by: Ajay Garg <ajay@activitycentral.com> +--- + +Copying the patch from +https://git.ceibal.edu.uy/dx3-osbuilder-uy/dx3-osbuilder-uy/blobs/dx3-uy/scripts/parches/05-aboutcomputer_show_model_laptop.patch +into dx3 osbuilder (bleeding-edge). + + extensions/cpsection/aboutcomputer/model.py | 9 +++++++++ + extensions/cpsection/aboutcomputer/view.py | 15 +++++++++++++++ + 2 files changed, 24 insertions(+), 0 deletions(-) + +diff --git a/extensions/cpsection/aboutcomputer/model.py b/extensions/cpsection/aboutcomputer/model.py +index 4510af6..27237e8 100644 +--- a/extensions/cpsection/aboutcomputer/model.py ++++ b/extensions/cpsection/aboutcomputer/model.py +@@ -27,6 +27,8 @@ import dbus + + from jarabe import config + ++from ceibal import laptops ++ + _NM_SERVICE = 'org.freedesktop.NetworkManager' + _NM_PATH = '/org/freedesktop/NetworkManager' + _NM_IFACE = 'org.freedesktop.NetworkManager' +@@ -127,6 +129,13 @@ def print_build_number(): + print get_build_number() + + ++def get_model_laptop(): ++ model_laptop = laptops.get_model_laptop() ++ if model_laptop is None or not model_laptop: ++ model_laptop = _not_available ++ return model_laptop ++ ++ + def _parse_firmware_number(firmware_no): + if firmware_no is None: + firmware_no = _not_available +diff --git a/extensions/cpsection/aboutcomputer/view.py b/extensions/cpsection/aboutcomputer/view.py +index dd2f200..75b79df 100644 +--- a/extensions/cpsection/aboutcomputer/view.py ++++ b/extensions/cpsection/aboutcomputer/view.py +@@ -110,6 +110,21 @@ class AboutComputer(SectionView): + box_software.set_border_width(style.DEFAULT_SPACING * 2) + box_software.set_spacing(style.DEFAULT_SPACING) + ++ box_model = gtk.HBox(spacing=style.DEFAULT_SPACING) ++ label_model = gtk.Label(_('Model:')) ++ label_model.set_alignment(1, 0) ++ label_model.modify_fg(gtk.STATE_NORMAL, ++ style.COLOR_SELECTION_GREY.get_gdk_color()) ++ box_model.pack_start(label_model, expand=False) ++ self._group.add_widget(label_model) ++ label_model.show() ++ label_model_no = gtk.Label(self._model.get_model_laptop()) ++ label_model_no.set_alignment(0, 0) ++ box_model.pack_start(label_model_no, expand=False) ++ label_model_no.show() ++ box_software.pack_start(box_model, expand=False) ++ box_model.show() ++ + box_build = gtk.HBox(spacing=style.DEFAULT_SPACING) + label_build = gtk.Label(_('Build:')) + label_build.set_alignment(1, 0) +-- +1.7.4.4 + |