close
Attachments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #1622: gsm-patch.diff

File gsm-patch.diff, 71.0 KB (added by tch, 6 years ago)
  • new file data/icons/module-modemconfiguration.svg

    From 17e147e12210a7153d75eaf2ec003909c4a8e603 Mon Sep 17 00:00:00 2001
    From: tch <mabente@paraguayeduca.org>
    Date: Thu, 17 Dec 2009 10:45:15 -0300
    Subject: [PATCH] gsm connection support, control panel section and device icon
    
    ---
     data/icons/module-modemconfiguration.svg           | 1272 ++++++++++++++++++++
     .../cpsection/modemconfiguration/__init__.py       |   22 +
     extensions/cpsection/modemconfiguration/model.py   |   43 +
     extensions/cpsection/modemconfiguration/view.py    |  142 +++
     extensions/deviceicon/network.py                   |  170 +++-
     src/jarabe/desktop/meshbox.py                      |   10 +-
     src/jarabe/model/network.py                        |  189 +++-
     7 files changed, 1825 insertions(+), 23 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..b0703e2
    - +  
     1# Copyright (C) 2009 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..d06db75
    - +  
     1# Copyright (C) 2009 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
     19storage = StorageGsm()
     20
     21def get_username():
     22    return storage.get_username()
     23
     24def get_password():
     25    return storage.get_password()
     26
     27def get_number():
     28    return storage.get_number()
     29
     30def get_apn():
     31    return storage.get_apn()
     32
     33def set_username(username):
     34    storage.set_username(username)
     35
     36def set_password(password):
     37    storage.set_password(password)
     38
     39def set_number(number):
     40    storage.set_number(number)
     41
     42def set_apn(apn):
     43    storage.set_apn(apn)
  • 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..3033463
    - +  
     1# Copyright (C) 2009 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
     30_LABEL = 0
     31_MODEL_GET = 1
     32_MODEL_SET = 2
     33
     34_ATTRIBUTES = {
     35    'username'  : [_('Username'), 'get_username', 'set_username'],
     36    'password'  : [_('Password'), 'get_password', 'set_password'],
     37    'number'    : [_('Number'), 'get_number', 'set_number'],
     38    'apn'       : [_('Apn'), 'get_apn', 'set_apn']
     39}
     40
     41class MyEntry(gtk.Entry):
     42    def __init__(self, model, attr_name):
     43        gtk.Entry.__init__(self, 25)
     44
     45        self.sid = 0
     46        self.is_valid = True
     47        self.get_method = getattr(model, _ATTRIBUTES[attr_name][_MODEL_GET])
     48        self.set_method = getattr(model, _ATTRIBUTES[attr_name][_MODEL_SET])
     49        self.set_width_chars(25)
     50
     51class ModemConfiguration(SectionView):
     52    def __init__(self, model, alerts=None):
     53        SectionView.__init__(self)
     54
     55        self._model = model
     56        self.restart_alerts = alerts
     57        self._username_sid = 0
     58        self._username_valid = True
     59        self._password_valid = True
     60        self._number_valid = True
     61        self._apn_valid = True
     62
     63        self.set_border_width(style.DEFAULT_SPACING)
     64        self.set_spacing(style.DEFAULT_SPACING)
     65        self._group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
     66
     67        self._username_entry = self._setup_field("username")
     68        self._password_entry = self._setup_field('password')
     69        self._number_entry = self._setup_field('number')
     70        self._apn_entry = self._setup_field('apn')
     71
     72        self.setup()
     73
     74    def _setup_field(self, attr_name):
     75        box = gtk.HBox(spacing=style.DEFAULT_SPACING)
     76     
     77        label = gtk.Label(_ATTRIBUTES[attr_name][_LABEL] + ':')
     78        label.modify_fg(gtk.STATE_NORMAL, style.COLOR_SELECTION_GREY.get_gdk_color())
     79        box.pack_start(label)
     80         
     81        entry = MyEntry(self._model, attr_name)
     82        box.pack_start(entry, False)
     83        box.show_all()
     84
     85        self.pack_start(box, False)
     86        return entry
     87
     88    def setup(self):
     89        self._username_entry.set_text(self._model.get_username())
     90        self._password_entry.set_text(self._model.get_password())
     91        self._number_entry.set_text(self._model.get_number())
     92        self._apn_entry.set_text(self._model.get_apn())
     93
     94        self._username_valid = True
     95        self._password_valid = True
     96        self._number_valid = True
     97        self._apn_valid = True
     98        self.needs_restart = False
     99
     100        self._username_change_handler = self._username_entry.connect( \
     101                'changed', self.__changed_cb)
     102        self._password_change_handler = self._password_entry.connect( \
     103                'changed', self.__changed_cb)
     104        self._number_change_handler = self._number_entry.connect( \
     105                'changed', self.__changed_cb)
     106        self._apn_change_handler = self._apn_entry.connect( \
     107                'changed', self.__changed_cb)
     108
     109    def undo(self):
     110        self._username_entry.disconnect(self._username_change_handler)
     111        self._password_entry.disconnect(self._password_change_handler)
     112        self._number_entry.disconnect(self._number_change_handler)
     113        self._apn_entry.disconnect(self._apn_change_handler)
     114        self._model.undo()
     115
     116    def _validate(self):
     117        if self._username_entry._is_valid and self._password_entry._is_valid and self._number_entry._is_valid and self._apn_entry._is_valid:
     118            self.props.is_valid = True
     119        else:
     120            self.props.is_valid = False
     121
     122    def __changed_cb(self, widget, data=None):
     123        if widget.sid:
     124            gobject.source_remove(widget.sid)
     125        widget.sid = gobject.timeout_add(APPLY_TIMEOUT,
     126                                             self.__timeout_cb, widget)
     127
     128    def __timeout_cb(self, widget):
     129        widget.sid = 0
     130
     131        if widget.get_text() == widget.get_method():
     132            return False
     133        try:
     134            widget.set_method(widget.get_text())
     135        except ValueError, detail:
     136            widget.is_valid = False           
     137        else:
     138            widget.is_valid = True
     139            self.needs_restart = True
     140        self._validate()
     141        return False
     142
  • extensions/deviceicon/network.py

    diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py
    index dd1a70c..3a9b27f 100644
    a b  
    11#
    22# Copyright (C) 2008 One Laptop Per Child
    3 # Copyright (C) 2009 Tomeu Vizoso, Simon Schampijer
     3# Copyright (C) 2009 Tomeu Vizoso, Simon Schampijer, Martin Abente
    44#
    55# This program is free software; you can redistribute it and/or modify
    66# it under the terms of the GNU General Public License as published by
    _NM_DEVICE_STATE_IP_CONFIG = 7 
    6363_NM_DEVICE_STATE_ACTIVATED = 8
    6464_NM_DEVICE_STATE_FAILED = 9
    6565
     66_GSM_STATE_NOT_READY = 0
     67_GSM_STATE_DISCONNECTED = 1
     68_GSM_STATE_CONNECTING = 2
     69_GSM_STATE_CONNECTED = 3
     70
     71_GSM_SIGNAL = 0
     72_GSM_LABEL = 1
     73_GSM_TEXT = 2
     74
     75_GSM_STATES = {
     76    _GSM_STATE_NOT_READY : ['gsm-idle', '...', _('Please wait...')],
     77    _GSM_STATE_DISCONNECTED : ['gsm-connect', _('Connect'), _('Disconnected')],
     78    _GSM_STATE_CONNECTING : ['gsm-disconnect', _('Cancel'), _('Connecting...')],
     79    _GSM_STATE_CONNECTED : ['gsm-disconnect', _('Disconnect'), _('Connected')]
     80}
     81
    6682def frequency_to_channel(frequency):
    6783    ftoc = { 2412: 1, 2417: 2, 2422: 3, 2427: 4,
    6884             2432: 5, 2437: 6, 2442: 7, 2447: 8,
    class WiredPalette(Palette): 
    201217            ip_address_text = ""
    202218        self._ip_address_label.set_text(ip_address_text)
    203219
     220class GsmPalette(Palette):
     221    __gtype_name__ = 'SugarGsmPalette'
     222
     223    __gsignals__ = {
     224        'gsm-connect'         : (gobject.SIGNAL_RUN_FIRST,
     225                                   gobject.TYPE_NONE, ([])),
     226        'gsm-disconnect'      : (gobject.SIGNAL_RUN_FIRST,
     227                                   gobject.TYPE_NONE, ([])),
     228        'gsm-idle'         : (gobject.SIGNAL_RUN_FIRST,
     229                                   gobject.TYPE_NONE, ([])),
     230    }
     231
     232    def __init__(self):
     233        Palette.__init__(self, label=_('GSM Device'))
     234
     235        self._current_signal = _GSM_STATES[_GSM_STATE_NOT_READY][_GSM_SIGNAL]
     236        self._toggle_state_item = gtk.MenuItem(_GSM_STATES[_GSM_STATE_NOT_READY][_GSM_LABEL])
     237        self._toggle_state_item.connect('activate', self._toggle_state_cb)
     238        self.menu.append(self._toggle_state_item)
     239        self._toggle_state_item.show()
     240
     241        self.props.secondary_text = _GSM_STATES[_GSM_STATE_NOT_READY][_GSM_TEXT]
     242
     243    def set_state(self, state):
     244
     245        if state in _GSM_STATES:
     246            self._current_signal = _GSM_STATES[state][_GSM_SIGNAL]
     247            self._toggle_state_item.get_child().set_label(_GSM_STATES[state][_GSM_LABEL])
     248            self.props.secondary_text = _GSM_STATES[state][_GSM_TEXT]
     249
     250    def _toggle_state_cb(self, menuitem):
     251        self.emit(self._current_signal)
    204252
    205253class WirelessDeviceView(ToolButton):
    206254
    class WirelessDeviceView(ToolButton): 
    414462        color = client.get_string('/desktop/sugar/user/color')
    415463        connection_name = _('%s\'s network %s') % (nick, color)
    416464
    417         connection = network.find_connection(connection_name)
     465        connection = network.find_connection_by_ssid(connection_name)
    418466        if connection is None:
    419467            settings = Settings()
    420468            settings.connection.id = 'Auto ' + connection_name
    421             settings.connection.uuid = unique_id()
     469            uuid = settings.connection.uuid = unique_id()
    422470            settings.connection.type = '802-11-wireless'
    423471            settings.wireless.ssid = dbus.ByteArray(connection_name)
    424472            settings.wireless.band = 'bg'
    class WirelessDeviceView(ToolButton): 
    426474            settings.ip4_config = IP4Config()
    427475            settings.ip4_config.method = 'link-local'
    428476
    429             connection = network.add_connection(connection_name, settings)
     477            connection = network.add_connection(uuid, settings)
    430478
    431479        obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
    432480        netmgr = dbus.Interface(obj, _NM_IFACE)
    class WiredDeviceView(TrayIcon): 
    461509        self._palette.set_group_id('frame')
    462510        self._palette.set_connected(speed, address)
    463511
     512class GsmDeviceView(TrayIcon):
     513
     514    _ICON_NAME = 'gsm-device'
     515    FRAME_POSITION_RELATIVE = 303
     516
     517    def __init__(self, device):
     518        client = gconf.client_get_default()
     519        color = xocolor.XoColor(client.get_string('/desktop/sugar/user/color'))
     520
     521        TrayIcon.__init__(self, icon_name=self._ICON_NAME, xo_color=color)
     522
     523        self._bus = dbus.SystemBus()
     524        self._device = device
     525
     526        self.set_palette_invoker(FrameWidgetInvoker(self))
     527        self._palette = GsmPalette()
     528        self.set_palette(self._palette)
     529        self._palette.set_group_id('frame')
     530
     531        props = dbus.Interface(self._device, 'org.freedesktop.DBus.Properties')
     532        props.GetAll(_NM_DEVICE_IFACE, byte_arrays=True,
     533                     reply_handler=self.__current_state_check_cb,
     534                     error_handler=self.__current_state_check_error_cb)
     535
     536        self._palette.connect('gsm-connect', self.__gsm_connect_cb)
     537        self._palette.connect('gsm-disconnect', self.__gsm_disconnect_cb)
     538        self._palette.connect('gsm-idle', self.__gsm_idle_cb)
     539
     540        self._bus.add_signal_receiver(self.__state_changed_cb,
     541                                      signal_name='StateChanged',
     542                                      path=self._device.object_path,
     543                                      dbus_interface=_NM_DEVICE_IFACE)
     544
     545    def __gsm_connect_cb(self, palette, data=None):
     546
     547        try:
     548            connection = network.find_gsm_connection()
     549            if connection is not None:
     550                obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
     551                netmgr = dbus.Interface(obj, _NM_IFACE)
     552
     553                netmgr.ActivateConnection(network.SETTINGS_SERVICE,
     554                                          connection.path,
     555                                          self._device.object_path,
     556                                          '/')
     557        except Exception, detail:
     558            logging.error('Could not connect to gsm connection, %s', detail)
     559
     560    def __gsm_disconnect_cb(self, palette, data=None):
     561
     562        obj = self._bus.get_object(_NM_SERVICE, _NM_PATH)
     563        netmgr = dbus.Interface(obj, _NM_IFACE)
     564        netmgr_props = dbus.Interface(netmgr, 'org.freedesktop.DBus.Properties')
     565        active_connections_o = netmgr_props.Get(_NM_IFACE, 'ActiveConnections')
     566
     567        for conn_o in active_connections_o:
     568            obj = self._bus.get_object(_NM_IFACE, conn_o)
     569            props = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
     570            devices = props.Get(_NM_ACTIVE_CONN_IFACE, 'Devices')
     571            if self._device.object_path in devices:
     572                netmgr.DeactivateConnection(conn_o)
     573                break
     574
     575    def __gsm_idle_cb(self, palette, data=None):
     576        pass
     577
     578    def __state_changed_cb(self, new_state, old_state, reason):
     579        self.__update_state(int(new_state))
     580
     581    def __current_state_check_cb(self, properties):
     582        self.__update_state(int(properties['State']))
     583
     584    def __current_state_check_error_cb(self, err):
     585        logging.error('Error getting gsm state %', err)
     586
     587    def __update_state(self, state):
     588        gsm_state = None
     589
     590        if state is network.DEVICE_STATE_ACTIVATED:
     591            gsm_state = _GSM_STATE_CONNECTED
     592
     593        elif state is network.DEVICE_STATE_DISCONNECTED:
     594            gsm_state = _GSM_STATE_DISCONNECTED
     595
     596        elif state in [network.DEVICE_STATE_UNMANAGED, _NM_DEVICE_STATE_UNAVAILABLE, _NM_DEVICE_STATE_UNKNOWN]:
     597            gsm_state = _GSM_STATE_NOT_READY
     598
     599        elif state in [_NM_DEVICE_STATE_PREPARE, _NM_DEVICE_STATE_CONFIG, _NM_DEVICE_STATE_IP_CONFIG]:
     600            gsm_state = _GSM_STATE_CONNECTING
     601
     602        self._palette.set_state(gsm_state)
     603
     604    def disconnect(self):
     605        self._bus.remove_signal_receiver(self.__state_changed_cb,
     606                                         signal_name='StateChanged',
     607                                         path=self._device.object_path,
     608                                         dbus_interface=_NM_DEVICE_IFACE)
    464609
    465610class WirelessDeviceObserver(object):
    466611    def __init__(self, device, tray):
    class WiredDeviceObserver(object): 
    526671                del self._device_view
    527672                self._device_view = None
    528673
     674class GsmDeviceObserver(object):
     675    def __init__(self, device, tray):
     676        self._device = device
     677        self._device_view = None
     678        self._tray = tray
     679
     680        self._device_view = GsmDeviceView(device)
     681        self._tray.add_device(self._device_view)
     682
     683    def disconnect(self):
     684        self._device_view.disconnect()
     685        self._tray.remove_device(self._device_view)
     686        del self._device_view
     687        self._device_view = None
    529688
    530689class NetworkManagerObserver(object):
    531690    def __init__(self, tray):
    class NetworkManagerObserver(object): 
    569728        elif device_type == network.DEVICE_TYPE_802_11_WIRELESS:
    570729            device = WirelessDeviceObserver(nm_device, self._tray)
    571730            self._devices[device_op] = device
     731        elif device_type == network.DEVICE_TYPE_GSM_MODEM:
     732            device = GsmDeviceObserver(nm_device, self._tray)
     733            self._devices[device_op] = device
    572734
    573735    def __device_added_cb(self, device_op):
    574736        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..00031ce 100644
    a b  
    11# Copyright (C) 2008 Red Hat, Inc.
    2 # Copyright (C) 2009 Tomeu Vizoso, Simon Schampijer
     2# Copyright (C) 2009 Tomeu Vizoso, Simon Schampijer, Martin Abente
    33# Copyright (C) 2009 One Laptop per Child
    44#
    55# This program is free software; you can redistribute it and/or modify
    import time 
    2323import dbus
    2424import gobject
    2525import ConfigParser
     26import gconf
    2627
    2728from sugar import dispatch
    2829from sugar import env
     30from sugar.util import unique_id
    2931
    3032DEVICE_TYPE_802_3_ETHERNET = 1
    3133DEVICE_TYPE_802_11_WIRELESS = 2
     34DEVICE_TYPE_GSM_MODEM = 3
    3235
    3336DEVICE_STATE_UNKNOWN = 0
    3437DEVICE_STATE_UNMANAGED = 1
    DEVICE_STATE_IP_CONFIG = 7 
    4144DEVICE_STATE_ACTIVATED = 8
    4245DEVICE_STATE_FAILED = 9
    4346
     47NM_CONNECTION_TYPE_802_11_WIRELESS = '802-11-wireless'
     48NM_CONNECTION_TYPE_GSM = 'gsm'
     49
    4450NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0
    4551NM_ACTIVE_CONNECTION_STATE_ACTIVATING = 1
    4652NM_ACTIVE_CONNECTION_STATE_ACTIVATED = 2
    NM_CONNECTION_IFACE = 'org.freedesktop.NetworkManagerSettings.Connection' 
    8086NM_SECRETS_IFACE = 'org.freedesktop.NetworkManagerSettings.Connection.Secrets'
    8187NM_ACCESSPOINT_IFACE = 'org.freedesktop.NetworkManager.AccessPoint'
    8288
     89GSM_USERNAME_PATH = '/sugar/nm/gsm/username'
     90GSM_PASSWORD_PATH = '/sugar/nm/gsm/password'
     91GSM_NUMBER_PATH = '/sugar/nm/gsm/number'
     92GSM_APN_PATH = '/sugar/nm/gsm/apn'
     93
    8394_nm_settings = None
    8495_conn_counter = 0
    8596
    class IP4Config(object): 
    146157            ip4_config['method'] = self.method
    147158        return ip4_config
    148159
     160class Serial(object):
     161    def __init__(self):
     162        self.baud = None
     163
     164    def get_dict(self):
     165        serial = {}
     166
     167        if self.baud is not None:
     168            serial['baud'] = self.baud
     169
     170        return serial
     171
     172class Ppp(object):
     173    def __init__(self):
     174        pass
     175
     176    def get_dict(self):
     177      ppp = {}
     178      return ppp
     179
     180class Gsm(object):
     181    def __init__(self):
     182        self.apn = None
     183        self.number = None
     184        self.username = None
     185
     186    def get_dict(self):
     187        gsm = {}
     188
     189        if self.apn is not None:
     190            gsm['apn'] = self.apn
     191        if self.number is not None:
     192            gsm['number'] = self.number
     193        if self.username is not None:
     194            gsm['username'] = self.username
     195
     196        return gsm
     197
    149198class Settings(object):
    150199    def __init__(self):
    151200        self.connection = Connection()
    class Secrets(object): 
    189238
    190239        return settings
    191240
     241class SettingsGsm(object):
     242    def __init__(self):
     243        self.connection = Connection()
     244        self.ip4_config = IP4Config()
     245        self.serial = Serial()
     246        self.ppp = Ppp()
     247        self.gsm = Gsm()
     248
     249    def get_dict(self):
     250        settings = {}
     251
     252        settings['connection'] = self.connection.get_dict()
     253        settings['serial'] = self.serial.get_dict()
     254        settings['ppp'] = self.ppp.get_dict()
     255        settings['gsm'] = self.gsm.get_dict()
     256        settings['ipv4'] = self.ip4_config.get_dict()
     257
     258        return settings
     259
     260class SecretsGsm(object):
     261    def __init__(self):
     262        self.password = None
     263
     264    def get_dict(self):
     265        secrets = {}
     266        if self.password is not None:
     267            secrets['password'] = self.password
     268        return { 'gsm' : secrets }
     269
    192270class NMSettings(dbus.service.Object):
    193271    def __init__(self):
    194272        bus = dbus.SystemBus()
    class NMSettings(dbus.service.Object): 
    207285    def NewConnection(self, connection_path):
    208286        pass
    209287
    210     def add_connection(self, ssid, conn):
    211         self.connections[ssid] = conn
     288    def add_connection(self, uuid, conn):
     289        self.connections[uuid] = conn
    212290        conn.secrets_request.connect(self.__secrets_request_cb)
    213291        self.NewConnection(conn.path)
    214292
    class NMSettingsConnection(dbus.service.Object): 
    248326        if not self._settings.connection.autoconnect:
    249327            self._settings.connection.autoconnect = True
    250328            self._settings.connection.timestamp = int(time.time())
    251             self.save()
     329            if self._settings.connection.type == NM_CONNECTION_TYPE_802_11_WIRELESS:
     330                self.save()
    252331
    253332    def set_secrets(self, secrets):
    254333        self._secrets = secrets
    255         self.save()
     334        if self._settings.connection.type == NM_CONNECTION_TYPE_802_11_WIRELESS:
     335            self.save()
    256336
    257337    def get_settings(self):
    258338        return self._settings
    class AccessPoint(gobject.GObject): 
    441521                                         path=self.model.object_path,
    442522                                         dbus_interface=NM_ACCESSPOINT_IFACE)
    443523
     524class StorageGsm(object):
     525    def __init__(self):
     526        self.client = gconf.client_get_default()
     527
     528    def get_username(self):
     529        return self.verified(self.client.get_string(GSM_USERNAME_PATH))
     530
     531    def get_password(self):
     532        return self.verified(self.client.get_string(GSM_PASSWORD_PATH))
     533
     534    def get_number(self):
     535        return self.verified(self.client.get_string(GSM_NUMBER_PATH))
     536
     537    def get_apn(self):
     538        return self.verified(self.client.get_string(GSM_APN_PATH))
     539
     540    def set_username(self, username):
     541        self.client.set_string(GSM_USERNAME_PATH, username)
     542
     543    def set_password(self, password):
     544        self.client.set_string(GSM_PASSWORD_PATH, password)
     545
     546    def set_number(self, number):
     547        self.client.set_string(GSM_NUMBER_PATH, number)
     548
     549    def set_apn(self, apn):
     550        self.client.set_string(GSM_APN_PATH, apn)
     551
     552    def verified(self, value):
     553        if value is None:
     554            return ''
     555        return value
    444556
    445557def get_settings():
    446558    global _nm_settings
    def get_settings(): 
    452564        load_connections()
    453565    return _nm_settings
    454566
    455 def find_connection(ssid):
     567def find_connection_by_ssid(ssid):
    456568    connections = get_settings().connections
    457     if ssid in connections:
    458         return connections[ssid]
    459     else:
    460         return None
    461569
    462 def add_connection(ssid, settings, secrets=None):
     570    for conn_index in connections:
     571        connection = connections[conn_index]
     572        if connection._settings.connection.type == NM_CONNECTION_TYPE_802_11_WIRELESS:
     573            if connection._settings.wireless.ssid == ssid:
     574                return connection
     575
     576    return None
     577
     578def add_connection(uuid, settings, secrets=None):
    463579    global _conn_counter
    464580
    465581    path = NM_SETTINGS_PATH + '/' + str(_conn_counter)
    466582    _conn_counter += 1
    467583
    468584    conn = NMSettingsConnection(path, settings, secrets)
    469     _nm_settings.add_connection(ssid, conn)
     585    _nm_settings.add_connection(uuid, conn)
    470586    return conn
    471587
    472 def load_connections():
     588def load_wifi_connections():
    473589    profile_path = env.get_profile_path()
    474590    config_path = os.path.join(profile_path, 'nm', 'connections.cfg')
    475591
    def load_connections(): 
    534650        except ConfigParser.Error:
    535651            logging.exception('Error reading section')
    536652        else:
    537             add_connection(ssid, settings, secrets)
     653            add_connection(uuid, settings, secrets)
     654
     655def load_gsm_connection():
     656    storage = StorageGsm()       
     657    settings = SettingsGsm()
     658    secrets = SecretsGsm()
     659
     660    try:
     661        settings.gsm.username = storage.get_username()
     662        settings.gsm.number = storage.get_number()
     663        settings.gsm.apn = storage.get_apn()
     664        password = storage.get_password()
     665
     666    except ValueError:
     667        logging.error("While loading gsm connection from settings")
     668
     669    else:
     670        if password != '':
     671            secrets.password = password
     672
     673        settings.connection.id = 'gsm'
     674        settings.connection.type = NM_CONNECTION_TYPE_GSM
     675        uuid = settings.connection.uuid = unique_id()
     676        settings.connection.autoconnect = False
     677        settings.ip4_config.method = 'auto'
     678        settings.serial.baud = 115200
     679
     680        try:
     681            add_connection(uuid, settings, secrets)
     682        except Exception:
     683            logging.error("While adding the gsm connection")
     684       
     685
     686def load_connections():
     687    load_wifi_connections()
     688    load_gsm_connection()
     689
     690def find_gsm_connection():
     691    connections = get_settings().connections
     692
     693    for conn_index in connections:
     694        connection = connections[conn_index]
     695        if connection._settings.connection.type == NM_CONNECTION_TYPE_GSM:
     696            return connection
     697
     698    return None