Ticket #1622: gsm-patch-v4.patch

File gsm-patch-v4.patch, 73.2 KB (added by tch, 14 years ago)
  • new file data/icons/module-modemconfiguration.svg

    From 1bda895b20963dd1d590acdaa974ea724ddb3e25 Mon Sep 17 00:00:00 2001
    From: tch <mabente@paraguayeduca.org>
    Date: Tue, 29 Dec 2009 11:41:30 -0300
    Subject: [PATCH] Gsm Connection management and device icon
    
    ---
     data/icons/module-modemconfiguration.svg           | 1272 ++++++++++++++++++++
     .../cpsection/modemconfiguration/__init__.py       |   22 +
     extensions/cpsection/modemconfiguration/model.py   |   51 +
     extensions/cpsection/modemconfiguration/view.py    |  196 +++
     extensions/deviceicon/network.py                   |  193 +++-
     src/jarabe/desktop/meshbox.py                      |   10 +-
     src/jarabe/model/network.py                        |  188 +++-
     7 files changed, 1911 insertions(+), 21 deletions(-)
     create mode 100644 data/icons/module-modemconfiguration.svg
     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/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>
  • 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..0a6bcae
    - +  
     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 jarabe.model.network import StorageGsm
     18
     19_storage = None
     20
     21def get_username():
     22    return get_storage().get_username()
     23
     24def get_password():
     25    return get_storage().get_password()
     26
     27def get_number():
     28    return get_storage().get_number()
     29
     30def get_apn():
     31    return get_storage().get_apn()
     32
     33def set_username(username):
     34    get_storage().set_username(username)
     35
     36def set_password(password):
     37    get_storage().set_password(password)
     38
     39def set_number(number):
     40    get_storage().set_number(number)
     41
     42def set_apn(apn):
     43    get_storage().set_apn(apn)
     44
     45def get_storage():
     46    global _storage
     47
     48    if _storage is None:
     49        _storage = StorageGsm()
     50    return _storage
     51       
  • 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..7b65321
    - +  
     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 GsmEntry(gtk.Entry):
     31    def __init__(self):
     32        gtk.Entry.__init__(self, 25)
     33        self.sid = 0
     34        self.is_valid = True
     35        self.changed_handler = None
     36        self.label_text = None
     37        self.set_width_chars(25)
     38
     39    def connect_changed(self, changed_cb):
     40        if self.changed_handler is None:
     41            self.changed_handler = self.connect('changed', changed_cb)
     42
     43    def disconnect_changed(self):
     44        if self.changed_handler is not None:
     45            self.disconnect(self.changed_handler)
     46
     47    # Sets text from model to entry
     48    def set_text_from_model(self):
     49            self.set_text(self.get_method())
     50
     51    # Sets text from entry to model
     52    def set_text_to_model(self):
     53            self.set_method(self.get_text())
     54
     55    def get_method(self):
     56        raise NotImplementedError
     57
     58    def set_method(self):
     59        raise NotImplementedError   
     60
     61class UsernameEntry(GsmEntry):
     62    def __init__(self, model):
     63        GsmEntry.__init__(self)
     64        self._model = model
     65
     66    def get_method(self):
     67        return self._model.get_username()
     68
     69    def set_method(self, username):
     70        return self._model.set_username(username)
     71
     72class PasswordEntry(GsmEntry):
     73    def __init__(self, model):
     74        GsmEntry.__init__(self)
     75        self._model = model
     76
     77    def get_method(self):
     78        return self._model.get_password()
     79
     80    def set_method(self, password):
     81        return self._model.set_password(password)
     82
     83class NumberEntry(GsmEntry):
     84    def __init__(self, model):
     85        GsmEntry.__init__(self)
     86        self._model = model
     87
     88    def get_method(self):
     89        return self._model.get_number()
     90
     91    def set_method(self, number):
     92        return self._model.set_number(number)
     93
     94class ApnEntry(GsmEntry):
     95    def __init__(self, model):
     96        GsmEntry.__init__(self)
     97        self._model = model
     98
     99    def get_method(self):
     100        return self._model.get_apn()
     101
     102    def set_method(self, apn):
     103        return self._model.set_apn(apn)
     104
     105class ModemConfiguration(SectionView):
     106    def __init__(self, model, alerts=None):
     107        SectionView.__init__(self)
     108
     109        self._model = model
     110        self.restart_alerts = alerts
     111
     112        self.set_border_width(style.DEFAULT_SPACING)
     113        self.set_spacing(style.DEFAULT_SPACING)
     114        self._group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
     115
     116        self._username_entry = UsernameEntry(model)
     117        username_field = self._create_field(self._username_entry, _('Username:'))
     118        self.pack_start(username_field, False)
     119
     120        self._password_entry = PasswordEntry(model)
     121        password_field = self._create_field(self._password_entry, _('Password:'))
     122        self.pack_start(password_field, False)
     123
     124        self._number_entry = NumberEntry(model)
     125        number_field = self._create_field(self._number_entry, _('Number:'))
     126        self.pack_start(number_field, False)
     127
     128        self._apn_entry = ApnEntry(model)
     129        apn_field = self._create_field(self._apn_entry, _('APN:'))
     130        self.pack_start(apn_field, False)
     131
     132        self.setup()
     133
     134    def _create_field(self, entry, label_text):
     135        box = gtk.HBox(spacing=style.DEFAULT_SPACING)
     136     
     137        label = gtk.Label(label_text)
     138        label.modify_fg(gtk.STATE_NORMAL, style.COLOR_SELECTION_GREY.get_gdk_color())
     139        box.pack_start(label)
     140         
     141        box.pack_start(entry, False)
     142        box.show_all()
     143
     144        return box
     145
     146    def setup(self):
     147        self._username_entry.set_text_from_model()
     148        self._password_entry.set_text_from_model()
     149        self._number_entry.set_text_from_model()
     150        self._apn_entry.set_text_from_model()
     151
     152        self.needs_restart = False
     153
     154        self._username_entry.connect_changed(self.__changed_cb)
     155        self._password_entry.connect_changed(self.__changed_cb)
     156        self._number_entry.connect_changed(self.__changed_cb)
     157        self._apn_entry.connect_changed(self.__changed_cb)
     158
     159    def undo(self):
     160        self._username_entry.disconnect_changed()
     161        self._password_entry.disconnect_changed()
     162        self._number_entry.disconnect_changed()
     163        self._apn_entry.disconnect_changed()
     164
     165        self._model.undo()
     166
     167    def _validate(self):
     168        if self._username_entry.is_valid and \
     169            self._password_entry.is_valid and \
     170                self._number_entry.is_valid and \
     171                    self._apn_entry.is_valid:
     172                        self.props.is_valid = True
     173        else:
     174            self.props.is_valid = False
     175
     176    def __changed_cb(self, widget, data=None):
     177        if widget.sid:
     178            gobject.source_remove(widget.sid)
     179        widget.sid = gobject.timeout_add(APPLY_TIMEOUT,
     180                                             self.__timeout_cb, widget)
     181
     182    def __timeout_cb(self, widget):
     183        widget.sid = 0
     184
     185        if widget.get_text() == widget.get_method():
     186            return False
     187        try:
     188            widget.set_text_to_model()
     189        except ValueError:
     190            widget.is_valid = False           
     191        else:
     192            widget.is_valid = True
     193            self.needs_restart = True
     194        self._validate()
     195        return False
     196
  • extensions/deviceicon/network.py

    diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py
    index dd1a70c..754d3af 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_DEVICE_STATE_IP_CONFIG = 7 
    6364_NM_DEVICE_STATE_ACTIVATED = 8
    6465_NM_DEVICE_STATE_FAILED = 9
    6566
     67_GSM_STATE_NOT_READY = 0
     68_GSM_STATE_DISCONNECTED = 1
     69_GSM_STATE_CONNECTING = 2
     70_GSM_STATE_CONNECTED = 3
     71
    6672def frequency_to_channel(frequency):
    6773    ftoc = { 2412: 1, 2417: 2, 2422: 3, 2427: 4,
    6874             2432: 5, 2437: 6, 2442: 7, 2447: 8,
    class WiredPalette(Palette): 
    201207            ip_address_text = ""
    202208        self._ip_address_label.set_text(ip_address_text)
    203209
     210class GsmPalette(Palette):
     211    __gtype_name__ = 'SugarGsmPalette'
     212
     213    __gsignals__ = {
     214        'gsm-connect'         : (gobject.SIGNAL_RUN_FIRST,
     215                                   gobject.TYPE_NONE, ([])),
     216        'gsm-disconnect'      : (gobject.SIGNAL_RUN_FIRST,
     217                                   gobject.TYPE_NONE, ([])),
     218        'gsm-idle'         : (gobject.SIGNAL_RUN_FIRST,
     219                                   gobject.TYPE_NONE, ([])),
     220    }
     221
     222    def __init__(self):
     223        Palette.__init__(self, label=_('GSM Device'))
     224
     225        self._current_state = None
     226        self.props.secondary_text = None
     227        self._toggle_state_item = gtk.MenuItem('')
     228        self.set_state(_GSM_STATE_NOT_READY)
     229
     230        self._toggle_state_item.connect('activate', self._toggle_state_cb)
     231        self.menu.append(self._toggle_state_item)
     232        self._toggle_state_item.show()
     233
     234    def set_state(self, state):
     235        self._current_state = state
     236        self._update_label_and_text()
     237
     238    def _update_label_and_text(self):
     239        if self._current_state == _GSM_STATE_NOT_READY:
     240            self._toggle_state_item.get_child().set_label('...')
     241            self.props.secondary_text = _('Please wait...')
     242
     243        elif self._current_state == _GSM_STATE_DISCONNECTED:
     244            self._toggle_state_item.get_child().set_label(_('Connect'))
     245            self.props.secondary_text = _('Disconnected')
     246
     247        elif self._current_state == _GSM_STATE_CONNECTING:
     248            self._toggle_state_item.get_child().set_label(_('Cancel'))
     249            self.props.secondary_text = _('Connecting...')
     250
     251        elif self._current_state == _GSM_STATE_CONNECTED:
     252            self._toggle_state_item.get_child().set_label(_('Disconnect'))
     253            self.props.secondary_text = _('Connected')
     254        else:
     255            logging.error('Invalid GSM state while updating label and text, %s', str(self._current_state))
     256
     257    def _toggle_state_cb(self, menuitem):
     258        if self._current_state == _GSM_STATE_NOT_READY:
     259            self.emit('gsm-idle')
     260
     261        elif self._current_state == _GSM_STATE_DISCONNECTED:
     262            self.emit('gsm-connect')
     263
     264        elif self._current_state == _GSM_STATE_CONNECTING:
     265            self.emit('gsm-disconnect')
     266
     267        elif self._current_state == _GSM_STATE_CONNECTED:
     268            self.emit('gsm-disconnect')
     269        else:
     270            logging.error('Invalid GSM state while emitting signal, %s', str(self._current_state))
    204271
    205272class WirelessDeviceView(ToolButton):
    206273
    class WirelessDeviceView(ToolButton): 
    414481        color = client.get_string('/desktop/sugar/user/color')
    415482        connection_name = _('%s\'s network %s') % (nick, color)
    416483
    417         connection = network.find_connection(connection_name)
     484        connection = network.find_connection_by_ssid(connection_name)
    418485        if connection is None:
    419486            settings = Settings()
    420487            settings.connection.id = 'Auto ' + connection_name
    421             settings.connection.uuid = unique_id()
     488            uuid = settings.connection.uuid = unique_id()
    422489            settings.connection.type = '802-11-wireless'
    423490            settings.wireless.ssid = dbus.ByteArray(connection_name)
    424491            settings.wireless.band = 'bg'
    class WirelessDeviceView(ToolButton): 
    426493            settings.ip4_config = IP4Config()
    427494            settings.ip4_config.method = 'link-local'
    428495
    429             connection = network.add_connection(connection_name, settings)
     496            connection = network.add_connection(uuid, settings)
    430497
    431498        obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
    432499        netmgr = dbus.Interface(obj, _NM_IFACE)
    class WiredDeviceView(TrayIcon): 
    461528        self._palette.set_group_id('frame')
    462529        self._palette.set_connected(speed, address)
    463530
     531class GsmDeviceView(TrayIcon):
     532
     533    _ICON_NAME = 'gsm-device'
     534    FRAME_POSITION_RELATIVE = 303
     535
     536    def __init__(self, device):
     537        client = gconf.client_get_default()
     538        color = xocolor.XoColor(client.get_string('/desktop/sugar/user/color'))
     539
     540        TrayIcon.__init__(self, icon_name=self._ICON_NAME, xo_color=color)
     541
     542        self._bus = dbus.SystemBus()
     543        self._device = device
     544        self._palette = None
     545        self.set_palette_invoker(FrameWidgetInvoker(self))
     546
     547        self._bus.add_signal_receiver(self.__state_changed_cb,
     548                                      signal_name='StateChanged',
     549                                      path=self._device.object_path,
     550                                      dbus_interface=_NM_DEVICE_IFACE)
     551
     552    def create_palette(self):
     553        palette = GsmPalette()
     554
     555        palette.set_group_id('frame')
     556        palette.connect('gsm-connect', self.__gsm_connect_cb)
     557        palette.connect('gsm-disconnect', self.__gsm_disconnect_cb)
     558        palette.connect('gsm-idle', self.__gsm_idle_cb)
     559
     560        self._palette = palette
     561
     562        props = dbus.Interface(self._device, 'org.freedesktop.DBus.Properties')
     563        props.GetAll(_NM_DEVICE_IFACE, byte_arrays=True,
     564                     reply_handler=self.__current_state_check_cb,
     565                     error_handler=self.__current_state_check_error_cb)
     566
     567        return palette
     568
     569    def __gsm_connect_cb(self, palette, data=None):
     570
     571        try:
     572            connection = network.find_gsm_connection()
     573            if connection is not None:
     574                obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
     575                netmgr = dbus.Interface(obj, _NM_IFACE)
     576
     577                netmgr.ActivateConnection(network.SETTINGS_SERVICE,
     578                                          connection.path,
     579                                          self._device.object_path,
     580                                          '/')
     581        except Exception, detail:
     582            logging.exception('Could not connect to gsm connection, %s', detail)
     583
     584    def __gsm_disconnect_cb(self, palette, data=None):
     585
     586        obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
     587        netmgr = dbus.Interface(obj, _NM_IFACE)
     588        netmgr_props = dbus.Interface(netmgr, 'org.freedesktop.DBus.Properties')
     589        active_connections_o = netmgr_props.Get(_NM_IFACE, 'ActiveConnections')
     590
     591        for conn_o in active_connections_o:
     592            obj = self._bus.get_object(_NM_IFACE, conn_o)
     593            props = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
     594            devices = props.Get(_NM_ACTIVE_CONN_IFACE, 'Devices')
     595            if self._device.object_path in devices:
     596                netmgr.DeactivateConnection(conn_o)
     597                break
     598
     599    def __gsm_idle_cb(self, palette, data=None):
     600        pass
     601
     602    def __state_changed_cb(self, new_state, old_state, reason):
     603        self._update_state(int(new_state))
     604
     605    def __current_state_check_cb(self, properties):
     606        self._update_state(int(properties['State']))
     607
     608    def __current_state_check_error_cb(self, err):
     609        logging.exception('While checking gsm device state, %s', err)
     610
     611    def _update_state(self, state):
     612        gsm_state = None
     613
     614        if state is network.DEVICE_STATE_ACTIVATED:
     615            gsm_state = _GSM_STATE_CONNECTED
     616
     617        elif state is network.DEVICE_STATE_DISCONNECTED:
     618            gsm_state = _GSM_STATE_DISCONNECTED
     619
     620        elif state in [network.DEVICE_STATE_UNMANAGED, _NM_DEVICE_STATE_UNAVAILABLE, _NM_DEVICE_STATE_UNKNOWN]:
     621            gsm_state = _GSM_STATE_NOT_READY
     622
     623        elif state in [_NM_DEVICE_STATE_PREPARE, _NM_DEVICE_STATE_CONFIG, _NM_DEVICE_STATE_IP_CONFIG]:
     624            gsm_state = _GSM_STATE_CONNECTING
     625
     626        if self._palette is not None:
     627            self._palette.set_state(gsm_state)
     628
     629    def disconnect(self):
     630        self._bus.remove_signal_receiver(self.__state_changed_cb,
     631                                         signal_name='StateChanged',
     632                                         path=self._device.object_path,
     633                                         dbus_interface=_NM_DEVICE_IFACE)
    464634
    465635class WirelessDeviceObserver(object):
    466636    def __init__(self, device, tray):
    class WiredDeviceObserver(object): 
    526696                del self._device_view
    527697                self._device_view = None
    528698
     699class GsmDeviceObserver(object):
     700    def __init__(self, device, tray):
     701        self._device = device
     702        self._device_view = None
     703        self._tray = tray
     704
     705        self._device_view = GsmDeviceView(device)
     706        self._tray.add_device(self._device_view)
     707
     708    def disconnect(self):
     709        self._device_view.disconnect()
     710        self._tray.remove_device(self._device_view)
     711        del self._device_view
     712        self._device_view = None
    529713
    530714class NetworkManagerObserver(object):
    531715    def __init__(self, tray):
    class NetworkManagerObserver(object): 
    569753        elif device_type == network.DEVICE_TYPE_802_11_WIRELESS:
    570754            device = WirelessDeviceObserver(nm_device, self._tray)
    571755            self._devices[device_op] = device
     756        elif device_type == network.DEVICE_TYPE_GSM_MODEM:
     757            device = GsmDeviceObserver(nm_device, self._tray)
     758            self._devices[device_op] = device
    572759
    573760    def __device_added_cb(self, device_op):
    574761        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 2c58fe6..8d953a0 100644
    a b class WirelessNetworkView(CanvasPulsingIcon): 
    111111        self.set_palette(self._palette)
    112112        self._palette_icon.props.xo_color = self._color
    113113
    114         if network.find_connection(self._name) is not None:
     114        if network.find_connection_by_ssid(self._name) is not None:
    115115            self.props.badge_name = "emblem-favorite"
    116116            self._palette_icon.props.badge_name = "emblem-favorite"
    117117        elif initial_ap.flags == network.NM_802_11_AP_FLAGS_PRIVACY:
    class WirelessNetworkView(CanvasPulsingIcon): 
    213213            state = network.DEVICE_STATE_UNKNOWN
    214214
    215215        if state == network.DEVICE_STATE_ACTIVATED:
    216             connection = network.find_connection(self._name)
     216            connection = network.find_connection_by_ssid(self._name)
    217217            if connection:
    218218                if self._mode == network.NM_802_11_MODE_INFRA:
    219219                    connection.set_connected()
    class WirelessNetworkView(CanvasPulsingIcon): 
    330330        self._connect()
    331331
    332332    def _connect(self):
    333         connection = network.find_connection(self._name)
     333        connection = network.find_connection_by_ssid(self._name)
    334334        if connection is None:
    335335            settings = Settings()
    336336            settings.connection.id = 'Auto ' + self._name
    337             settings.connection.uuid = unique_id()
     337            uuid = settings.connection.uuid = unique_id()
    338338            settings.connection.type = '802-11-wireless'
    339339            settings.wireless.ssid = self._name
    340340
    class WirelessNetworkView(CanvasPulsingIcon): 
    352352            if wireless_security is not None:
    353353                settings.wireless.security = '802-11-wireless-security'
    354354
    355             connection = network.add_connection(self._name, settings)
     355            connection = network.add_connection(uuid, settings)
    356356
    357357        obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
    358358        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 10b73ab..7c3849d 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
    3236
    3337DEVICE_STATE_UNKNOWN = 0
    3438DEVICE_STATE_UNMANAGED = 1
    DEVICE_STATE_IP_CONFIG = 7 
    4145DEVICE_STATE_ACTIVATED = 8
    4246DEVICE_STATE_FAILED = 9
    4347
     48NM_CONNECTION_TYPE_802_11_WIRELESS = '802-11-wireless'
     49NM_CONNECTION_TYPE_GSM = 'gsm'
     50
    4451NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0
    4552NM_ACTIVE_CONNECTION_STATE_ACTIVATING = 1
    4653NM_ACTIVE_CONNECTION_STATE_ACTIVATED = 2
    NM_CONNECTION_IFACE = 'org.freedesktop.NetworkManagerSettings.Connection' 
    8087NM_SECRETS_IFACE = 'org.freedesktop.NetworkManagerSettings.Connection.Secrets'
    8188NM_ACCESSPOINT_IFACE = 'org.freedesktop.NetworkManager.AccessPoint'
    8289
     90GSM_USERNAME_PATH = '/sugar/nm/gsm/username'
     91GSM_PASSWORD_PATH = '/sugar/nm/gsm/password'
     92GSM_NUMBER_PATH = '/sugar/nm/gsm/number'
     93GSM_APN_PATH = '/sugar/nm/gsm/apn'
     94
    8395_nm_settings = None
    8496_conn_counter = 0
    8597
    class IP4Config(object): 
    146158            ip4_config['method'] = self.method
    147159        return ip4_config
    148160
     161class Serial(object):
     162    def __init__(self):
     163        self.baud = None
     164
     165    def get_dict(self):
     166        serial = {}
     167
     168        if self.baud is not None:
     169            serial['baud'] = self.baud
     170
     171        return serial
     172
     173class Ppp(object):
     174    def __init__(self):
     175        pass
     176
     177    def get_dict(self):
     178      ppp = {}
     179      return ppp
     180
     181class Gsm(object):
     182    def __init__(self):
     183        self.apn = None
     184        self.number = None
     185        self.username = None
     186
     187    def get_dict(self):
     188        gsm = {}
     189
     190        if self.apn is not None:
     191            gsm['apn'] = self.apn
     192        if self.number is not None:
     193            gsm['number'] = self.number
     194        if self.username is not None:
     195            gsm['username'] = self.username
     196
     197        return gsm
     198
    149199class Settings(object):
    150200    def __init__(self):
    151201        self.connection = Connection()
    class Secrets(object): 
    189239
    190240        return settings
    191241
     242class SettingsGsm(object):
     243    def __init__(self):
     244        self.connection = Connection()
     245        self.ip4_config = IP4Config()
     246        self.serial = Serial()
     247        self.ppp = Ppp()
     248        self.gsm = Gsm()
     249
     250    def get_dict(self):
     251        settings = {}
     252
     253        settings['connection'] = self.connection.get_dict()
     254        settings['serial'] = self.serial.get_dict()
     255        settings['ppp'] = self.ppp.get_dict()
     256        settings['gsm'] = self.gsm.get_dict()
     257        settings['ipv4'] = self.ip4_config.get_dict()
     258
     259        return settings
     260
     261class SecretsGsm(object):
     262    def __init__(self):
     263        self.password = None
     264
     265    def get_dict(self):
     266        secrets = {}
     267        if self.password is not None:
     268            secrets['password'] = self.password
     269        return {'gsm': secrets}
     270
    192271class NMSettings(dbus.service.Object):
    193272    def __init__(self):
    194273        bus = dbus.SystemBus()
    class NMSettings(dbus.service.Object): 
    207286    def NewConnection(self, connection_path):
    208287        pass
    209288
    210     def add_connection(self, ssid, conn):
    211         self.connections[ssid] = conn
     289    def add_connection(self, uuid, conn):
     290        self.connections[uuid] = conn
    212291        conn.secrets_request.connect(self.__secrets_request_cb)
    213292        self.NewConnection(conn.path)
    214293
    class NMSettingsConnection(dbus.service.Object): 
    248327        if not self._settings.connection.autoconnect:
    249328            self._settings.connection.autoconnect = True
    250329            self._settings.connection.timestamp = int(time.time())
    251             self.save()
     330            if self._settings.connection.type == NM_CONNECTION_TYPE_802_11_WIRELESS:
     331                self.save()
    252332
    253333    def set_secrets(self, secrets):
    254334        self._secrets = secrets
    255         self.save()
     335        if self._settings.connection.type == NM_CONNECTION_TYPE_802_11_WIRELESS:
     336            self.save()
    256337
    257338    def get_settings(self):
    258339        return self._settings
    class AccessPoint(gobject.GObject): 
    441522                                         path=self.model.object_path,
    442523                                         dbus_interface=NM_ACCESSPOINT_IFACE)
    443524
     525class StorageGsm(object):
     526    def __init__(self):
     527        self._client = gconf.client_get_default()
     528
     529    def get_username(self):
     530        return self.verified(self._client.get_string(GSM_USERNAME_PATH))
     531
     532    def get_password(self):
     533        return self.verified(self._client.get_string(GSM_PASSWORD_PATH))
     534
     535    def get_number(self):
     536        return self.verified(self._client.get_string(GSM_NUMBER_PATH))
     537
     538    def get_apn(self):
     539        return self.verified(self._client.get_string(GSM_APN_PATH))
     540
     541    def set_username(self, username):
     542        self._client.set_string(GSM_USERNAME_PATH, username)
     543
     544    def set_password(self, password):
     545        self._client.set_string(GSM_PASSWORD_PATH, password)
     546
     547    def set_number(self, number):
     548        self._client.set_string(GSM_NUMBER_PATH, number)
     549
     550    def set_apn(self, apn):
     551        self._client.set_string(GSM_APN_PATH, apn)
     552
     553    def verified(self, value):
     554        if value is None:
     555            return ''
     556        return value
    444557
    445558def get_settings():
    446559    global _nm_settings
    def get_settings(): 
    452565        load_connections()
    453566    return _nm_settings
    454567
    455 def find_connection(ssid):
     568def find_connection_by_ssid(ssid):
    456569    connections = get_settings().connections
    457     if ssid in connections:
    458         return connections[ssid]
    459     else:
    460         return None
    461570
    462 def add_connection(ssid, settings, secrets=None):
     571    for conn_index in connections:
     572        connection = connections[conn_index]
     573        if connection._settings.connection.type == NM_CONNECTION_TYPE_802_11_WIRELESS:
     574            if connection._settings.wireless.ssid == ssid:
     575                return connection
     576
     577    return None
     578
     579def add_connection(uuid, settings, secrets=None):
    463580    global _conn_counter
    464581
    465582    path = NM_SETTINGS_PATH + '/' + str(_conn_counter)
    466583    _conn_counter += 1
    467584
    468585    conn = NMSettingsConnection(path, settings, secrets)
    469     _nm_settings.add_connection(ssid, conn)
     586    _nm_settings.add_connection(uuid, conn)
    470587    return conn
    471588
    472 def load_connections():
     589def load_wifi_connections():
    473590    profile_path = env.get_profile_path()
    474591    config_path = os.path.join(profile_path, 'nm', 'connections.cfg')
    475592
    def load_connections(): 
    534651        except ConfigParser.Error:
    535652            logging.exception('Error reading section')
    536653        else:
    537             add_connection(ssid, settings, secrets)
     654            add_connection(uuid, settings, secrets)
     655
     656def load_gsm_connection():
     657    storage = StorageGsm()       
     658    settings = SettingsGsm()
     659    secrets = SecretsGsm()
     660
     661    try:
     662        settings.gsm.username = storage.get_username()
     663        settings.gsm.number = storage.get_number()
     664        settings.gsm.apn = storage.get_apn()
     665        password = storage.get_password()
     666
     667    except ValueError, detail:
     668        logging.exception('While reading gsm settings from storage, %s', detail)
     669
     670    else:
     671        if password:
     672            secrets.password = password
     673
     674        settings.connection.id = 'gsm'
     675        settings.connection.type = NM_CONNECTION_TYPE_GSM
     676        uuid = settings.connection.uuid = unique_id()
     677        settings.connection.autoconnect = False
     678        settings.ip4_config.method = 'auto'
     679        settings.serial.baud = 115200
     680
     681        try:
     682            add_connection(uuid, settings, secrets)
     683        except Exception, detail:
     684            logging.exception('While adding gsm connection, %s', detail)
     685       
     686
     687def load_connections():
     688    load_wifi_connections()
     689    load_gsm_connection()
     690
     691def find_gsm_connection():
     692    connections = get_settings().connections
     693
     694    for conn_index in connections:
     695        connection = connections[conn_index]
     696        if connection._settings.connection.type == NM_CONNECTION_TYPE_GSM:
     697            return connection
     698
     699    return None