Ticket #1622: 0001-Implement-support-for-3G-modems-tch-1622.patch

File 0001-Implement-support-for-3G-modems-tch-1622.patch, 75.7 KB (added by tomeu, 14 years ago)

updated patch

  • configure.ac

    From a6deb1cef47dd6b32ad268b10630905137362615 Mon Sep 17 00:00:00 2001
    From: Tomeu Vizoso <tomeu@sugarlabs.org>
    Date: Sat, 23 Jan 2010 16:39:03 +0100
    Subject: [PATCH] Implement support for 3G modems (tch) #1622
    
    ---
     configure.ac                                       |    1 +
     data/icons/Makefile.am                             |    1 +
     data/icons/module-modemconfiguration.svg           | 1272 ++++++++++++++++++++
     extensions/cpsection/Makefile.am                   |    3 +-
     .../cpsection/modemconfiguration/Makefile.am       |    6 +
     .../cpsection/modemconfiguration/__init__.py       |   22 +
     extensions/cpsection/modemconfiguration/model.py   |   53 +
     extensions/cpsection/modemconfiguration/view.py    |  192 +++
     extensions/deviceicon/network.py                   |  214 +++-
     src/jarabe/desktop/meshbox.py                      |   10 +-
     src/jarabe/model/network.py                        |  151 +++-
     11 files changed, 1892 insertions(+), 33 deletions(-)
     create mode 100644 data/icons/module-modemconfiguration.svg
     create mode 100644 extensions/cpsection/modemconfiguration/Makefile.am
     create mode 100644 extensions/cpsection/modemconfiguration/__init__.py
     create mode 100644 extensions/cpsection/modemconfiguration/model.py
     create mode 100644 extensions/cpsection/modemconfiguration/view.py
    
    diff --git a/configure.ac b/configure.ac
    index f0db28e..6231d76 100644
    a b extensions/cpsection/datetime/Makefile 
    5454extensions/cpsection/frame/Makefile
    5555extensions/cpsection/keyboard/Makefile
    5656extensions/cpsection/language/Makefile
     57extensions/cpsection/modemconfiguration/Makefile
    5758extensions/cpsection/Makefile
    5859extensions/cpsection/network/Makefile
    5960extensions/cpsection/power/Makefile
  • data/icons/Makefile.am

    diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
    index d2f4ede..a35643a 100644
    a b sugar_DATA = \ 
    77        module-frame.svg                \
    88        module-keyboard.svg             \
    99        module-language.svg             \
     10        module-modemconfiguration.svg   \
    1011        module-network.svg              \
    1112        module-power.svg                \
    1213        module-updater.svg
  • new file data/icons/module-modemconfiguration.svg

    diff --git a/data/icons/module-modemconfiguration.svg b/data/icons/module-modemconfiguration.svg
    new file mode 100644
    index 0000000..b62a12e
    - +  
     1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
     2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
     3"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
     4<!-- Created with Sodipodi ("http://www.sodipodi.com/") -->
     5<svg
     6   xmlns:dc="http://purl.org/dc/elements/1.1/"
     7   xmlns:cc="http://web.resource.org/cc/"
     8   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     9   xmlns:svg="http://www.w3.org/2000/svg"
     10   xmlns="http://www.w3.org/2000/svg"
     11   xmlns:xlink="http://www.w3.org/1999/xlink"
     12   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
     13   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
     14   sodipodi:docname="/home/latu/Desktop/Desarrollo/Cliente3G/Conexion3G.activity/activity/activity-Conexion3G.svg"
     15   sodipodi:docbase="/home/latu/Desktop/Desarrollo/Cliente3G/Conexion3G.activity/activity/"
     16   inkscape:version="0.43+devel"
     17   sodipodi:version="0.34"
     18   id="svg1288"
     19   height="48px"
     20   width="48px">
     21  <defs
     22     id="defs3">
     23    <linearGradient
     24       id="linearGradient6457"
     25       inkscape:collect="always">
     26      <stop
     27         id="stop6459"
     28         offset="0"
     29         style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" />
     30      <stop
     31         id="stop6461"
     32         offset="1"
     33         style="stop-color: rgb(255, 255, 255); stop-opacity: 0;" />
     34    </linearGradient>
     35    <linearGradient
     36       id="linearGradient6444">
     37      <stop
     38         id="stop6446"
     39         offset="0.0000000"
     40         style="stop-color: rgb(184, 207, 231); stop-opacity: 1;" />
     41      <stop
     42         id="stop6448"
     43         offset="1.0000000"
     44         style="stop-color: rgb(114, 159, 207); stop-opacity: 1;" />
     45    </linearGradient>
     46    <linearGradient
     47       id="linearGradient6187"
     48       inkscape:collect="always">
     49      <stop
     50         id="stop6189"
     51         offset="0"
     52         style="stop-color: rgb(94, 94, 94); stop-opacity: 1;" />
     53      <stop
     54         id="stop6191"
     55         offset="1"
     56         style="stop-color: rgb(94, 94, 94); stop-opacity: 0;" />
     57    </linearGradient>
     58    <linearGradient
     59       id="linearGradient6171"
     60       inkscape:collect="always">
     61      <stop
     62         id="stop6173"
     63         offset="0"
     64         style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" />
     65      <stop
     66         id="stop6175"
     67         offset="1"
     68         style="stop-color: rgb(255, 255, 255); stop-opacity: 0;" />
     69    </linearGradient>
     70    <linearGradient
     71       id="linearGradient6151">
     72      <stop
     73         id="stop6153"
     74         offset="0.0000000"
     75         style="stop-color: rgb(224, 226, 226); stop-opacity: 1;" />
     76      <stop
     77         id="stop6155"
     78         offset="1.0000000"
     79         style="stop-color: rgb(191, 194, 194); stop-opacity: 1;" />
     80    </linearGradient>
     81    <linearGradient
     82       id="linearGradient158">
     83      <stop
     84         style="stop-color: rgb(104, 104, 104); stop-opacity: 0;"
     85         offset="0.0000000"
     86         id="stop159" />
     87      <stop
     88         style="stop-color: rgb(104, 104, 104); stop-opacity: 1;"
     89         offset="0.23762377"
     90         id="stop162" />
     91      <stop
     92         style="stop-color: rgb(104, 104, 104); stop-opacity: 1;"
     93         offset="0.78109992"
     94         id="stop163" />
     95      <stop
     96         style="stop-color: rgb(104, 104, 104); stop-opacity: 0;"
     97         offset="1.0000000"
     98         id="stop160" />
     99    </linearGradient>
     100    <linearGradient
     101       id="linearGradient272">
     102      <stop
     103         style="stop-color: rgb(71, 71, 71); stop-opacity: 0;"
     104         offset="0.0000000"
     105         id="stop273" />
     106      <stop
     107         style="stop-color: rgb(71, 71, 71); stop-opacity: 1;"
     108         offset="0.10000000"
     109         id="stop275" />
     110      <stop
     111         style="stop-color: rgb(71, 71, 71); stop-opacity: 1;"
     112         offset="0.89999998"
     113         id="stop276" />
     114      <stop
     115         style="stop-color: rgb(71, 71, 71); stop-opacity: 0;"
     116         offset="1.0000000"
     117         id="stop274" />
     118    </linearGradient>
     119    <linearGradient
     120       id="linearGradient178">
     121      <stop
     122         style="stop-color: rgb(255, 255, 255); stop-opacity: 0;"
     123         offset="0.0000000"
     124         id="stop179" />
     125      <stop
     126         style="stop-color: rgb(255, 255, 255); stop-opacity: 0.706587;"
     127         offset="0.10827128"
     128         id="stop180" />
     129      <stop
     130         style="stop-color: rgb(255, 255, 255); stop-opacity: 0.706587;"
     131         offset="0.92053902"
     132         id="stop181" />
     133      <stop
     134         style="stop-color: rgb(255, 255, 255); stop-opacity: 0;"
     135         offset="1.0000000"
     136         id="stop182" />
     137    </linearGradient>
     138    <linearGradient
     139       id="linearGradient4543"
     140       inkscape:collect="always">
     141      <stop
     142         id="stop4545"
     143         offset="0"
     144         style="stop-color: rgb(0, 0, 0); stop-opacity: 1;" />
     145      <stop
     146         id="stop4547"
     147         offset="1"
     148         style="stop-color: rgb(0, 0, 0); stop-opacity: 0;" />
     149    </linearGradient>
     150    <linearGradient
     151       id="linearGradient4509">
     152      <stop
     153         style="stop-color: rgb(0, 0, 0); stop-opacity: 1;"
     154         offset="0.0000000"
     155         id="stop4511" />
     156      <stop
     157         style="stop-color: rgb(0, 0, 0); stop-opacity: 0;"
     158         offset="1.0000000"
     159         id="stop4513" />
     160    </linearGradient>
     161    <linearGradient
     162       id="linearGradient4449"
     163       inkscape:collect="always">
     164      <stop
     165         id="stop4451"
     166         offset="0"
     167         style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" />
     168      <stop
     169         id="stop4453"
     170         offset="1"
     171         style="stop-color: rgb(255, 255, 255); stop-opacity: 0;" />
     172    </linearGradient>
     173    <linearGradient
     174       id="linearGradient4420"
     175       inkscape:collect="always">
     176      <stop
     177         id="stop4422"
     178         offset="0"
     179         style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" />
     180      <stop
     181         id="stop4424"
     182         offset="1"
     183         style="stop-color: rgb(255, 255, 255); stop-opacity: 0;" />
     184    </linearGradient>
     185    <linearGradient
     186       id="linearGradient4412"
     187       inkscape:collect="always">
     188      <stop
     189         id="stop4414"
     190         offset="0"
     191         style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" />
     192      <stop
     193         id="stop4416"
     194         offset="1"
     195         style="stop-color: rgb(255, 255, 255); stop-opacity: 0;" />
     196    </linearGradient>
     197    <linearGradient
     198       id="linearGradient4400">
     199      <stop
     200         id="stop4402"
     201         offset="0"
     202         style="stop-color: rgb(151, 151, 151); stop-opacity: 1;" />
     203      <stop
     204         id="stop4404"
     205         offset="1.0000000"
     206         style="stop-color: rgb(200, 200, 200); stop-opacity: 1;" />
     207    </linearGradient>
     208    <linearGradient
     209       id="linearGradient4386">
     210      <stop
     211         id="stop4388"
     212         offset="0.0000000"
     213         style="stop-color: rgb(210, 210, 210); stop-opacity: 1;" />
     214      <stop
     215         id="stop4390"
     216         offset="1.0000000"
     217         style="stop-color: rgb(223, 223, 223); stop-opacity: 1;" />
     218    </linearGradient>
     219    <linearGradient
     220       gradientTransform="matrix(0.704136, 0, 0, 0.704136, -7.02064, 9.45973)"
     221       gradientUnits="userSpaceOnUse"
     222       y2="10.018264"
     223       x2="23.233509"
     224       y1="34.463955"
     225       x1="24.349752"
     226       id="linearGradient4392"
     227       xlink:href="#linearGradient4386"
     228       inkscape:collect="always" />
     229    <linearGradient
     230       gradientTransform="matrix(0.658413, 0, 0, 0.688766, -6.06109, 9.52172)"
     231       gradientUnits="userSpaceOnUse"
     232       y2="26.786800"
     233       x2="22.311644"
     234       y1="26.887815"
     235       x1="27.324621"
     236       id="linearGradient4418"
     237       xlink:href="#linearGradient4412"
     238       inkscape:collect="always" />
     239    <linearGradient
     240       gradientTransform="matrix(0.658413, 0, 0, 0.688766, -6.06109, 9.52172)"
     241       gradientUnits="userSpaceOnUse"
     242       y2="26.786800"
     243       x2="22.311644"
     244       y1="26.887815"
     245       x1="27.324621"
     246       id="linearGradient4426"
     247       xlink:href="#linearGradient4420"
     248       inkscape:collect="always" />
     249    <linearGradient
     250       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -4.79569, 9.52172)"
     251       y2="30.928421"
     252       x2="16.364470"
     253       y1="39.918777"
     254       x1="16.364470"
     255       gradientUnits="userSpaceOnUse"
     256       id="linearGradient4459"
     257       xlink:href="#linearGradient4449"
     258       inkscape:collect="always" />
     259    <linearGradient
     260       y2="30.928421"
     261       x2="16.364470"
     262       y1="39.918777"
     263       x1="16.364470"
     264       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -3.41816, 9.52172)"
     265       gradientUnits="userSpaceOnUse"
     266       id="linearGradient4463"
     267       xlink:href="#linearGradient4449"
     268       inkscape:collect="always" />
     269    <linearGradient
     270       y2="30.928421"
     271       x2="16.364470"
     272       y1="39.918777"
     273       x1="16.364470"
     274       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -2.04063, 9.52172)"
     275       gradientUnits="userSpaceOnUse"
     276       id="linearGradient4467"
     277       xlink:href="#linearGradient4449"
     278       inkscape:collect="always" />
     279    <linearGradient
     280       y2="30.928421"
     281       x2="16.364470"
     282       y1="39.918777"
     283       x1="16.364470"
     284       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -0.6631, 9.52172)"
     285       gradientUnits="userSpaceOnUse"
     286       id="linearGradient4471"
     287       xlink:href="#linearGradient4449"
     288       inkscape:collect="always" />
     289    <linearGradient
     290       y2="30.928421"
     291       x2="16.364470"
     292       y1="39.918777"
     293       x1="16.364470"
     294       gradientTransform="matrix(0.688766, 0, 0, 0.688766, 0.714451, 9.52172)"
     295       gradientUnits="userSpaceOnUse"
     296       id="linearGradient4475"
     297       xlink:href="#linearGradient4449"
     298       inkscape:collect="always" />
     299    <linearGradient
     300       y2="30.928421"
     301       x2="16.364470"
     302       y1="39.918777"
     303       x1="16.364470"
     304       gradientTransform="matrix(0.688766, 0, 0, 0.688766, 2.09199, 9.52172)"
     305       gradientUnits="userSpaceOnUse"
     306       id="linearGradient4479"
     307       xlink:href="#linearGradient4449"
     308       inkscape:collect="always" />
     309    <linearGradient
     310       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -5.54704, 9.52172)"
     311       y2="30.928421"
     312       x2="16.364470"
     313       y1="39.918777"
     314       x1="16.364470"
     315       gradientUnits="userSpaceOnUse"
     316       id="linearGradient4495"
     317       xlink:href="#linearGradient4509"
     318       inkscape:collect="always" />
     319    <linearGradient
     320       y2="30.928421"
     321       x2="16.364470"
     322       y1="39.918777"
     323       x1="16.364470"
     324       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -4.16951, 9.52172)"
     325       gradientUnits="userSpaceOnUse"
     326       id="linearGradient4497"
     327       xlink:href="#linearGradient4509"
     328       inkscape:collect="always" />
     329    <linearGradient
     330       y2="30.928421"
     331       x2="16.364470"
     332       y1="39.918777"
     333       x1="16.364470"
     334       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -2.79198, 9.52172)"
     335       gradientUnits="userSpaceOnUse"
     336       id="linearGradient4499"
     337       xlink:href="#linearGradient4509"
     338       inkscape:collect="always" />
     339    <linearGradient
     340       y2="30.928421"
     341       x2="16.364470"
     342       y1="39.918777"
     343       x1="16.364470"
     344       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -1.41445, 9.52172)"
     345       gradientUnits="userSpaceOnUse"
     346       id="linearGradient4501"
     347       xlink:href="#linearGradient4509"
     348       inkscape:collect="always" />
     349    <linearGradient
     350       y2="30.928421"
     351       x2="16.364470"
     352       y1="39.918777"
     353       x1="16.364470"
     354       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -0.0369197, 9.52172)"
     355       gradientUnits="userSpaceOnUse"
     356       id="linearGradient4503"
     357       xlink:href="#linearGradient4509"
     358       inkscape:collect="always" />
     359    <linearGradient
     360       y2="30.928421"
     361       x2="16.364470"
     362       y1="39.918777"
     363       x1="16.364470"
     364       gradientTransform="matrix(0.688766, 0, 0, 0.688766, 1.34067, 9.52172)"
     365       gradientUnits="userSpaceOnUse"
     366       id="linearGradient4505"
     367       xlink:href="#linearGradient4509"
     368       inkscape:collect="always" />
     369    <radialGradient
     370       gradientUnits="userSpaceOnUse"
     371       gradientTransform="matrix(1, 0, 0, 0.394366, 1.02097e-14, 23.442)"
     372       r="14.344166"
     373       fy="38.706596"
     374       fx="23.536554"
     375       cy="38.706596"
     376       cx="23.536554"
     377       id="radialGradient4549"
     378       xlink:href="#linearGradient4543"
     379       inkscape:collect="always" />
     380    <linearGradient
     381       y2="117.82710"
     382       x2="15.343062"
     383       y1="117.82710"
     384       x1="1.6422368"
     385       gradientTransform="matrix(2.74016, 0, 0, 0.364942, 31.378, -10.3527)"
     386       gradientUnits="userSpaceOnUse"
     387       id="linearGradient5397"
     388       xlink:href="#linearGradient158"
     389       inkscape:collect="always" />
     390    <linearGradient
     391       y2="372.57819"
     392       x2="5.0856376"
     393       y1="372.57819"
     394       x1="0.61210024"
     395       gradientTransform="matrix(8.1686, 0, 0, 0.22121, 31.378, -48.2741)"
     396       gradientUnits="userSpaceOnUse"
     397       id="linearGradient5399"
     398       xlink:href="#linearGradient272"
     399       inkscape:collect="always" />
     400    <linearGradient
     401       y2="372.57819"
     402       x2="5.0856376"
     403       y1="372.57819"
     404       x1="0.61210024"
     405       gradientTransform="matrix(8.1686, 0, 0, 0.228621, 31.378, -46.2669)"
     406       gradientUnits="userSpaceOnUse"
     407       id="linearGradient5401"
     408       xlink:href="#linearGradient272"
     409       inkscape:collect="always" />
     410    <linearGradient
     411       y2="117.82710"
     412       x2="15.343062"
     413       y1="117.82710"
     414       x1="1.6422368"
     415       gradientTransform="matrix(2.74016, 0, 0, 0.147685, 31.378, 14.8331)"
     416       gradientUnits="userSpaceOnUse"
     417       id="linearGradient5403"
     418       xlink:href="#linearGradient178"
     419       inkscape:collect="always" />
     420    <linearGradient
     421       y2="31.565634"
     422       x2="37.140110"
     423       y1="10.655476"
     424       x1="25.515011"
     425       gradientUnits="userSpaceOnUse"
     426       id="linearGradient6210"
     427       xlink:href="#linearGradient6171"
     428       inkscape:collect="always" />
     429    <linearGradient
     430       y2="28.554563"
     431       x2="38.547222"
     432       y1="28.554563"
     433       x1="32.587322"
     434       gradientUnits="userSpaceOnUse"
     435       id="linearGradient6212"
     436       xlink:href="#linearGradient6187"
     437       inkscape:collect="always" />
     438    <linearGradient
     439       y2="31.565634"
     440       x2="37.140110"
     441       y1="10.655476"
     442       x1="25.515011"
     443       gradientUnits="userSpaceOnUse"
     444       id="linearGradient6240"
     445       xlink:href="#linearGradient6171"
     446       inkscape:collect="always" />
     447    <linearGradient
     448       y2="28.554563"
     449       x2="38.547222"
     450       y1="28.554563"
     451       x1="32.587322"
     452       gradientUnits="userSpaceOnUse"
     453       id="linearGradient6242"
     454       xlink:href="#linearGradient6187"
     455       inkscape:collect="always" />
     456    <radialGradient
     457       r="14.344166"
     458       fy="38.706596"
     459       fx="23.536554"
     460       cy="38.706596"
     461       cx="23.536554"
     462       gradientTransform="matrix(1, 0, 0, 0.394366, -7.98147e-15, 23.442)"
     463       gradientUnits="userSpaceOnUse"
     464       id="radialGradient6246"
     465       xlink:href="#linearGradient4543"
     466       inkscape:collect="always" />
     467    <radialGradient
     468       r="14.344166"
     469       fy="38.706596"
     470       fx="23.536554"
     471       cy="38.706596"
     472       cx="23.536554"
     473       gradientTransform="matrix(1, 0, 0, 0.394366, 5.34295e-16, 23.442)"
     474       gradientUnits="userSpaceOnUse"
     475       id="radialGradient6250"
     476       xlink:href="#linearGradient4543"
     477       inkscape:collect="always" />
     478    <linearGradient
     479       y2="117.82710"
     480       x2="15.343062"
     481       y1="117.82710"
     482       x1="1.6422368"
     483       gradientTransform="matrix(2.74016, -3.34247e-32, -7.06832e-33, 0.364942, 31.378, -10.3527)"
     484       gradientUnits="userSpaceOnUse"
     485       id="linearGradient6262"
     486       xlink:href="#linearGradient158"
     487       inkscape:collect="always" />
     488    <linearGradient
     489       y2="372.57819"
     490       x2="5.0856376"
     491       y1="372.57819"
     492       x1="0.61210024"
     493       gradientTransform="matrix(8.1686, -9.9641e-32, -4.28449e-33, 0.22121, 31.378, -48.2741)"
     494       gradientUnits="userSpaceOnUse"
     495       id="linearGradient6264"
     496       xlink:href="#linearGradient272"
     497       inkscape:collect="always" />
     498    <linearGradient
     499       y2="372.57819"
     500       x2="5.0856376"
     501       y1="372.57819"
     502       x1="0.61210024"
     503       gradientTransform="matrix(8.1686, -9.9641e-32, -4.42803e-33, 0.228621, 31.378, -46.2669)"
     504       gradientUnits="userSpaceOnUse"
     505       id="linearGradient6266"
     506       xlink:href="#linearGradient272"
     507       inkscape:collect="always" />
     508    <linearGradient
     509       y2="117.82710"
     510       x2="15.343062"
     511       y1="117.82710"
     512       x1="1.6422368"
     513       gradientTransform="matrix(2.74016, -3.34247e-32, -2.86043e-33, 0.147685, 31.378, 14.8331)"
     514       gradientUnits="userSpaceOnUse"
     515       id="linearGradient6268"
     516       xlink:href="#linearGradient178"
     517       inkscape:collect="always" />
     518    <linearGradient
     519       gradientTransform="matrix(0.953806, 0, 0, 1, 1.83218, -4.57479e-16)"
     520       gradientUnits="userSpaceOnUse"
     521       y2="26.435217"
     522       x2="38.278458"
     523       y1="19.061104"
     524       x1="36.067482"
     525       id="linearGradient6463"
     526       xlink:href="#linearGradient6457"
     527       inkscape:collect="always" />
     528    <linearGradient
     529       gradientTransform="matrix(0.969204, 0, 0, 1, -5.81595, -9.8995)"
     530       y2="26.435217"
     531       x2="38.278458"
     532       y1="19.061104"
     533       x1="36.067482"
     534       gradientUnits="userSpaceOnUse"
     535       id="linearGradient6467"
     536       xlink:href="#linearGradient6457"
     537       inkscape:collect="always" />
     538    <linearGradient
     539       inkscape:collect="always"
     540       xlink:href="#linearGradient4386"
     541       id="linearGradient4059"
     542       gradientUnits="userSpaceOnUse"
     543       gradientTransform="matrix(0.704136, 0, 0, 0.704136, -7.02064, 9.45973)"
     544       x1="24.349752"
     545       y1="34.463955"
     546       x2="23.233509"
     547       y2="10.018264" />
     548    <linearGradient
     549       inkscape:collect="always"
     550       xlink:href="#linearGradient4420"
     551       id="linearGradient4061"
     552       gradientUnits="userSpaceOnUse"
     553       gradientTransform="matrix(0.658413, 0, 0, 0.688766, -6.06109, 9.52172)"
     554       x1="27.324621"
     555       y1="26.887815"
     556       x2="22.311644"
     557       y2="26.786800" />
     558    <linearGradient
     559       inkscape:collect="always"
     560       xlink:href="#linearGradient4412"
     561       id="linearGradient4063"
     562       gradientUnits="userSpaceOnUse"
     563       gradientTransform="matrix(0.658413, 0, 0, 0.688766, -6.06109, 9.52172)"
     564       x1="27.324621"
     565       y1="26.887815"
     566       x2="22.311644"
     567       y2="26.786800" />
     568    <linearGradient
     569       inkscape:collect="always"
     570       xlink:href="#linearGradient4449"
     571       id="linearGradient4065"
     572       gradientUnits="userSpaceOnUse"
     573       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -4.79569, 9.52172)"
     574       x1="16.364470"
     575       y1="39.918777"
     576       x2="16.364470"
     577       y2="30.928421" />
     578    <linearGradient
     579       inkscape:collect="always"
     580       xlink:href="#linearGradient4449"
     581       id="linearGradient4067"
     582       gradientUnits="userSpaceOnUse"
     583       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -3.41816, 9.52172)"
     584       x1="16.364470"
     585       y1="39.918777"
     586       x2="16.364470"
     587       y2="30.928421" />
     588    <linearGradient
     589       inkscape:collect="always"
     590       xlink:href="#linearGradient4449"
     591       id="linearGradient4069"
     592       gradientUnits="userSpaceOnUse"
     593       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -2.04063, 9.52172)"
     594       x1="16.364470"
     595       y1="39.918777"
     596       x2="16.364470"
     597       y2="30.928421" />
     598    <linearGradient
     599       inkscape:collect="always"
     600       xlink:href="#linearGradient4449"
     601       id="linearGradient4071"
     602       gradientUnits="userSpaceOnUse"
     603       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -0.6631, 9.52172)"
     604       x1="16.364470"
     605       y1="39.918777"
     606       x2="16.364470"
     607       y2="30.928421" />
     608    <linearGradient
     609       inkscape:collect="always"
     610       xlink:href="#linearGradient4449"
     611       id="linearGradient4073"
     612       gradientUnits="userSpaceOnUse"
     613       gradientTransform="matrix(0.688766, 0, 0, 0.688766, 0.714451, 9.52172)"
     614       x1="16.364470"
     615       y1="39.918777"
     616       x2="16.364470"
     617       y2="30.928421" />
     618    <linearGradient
     619       inkscape:collect="always"
     620       xlink:href="#linearGradient4449"
     621       id="linearGradient4075"
     622       gradientUnits="userSpaceOnUse"
     623       gradientTransform="matrix(0.688766, 0, 0, 0.688766, 2.09199, 9.52172)"
     624       x1="16.364470"
     625       y1="39.918777"
     626       x2="16.364470"
     627       y2="30.928421" />
     628    <linearGradient
     629       inkscape:collect="always"
     630       xlink:href="#linearGradient4509"
     631       id="linearGradient4077"
     632       gradientUnits="userSpaceOnUse"
     633       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -5.54704, 9.52172)"
     634       x1="16.364470"
     635       y1="39.918777"
     636       x2="16.364470"
     637       y2="30.928421" />
     638    <linearGradient
     639       inkscape:collect="always"
     640       xlink:href="#linearGradient4509"
     641       id="linearGradient4079"
     642       gradientUnits="userSpaceOnUse"
     643       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -4.16951, 9.52172)"
     644       x1="16.364470"
     645       y1="39.918777"
     646       x2="16.364470"
     647       y2="30.928421" />
     648    <linearGradient
     649       inkscape:collect="always"
     650       xlink:href="#linearGradient4509"
     651       id="linearGradient4081"
     652       gradientUnits="userSpaceOnUse"
     653       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -2.79198, 9.52172)"
     654       x1="16.364470"
     655       y1="39.918777"
     656       x2="16.364470"
     657       y2="30.928421" />
     658    <linearGradient
     659       inkscape:collect="always"
     660       xlink:href="#linearGradient4509"
     661       id="linearGradient4083"
     662       gradientUnits="userSpaceOnUse"
     663       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -1.41445, 9.52172)"
     664       x1="16.364470"
     665       y1="39.918777"
     666       x2="16.364470"
     667       y2="30.928421" />
     668    <linearGradient
     669       inkscape:collect="always"
     670       xlink:href="#linearGradient4509"
     671       id="linearGradient4085"
     672       gradientUnits="userSpaceOnUse"
     673       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -0.0369197, 9.52172)"
     674       x1="16.364470"
     675       y1="39.918777"
     676       x2="16.364470"
     677       y2="30.928421" />
     678    <linearGradient
     679       inkscape:collect="always"
     680       xlink:href="#linearGradient4509"
     681       id="linearGradient4087"
     682       gradientUnits="userSpaceOnUse"
     683       gradientTransform="matrix(0.688766, 0, 0, 0.688766, 1.34067, 9.52172)"
     684       x1="16.364470"
     685       y1="39.918777"
     686       x2="16.364470"
     687       y2="30.928421" />
     688    <linearGradient
     689       inkscape:collect="always"
     690       xlink:href="#linearGradient4509"
     691       id="linearGradient4127"
     692       gradientUnits="userSpaceOnUse"
     693       gradientTransform="matrix(0.688766, 0, 0, 0.688766, 1.34067, 9.52172)"
     694       x1="16.364470"
     695       y1="39.918777"
     696       x2="16.364470"
     697       y2="30.928421" />
     698    <linearGradient
     699       inkscape:collect="always"
     700       xlink:href="#linearGradient4509"
     701       id="linearGradient4129"
     702       gradientUnits="userSpaceOnUse"
     703       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -0.0369197, 9.52172)"
     704       x1="16.364470"
     705       y1="39.918777"
     706       x2="16.364470"
     707       y2="30.928421" />
     708    <linearGradient
     709       inkscape:collect="always"
     710       xlink:href="#linearGradient4509"
     711       id="linearGradient4131"
     712       gradientUnits="userSpaceOnUse"
     713       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -1.41445, 9.52172)"
     714       x1="16.364470"
     715       y1="39.918777"
     716       x2="16.364470"
     717       y2="30.928421" />
     718    <linearGradient
     719       inkscape:collect="always"
     720       xlink:href="#linearGradient4509"
     721       id="linearGradient4133"
     722       gradientUnits="userSpaceOnUse"
     723       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -2.79198, 9.52172)"
     724       x1="16.364470"
     725       y1="39.918777"
     726       x2="16.364470"
     727       y2="30.928421" />
     728    <linearGradient
     729       inkscape:collect="always"
     730       xlink:href="#linearGradient4509"
     731       id="linearGradient4135"
     732       gradientUnits="userSpaceOnUse"
     733       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -4.16951, 9.52172)"
     734       x1="16.364470"
     735       y1="39.918777"
     736       x2="16.364470"
     737       y2="30.928421" />
     738    <linearGradient
     739       inkscape:collect="always"
     740       xlink:href="#linearGradient4509"
     741       id="linearGradient4137"
     742       gradientUnits="userSpaceOnUse"
     743       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -5.54704, 9.52172)"
     744       x1="16.364470"
     745       y1="39.918777"
     746       x2="16.364470"
     747       y2="30.928421" />
     748    <linearGradient
     749       inkscape:collect="always"
     750       xlink:href="#linearGradient4449"
     751       id="linearGradient4139"
     752       gradientUnits="userSpaceOnUse"
     753       gradientTransform="matrix(0.688766, 0, 0, 0.688766, 2.09199, 9.52172)"
     754       x1="16.364470"
     755       y1="39.918777"
     756       x2="16.364470"
     757       y2="30.928421" />
     758    <linearGradient
     759       inkscape:collect="always"
     760       xlink:href="#linearGradient4449"
     761       id="linearGradient4141"
     762       gradientUnits="userSpaceOnUse"
     763       gradientTransform="matrix(0.688766, 0, 0, 0.688766, 0.714451, 9.52172)"
     764       x1="16.364470"
     765       y1="39.918777"
     766       x2="16.364470"
     767       y2="30.928421" />
     768    <linearGradient
     769       inkscape:collect="always"
     770       xlink:href="#linearGradient4449"
     771       id="linearGradient4143"
     772       gradientUnits="userSpaceOnUse"
     773       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -0.6631, 9.52172)"
     774       x1="16.364470"
     775       y1="39.918777"
     776       x2="16.364470"
     777       y2="30.928421" />
     778    <linearGradient
     779       inkscape:collect="always"
     780       xlink:href="#linearGradient4449"
     781       id="linearGradient4145"
     782       gradientUnits="userSpaceOnUse"
     783       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -2.04063, 9.52172)"
     784       x1="16.364470"
     785       y1="39.918777"
     786       x2="16.364470"
     787       y2="30.928421" />
     788    <linearGradient
     789       inkscape:collect="always"
     790       xlink:href="#linearGradient4449"
     791       id="linearGradient4147"
     792       gradientUnits="userSpaceOnUse"
     793       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -3.41816, 9.52172)"
     794       x1="16.364470"
     795       y1="39.918777"
     796       x2="16.364470"
     797       y2="30.928421" />
     798    <linearGradient
     799       inkscape:collect="always"
     800       xlink:href="#linearGradient4449"
     801       id="linearGradient4149"
     802       gradientUnits="userSpaceOnUse"
     803       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -4.79569, 9.52172)"
     804       x1="16.364470"
     805       y1="39.918777"
     806       x2="16.364470"
     807       y2="30.928421" />
     808    <linearGradient
     809       inkscape:collect="always"
     810       xlink:href="#linearGradient4420"
     811       id="linearGradient4151"
     812       gradientUnits="userSpaceOnUse"
     813       gradientTransform="matrix(0.658413, 0, 0, 0.688766, -6.06109, 9.52172)"
     814       x1="27.324621"
     815       y1="26.887815"
     816       x2="22.311644"
     817       y2="26.786800" />
     818    <linearGradient
     819       inkscape:collect="always"
     820       xlink:href="#linearGradient4412"
     821       id="linearGradient4153"
     822       gradientUnits="userSpaceOnUse"
     823       gradientTransform="matrix(0.658413, 0, 0, 0.688766, -6.06109, 9.52172)"
     824       x1="27.324621"
     825       y1="26.887815"
     826       x2="22.311644"
     827       y2="26.786800" />
     828    <linearGradient
     829       inkscape:collect="always"
     830       xlink:href="#linearGradient4386"
     831       id="linearGradient4155"
     832       gradientUnits="userSpaceOnUse"
     833       gradientTransform="matrix(0.704136, 0, 0, 0.704136, -7.02064, 9.45973)"
     834       x1="24.349752"
     835       y1="34.463955"
     836       x2="23.233509"
     837       y2="10.018264" />
     838    <linearGradient
     839       inkscape:collect="always"
     840       xlink:href="#linearGradient6171"
     841       id="linearGradient4192"
     842       gradientUnits="userSpaceOnUse"
     843       x1="25.515011"
     844       y1="10.655476"
     845       x2="37.140110"
     846       y2="31.565634" />
     847    <linearGradient
     848       inkscape:collect="always"
     849       xlink:href="#linearGradient6187"
     850       id="linearGradient4194"
     851       gradientUnits="userSpaceOnUse"
     852       x1="32.587322"
     853       y1="28.554563"
     854       x2="38.547222"
     855       y2="28.554563" />
     856    <linearGradient
     857       inkscape:collect="always"
     858       xlink:href="#linearGradient6171"
     859       id="linearGradient4210"
     860       gradientUnits="userSpaceOnUse"
     861       x1="25.515011"
     862       y1="10.655476"
     863       x2="37.140110"
     864       y2="31.565634" />
     865    <linearGradient
     866       inkscape:collect="always"
     867       xlink:href="#linearGradient6187"
     868       id="linearGradient4212"
     869       gradientUnits="userSpaceOnUse"
     870       x1="32.587322"
     871       y1="28.554563"
     872       x2="38.547222"
     873       y2="28.554563" />
     874    <linearGradient
     875       inkscape:collect="always"
     876       xlink:href="#linearGradient6457"
     877       id="linearGradient4214"
     878       gradientUnits="userSpaceOnUse"
     879       gradientTransform="matrix(0.953806, 0, 0, 1, 1.83218, -4.56286e-16)"
     880       x1="36.067482"
     881       y1="19.061104"
     882       x2="38.278458"
     883       y2="26.435217" />
     884    <linearGradient
     885       inkscape:collect="always"
     886       xlink:href="#linearGradient6187"
     887       id="linearGradient4228"
     888       gradientUnits="userSpaceOnUse"
     889       x1="32.587322"
     890       y1="28.554563"
     891       x2="38.547222"
     892       y2="28.554563" />
     893    <radialGradient
     894       inkscape:collect="always"
     895       xlink:href="#linearGradient4543"
     896       id="radialGradient4272"
     897       gradientUnits="userSpaceOnUse"
     898       gradientTransform="matrix(1, 0, 0, 0.394366, 5.34295e-16, 23.442)"
     899       cx="23.536554"
     900       cy="38.706596"
     901       fx="23.536554"
     902       fy="38.706596"
     903       r="14.344166" />
     904    <linearGradient
     905       inkscape:collect="always"
     906       xlink:href="#linearGradient6171"
     907       id="linearGradient4274"
     908       gradientUnits="userSpaceOnUse"
     909       x1="25.515011"
     910       y1="10.655476"
     911       x2="37.140110"
     912       y2="31.565634" />
     913    <linearGradient
     914       inkscape:collect="always"
     915       xlink:href="#linearGradient6187"
     916       id="linearGradient4276"
     917       gradientUnits="userSpaceOnUse"
     918       x1="32.587322"
     919       y1="28.554563"
     920       x2="38.547222"
     921       y2="28.554563" />
     922    <linearGradient
     923       inkscape:collect="always"
     924       xlink:href="#linearGradient6457"
     925       id="linearGradient4278"
     926       gradientUnits="userSpaceOnUse"
     927       gradientTransform="matrix(0.953806, 0, 0, 1, 1.83218, -4.5569e-16)"
     928       x1="36.067482"
     929       y1="19.061104"
     930       x2="38.278458"
     931       y2="26.435217" />
     932    <radialGradient
     933       inkscape:collect="always"
     934       xlink:href="#linearGradient4543"
     935       id="radialGradient4296"
     936       gradientUnits="userSpaceOnUse"
     937       gradientTransform="matrix(1, 0, 0, 0.394366, 6.52257e-16, 23.442)"
     938       cx="23.536554"
     939       cy="38.706596"
     940       fx="23.536554"
     941       fy="38.706596"
     942       r="14.344166" />
     943    <linearGradient
     944       inkscape:collect="always"
     945       xlink:href="#linearGradient6171"
     946       id="linearGradient4298"
     947       gradientUnits="userSpaceOnUse"
     948       x1="25.515011"
     949       y1="10.655476"
     950       x2="37.140110"
     951       y2="31.565634" />
     952    <linearGradient
     953       inkscape:collect="always"
     954       xlink:href="#linearGradient6187"
     955       id="linearGradient4300"
     956       gradientUnits="userSpaceOnUse"
     957       x1="32.587322"
     958       y1="28.554563"
     959       x2="38.547222"
     960       y2="28.554563" />
     961    <linearGradient
     962       inkscape:collect="always"
     963       xlink:href="#linearGradient6457"
     964       id="linearGradient4302"
     965       gradientUnits="userSpaceOnUse"
     966       gradientTransform="matrix(0.953806, 0, 0, 1, 1.83218, -8.92136e-16)"
     967       x1="36.067482"
     968       y1="19.061104"
     969       x2="38.278458"
     970       y2="26.435217" />
     971    <radialGradient
     972       inkscape:collect="always"
     973       xlink:href="#linearGradient4543"
     974       id="radialGradient4318"
     975       gradientUnits="userSpaceOnUse"
     976       gradientTransform="matrix(1, 0, 0, 0.394366, -1.17961e-16, 23.442)"
     977       cx="23.536554"
     978       cy="38.706596"
     979       fx="23.536554"
     980       fy="38.706596"
     981       r="14.344166" />
     982    <linearGradient
     983       inkscape:collect="always"
     984       xlink:href="#linearGradient6171"
     985       id="linearGradient4320"
     986       gradientUnits="userSpaceOnUse"
     987       x1="25.515011"
     988       y1="10.655476"
     989       x2="37.140110"
     990       y2="31.565634" />
     991    <linearGradient
     992       inkscape:collect="always"
     993       xlink:href="#linearGradient6187"
     994       id="linearGradient4322"
     995       gradientUnits="userSpaceOnUse"
     996       x1="32.587322"
     997       y1="28.554563"
     998       x2="38.547222"
     999       y2="28.554563" />
     1000    <linearGradient
     1001       inkscape:collect="always"
     1002       xlink:href="#linearGradient6457"
     1003       id="linearGradient4324"
     1004       gradientUnits="userSpaceOnUse"
     1005       gradientTransform="matrix(0.953806, 0, 0, 1, 1.83218, -1.32799e-15)"
     1006       x1="36.067482"
     1007       y1="19.061104"
     1008       x2="38.278458"
     1009       y2="26.435217" />
     1010    <linearGradient
     1011       inkscape:collect="always"
     1012       xlink:href="#linearGradient4509"
     1013       id="linearGradient4351"
     1014       gradientUnits="userSpaceOnUse"
     1015       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -4.16951, 9.52172)"
     1016       x1="16.364470"
     1017       y1="39.918777"
     1018       x2="16.364470"
     1019       y2="30.928421" />
     1020    <linearGradient
     1021       inkscape:collect="always"
     1022       xlink:href="#linearGradient4509"
     1023       id="linearGradient4355"
     1024       gradientUnits="userSpaceOnUse"
     1025       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -4.16951, 9.52172)"
     1026       x1="16.364470"
     1027       y1="39.918777"
     1028       x2="16.364470"
     1029       y2="30.928421" />
     1030    <linearGradient
     1031       inkscape:collect="always"
     1032       xlink:href="#linearGradient4449"
     1033       id="linearGradient4359"
     1034       gradientUnits="userSpaceOnUse"
     1035       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -4.79569, 9.52172)"
     1036       x1="16.364470"
     1037       y1="39.918777"
     1038       x2="16.364470"
     1039       y2="30.928421" />
     1040    <linearGradient
     1041       inkscape:collect="always"
     1042       xlink:href="#linearGradient4449"
     1043       id="linearGradient4363"
     1044       gradientUnits="userSpaceOnUse"
     1045       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -4.79569, 9.52172)"
     1046       x1="16.364470"
     1047       y1="39.918777"
     1048       x2="16.364470"
     1049       y2="30.928421" />
     1050    <linearGradient
     1051       inkscape:collect="always"
     1052       xlink:href="#linearGradient4449"
     1053       id="linearGradient4367"
     1054       gradientUnits="userSpaceOnUse"
     1055       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -4.79569, 9.52172)"
     1056       x1="16.364470"
     1057       y1="39.918777"
     1058       x2="16.364470"
     1059       y2="30.928421" />
     1060    <linearGradient
     1061       inkscape:collect="always"
     1062       xlink:href="#linearGradient4509"
     1063       id="linearGradient4371"
     1064       gradientUnits="userSpaceOnUse"
     1065       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -4.16951, 9.52172)"
     1066       x1="16.364470"
     1067       y1="39.918777"
     1068       x2="16.364470"
     1069       y2="30.928421" />
     1070    <linearGradient
     1071       inkscape:collect="always"
     1072       xlink:href="#linearGradient4509"
     1073       id="linearGradient4375"
     1074       gradientUnits="userSpaceOnUse"
     1075       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -4.16951, 9.52172)"
     1076       x1="16.364470"
     1077       y1="39.918777"
     1078       x2="16.364470"
     1079       y2="30.928421" />
     1080    <linearGradient
     1081       inkscape:collect="always"
     1082       xlink:href="#linearGradient4509"
     1083       id="linearGradient4379"
     1084       gradientUnits="userSpaceOnUse"
     1085       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -4.16951, 9.52172)"
     1086       x1="16.364470"
     1087       y1="39.918777"
     1088       x2="16.364470"
     1089       y2="30.928421" />
     1090    <linearGradient
     1091       inkscape:collect="always"
     1092       xlink:href="#linearGradient4509"
     1093       id="linearGradient4383"
     1094       gradientUnits="userSpaceOnUse"
     1095       gradientTransform="matrix(0.688766, 0, 0, 0.688766, -5.54704, 9.52172)"
     1096       x1="16.364470"
     1097       y1="39.918777"
     1098       x2="16.364470"
     1099       y2="30.928421" />
     1100  </defs>
     1101  <sodipodi:namedview
     1102     fill="#204a87"
     1103     inkscape:showpageshadow="false"
     1104     showborder="true"
     1105     inkscape:window-y="51"
     1106     inkscape:window-x="116"
     1107     inkscape:window-height="1068"
     1108     inkscape:window-width="1030"
     1109     inkscape:document-units="px"
     1110     inkscape:grid-bbox="true"
     1111     showgrid="true"
     1112     inkscape:current-layer="layer1"
     1113     inkscape:cy="24"
     1114     inkscape:cx="24"
     1115     inkscape:zoom="13.988095"
     1116     inkscape:pageshadow="2"
     1117     inkscape:pageopacity="0.0"
     1118     borderopacity="0.81568627"
     1119     bordercolor="#666666"
     1120     pagecolor="#ffffff"
     1121     id="base"
     1122     gridempspacing="4" />
     1123  <metadata
     1124     id="metadata4">
     1125    <rdf:RDF>
     1126      <cc:Work
     1127         rdf:about="">
     1128        <dc:format>image/svg+xml</dc:format>
     1129        <dc:type
     1130           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
     1131        <dc:title>Workgroup</dc:title>
     1132        <dc:creator>
     1133          <cc:Agent>
     1134            <dc:title>Jakub Steiner</dc:title>
     1135          </cc:Agent>
     1136        </dc:creator>
     1137        <dc:source>http://jimmac.musichall.cz</dc:source>
     1138        <cc:license
     1139           rdf:resource="http://creativecommons.org/licenses/by/2.0/" />
     1140        <dc:subject>
     1141          <rdf:Bag>
     1142            <rdf:li>lan</rdf:li>
     1143            <rdf:li>workgroup</rdf:li>
     1144            <rdf:li>network</rdf:li>
     1145            <rdf:li>peer</rdf:li>
     1146          </rdf:Bag>
     1147        </dc:subject>
     1148        <dc:contributor>
     1149          <cc:Agent>
     1150            <dc:title>Garrett LeSage</dc:title>
     1151          </cc:Agent>
     1152        </dc:contributor>
     1153      </cc:Work>
     1154      <cc:License
     1155         rdf:about="http://creativecommons.org/licenses/by/2.0/">
     1156        <cc:permits
     1157           rdf:resource="http://web.resource.org/cc/Reproduction" />
     1158        <cc:permits
     1159           rdf:resource="http://web.resource.org/cc/Distribution" />
     1160        <cc:requires
     1161           rdf:resource="http://web.resource.org/cc/Notice" />
     1162        <cc:requires
     1163           rdf:resource="http://web.resource.org/cc/Attribution" />
     1164        <cc:permits
     1165           rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
     1166        <cc:requires
     1167           rdf:resource="http://web.resource.org/cc/ShareAlike" />
     1168      </cc:License>
     1169    </rdf:RDF>
     1170  </metadata>
     1171  <path
     1172     transform="matrix(0.994775,0,0,0.504437,2.062737,21.5656)"
     1173     d="M 37.88072 38.7066 A 14.34417 5.656854 0 1 0 9.192389 38.7066 A 14.34417 5.656854 0 1 0  37.88072 38.7066 z"
     1174     sodipodi:ry="5.6568542"
     1175     sodipodi:rx="14.344166"
     1176     sodipodi:cy="38.706596"
     1177     sodipodi:cx="23.536554"
     1178     id="path4244"
     1179     style="font-size:12;opacity:0.4;color:#000000;fill-opacity:0.0368;fill-rule:evenodd;stroke-dashoffset:0;"
     1180     sodipodi:type="arc"
     1181     inkscape:r_cx="true"
     1182     inkscape:r_cy="true" />
     1183  <rect
     1184     style="font-size:12;color:#000000;fill-opacity:0.0368;fill-rule:evenodd;stroke:#5e5e5e;stroke-width:1.836665;stroke-dashoffset:0;"
     1185     id="rect6216"
     1186     width="31.9577503"
     1187     height="6.57723284"
     1188     x="14.9798265"
     1189     y="34.610033"
     1190     rx="2.23386907"
     1191     ry="2.06891823"
     1192     inkscape:r_cx="true"
     1193     inkscape:r_cy="true" />
     1194  <rect
     1195     ry="4.22821856"
     1196     rx="4.56532911"
     1197     y="6.65627432"
     1198     x="14.9798265"
     1199     height="27.7626915"
     1200     width="31.9577503"
     1201     id="rect6218"
     1202     style="font-size:12;color:#000000;fill-opacity:0.0368;fill-rule:evenodd;stroke:#5e5e5e;stroke-width:1.836665;stroke-dashoffset:0;"
     1203     inkscape:r_cx="true"
     1204     inkscape:r_cy="true" />
     1205  <rect
     1206     ry="0.93960613"
     1207     rx="1.01451695"
     1208     y="10.8743858"
     1209     x="19.418328"
     1210     height="18.0874271"
     1211     width="24.8556874"
     1212     id="rect6220"
     1213     style="font-size:12;opacity:0.662857;color:#000000;fill-opacity:0.0368;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.708601;stroke-dashoffset:0;"
     1214     inkscape:r_cx="true"
     1215     inkscape:r_cy="true" />
     1216  <rect
     1217     style="font-size:12;color:#000000;fill:#ffffff;fill-rule:evenodd;stroke:#5e5e5e;stroke-width:1.836665;stroke-dashoffset:0;font-family:Bitstream Vera Sans;"
     1218     id="rect6222"
     1219     width="24.8556874"
     1220     height="18.0874271"
     1221     x="18.5306389"
     1222     y="9.94545269"
     1223     rx="1.01451695"
     1224     ry="0.93960625"
     1225     inkscape:r_cx="true"
     1226     inkscape:r_cy="true" />
     1227  <path
     1228     inkscape:r_cy="true"
     1229     inkscape:r_cx="true"
     1230     sodipodi:nodetypes="ccccccc"
     1231     id="path3626"
     1232     d="M 5.501559 32.19438 L 14.09312 32.2397 L 14.13029 28.09275 L 5.486979 28.04718 L 4.393265 28.8044 L 4.369441 31.46357 L 5.501559 32.19438 z "
     1233     style="font-size:12;fill-opacity:0;fill-rule:evenodd;stroke:#5e5e5e;stroke-width:0.974231;stroke-linecap:round;stroke-linejoin:round;" />
     1234  <rect
     1235     inkscape:r_cy="true"
     1236     inkscape:r_cx="true"
     1237     style="font-size:12;opacity:0.2;color:#000000;fill-opacity:0.0368;fill-rule:evenodd;stroke-dashoffset:0;"
     1238     id="rect4357"
     1239     width="1.81095675"
     1240     height="11.3847269"
     1241     x="11.8748981"
     1242     y="32.5087579"
     1243     transform="matrix(0.999981,6.17421e-3,-7.655214e-3,0.999971,0,0)" />
     1244  <path
     1245     sodipodi:type="spiral"
     1246     style="font-size:12;fill:none;fill-rule:evenodd;stroke:#000000;stroke-opacity:0.1618;stroke-width:0.5198;stroke-dasharray:none;"
     1247     id="path914"
     1248     sodipodi:cx="2.61538482"
     1249     sodipodi:cy="13.8461494"
     1250     sodipodi:expansion="1"
     1251     sodipodi:radius="4.40817022"
     1252     sodipodi:argument="-18.3390675"
     1253     sodipodi:t0="0"
     1254     d="M 2.615385 13.84615 C 2.766369 13.9826 2.600902 14.15861 2.435898 14.16666 C 2.087394 14.18367 1.91242 13.78183 1.974359 13.48717 C 2.083986 12.96567 2.678387 12.73503 3.153847 12.88461 C 3.847221 13.10275 4.139604 13.91138 3.897436 14.5641 C 3.576101 15.4302 2.546791 15.7855 1.717948 15.44871 C 0.67854 15.02637 0.259858 13.77368 0.692307 12.76923 C 1.214578 11.55615 2.692022 11.07385 3.871796 11.60256 C 5.258776 12.22413 5.804839 13.92713 5.179488 15.28205 C 4.459004 16.84309 2.529944 17.45301 0.999999 16.73077 C -0.735208 15.91162 -1.409055 13.75616 -0.589744 12.05128 C 0.327875 10.14182 2.709978 9.404 4.589745 10.32051 C 6.673504 11.33647 7.47534 13.9454 6.46154 16 "
     1255     transform="matrix(1.519545,0,0,1.415876,2.298103,3.983214)"
     1256     sodipodi:revolution="4" />
     1257  <text
     1258     style="fill:#000000;stroke:none;font-family:DejaVu Serif;font-style:italic;font-weight:normal;font-size:6;fill-opacity:0.3456;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;text-anchor:middle;writing-mode:lr;"
     1259     x="23.7343745"
     1260     y="15.8241341"
     1261     id="text763"
     1262     sodipodi:linespacing="100%"
     1263     xml:space="default"
     1264     transform="scale(1.298271,0.989396)">
     1265    <tspan
     1266       x="23.734375"
     1267       y="15.8241339"
     1268       sodipodi:role="line"
     1269       id="tspan826"
     1270       style="fill:#000000;fill-opacity:0.3456;">www</tspan>
     1271  </text>
     1272</svg>
  • extensions/cpsection/Makefile.am

    diff --git a/extensions/cpsection/Makefile.am b/extensions/cpsection/Makefile.am
    index dd0a6b8..a92b5dd 100644
    a b  
    1 SUBDIRS = aboutme aboutcomputer datetime frame keyboard language network power updater
     1SUBDIRS = aboutme aboutcomputer datetime frame keyboard language \
     2    modemconfiguration network power updater
    23
    34sugardir = $(pkgdatadir)/extensions/cpsection
    45sugar_PYTHON = __init__.py
  • new file extensions/cpsection/modemconfiguration/Makefile.am

    diff --git a/extensions/cpsection/modemconfiguration/Makefile.am b/extensions/cpsection/modemconfiguration/Makefile.am
    new file mode 100644
    index 0000000..3e2613e
    - +  
     1sugardir = $(pkgdatadir)/extensions/cpsection/modemconfiguration
     2
     3sugar_PYTHON =          \
     4        __init__.py     \
     5        model.py        \
     6        view.py         
  • new file extensions/cpsection/modemconfiguration/__init__.py

    diff --git a/extensions/cpsection/modemconfiguration/__init__.py b/extensions/cpsection/modemconfiguration/__init__.py
    new file mode 100644
    index 0000000..8a219dc
    - +  
     1# Copyright (C) 2009 Paraguay Educa, Martin Abente
     2#
     3# This program is free software; you can redistribute it and/or modify
     4# it under the terms of the GNU General Public License as published by
     5# the Free Software Foundation; either version 2 of the License, or
     6# (at your option) any later version.
     7#
     8# This program is distributed in the hope that it will be useful,
     9# but WITHOUT ANY WARRANTY; without even the implied warranty of
     10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     11# GNU General Public License for more details.
     12#
     13# You should have received a copy of the GNU General Public License
     14# along with this program; if not, write to the Free Software
     15# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  US
     16
     17from gettext import gettext as _
     18
     19CLASS = 'ModemConfiguration'
     20ICON = 'module-modemconfiguration'
     21TITLE = _('Modem Configuration')
     22
  • new file extensions/cpsection/modemconfiguration/model.py

    diff --git a/extensions/cpsection/modemconfiguration/model.py b/extensions/cpsection/modemconfiguration/model.py
    new file mode 100644
    index 0000000..f96e88f
    - +  
     1# Copyright (C) 2009 Paraguay Educa, Martin Abente
     2#
     3# This program is free software; you can redistribute it and/or modify
     4# it under the terms of the GNU General Public License as published by
     5# the Free Software Foundation; either version 2 of the License, or
     6# (at your option) any later version.
     7#
     8# This program is distributed in the hope that it will be useful,
     9# but WITHOUT ANY WARRANTY; without even the implied warranty of
     10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     11# GNU General Public License for more details.
     12#
     13# You should have received a copy of the GNU General Public License
     14# along with this program; if not, write to the Free Software
     15# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  US
     16
     17import gconf
     18
     19from jarabe.model.network import GSM_USERNAME_PATH, GSM_PASSWORD_PATH, \
     20                                 GSM_NUMBER_PATH, GSM_APN_PATH
     21
     22def get_username():
     23    client = gconf.client_get_default()
     24    return client.get_string(GSM_USERNAME_PATH) or ''
     25
     26def get_password():
     27    client = gconf.client_get_default()
     28    return client.get_string(GSM_PASSWORD_PATH) or ''
     29
     30def get_number():
     31    client = gconf.client_get_default()
     32    return client.get_string(GSM_NUMBER_PATH) or ''
     33
     34def get_apn():
     35    client = gconf.client_get_default()
     36    return client.get_string(GSM_APN_PATH) or ''
     37
     38def set_username(username):
     39    client = gconf.client_get_default()
     40    client.set_string(GSM_USERNAME_PATH, username)
     41
     42def set_password(password):
     43    client = gconf.client_get_default()
     44    client.set_string(GSM_PASSWORD_PATH, password)
     45
     46def set_number(number):
     47    client = gconf.client_get_default()
     48    client.set_string(GSM_NUMBER_PATH, number)
     49
     50def set_apn(apn):
     51    client = gconf.client_get_default()
     52    client.set_string(GSM_APN_PATH, apn)
     53
  • new file extensions/cpsection/modemconfiguration/view.py

    diff --git a/extensions/cpsection/modemconfiguration/view.py b/extensions/cpsection/modemconfiguration/view.py
    new file mode 100644
    index 0000000..d66f1d5
    - +  
     1# Copyright (C) 2009 Paraguay Educa, Martin Abente
     2#
     3# This program is free software; you can redistribute it and/or modify
     4# it under the terms of the GNU General Public License as published by
     5# the Free Software Foundation; either version 2 of the License, or
     6# (at your option) any later version.
     7#
     8# This program is distributed in the hope that it will be useful,
     9# but WITHOUT ANY WARRANTY; without even the implied warranty of
     10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     11# GNU General Public License for more details.
     12#
     13# You should have received a copy of the GNU General Public License
     14# along with this program; if not, write to the Free Software
     15# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  US
     16
     17import os
     18import logging
     19from gettext import gettext as _
     20
     21import gtk
     22import gobject
     23
     24from sugar.graphics import style
     25
     26from jarabe.controlpanel.sectionview import SectionView
     27
     28APPLY_TIMEOUT = 1000
     29
     30class EntryWithLabel(gtk.HBox):
     31    __gtype_name__ = "SugarEntryWithLabel"
     32
     33    def __init__(self, label_text):
     34        gtk.HBox.__init__(self, spacing=style.DEFAULT_SPACING)
     35
     36        self._timeout_sid = 0
     37        self._changed_handler = None
     38        self._is_valid = True
     39
     40        label = gtk.Label(label_text)
     41        label.modify_fg(gtk.STATE_NORMAL,
     42                        style.COLOR_SELECTION_GREY.get_gdk_color())
     43        self.pack_start(label, True, True)
     44        label.show()
     45
     46        self._entry = gtk.Entry(25)
     47        self._entry.connect('changed', self.__entry_changed_cb)
     48        self._entry.set_width_chars(25)
     49        self.pack_start(self._entry, expand=False)
     50        self._entry.show()
     51
     52    def __entry_changed_cb(self, widget, data=None):
     53        if self._timeout_sid:
     54            gobject.source_remove(self._timeout_sid)
     55        self._timeout_sid = gobject.timeout_add(APPLY_TIMEOUT,
     56                                                self.__timeout_cb)
     57
     58    def __timeout_cb(self):
     59        self._timeout_sid = 0
     60
     61        if self._entry.get_text() == self.get_value():
     62            return False
     63
     64        try:
     65            self.set_value(self._entry.get_text())
     66        except ValueError:
     67            self._is_valid = False
     68        else:
     69            self._is_valid = True
     70
     71        self.notify('is-valid')
     72
     73        return False
     74
     75    def set_text_from_model(self):
     76        self._entry.set_text(self.get_value())
     77
     78    def get_value(self):
     79        raise NotImplementedError
     80
     81    def set_value(self):
     82        raise NotImplementedError   
     83
     84    def _get_is_valid(self):
     85        return self._is_valid
     86    is_valid = gobject.property(type=bool, getter=_get_is_valid, default=True)
     87
     88class UsernameEntry(EntryWithLabel):
     89    def __init__(self, model):
     90        EntryWithLabel.__init__(self, _('Username:'))
     91        self._model = model
     92
     93    def get_value(self):
     94        return self._model.get_username()
     95
     96    def set_value(self, username):
     97        return self._model.set_username(username)
     98
     99class PasswordEntry(EntryWithLabel):
     100    def __init__(self, model):
     101        EntryWithLabel.__init__(self, _('Password:'))
     102        self._model = model
     103
     104    def get_value(self):
     105        return self._model.get_password()
     106
     107    def set_value(self, password):
     108        return self._model.set_password(password)
     109
     110class NumberEntry(EntryWithLabel):
     111    def __init__(self, model):
     112        EntryWithLabel.__init__(self, _('Number:'))
     113        self._model = model
     114
     115    def get_value(self):
     116        return self._model.get_number()
     117
     118    def set_value(self, number):
     119        return self._model.set_number(number)
     120
     121class ApnEntry(EntryWithLabel):
     122    def __init__(self, model):
     123        EntryWithLabel.__init__(self, _('APN:'))
     124        self._model = model
     125
     126    def get_value(self):
     127        return self._model.get_apn()
     128
     129    def set_value(self, apn):
     130        return self._model.set_apn(apn)
     131
     132class ModemConfiguration(SectionView):
     133    def __init__(self, model, alerts=None):
     134        SectionView.__init__(self)
     135
     136        self._model = model
     137        self.restart_alerts = alerts
     138
     139        self.set_border_width(style.DEFAULT_SPACING)
     140        self.set_spacing(style.DEFAULT_SPACING)
     141
     142        self._username_entry = UsernameEntry(model)
     143        self._username_entry.connect('notify::is-valid',
     144                                     self.__notify_is_valid_cb)
     145        self.pack_start(self._username_entry, expand=False)
     146        self._username_entry.show()
     147
     148        self._password_entry = PasswordEntry(model)
     149        self._password_entry.connect('notify::is-valid',
     150                                     self.__notify_is_valid_cb)
     151        self.pack_start(self._password_entry, expand=False)
     152        self._password_entry.show()
     153
     154        self._number_entry = NumberEntry(model)
     155        self._number_entry.connect('notify::is-valid',
     156                                   self.__notify_is_valid_cb)
     157        self.pack_start(self._number_entry, expand=False)
     158        self._number_entry.show()
     159
     160        self._apn_entry = ApnEntry(model)
     161        self._apn_entry.connect('notify::is-valid',
     162                                self.__notify_is_valid_cb)
     163        self.pack_start(self._apn_entry, expand=False)
     164        self._apn_entry.show()
     165
     166        self.setup()
     167
     168    def setup(self):
     169        self._username_entry.set_text_from_model()
     170        self._password_entry.set_text_from_model()
     171        self._number_entry.set_text_from_model()
     172        self._apn_entry.set_text_from_model()
     173
     174        self.needs_restart = False
     175
     176    def undo(self):
     177        self._model.undo()
     178
     179    def _validate(self):
     180        if self._username_entry.is_valid and \
     181            self._password_entry.is_valid and \
     182                self._number_entry.is_valid and \
     183                    self._apn_entry.is_valid:
     184                        self.props.is_valid = True
     185        else:
     186            self.props.is_valid = False
     187
     188    def __notify_is_valid_cb(self, entry, pspec):
     189        if entry.is_valid:
     190            self.needs_restart = True
     191        self._validate()
     192
  • extensions/deviceicon/network.py

    diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py
    index e40e196..2ca6a88 100644
    a b  
    11#
    22# Copyright (C) 2008 One Laptop Per Child
    33# Copyright (C) 2009 Tomeu Vizoso, Simon Schampijer
     4# Copyright (C) 2009 Paraguay Educa, Martin Abente
    45#
    56# This program is free software; you can redistribute it and/or modify
    67# it under the terms of the GNU General Public License as published by
    _NM_OLPC_MESH_IFACE = 'org.freedesktop.NetworkManager.Device.OlpcMesh' 
    5556_NM_ACCESSPOINT_IFACE = 'org.freedesktop.NetworkManager.AccessPoint'
    5657_NM_ACTIVE_CONN_IFACE = 'org.freedesktop.NetworkManager.Connection.Active'
    5758
    58 _NM_DEVICE_STATE_UNKNOWN = 0
    59 _NM_DEVICE_STATE_UNMANAGED = 1
    60 _NM_DEVICE_STATE_UNAVAILABLE = 2
    61 _NM_DEVICE_STATE_DISCONNECTED = 3
    62 _NM_DEVICE_STATE_PREPARE = 4
    63 _NM_DEVICE_STATE_CONFIG = 5
    64 _NM_DEVICE_STATE_NEED_AUTH = 6
    65 _NM_DEVICE_STATE_IP_CONFIG = 7
    66 _NM_DEVICE_STATE_ACTIVATED = 8
    67 _NM_DEVICE_STATE_FAILED = 9
     59_GSM_STATE_NOT_READY = 0
     60_GSM_STATE_DISCONNECTED = 1
     61_GSM_STATE_CONNECTING = 2
     62_GSM_STATE_CONNECTED = 3
    6863
    6964def frequency_to_channel(frequency):
    7065    ftoc = { 2412: 1, 2417: 2, 2422: 3, 2427: 4,
    class WiredPalette(Palette): 
    215210            ip_address_text = ""
    216211        self._ip_address_label.set_text(ip_address_text)
    217212
     213class GsmPalette(Palette):
     214    __gtype_name__ = 'SugarGsmPalette'
     215
     216    __gsignals__ = {
     217        'gsm-connect'         : (gobject.SIGNAL_RUN_FIRST,
     218                                 gobject.TYPE_NONE, ([])),
     219        'gsm-disconnect'      : (gobject.SIGNAL_RUN_FIRST,
     220                                 gobject.TYPE_NONE, ([])),
     221    }
     222
     223    def __init__(self):
     224        Palette.__init__(self, label=_('Wireless modem'))
     225
     226        self._current_state = None
     227
     228        self._toggle_state_item = gtk.MenuItem('')
     229        self._toggle_state_item.connect('activate', self.__toggle_state_cb)
     230        self.menu.append(self._toggle_state_item)
     231        self._toggle_state_item.show()
     232
     233        self.set_state(_GSM_STATE_NOT_READY)
     234
     235    def set_state(self, state):
     236        self._current_state = state
     237        self._update_label_and_text()
     238
     239    def _update_label_and_text(self):
     240        if self._current_state == _GSM_STATE_NOT_READY:
     241            self._toggle_state_item.get_child().set_label('...')
     242            self.props.secondary_text = _('Please wait...')
     243
     244        elif self._current_state == _GSM_STATE_DISCONNECTED:
     245            self._toggle_state_item.get_child().set_label(_('Connect'))
     246            self.props.secondary_text = _('Disconnected')
     247
     248        elif self._current_state == _GSM_STATE_CONNECTING:
     249            self._toggle_state_item.get_child().set_label(_('Cancel'))
     250            self.props.secondary_text = _('Connecting...')
     251
     252        elif self._current_state == _GSM_STATE_CONNECTED:
     253            self._toggle_state_item.get_child().set_label(_('Disconnect'))
     254            self.props.secondary_text = _('Connected')
     255        else:
     256            raise ValueError('Invalid GSM state while updating label and ' \
     257                             'text, %s' % str(self._current_state))
     258
     259    def __toggle_state_cb(self, menuitem):
     260        if self._current_state == _GSM_STATE_NOT_READY:
     261            pass
     262        elif self._current_state == _GSM_STATE_DISCONNECTED:
     263            self.emit('gsm-connect')
     264        elif self._current_state == _GSM_STATE_CONNECTING:
     265            self.emit('gsm-disconnect')
     266        elif self._current_state == _GSM_STATE_CONNECTED:
     267            self.emit('gsm-disconnect')
     268        else:
     269            raise ValueError('Invalid GSM state while emitting signal, %s' % \
     270                             str(self._current_state))
     271
    218272
    219273class WirelessDeviceView(ToolButton):
    220274
    class WirelessDeviceView(ToolButton): 
    451505        connection_name = format % nick
    452506        connection_name += color_suffix
    453507
    454         connection = network.find_connection(connection_name)
     508        connection = network.find_connection_by_ssid(connection_name)
    455509        if connection is None:
    456510            settings = Settings()
    457511            settings.connection.id = 'Auto ' + connection_name
    458             settings.connection.uuid = unique_id()
     512            uuid = settings.connection.uuid = unique_id()
    459513            settings.connection.type = '802-11-wireless'
    460514            settings.wireless.ssid = dbus.ByteArray(connection_name)
    461515            settings.wireless.band = 'bg'
    class WirelessDeviceView(ToolButton): 
    463517            settings.ip4_config = IP4Config()
    464518            settings.ip4_config.method = 'link-local'
    465519
    466             connection = network.add_connection(connection_name, settings)
     520            connection = network.add_connection(uuid, settings)
    467521
    468522        obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
    469523        netmgr = dbus.Interface(obj, _NM_IFACE)
    class WiredDeviceView(TrayIcon): 
    623677        self._palette.set_connected(speed, address)
    624678
    625679
     680class GsmDeviceView(TrayIcon):
     681
     682    _ICON_NAME = 'gsm-device'
     683    FRAME_POSITION_RELATIVE = 303
     684
     685    def __init__(self, device):
     686        client = gconf.client_get_default()
     687        color = xocolor.XoColor(client.get_string('/desktop/sugar/user/color'))
     688
     689        TrayIcon.__init__(self, icon_name=self._ICON_NAME, xo_color=color)
     690
     691        self._bus = dbus.SystemBus()
     692        self._device = device
     693        self._palette = None
     694        self.set_palette_invoker(FrameWidgetInvoker(self))
     695
     696        self._bus.add_signal_receiver(self.__state_changed_cb,
     697                                      signal_name='StateChanged',
     698                                      path=self._device.object_path,
     699                                      dbus_interface=_NM_DEVICE_IFACE)
     700
     701    def create_palette(self):
     702        palette = GsmPalette()
     703
     704        palette.set_group_id('frame')
     705        palette.connect('gsm-connect', self.__gsm_connect_cb)
     706        palette.connect('gsm-disconnect', self.__gsm_disconnect_cb)
     707
     708        self._palette = palette
     709
     710        props = dbus.Interface(self._device, 'org.freedesktop.DBus.Properties')
     711        props.GetAll(_NM_DEVICE_IFACE, byte_arrays=True,
     712                     reply_handler=self.__current_state_check_cb,
     713                     error_handler=self.__current_state_check_error_cb)
     714
     715        return palette
     716
     717    def __gsm_connect_cb(self, palette, data=None):
     718        connection = network.find_gsm_connection()
     719        if connection is not None:
     720            obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
     721            netmgr = dbus.Interface(obj, _NM_IFACE)
     722            netmgr.ActivateConnection(network.SETTINGS_SERVICE,
     723                                        connection.path,
     724                                        self._device.object_path,
     725                                        '/',
     726                                        reply_handler=self.__connect_cb,
     727                                        error_handler=self.__connect_error_cb)
     728
     729    def __connect_cb(self, active_connection):
     730        logging.debug('Connected successfully to gsm device, %s',
     731                      active_connection)
     732
     733    def __connect_error_cb(self, error):
     734        raise RuntimeError('Error when connecting to gsm device, %s' % error)
     735
     736    def __gsm_disconnect_cb(self, palette, data=None):
     737        obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
     738        netmgr = dbus.Interface(obj, _NM_IFACE)
     739        netmgr_props = dbus.Interface(netmgr, 'org.freedesktop.DBus.Properties')
     740        active_connections_o = netmgr_props.Get(_NM_IFACE, 'ActiveConnections')
     741
     742        for conn_o in active_connections_o:
     743            obj = self._bus.get_object(_NM_IFACE, conn_o)
     744            props = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
     745            devices = props.Get(_NM_ACTIVE_CONN_IFACE, 'Devices')
     746            if self._device.object_path in devices:
     747                netmgr.DeactivateConnection(
     748                        conn_o,
     749                        reply_handler=self.__disconnect_cb,
     750                        error_handler=self.__disconnect_error_cb)
     751                break
     752
     753    def __disconnect_cb(self):
     754        logging.debug('Disconnected successfully gsm device')
     755
     756    def __disconnect_error_cb(self, error):
     757        raise RuntimeError('Error when disconnecting gsm device, %s' % error)
     758
     759    def __state_changed_cb(self, new_state, old_state, reason):
     760        self._update_state(int(new_state))
     761
     762    def __current_state_check_cb(self, properties):
     763        self._update_state(int(properties['State']))
     764
     765    def __current_state_check_error_cb(self, error):
     766        raise RuntimeError('Error when checking gsm device state, %s' % error)
     767
     768    def _update_state(self, state):
     769        gsm_state = None
     770
     771        if state is network.DEVICE_STATE_ACTIVATED:
     772            gsm_state = _GSM_STATE_CONNECTED
     773
     774        elif state is network.DEVICE_STATE_DISCONNECTED:
     775            gsm_state = _GSM_STATE_DISCONNECTED
     776
     777        elif state in [network.DEVICE_STATE_UNMANAGED,
     778                       network.DEVICE_STATE_UNAVAILABLE,
     779                       network.DEVICE_STATE_UNKNOWN]:
     780            gsm_state = _GSM_STATE_NOT_READY
     781
     782        elif state in [network.DEVICE_STATE_PREPARE,
     783                       network.DEVICE_STATE_CONFIG,
     784                       network.DEVICE_STATE_IP_CONFIG]:
     785            gsm_state = _GSM_STATE_CONNECTING
     786
     787        if self._palette is not None:
     788            self._palette.set_state(gsm_state)
     789
     790    def disconnect(self):
     791        self._bus.remove_signal_receiver(self.__state_changed_cb,
     792                                         signal_name='StateChanged',
     793                                         path=self._device.object_path,
     794                                         dbus_interface=_NM_DEVICE_IFACE)
     795
    626796class WirelessDeviceObserver(object):
    627797    def __init__(self, device, tray, device_type):
    628798        self._device = device
    class WirelessDeviceObserver(object): 
    633803            self._device_view = WirelessDeviceView(self._device)
    634804        elif device_type == network.DEVICE_TYPE_802_11_OLPC_MESH:
    635805            self._device_view = OlpcMeshDeviceView(self._device)
     806        else:
     807            raise ValueError('Unimplemented device type %d' % device_type)
    636808
    637809        self._tray.add_device(self._device_view)
    638810
    class WiredDeviceObserver(object): 
    691863                del self._device_view
    692864                self._device_view = None
    693865
     866class GsmDeviceObserver(object):
     867    def __init__(self, device, tray):
     868        self._device = device
     869        self._device_view = None
     870        self._tray = tray
     871
     872        self._device_view = GsmDeviceView(device)
     873        self._tray.add_device(self._device_view)
     874
     875    def disconnect(self):
     876        self._device_view.disconnect()
     877        self._tray.remove_device(self._device_view)
     878        self._device_view = None
    694879
    695880class NetworkManagerObserver(object):
    696881    def __init__(self, tray):
    class NetworkManagerObserver(object): 
    735920                             network.DEVICE_TYPE_802_11_OLPC_MESH]:
    736921            device = WirelessDeviceObserver(nm_device, self._tray, device_type)
    737922            self._devices[device_op] = device
     923        elif device_type == network.DEVICE_TYPE_GSM_MODEM:
     924            device = GsmDeviceObserver(nm_device, self._tray)
     925            self._devices[device_op] = device
    738926
    739927    def __device_added_cb(self, device_op):
    740928        self._check_device(device_op)
  • src/jarabe/desktop/meshbox.py

    diff --git a/src/jarabe/desktop/meshbox.py b/src/jarabe/desktop/meshbox.py
    index 38f1e71..43f0fe9 100644
    a b class WirelessNetworkView(CanvasPulsingIcon): 
    116116        self.set_palette(self._palette)
    117117        self._palette_icon.props.xo_color = self._color
    118118
    119         if network.find_connection(self._name) is not None:
     119        if network.find_connection_by_ssid(self._name) is not None:
    120120            self.props.badge_name = "emblem-favorite"
    121121            self._palette_icon.props.badge_name = "emblem-favorite"
    122122        elif initial_ap.flags == network.NM_802_11_AP_FLAGS_PRIVACY:
    class WirelessNetworkView(CanvasPulsingIcon): 
    223223            state = network.DEVICE_STATE_UNKNOWN
    224224
    225225        if state == network.DEVICE_STATE_ACTIVATED:
    226             connection = network.find_connection(self._name)
     226            connection = network.find_connection_by_ssid(self._name)
    227227            if connection:
    228228                if self._mode == network.NM_802_11_MODE_INFRA:
    229229                    connection.set_connected()
    class WirelessNetworkView(CanvasPulsingIcon): 
    340340        self._connect()
    341341
    342342    def _connect(self):
    343         connection = network.find_connection(self._name)
     343        connection = network.find_connection_by_ssid(self._name)
    344344        if connection is None:
    345345            settings = Settings()
    346346            settings.connection.id = 'Auto ' + self._name
    347             settings.connection.uuid = unique_id()
     347            uuid = settings.connection.uuid = unique_id()
    348348            settings.connection.type = '802-11-wireless'
    349349            settings.wireless.ssid = self._name
    350350
    class WirelessNetworkView(CanvasPulsingIcon): 
    362362            if wireless_security is not None:
    363363                settings.wireless.security = '802-11-wireless-security'
    364364
    365             connection = network.add_connection(self._name, settings)
     365            connection = network.add_connection(uuid, settings)
    366366
    367367        obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
    368368        netmgr = dbus.Interface(obj, _NM_IFACE)
  • src/jarabe/model/network.py

    diff --git a/src/jarabe/model/network.py b/src/jarabe/model/network.py
    index b3c30d9..696dc91 100644
    a b  
    11# Copyright (C) 2008 Red Hat, Inc.
    22# Copyright (C) 2009 Tomeu Vizoso, Simon Schampijer
    33# Copyright (C) 2009 One Laptop per Child
     4# Copyright (C) 2009 Paraguay Educa, Martin Abente
    45#
    56# This program is free software; you can redistribute it and/or modify
    67# it under the terms of the GNU General Public License as published by
    import time 
    2324import dbus
    2425import gobject
    2526import ConfigParser
     27import gconf
    2628
    2729from sugar import dispatch
    2830from sugar import env
     31from sugar.util import unique_id
    2932
    3033DEVICE_TYPE_802_3_ETHERNET = 1
    3134DEVICE_TYPE_802_11_WIRELESS = 2
     35DEVICE_TYPE_GSM_MODEM = 3
    3236DEVICE_TYPE_802_11_OLPC_MESH = 6
    3337
    3438DEVICE_STATE_UNKNOWN = 0
    DEVICE_STATE_IP_CONFIG = 7 
    4246DEVICE_STATE_ACTIVATED = 8
    4347DEVICE_STATE_FAILED = 9
    4448
     49NM_CONNECTION_TYPE_802_11_WIRELESS = '802-11-wireless'
     50NM_CONNECTION_TYPE_GSM = 'gsm'
     51
    4552NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0
    4653NM_ACTIVE_CONNECTION_STATE_ACTIVATING = 1
    4754NM_ACTIVE_CONNECTION_STATE_ACTIVATED = 2
    NM_CONNECTION_IFACE = 'org.freedesktop.NetworkManagerSettings.Connection' 
    8188NM_SECRETS_IFACE = 'org.freedesktop.NetworkManagerSettings.Connection.Secrets'
    8289NM_ACCESSPOINT_IFACE = 'org.freedesktop.NetworkManager.AccessPoint'
    8390
     91GSM_USERNAME_PATH = '/sugar/network/gsm/username'
     92GSM_PASSWORD_PATH = '/sugar/network/gsm/password'
     93GSM_NUMBER_PATH = '/sugar/network/gsm/number'
     94GSM_APN_PATH = '/sugar/network/gsm/apn'
     95
    8496_nm_settings = None
    8597_conn_counter = 0
    8698
    class IP4Config(object): 
    168180            ip4_config['method'] = self.method
    169181        return ip4_config
    170182
     183class Serial(object):
     184    def __init__(self):
     185        self.baud = None
     186
     187    def get_dict(self):
     188        serial = {}
     189
     190        if self.baud is not None:
     191            serial['baud'] = self.baud
     192
     193        return serial
     194
     195class Ppp(object):
     196    def __init__(self):
     197        pass
     198
     199    def get_dict(self):
     200      ppp = {}
     201      return ppp
     202
     203class Gsm(object):
     204    def __init__(self):
     205        self.apn = None
     206        self.number = None
     207        self.username = None
     208
     209    def get_dict(self):
     210        gsm = {}
     211
     212        if self.apn is not None:
     213            gsm['apn'] = self.apn
     214        if self.number is not None:
     215            gsm['number'] = self.number
     216        if self.username is not None:
     217            gsm['username'] = self.username
     218
     219        return gsm
     220
    171221class Settings(object):
    172222    def __init__(self, wireless_cfg=None):
    173223        self.connection = Connection()
    class Secrets(object): 
    215265
    216266        return settings
    217267
     268class SettingsGsm(object):
     269    def __init__(self):
     270        self.connection = Connection()
     271        self.ip4_config = IP4Config()
     272        self.serial = Serial()
     273        self.ppp = Ppp()
     274        self.gsm = Gsm()
     275
     276    def get_dict(self):
     277        settings = {}
     278
     279        settings['connection'] = self.connection.get_dict()
     280        settings['serial'] = self.serial.get_dict()
     281        settings['ppp'] = self.ppp.get_dict()
     282        settings['gsm'] = self.gsm.get_dict()
     283        settings['ipv4'] = self.ip4_config.get_dict()
     284
     285        return settings
     286
     287class SecretsGsm(object):
     288    def __init__(self):
     289        self.password = None
     290
     291    def get_dict(self):
     292        secrets = {}
     293        if self.password is not None:
     294            secrets['password'] = self.password
     295        return {'gsm': secrets}
     296
    218297class NMSettings(dbus.service.Object):
    219298    def __init__(self):
    220299        bus = dbus.SystemBus()
    class NMSettings(dbus.service.Object): 
    233312    def NewConnection(self, connection_path):
    234313        pass
    235314
    236     def add_connection(self, ssid, conn):
    237         self.connections[ssid] = conn
     315    def add_connection(self, uuid, conn):
     316        self.connections[uuid] = conn
    238317        conn.secrets_request.connect(self.__secrets_request_cb)
    239318        self.NewConnection(conn.path)
    240319
    class NMSettingsConnection(dbus.service.Object): 
    274353        if not self._settings.connection.autoconnect:
    275354            self._settings.connection.autoconnect = True
    276355            self._settings.connection.timestamp = int(time.time())
    277             self.save()
     356            if self._settings.connection.type == NM_CONNECTION_TYPE_802_11_WIRELESS:
     357                self.save()
    278358
    279359    def set_secrets(self, secrets):
    280360        self._secrets = secrets
    281         self.save()
     361        if self._settings.connection.type == NM_CONNECTION_TYPE_802_11_WIRELESS:
     362            self.save()
    282363
    283364    def get_settings(self):
    284365        return self._settings
    class AccessPoint(gobject.GObject): 
    467548                                         path=self.model.object_path,
    468549                                         dbus_interface=NM_ACCESSPOINT_IFACE)
    469550
    470 
    471551def get_settings():
    472552    global _nm_settings
    473553    if _nm_settings is None:
    def get_settings(): 
    478558        load_connections()
    479559    return _nm_settings
    480560
    481 def find_connection(ssid):
     561def find_connection_by_ssid(ssid):
    482562    connections = get_settings().connections
    483     if ssid in connections:
    484         return connections[ssid]
    485     else:
    486         return None
    487563
    488 def add_connection(ssid, settings, secrets=None):
     564    for conn_index in connections:
     565        connection = connections[conn_index]
     566        if connection._settings.connection.type == NM_CONNECTION_TYPE_802_11_WIRELESS:
     567            if connection._settings.wireless.ssid == ssid:
     568                return connection
     569
     570    return None
     571
     572def add_connection(uuid, settings, secrets=None):
    489573    global _conn_counter
    490574
    491575    path = NM_SETTINGS_PATH + '/' + str(_conn_counter)
    492576    _conn_counter += 1
    493577
    494578    conn = NMSettingsConnection(path, settings, secrets)
    495     _nm_settings.add_connection(ssid, conn)
     579    _nm_settings.add_connection(uuid, conn)
    496580    return conn
    497581
    498 def load_connections():
     582def load_wifi_connections():
    499583    profile_path = env.get_profile_path()
    500584    config_path = os.path.join(profile_path, 'nm', 'connections.cfg')
    501585
    def load_connections(): 
    560644        except ConfigParser.Error:
    561645            logging.exception('Error reading section')
    562646        else:
    563             add_connection(ssid, settings, secrets)
     647            add_connection(uuid, settings, secrets)
     648
     649
     650def load_gsm_connection():
     651    settings = SettingsGsm()
     652    secrets = SecretsGsm()
     653
     654    client = gconf.client_get_default()
     655    settings.gsm.username = client.get_string(GSM_USERNAME_PATH) or ''
     656    settings.gsm.number = client.get_string(GSM_NUMBER_PATH) or ''
     657    settings.gsm.apn = client.get_string(GSM_APN_PATH) or ''
     658    password = client.get_string(GSM_PASSWORD_PATH) or ''
     659
     660    if password:
     661        secrets.password = password
     662
     663    settings.connection.id = 'gsm'
     664    settings.connection.type = NM_CONNECTION_TYPE_GSM
     665    uuid = settings.connection.uuid = unique_id()
     666    settings.connection.autoconnect = False
     667    settings.ip4_config.method = 'auto'
     668    settings.serial.baud = 115200
     669
     670    try:
     671        add_connection(uuid, settings, secrets)
     672    except Exception:
     673        logging.exception('While adding gsm connection')
     674
     675def load_connections():
     676    load_wifi_connections()
     677    load_gsm_connection()
     678
     679def find_gsm_connection():
     680    connections = get_settings().connections
     681
     682    for connection in connections.values():
     683        if connection.get_settings().connection.type == NM_CONNECTION_TYPE_GSM:
     684            return connection
     685
     686    return None