Hi all.
Kindly review the patch, so that progress may be made in pushing this :)
Thanks and Regards,
Ajay
On Fri, Jul 20, 2012 at 5:02 PM, Ajay Garg wrote:
>
> First of all, please note that the first, major part of adding the
> database support
> has been done by ::
>
> Andres Ambrois
>
> Details of Andres's work are present at
> http://bugs.sugarlabs.org/ticket/1630
>
>
>
> ===
>
>
> So, this patch ::
>
>a)
>Ports Andres's patch from Sugar-0.88 to Sugar-0.98.
>
>b)
>Adds the functionality, to keep the "Country, Provider, Plan" settings
>persisted as well.
>
>c)
>Also, some refactoring has been done, to avoid duplicate code as much
> as possible.
>
>
>
>
>
>
> Other relevant literature/discussions/logs at ::
>
>a) Wiki Feature Page ::
>http://wiki.sugarlabs.org/go/Features/3G_Support/Database_Support
>
>b)
>Feature Design ML ::
>http://lists.sugarlabs.org/archive/sugar-devel/2012-July/038429.html
>
>c)
>Brain-storming / Go-ahead meeting logs ::
>http://meeting.sugarlabs.org/sugar-meeting/meetings/2012-07-18T15:00:17
>
>
>
>
>
>
> This patch has been tested to work on NM 0.9.
>
> The 3G modem gets connected, only and only when the correct entries are
> entered
> (by choosing the correct plan, amongst the vast number of available plans).
>
>
>
>
>
>
>
>
>
>
>
>
> .../cpsection/modemconfiguration/Makefile.am |2 +
> extensions/cpsection/modemconfiguration/config.py | 25 +++
> extensions/cpsection/modemconfiguration/model.py | 163
> extensions/cpsection/modemconfiguration/view.py| 198
> +---
> 4 files changed, 365 insertions(+), 23 deletions(-)
> create mode 100644 extensions/cpsection/modemconfiguration/config.py
>
> 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
> b/extensions/cpsection/modemconfiguration/config.py
> new file mode 100644
> index 000..963616d
> --- /dev/null
> +++ b/extensions/cpsection/modemconfiguration/config.py
> @@ -0,0 +1,25 @@
> +# -*- encoding: utf-8 -*-
> +# Copyright (C) 2010 Andres 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 =
> "/usr/share/mobile-broadband-provider-info/serviceproviders.xml"
> +PROVIDERS_FORMAT_SUPPORTED = "2.0"
> +COUNTRY_CODES_PATH = "/usr/share/zoneinfo/iso3166.tab"
> +
> +GSM_COUNTRY_PATH = '/desktop/sugar/network/gsm/country'
> +GSM_PROVIDERS_PATH = '/desktop/sugar/network/gsm/providers'
> +GSM_PLAN_PATH = '/desktop/sugar/network/gsm/plan'
> diff --git a/extensions/cpsection/modemconfiguration/model.py
> b/extensions/cpsection/modemconfiguration/model.py
> index 969b5d9..2e4cd7d 100755
> --- a/extensions/cpsection/modemconfiguration/model.py
> +++ b/extensions/cpsection/modemconfiguration/model.py
> @@ -1,4 +1,8 @@
> # Copyright (C) 2009 Paraguay Educa, Martin Abente
> +# Copyright (C) 2010 Andres Ambrois
> +# Copyright (C) 2010 Anish Mangal
> +# Copyright (C) 2012 Ajay Garg
> +
> #
> # 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,10 +22,22 @@ import logging
>
> import dbus
> import gtk
> +import os
> +import locale
> +import logging
> +import gconf
> +
> +from xml.etree.cElementTree import ElementTree
> +from gettext import gettext as _
>
> from jarabe.model import network
>
>
> +from cpsection.modemconfiguration.config import PROVIDERS_PATH, \
> +
> PROVIDERS_FORMAT_SUPPORTED, \
> +