Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnish Mangal <anish@sugarlabs.org>2011-02-02 15:42:01 (GMT)
committer Anish Mangal <anish@sugarlabs.org>2011-02-02 15:42:01 (GMT)
commitc6d7845fce52a9b0c345aea103e2d3672426dd61 (patch)
tree50b71ca42308179de5428a17b82716a23f9b2d2a
parent1646b2ba1e5cb2dc5bc707b0dbd1b65d0df86dee (diff)
New patches for sugar, sugar-toolkit and updated specs
* sugar-toolkit - ctime workaround fix - sl#2201 fix - more robust handling of unhandled exceptions * sugar - sl#2201 fix - 3G|modem -- Database support for 3G control panel -- Fix no restart after provider info selection - Notification second behaviour enhancement
-rw-r--r--rpms/sugar-toolkit/set-ctime-workaround.patch33
-rw-r--r--rpms/sugar-toolkit/sugar-toolkit-Clipboard-menu-off-screen-2201.patch115
-rw-r--r--rpms/sugar-toolkit/sugar-toolkit-More-robust-handling-of-unhandled-exceptions.patch58
-rw-r--r--rpms/sugar-toolkit/sugar-toolkit.spec22
-rw-r--r--rpms/sugar/Database-support-for-3G-control-panel.patch546
-rw-r--r--rpms/sugar/Fix-no-restart-after-provider-info-selection.patch47
-rw-r--r--rpms/sugar/Message-Notifications-second-behaviour-enhancement.patch35
-rw-r--r--rpms/sugar/activate-busy-cursor-when-opening-cp-sections.patch39
-rw-r--r--rpms/sugar/sugar-Clipboard-menu-off-screen-2201.patch30
-rw-r--r--rpms/sugar/sugar.spec30
10 files changed, 953 insertions, 2 deletions
diff --git a/rpms/sugar-toolkit/set-ctime-workaround.patch b/rpms/sugar-toolkit/set-ctime-workaround.patch
new file mode 100644
index 0000000..86fff30
--- /dev/null
+++ b/rpms/sugar-toolkit/set-ctime-workaround.patch
@@ -0,0 +1,33 @@
+From patchwork Tue Jan 11 14:55:51 2011
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: set ctime workaround
+Date: Tue, 11 Jan 2011 19:55:51 -0000
+From: Martin Abente <martin.abente.lahaye@gmail.com>
+X-Patchwork-Id: 550
+Message-Id: <1294757751-15436-1-git-send-email-martin.abente.lahaye@gmail.com>
+To: dextrose@lists.sugarlabs.org,
+ tch@sugarlabs.org
+
+From: Esteban Bordon <ebordon@plan.ceibal.edu.uy>
+
+This is a workaround to set te ctime in sugar-toolkit.
+
+---
+src/sugar/datastore/datastore.py | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/src/sugar/datastore/datastore.py b/src/sugar/datastore/datastore.py
+index 1618cef..db75665 100644
+--- a/src/sugar/datastore/datastore.py
++++ b/src/sugar/datastore/datastore.py
+@@ -305,6 +305,8 @@ def create():
+ metadata = DSMetadata()
+ metadata['mtime'] = datetime.now().isoformat()
+ metadata['timestamp'] = int(time.time())
++ if not metadata.get('ctime'):
++ metadata['ctime'] = time.strftime("%Y-%m-%dT%H:%M:%S", time.localtime())
+ return DSObject(object_id=None, metadata=metadata, file_path=None)
+
+
diff --git a/rpms/sugar-toolkit/sugar-toolkit-Clipboard-menu-off-screen-2201.patch b/rpms/sugar-toolkit/sugar-toolkit-Clipboard-menu-off-screen-2201.patch
new file mode 100644
index 0000000..cc79154
--- /dev/null
+++ b/rpms/sugar-toolkit/sugar-toolkit-Clipboard-menu-off-screen-2201.patch
@@ -0,0 +1,115 @@
+From patchwork Sat Dec 18 05:25:44 2010
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [sugar-toolkit] Clipboard menu off screen #2201
+Date: Sat, 18 Dec 2010 10:25:44 -0000
+From: Aleksey Lim <alsroot@member.fsf.org>
+X-Patchwork-Id: 536
+Message-Id: <1292649944-24323-1-git-send-email-alsroot@member.fsf.org>
+To: sugar-devel@lists.sugarlabs.org
+Cc: dextrose@lists.sugarlabs.org
+
+New font.char_width property to return approximate char width. Set Palette's
+text_maxlen to a half of the screen by defualt.
+
+---
+src/sugar/graphics/palette.py | 21 +++++++++++++++++----
+ src/sugar/graphics/style.py | 40 ++++++++++++++++++++++++++++++++++++----
+ 2 files changed, 53 insertions(+), 8 deletions(-)
+
+diff --git a/src/sugar/graphics/palette.py b/src/sugar/graphics/palette.py
+index 46f167b..b542407 100644
+--- a/src/sugar/graphics/palette.py
++++ b/src/sugar/graphics/palette.py
+@@ -45,10 +45,23 @@ class Palette(PaletteWindow):
+ __gtype_name__ = 'SugarPalette'
+
+ def __init__(self, label=None, accel_path=None, menu_after_content=False,
+- text_maxlen=60, **kwargs):
+- # DEPRECATED: label is passed with the primary-text property,
+- # accel_path is set via the invoker property, and menu_after_content
+- # is not used
++ text_maxlen=None, **kwargs):
++ """Constructor.
++
++ Keyword arguments:
++ label -- DEPRECATED, is passed with the primary-text property
++ accel_path -- DEPRECATED, is set via the invoker property
++ menu_after_content -- DEPRECATED, is not used
++ text_maxlen -- max length of palette titles after that it becomes
++ ellipsized, possible values:
++ None -- autodetect most appropriate value, by default
++ <= 0 -- do not ellipsize titles
++ > 0 -- valid width value
++
++ """
++ if text_maxlen is None:
++ text_maxlen = (gtk.gdk.screen_width() / 2) / \
++ style.FONT_DEFAULT.char_width
+
+ self._primary_text = None
+ self._secondary_text = None
+diff --git a/src/sugar/graphics/style.py b/src/sugar/graphics/style.py
+index 7f48d9a..e8dc768 100644
+--- a/src/sugar/graphics/style.py
++++ b/src/sugar/graphics/style.py
+@@ -45,15 +45,46 @@ def _compute_zoom_factor():
+
+
+ class Font(object):
++ """High level font information."""
+
+- def __init__(self, desc):
+- self._desc = desc
++ def __init__(self, desc=None):
++ """Constructor.
++
++ Keyword arguments:
++ desc -- string with font description
++
++ """
++ default_context = gtk.Label().get_pango_context()
++
++ if desc is None:
++ self._desc = default_context.get_font_description()
++ else:
++ self._desc = pango.FontDescription(desc)
++
++ metrics = default_context.get_metrics(self._desc)
++ self._char_width = max(metrics.get_approximate_char_width(),
++ metrics.get_approximate_digit_width()) / pango.SCALE
+
+ def __str__(self):
+- return self._desc
++ return self._desc.to_string()
+
+ def get_pango_desc(self):
+- return pango.FontDescription(self._desc)
++ """Returns pango font description object."""
++ return self._desc
++
++ pango_desc = property(get_pango_desc)
++
++ def get_char_width(self):
++ """Approximate char width.
++
++ This is merely a representative value that is useful, for example, for
++ determining the initial size for a window. Actual characters in text
++ will be wider and narrower than this.
++
++ """
++ return self._char_width
++
++ char_width = property(get_char_width)
+
+
+ class Color(object):
+@@ -119,6 +150,7 @@ client = gconf.client_get_default()
+ FONT_SIZE = client.get_float('/desktop/sugar/font/default_size')
+ FONT_FACE = client.get_string('/desktop/sugar/font/default_face')
+
++FONT_DEFAULT = Font()
+ FONT_NORMAL = Font('%s %f' % (FONT_FACE, FONT_SIZE))
+ FONT_BOLD = Font('%s bold %f' % (FONT_FACE, FONT_SIZE))
+ FONT_NORMAL_H = zoom(24)
diff --git a/rpms/sugar-toolkit/sugar-toolkit-More-robust-handling-of-unhandled-exceptions.patch b/rpms/sugar-toolkit/sugar-toolkit-More-robust-handling-of-unhandled-exceptions.patch
new file mode 100644
index 0000000..8d138bf
--- /dev/null
+++ b/rpms/sugar-toolkit/sugar-toolkit-More-robust-handling-of-unhandled-exceptions.patch
@@ -0,0 +1,58 @@
+From patchwork Mon Jan 24 10:57:50 2011
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [sugar-toolkit] More robust handling of unhandled exceptions
+Date: Mon, 24 Jan 2011 15:57:50 -0000
+From: Aleksey Lim <alsroot@member.fsf.org>
+X-Patchwork-Id: 618
+Message-Id: <1295866670-3952-1-git-send-email-alsroot@member.fsf.org>
+To: dextrose@lists.sugarlabs.org
+
+---
+ src/sugar/feedback.py | 24 +++++++++++++++---------
+ 1 files changed, 15 insertions(+), 9 deletions(-)
+
+
+diff --git a/src/sugar/feedback.py b/src/sugar/feedback.py
+index 56dacab..770b7a7 100644
+--- a/src/sugar/feedback.py
++++ b/src/sugar/feedback.py
+@@ -79,6 +79,11 @@ def _send(activity_id, log_path):
+ log_path if need_log else '')
+
+
++def _format_exception(exctype, value, tb):
++ import traceback
++ return ''.join(traceback.format_exception(exctype, value, tb))
++
++
+ def _excepthook(exctype, value, tb):
+ global _log_formatter
+
+@@ -89,15 +94,16 @@ def _excepthook(exctype, value, tb):
+ from IPython.ultraTB import AutoFormattedTB
+ formatter = AutoFormattedTB(mode='Verbose', color_scheme='NoColor')
+ _log_formatter = formatter.text
+- except ImportError:
+- import traceback
+- _log_formatter = \
+- lambda * args: ''.join(traceback.format_exception(*args))
+-
+- message = _log_formatter(exctype, value, tb)
+- logging.error(message)
+-
+- trigger('unhandled_exception', need_log=True)
++ except BaseException:
++ _log_formatter = _format_exception
++
++ try:
++ message = _log_formatter(exctype, value, tb)
++ logging.error(message)
++ trigger('unhandled_exception', need_log=True)
++ except BaseException, error:
++ print >>sys.stderr, 'Unhandled %r while processing: %r %r' % \
++ (error, exctype, value)
+
+
+ sys.excepthook = _excepthook
diff --git a/rpms/sugar-toolkit/sugar-toolkit.spec b/rpms/sugar-toolkit/sugar-toolkit.spec
index 62e35fa..af892ca 100644
--- a/rpms/sugar-toolkit/sugar-toolkit.spec
+++ b/rpms/sugar-toolkit/sugar-toolkit.spec
@@ -3,7 +3,7 @@
Summary: Sugar toolkit
Name: sugar-toolkit
Version: 0.88.1
-Release: 4.13dxo%{?dist}
+Release: 4.14dxo%{?dist}
URL: http://wiki.laptop.org/go/Sugar
Source0: http://download.sugarlabs.org/sources/sucrose/glucose/%{name}/%{name}-%{version}.tar.bz2
Source1: macros.sugar
@@ -52,6 +52,15 @@ patch704: sugar-toolkit-4-4-XoColor-don-t-choke-if-passed-the-wrong-type-SL-1408
#Auto-feedback feature related changes
patch801: sugar-toolkit-Report-to-the-shell-on-errors.patch
+#Fix for sl#2201
+patch901: sugar-toolkit-Clipboard-menu-off-screen-2201.patch
+
+#Feedback feature: More robust handling of exceptions
+patch1001: sugar-toolkit-More-robust-handling-of-unhandled-exceptions.patch
+
+#ctime workaround
+patch1101: set-ctime-workaround.patch
+
License: LGPLv2+
Group: System Environment/Libraries
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -119,6 +128,12 @@ to interact with system services like presence and the datastore.
%patch801 -p1
+%patch901 -p1
+
+%patch1001 -p1
+
+%patch1101 -p1
+
%build
autoreconf
%configure
@@ -147,6 +162,11 @@ rm -rf %{buildroot}
%{_sysconfdir}/rpm/macros.sugar
%changelog
+* Tue Feb 1 2011 Anish Mangal <anish@sugarlabs.org> - 0.88.1-4.14
+- More robust handling of exceptions
+- sl#2201 fix
+- ctime workaround
+
* Wed Jan 19 2011 Anish Mangal <anish@sugarlabs.org> - 0.88.1-4.13
- Added auto-feedback feature related changes
diff --git a/rpms/sugar/Database-support-for-3G-control-panel.patch b/rpms/sugar/Database-support-for-3G-control-panel.patch
new file mode 100644
index 0000000..036323a
--- /dev/null
+++ b/rpms/sugar/Database-support-for-3G-control-panel.patch
@@ -0,0 +1,546 @@
+From patchwork Tue Jan 11 14:52:52 2011
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 8bit
+Subject: Database support for 3G control panel
+Date: Tue, 11 Jan 2011 19:52:52 -0000
+From: Martin Abente <martin.abente.lahaye@gmail.com>
+X-Patchwork-Id: 548
+Message-Id: <1294757572-15345-1-git-send-email-martin.abente.lahaye@gmail.com>
+To: dextrose@lists.sugarlabs.org,
+ tch@sugarlabs.org
+
+From: Andrés Ambrois <andresambrois@gmail.com>
+
+For more information please look at #1630
+
+---
+configure.ac | 1 +
+ .../cpsection/modemconfiguration/Makefile.am | 2 +
+ .../cpsection/modemconfiguration/config.py.in | 20 ++
+ extensions/cpsection/modemconfiguration/model.py | 119 +++++++++++++
+ extensions/cpsection/modemconfiguration/view.py | 184 ++++++++++++++++----
+ 5 files changed, 292 insertions(+), 34 deletions(-)
+ create mode 100644 extensions/cpsection/modemconfiguration/config.py.in
+ mode change 100755 => 100644 extensions/cpsection/modemconfiguration/model.py
+
+diff --git a/configure.ac b/configure.ac
+index 13a2f09..68a8bf3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -56,6 +56,7 @@ extensions/cpsection/frame/Makefile
+ extensions/cpsection/keyboard/Makefile
+ extensions/cpsection/language/Makefile
+ extensions/cpsection/modemconfiguration/Makefile
++extensions/cpsection/modemconfiguration/config.py
+ extensions/cpsection/Makefile
+ extensions/cpsection/network/Makefile
+ extensions/cpsection/power/Makefile
+diff --git a/extensions/cpsection/modemconfiguration/Makefile.am b/extensions/cpsection/modemconfiguration/Makefile.am
+index 3e2613e..525e02e 100644
+--- a/extensions/cpsection/modemconfiguration/Makefile.am
++++ b/extensions/cpsection/modemconfiguration/Makefile.am
+@@ -4,3 +4,5 @@ sugar_PYTHON = \
+ __init__.py \
+ model.py \
+ view.py
++
++nodist_sugar_PYTHON = config.py
+diff --git a/extensions/cpsection/modemconfiguration/config.py.in b/extensions/cpsection/modemconfiguration/config.py.in
+new file mode 100644
+index 0000000..6fa688e
+--- /dev/null
++++ b/extensions/cpsection/modemconfiguration/config.py.in
+@@ -0,0 +1,20 @@
++# -*- encoding: utf-8 -*-
++# Copyright (C) 2010 Andrés Ambrois
++#
++# 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
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US
++
++PROVIDERS_PATH = "@prefix@/share/mobile-broadband-provider-info/serviceproviders.xml"
++PROVIDERS_FORMAT_SUPPORTED = "2.0"
++COUNTRY_CODES_PATH = "@prefix@/share/zoneinfo/iso3166.tab"
+diff --git a/extensions/cpsection/modemconfiguration/model.py b/extensions/cpsection/modemconfiguration/model.py
+old mode 100755
+new mode 100644
+index 2545ce1..dbec47d
+--- a/extensions/cpsection/modemconfiguration/model.py
++++ b/extensions/cpsection/modemconfiguration/model.py
+@@ -15,11 +15,22 @@
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US
+
+ import gconf
++import gtk
++import os
++import locale
++import logging
++
++from xml.etree.cElementTree import ElementTree
++from gettext import gettext as _
+
+ from jarabe.model.network import GSM_USERNAME_PATH, GSM_PASSWORD_PATH, \
+ GSM_NUMBER_PATH, GSM_APN_PATH, GSM_PIN_PATH, \
+ GSM_PUK_PATH
+
++from cpsection.modemconfiguration.config import PROVIDERS_PATH, \
++ PROVIDERS_FORMAT_SUPPORTED, \
++ COUNTRY_CODES_PATH
++
+ def get_username():
+ client = gconf.client_get_default()
+ return client.get_string(GSM_USERNAME_PATH) or ''
+@@ -68,3 +79,111 @@ def set_puk(puk):
+ client = gconf.client_get_default()
+ client.set_string(GSM_PUK_PATH, puk)
+
++def has_providers_db():
++ if not os.path.isfile(COUNTRY_CODES_PATH):
++ logging.debug("Mobile broadband provider database: Country " \
++ "codes path %s not found.", COUNTRY_CODES_PATH)
++ return False
++ try:
++ tree = ElementTree(file=PROVIDERS_PATH)
++ except (IOError, SyntaxError), e:
++ logging.debug("Mobile broadband provider database: Could not read " \
++ "provider information %s error=%s", PROVIDERS_PATH)
++ return False
++ else:
++ elem = tree.getroot()
++ if elem is None or elem.get('format') != PROVIDERS_FORMAT_SUPPORTED:
++ logging.debug("Mobile broadband provider database: Could not " \
++ "read provider information. %s is wrong format.",
++ elem.get('format'))
++ return False
++ return True
++
++
++class CountryListStore(gtk.ListStore):
++ COUNTRY_CODE = locale.getdefaultlocale()[0][3:5].lower()
++
++ def __init__(self):
++ gtk.ListStore.__init__(self, str, object)
++ codes = {}
++ with open(COUNTRY_CODES_PATH) as codes_file:
++ for line in codes_file:
++ if line.startswith('#'):
++ continue
++ code, name = line.split('\t')[:2]
++ codes[code.lower()] = name.strip()
++ etree = ElementTree(file=PROVIDERS_PATH).getroot()
++ self._country_idx = None
++ i = 0
++ for elem in etree.findall('.//country'):
++ code = elem.attrib['code']
++ if code == self.COUNTRY_CODE:
++ self._country_idx = i
++ else:
++ i += 1
++ if code in codes:
++ self.append((codes[code], elem))
++ else:
++ self.append((code, elem))
++
++ def get_row_providers(self, row):
++ return self[row][1]
++
++ def guess_country_row(self):
++ if self._country_idx is not None:
++ return self._country_idx
++ else:
++ return -1
++
++class ProviderListStore(gtk.ListStore):
++ def __init__(self, elem):
++ gtk.ListStore.__init__(self, str, object)
++ for provider_elem in elem.findall('.//provider'):
++ apns = provider_elem.findall('.//apn')
++ if not apns:
++ # Skip carriers with CDMA entries only
++ continue
++ self.append((provider_elem.find('.//name').text, apns))
++
++ def get_row_plans(self, row):
++ return self[row][1]
++
++class PlanListStore(gtk.ListStore):
++ LANG_NS_ATTR = '{http://www.w3.org/XML/1998/namespace}lang'
++ LANG = locale.getdefaultlocale()[0][:2]
++ DEFAULT_NUMBER = '*99#'
++
++ def __init__(self, elems):
++ gtk.ListStore.__init__(self, str, object)
++ for apn_elem in elems:
++ plan = {}
++ names = apn_elem.findall('.//name')
++ if names:
++ for name in names:
++ if name.get(self.LANG_NS_ATTR) is None:
++ # serviceproviders.xml default value
++ plan['name'] = name.text
++ elif name.get(self.LANG_NS_ATTR) == self.LANG:
++ # Great! We found a name value for our locale!
++ plan['name'] = name.text
++ break
++ else:
++ plan['name'] = _('Default')
++ plan['apn'] = apn_elem.get('value')
++ user = apn_elem.find('.//username')
++ if user is not None:
++ plan['username'] = user.text
++ else:
++ plan['username'] = ''
++ passwd = apn_elem.find('.//password')
++ if passwd is not None:
++ plan['password'] = passwd.text
++ else:
++ plan['password'] = ''
++
++ plan['number'] = self.DEFAULT_NUMBER
++
++ self.append((plan['name'], plan))
++
++ def get_row_plan(self, row):
++ return self[row][1]
+diff --git a/extensions/cpsection/modemconfiguration/view.py b/extensions/cpsection/modemconfiguration/view.py
+index b236f3f..3b03b3d 100644
+--- a/extensions/cpsection/modemconfiguration/view.py
++++ b/extensions/cpsection/modemconfiguration/view.py
+@@ -14,8 +14,6 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US
+
+-import os
+-import logging
+ from gettext import gettext as _
+
+ import gtk
+@@ -31,7 +29,7 @@ class EntryWithLabel(gtk.HBox):
+ __gtype_name__ = "SugarEntryWithLabel"
+
+ def __init__(self, label_text):
+- gtk.HBox.__init__(self, spacing=style.DEFAULT_SPACING)
++ gtk.HBox.__init__(self, spacing=style.DEFAULT_SPACING * 2)
+
+ self._timeout_sid = 0
+ self._changed_handler = None
+@@ -44,11 +42,11 @@ class EntryWithLabel(gtk.HBox):
+ self.pack_start(self.label, expand=False)
+ self.label.show()
+
+- self._entry = gtk.Entry(25)
+- self._entry.connect('changed', self.__entry_changed_cb)
+- self._entry.set_width_chars(25)
+- self.pack_start(self._entry, expand=False)
+- self._entry.show()
++ self.entry = gtk.Entry(25)
++ self.entry.connect('changed', self.__entry_changed_cb)
++ self.entry.set_width_chars(25)
++ self.pack_start(self.entry, expand=False)
++ self.entry.show()
+
+ def __entry_changed_cb(self, widget, data=None):
+ if self._timeout_sid:
+@@ -59,11 +57,11 @@ class EntryWithLabel(gtk.HBox):
+ def __timeout_cb(self):
+ self._timeout_sid = 0
+
+- if self._entry.get_text() == self.get_value():
++ if self.entry.get_text() == self.get_value():
+ return False
+
+ try:
+- self.set_value(self._entry.get_text())
++ self.set_value(self.entry.get_text())
+ except ValueError:
+ self._is_valid = False
+ else:
+@@ -74,18 +72,20 @@ class EntryWithLabel(gtk.HBox):
+ return False
+
+ def set_text_from_model(self):
+- self._entry.set_text(self.get_value())
++ self.entry.set_text(self.get_value())
+
+ def get_value(self):
+ raise NotImplementedError
+
+- def set_value(self):
++ def set_value(self, value):
+ raise NotImplementedError
+
+ def _get_is_valid(self):
+ return self._is_valid
++
+ is_valid = gobject.property(type=bool, getter=_get_is_valid, default=True)
+
++
+ class UsernameEntry(EntryWithLabel):
+ def __init__(self, model):
+ EntryWithLabel.__init__(self, _('Username:'))
+@@ -97,6 +97,7 @@ class UsernameEntry(EntryWithLabel):
+ def set_value(self, username):
+ self._model.set_username(username)
+
++
+ class PasswordEntry(EntryWithLabel):
+ def __init__(self, model):
+ EntryWithLabel.__init__(self, _('Password:'))
+@@ -108,6 +109,7 @@ class PasswordEntry(EntryWithLabel):
+ def set_value(self, password):
+ self._model.set_password(password)
+
++
+ class NumberEntry(EntryWithLabel):
+ def __init__(self, model):
+ EntryWithLabel.__init__(self, _('Number:'))
+@@ -119,6 +121,7 @@ class NumberEntry(EntryWithLabel):
+ def set_value(self, number):
+ self._model.set_number(number)
+
++
+ class ApnEntry(EntryWithLabel):
+ def __init__(self, model):
+ EntryWithLabel.__init__(self, _('Access Point Name (APN):'))
+@@ -130,6 +133,7 @@ class ApnEntry(EntryWithLabel):
+ def set_value(self, apn):
+ self._model.set_apn(apn)
+
++
+ class PinEntry(EntryWithLabel):
+ def __init__(self, model):
+ EntryWithLabel.__init__(self, _('Personal Identity Number (PIN):'))
+@@ -141,6 +145,7 @@ class PinEntry(EntryWithLabel):
+ def set_value(self, pin):
+ self._model.set_pin(pin)
+
++
+ class PukEntry(EntryWithLabel):
+ def __init__(self, model):
+ EntryWithLabel.__init__(self, _('Personal Unblocking Key (PUK):'))
+@@ -160,61 +165,150 @@ class ModemConfiguration(SectionView):
+ self._model = model
+ self.restart_alerts = alerts
+
+- self.set_border_width(style.DEFAULT_SPACING)
+ self.set_spacing(style.DEFAULT_SPACING)
+- self._group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
++
++ label_group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
++ combo_group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
++
++ scrolled_win = gtk.ScrolledWindow()
++ scrolled_win.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
++ scrolled_win.show()
++ self.add(scrolled_win)
++
++ main_box = gtk.VBox(spacing=style.DEFAULT_SPACING)
++ main_box.set_border_width(style.DEFAULT_SPACING)
++ main_box.show()
++ scrolled_win.add_with_viewport(main_box)
+
+ explanation = _("You will need to provide the following " \
+ "information to set up a mobile " \
+ "broadband connection to a cellular "\
+ "(3G) network.")
+ self._text = gtk.Label(explanation)
+- self._text.set_width_chars(100)
+ self._text.set_line_wrap(True)
+ self._text.set_alignment(0, 0)
+- self.pack_start(self._text, False)
++ main_box.pack_start(self._text, False)
+ self._text.show()
+
++ if model.has_providers_db():
++ self._upper_box = gtk.VBox(spacing=style.DEFAULT_SPACING)
++ self._upper_box.set_border_width(style.DEFAULT_SPACING)
++ main_box.pack_start(self._upper_box, expand=False)
++ self._upper_box.show()
++
++
++ box = gtk.HBox(spacing=style.DEFAULT_SPACING * 2)
++ label = gtk.Label(_('Country:'))
++ label.set_alignment(1, 0.5)
++ label_group.add_widget(label)
++ box.pack_start(label, False)
++ label.show()
++ country_store = model.CountryListStore()
++ country_combo = gtk.ComboBox(country_store)
++ combo_group.add_widget(country_combo)
++ cell = gtk.CellRendererText()
++ cell.props.xalign = 0.5
++ country_combo.pack_start(cell)
++ country_combo.add_attribute(cell, 'text', 0)
++ country_combo.connect('changed', self.__country_selected_cb)
++ box.pack_start(country_combo, False)
++ country_combo.show()
++ self._upper_box.pack_start(box, False)
++ box.show()
++
++ box = gtk.HBox(spacing=style.DEFAULT_SPACING * 2)
++ label = gtk.Label(_('Provider:'))
++ label.set_alignment(1, 0.5)
++ label_group.add_widget(label)
++ box.pack_start(label, False)
++ label.show()
++ self._providers_combo = gtk.ComboBox()
++ combo_group.add_widget(self._providers_combo)
++ cell = gtk.CellRendererText()
++ cell.props.xalign = 0.5
++ self._providers_combo.pack_start(cell)
++ self._providers_combo.add_attribute(cell, 'text', 0)
++ self._providers_combo.connect('changed',
++ self.__provider_selected_cb)
++ box.pack_start(self._providers_combo, False)
++ self._providers_combo.show()
++ self._upper_box.pack_start(box, False)
++ box.show()
++
++ box = gtk.HBox(spacing=style.DEFAULT_SPACING*2)
++ label = gtk.Label(_('Plan:'))
++ label.set_alignment(1, 0.5)
++ label_group.add_widget(label)
++ box.pack_start(label, False)
++ label.show()
++ self._plan_combo = gtk.ComboBox()
++ combo_group.add_widget(self._plan_combo)
++ cell = gtk.CellRendererText()
++ cell.props.xalign = 0.5
++ self._plan_combo.pack_start(cell)
++ self._plan_combo.add_attribute(cell, 'text', 0)
++ self._plan_combo.connect('changed', self.__plan_selected_cb)
++ box.pack_start(self._plan_combo, False)
++ self._plan_combo.show()
++ self._upper_box.pack_start(box, False)
++ box.show()
++
++ country_combo.set_active(country_store.guess_country_row())
++
++ separator = gtk.HSeparator()
++ main_box.pack_start(separator, False)
++ separator.show()
++
++ self._lower_box = gtk.VBox(spacing=style.DEFAULT_SPACING)
++ self._lower_box.set_border_width(style.DEFAULT_SPACING)
++ main_box.pack_start(self._lower_box, expand=False)
++ self._lower_box.show()
++
+ self._username_entry = UsernameEntry(model)
+ self._username_entry.connect('notify::is-valid',
+ self.__notify_is_valid_cb)
+- self._group.add_widget(self._username_entry.label)
+- self.pack_start(self._username_entry, expand=False)
++ label_group.add_widget(self._username_entry.label)
++ combo_group.add_widget(self._username_entry.entry)
++ self._lower_box.pack_start(self._username_entry, fill=False)
+ self._username_entry.show()
+
+ self._password_entry = PasswordEntry(model)
+ self._password_entry.connect('notify::is-valid',
+ self.__notify_is_valid_cb)
+- self._group.add_widget(self._password_entry.label)
+- self.pack_start(self._password_entry, expand=False)
++ label_group.add_widget(self._password_entry.label)
++ combo_group.add_widget(self._password_entry.entry)
++ self._lower_box.pack_start(self._password_entry, fill=False)
+ self._password_entry.show()
+
+ self._number_entry = NumberEntry(model)
+ self._number_entry.connect('notify::is-valid',
+ self.__notify_is_valid_cb)
+- self._group.add_widget(self._number_entry.label)
+- self.pack_start(self._number_entry, expand=False)
++ label_group.add_widget(self._number_entry.label)
++ combo_group.add_widget(self._number_entry.entry)
++ self._lower_box.pack_start(self._number_entry, fill=False)
+ self._number_entry.show()
+
+ self._apn_entry = ApnEntry(model)
+ self._apn_entry.connect('notify::is-valid',
+ self.__notify_is_valid_cb)
+- self._group.add_widget(self._apn_entry.label)
+- self.pack_start(self._apn_entry, expand=False)
++ label_group.add_widget(self._apn_entry.label)
++ combo_group.add_widget(self._apn_entry.entry)
++ self._lower_box.pack_start(self._apn_entry, fill=False)
+ self._apn_entry.show()
+
+ self._pin_entry = PinEntry(model)
+ self._pin_entry.connect('notify::is-valid',
+ self.__notify_is_valid_cb)
+- self._group.add_widget(self._pin_entry.label)
+- self.pack_start(self._pin_entry, expand=False)
++ label_group.add_widget(self._pin_entry.label)
++ self._lower_box.pack_start(self._pin_entry, fill=False)
+ self._pin_entry.show()
+
+ self._puk_entry = PukEntry(model)
+ self._puk_entry.connect('notify::is-valid',
+ self.__notify_is_valid_cb)
+- self._group.add_widget(self._puk_entry.label)
+- self.pack_start(self._puk_entry, expand=False)
++ label_group.add_widget(self._puk_entry.label)
++ combo_group.add_widget(self._puk_entry.entry)
++ self._lower_box.pack_start(self._puk_entry, fill=False)
+ self._puk_entry.show()
+
+ self.setup()
+@@ -232,14 +326,37 @@ class ModemConfiguration(SectionView):
+ def undo(self):
+ self._model.undo()
+
++ def __country_selected_cb(self, combo):
++ model = combo.get_model()
++ providers = model.get_row_providers(combo.get_active())
++ self._providers_combo.set_model(
++ self._model.ProviderListStore(providers))
++
++ def __provider_selected_cb(self, combo):
++ model = combo.get_model()
++ plans = model.get_row_plans(combo.get_active())
++ self._plan_combo.set_model(self._model.PlanListStore(plans))
++
++ def __plan_selected_cb(self, combo):
++ model = combo.get_model()
++ plan = model.get_row_plan(combo.get_active())
++ self._username_entry.set_value(plan['username'])
++ self._username_entry.set_text_from_model()
++ self._password_entry.set_value(plan['password'])
++ self._password_entry.set_text_from_model()
++ self._number_entry.set_value(plan['number'])
++ self._number_entry.set_text_from_model()
++ self._apn_entry.set_value(plan['apn'])
++ self._apn_entry.set_text_from_model()
++
+ def _validate(self):
+ if self._username_entry.is_valid and \
+- self._password_entry.is_valid and \
++ self._password_entry.is_valid and \
+ self._number_entry.is_valid and \
+- self._apn_entry.is_valid and \
+- self._pin_entry.is_valid and \
+- self._puk_entry.is_valid:
+- self.props.is_valid = True
++ self._apn_entry.is_valid and \
++ self._pin_entry.is_valid and \
++ self._puk_entry.is_valid:
++ self.props.is_valid = True
+ else:
+ self.props.is_valid = False
+
+@@ -247,4 +364,3 @@ class ModemConfiguration(SectionView):
+ if entry.is_valid:
+ self.needs_restart = True
+ self._validate()
+-
diff --git a/rpms/sugar/Fix-no-restart-after-provider-info-selection.patch b/rpms/sugar/Fix-no-restart-after-provider-info-selection.patch
new file mode 100644
index 0000000..c898cc4
--- /dev/null
+++ b/rpms/sugar/Fix-no-restart-after-provider-info-selection.patch
@@ -0,0 +1,47 @@
+From patchwork Tue Jan 11 14:54:07 2011
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: Fix no restart after provider info selection
+Date: Tue, 11 Jan 2011 19:54:07 -0000
+From: Martin Abente <martin.abente.lahaye@gmail.com>
+X-Patchwork-Id: 549
+Message-Id: <1294757647-15384-1-git-send-email-martin.abente.lahaye@gmail.com>
+To: dextrose@lists.sugarlabs.org,
+ tch@sugarlabs.org
+
+Current 3g provider information selection logic bypassed the
+validation process, thefore no restart was required.
+
+Note that changes in the current session does not modify
+the current loaded connection information, and since the
+connection information is loaded at startup, restart is
+required.
+
+---
+extensions/cpsection/modemconfiguration/view.py | 12 ++++--------
+ 1 files changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/extensions/cpsection/modemconfiguration/view.py b/extensions/cpsection/modemconfiguration/view.py
+index 3b03b3d..1e465cf 100644
+--- a/extensions/cpsection/modemconfiguration/view.py
++++ b/extensions/cpsection/modemconfiguration/view.py
+@@ -340,14 +340,10 @@ class ModemConfiguration(SectionView):
+ def __plan_selected_cb(self, combo):
+ model = combo.get_model()
+ plan = model.get_row_plan(combo.get_active())
+- self._username_entry.set_value(plan['username'])
+- self._username_entry.set_text_from_model()
+- self._password_entry.set_value(plan['password'])
+- self._password_entry.set_text_from_model()
+- self._number_entry.set_value(plan['number'])
+- self._number_entry.set_text_from_model()
+- self._apn_entry.set_value(plan['apn'])
+- self._apn_entry.set_text_from_model()
++ self._username_entry.entry.set_text(plan['username'])
++ self._password_entry.entry.set_text(plan['password'])
++ self._number_entry.entry.set_text(plan['number'])
++ self._apn_entry.entry.set_text(plan['apn'])
+
+ def _validate(self):
+ if self._username_entry.is_valid and \
diff --git a/rpms/sugar/Message-Notifications-second-behaviour-enhancement.patch b/rpms/sugar/Message-Notifications-second-behaviour-enhancement.patch
new file mode 100644
index 0000000..9b56f83
--- /dev/null
+++ b/rpms/sugar/Message-Notifications-second-behaviour-enhancement.patch
@@ -0,0 +1,35 @@
+From patchwork Tue Jan 11 14:49:39 2011
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: Message Notifications second behaviour enhancement
+Date: Tue, 11 Jan 2011 19:49:39 -0000
+From: Martin Abente <martin.abente.lahaye@gmail.com>
+X-Patchwork-Id: 546
+Message-Id: <1294757379-15248-1-git-send-email-martin.abente.lahaye@gmail.com>
+To: dextrose@lists.sugarlabs.org,
+ tch@sugarlabs.org
+
+Corner notification icon will only show up if the frame is not
+visible.
+
+---
+src/jarabe/frame/frame.py | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/src/jarabe/frame/frame.py b/src/jarabe/frame/frame.py
+index 4366076..663f297 100644
+--- a/src/jarabe/frame/frame.py
++++ b/src/jarabe/frame/frame.py
+@@ -390,8 +390,10 @@ class Frame(object):
+ button.start_pulsing()
+
+ palette.push_message(body, summary, icon_name, xo_color)
+- self._launch_notification_icon(_DEFAULT_ICON, xo_color, corner, duration)
+
++ if not self.visible:
++ self._launch_notification_icon(_DEFAULT_ICON, xo_color,
++ corner, duration)
+
+ def remove_message(self, palette, corner):
+ if corner not in self._notif_by_message:
diff --git a/rpms/sugar/activate-busy-cursor-when-opening-cp-sections.patch b/rpms/sugar/activate-busy-cursor-when-opening-cp-sections.patch
new file mode 100644
index 0000000..4477d98
--- /dev/null
+++ b/rpms/sugar/activate-busy-cursor-when-opening-cp-sections.patch
@@ -0,0 +1,39 @@
+From dd0fcdc103cdbeb052094e66e7812c786fe23e07 Mon Sep 17 00:00:00 2001
+From: Ishan Bansal <ishan@seeta.in>
+Date: Wed, 22 Sep 2010 19:05:48 +0530
+Subject: [PATCH] Added busy cursor when we open any section in control panel. (Ticket #245)
+
+The sections in control panel should activate busy cursor so that user
+could be given a impression that their request is in progress.
+---
+ src/jarabe/controlpanel/gui.py | 13 +++++++++----
+ 1 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/src/jarabe/controlpanel/gui.py b/src/jarabe/controlpanel/gui.py
+index 9d1cc9e..9ce8cfd 100644
+--- a/src/jarabe/controlpanel/gui.py
++++ b/src/jarabe/controlpanel/gui.py
+@@ -214,11 +214,16 @@ class ControlPanel(gtk.Window):
+ globals(), locals(), ['model'])
+ model = ModelWrapper(mod)
+
+- self._section_view = view_class(model,
+- self._options[option]['alerts'])
++ try:
++ self.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
++ self._section_view = view_class(model,
++ self._options[option]['alerts'])
++
++ self._set_canvas(self._section_view)
++ self._section_view.show()
++ finally:
++ self.get_window().set_cursor(None)
+
+- self._set_canvas(self._section_view)
+- self._section_view.show()
+ self._section_view.connect('notify::is-valid',
+ self.__valid_section_cb)
+ self._section_view.connect('request-close',
+--
+1.7.3.5
+
diff --git a/rpms/sugar/sugar-Clipboard-menu-off-screen-2201.patch b/rpms/sugar/sugar-Clipboard-menu-off-screen-2201.patch
new file mode 100644
index 0000000..e102c4e
--- /dev/null
+++ b/rpms/sugar/sugar-Clipboard-menu-off-screen-2201.patch
@@ -0,0 +1,30 @@
+From patchwork Fri Dec 17 11:37:05 2010
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [sugar] Clipboard menu off screen #2201
+Date: Fri, 17 Dec 2010 16:37:05 -0000
+From: Aleksey Lim <alsroot@member.fsf.org>
+X-Patchwork-Id: 534
+Message-Id: <1292585825-10104-1-git-send-email-alsroot@member.fsf.org>
+To: sugar-devel@lists.sugarlabs.org
+
+Rely on sugar-toolkit in setting most appropriate text_maxlen
+
+---
+src/jarabe/frame/clipboardmenu.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/jarabe/frame/clipboardmenu.py b/src/jarabe/frame/clipboardmenu.py
+index d11538d..5ce78b2 100644
+--- a/src/jarabe/frame/clipboardmenu.py
++++ b/src/jarabe/frame/clipboardmenu.py
+@@ -39,7 +39,7 @@ from jarabe.model import bundleregistry
+ class ClipboardMenu(Palette):
+
+ def __init__(self, cb_object):
+- Palette.__init__(self, text_maxlen=100)
++ Palette.__init__(self)
+
+ self._cb_object = cb_object
+
diff --git a/rpms/sugar/sugar.spec b/rpms/sugar/sugar.spec
index 656479b..c43afb5 100644
--- a/rpms/sugar/sugar.spec
+++ b/rpms/sugar/sugar.spec
@@ -3,7 +3,7 @@
Summary: Constructionist learning platform
Name: sugar
Version: 0.88.1
-Release: 5.48dxo%{?dist}
+Release: 5.49dxo%{?dist}
URL: http://sugarlabs.org/
Source0: http://download.sugarlabs.org/sources/sucrose/glucose/%{name}/%{name}-%{version}.tar.bz2
@@ -137,6 +137,19 @@ patch1801: sugar-Flickering-and-unknown-icons-in-the-window-bar-870.patch
#Microformat updater changes
patch1901: sugar-Pass-sugar-version-to-micro-format.php-ASLO-call.patch
+#sl#2201 fix
+patch2001: sugar-Clipboard-menu-off-screen-2201.patch
+
+#Notifications enhancement
+patch2101: Message-Notifications-second-behaviour-enhancement.patch
+
+#Modem|CP enhancements
+patch2201: Database-support-for-3G-control-panel.patch
+patch2202: Fix-no-restart-after-provider-info-selection.patch
+
+# CP enhancement
+patch2301: activate-busy-cursor-when-opening-cp-sections.patch
+
License: GPLv2+
Group: User Interface/Desktops
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -316,6 +329,15 @@ multiple instances of sugar.
%patch1901 -p1
+%patch2001 -p1
+
+%patch2101 -p1
+
+%patch2201 -p1
+%patch2202 -p1
+
+%patch2301 -p1
+
%build
autoreconf
%configure
@@ -392,6 +414,12 @@ rm -rf %{buildroot}
%{_datadir}/icons/hicolor/scalable/apps/sugar-xo.svg
%changelog
+* Tue Feb 1 2011 Anish Mangal <anish@sugarlabs.org> 0.88.1-5.49
+- sl#2201 fix
+- Message notification enhancement
+- Modem|CP enhancements
+- Activate buzy cursor on clicking CP items
+
* Wed Jan 19 2011 Aleksey Lim <alsroot@member.fsf.org> 0.88.1-5.48
- Add ipython runtime dependency to let feedback send more detailed tracebacks
- Changes to microformat updater