[Dextrose] [PATCH] au#687: Add network proxy config extension to CP
Anish Mangal
anish at sugarlabs.org
Mon Sep 19 10:45:42 EDT 2011
This work has been done and maintained by:
Aleksey Lim <alsroot at activitycentral.org>
here:
http://git.sugarlabs.org/alsroot/proxy_cp
Signed-off-by: Anish Mangal <anish at sugarlabs.org>
---
data/icons/Makefile.am | 3 +-
data/icons/module-proxy.svg | 364 ++++++++++++++++++++++++++++++++
extensions/cpsection/proxy/Makefile.am | 6 +
extensions/cpsection/proxy/__init__.py | 21 ++
extensions/cpsection/proxy/model.py | 14 ++
extensions/cpsection/proxy/view.py | 367 ++++++++++++++++++++++++++++++++
6 files changed, 741 insertions(+), 1 deletions(-)
create mode 100644 data/icons/module-proxy.svg
create mode 100644 extensions/cpsection/proxy/Makefile.am
create mode 100644 extensions/cpsection/proxy/__init__.py
create mode 100644 extensions/cpsection/proxy/model.py
create mode 100644 extensions/cpsection/proxy/view.py
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index 2497c4a..2582c31 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -11,6 +11,7 @@ sugar_DATA = \
module-modemconfiguration.svg \
module-network.svg \
module-power.svg \
- module-updater.svg
+ module-updater.svg \
+ module-proxy.svg
EXTRA_DIST = $(sugar_DATA)
diff --git a/data/icons/module-proxy.svg b/data/icons/module-proxy.svg
new file mode 100644
index 0000000..e4172c7
--- /dev/null
+++ b/data/icons/module-proxy.svg
@@ -0,0 +1,331 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.1"
+ width="55"
+ height="55"
+ id="svg3063">
+ <defs
+ id="defs3065">
+ <clipPath
+ id="SVGID_5_">
+ <use
+ id="use3018"
+ style="overflow:visible"
+ x="0"
+ y="0"
+ width="1"
+ height="1"
+ xlink:href="#SVGID_4_" />
+ </clipPath>
+ <clipPath
+ id="SVGID_5_-7">
+ <use
+ id="use3018-6"
+ style="overflow:visible"
+ x="0"
+ y="0"
+ width="1"
+ height="1"
+ xlink:href="#SVGID_4_" />
+ </clipPath>
+ <clipPath
+ id="SVGID_5_-1">
+ <use
+ id="use3018-4"
+ style="overflow:visible"
+ x="0"
+ y="0"
+ width="1"
+ height="1"
+ xlink:href="#SVGID_4_" />
+ </clipPath>
+ <clipPath
+ id="SVGID_5_-12">
+ <use
+ id="use3018-3"
+ style="overflow:visible"
+ x="0"
+ y="0"
+ width="1"
+ height="1"
+ xlink:href="#SVGID_4_" />
+ </clipPath>
+ <clipPath
+ id="SVGID_5_-3">
+ <use
+ id="use3018-41"
+ style="overflow:visible"
+ x="0"
+ y="0"
+ width="1"
+ height="1"
+ xlink:href="#SVGID_4_" />
+ </clipPath>
+ <clipPath
+ id="SVGID_5_-0">
+ <use
+ id="use3018-2"
+ style="overflow:visible"
+ x="0"
+ y="0"
+ width="1"
+ height="1"
+ xlink:href="#SVGID_4_" />
+ </clipPath>
+ <clipPath
+ id="SVGID_5_-8">
+ <use
+ id="use3018-65"
+ style="overflow:visible"
+ x="0"
+ y="0"
+ width="1"
+ height="1"
+ xlink:href="#SVGID_4_" />
+ </clipPath>
+ <clipPath
+ id="SVGID_5_-06">
+ <use
+ id="use3018-1"
+ style="overflow:visible"
+ x="0"
+ y="0"
+ width="1"
+ height="1"
+ xlink:href="#SVGID_4_" />
+ </clipPath>
+ <clipPath
+ id="SVGID_5_-82">
+ <use
+ id="use3018-9"
+ style="overflow:visible"
+ x="0"
+ y="0"
+ width="1"
+ height="1"
+ xlink:href="#SVGID_4_" />
+ </clipPath>
+ <defs
+ id="defs3508">
+ <path
+ d="m 23.589,42.098 c 10.277,0 18.616,-8.373 18.616,-18.645 0,-10.207 -8.338,-18.581 -18.616,-18.581 -10.206,0 -18.615,8.374 -18.615,18.581 0,10.272 8.41,18.645 18.615,18.645 z"
+ id="SVGID_3_" />
+ </defs>
+ <clipPath
+ id="SVGID_4_">
+ <use
+ id="use3512"
+ style="overflow:visible"
+ x="0"
+ y="0"
+ width="1"
+ height="1"
+ xlink:href="#SVGID_3_" />
+ </clipPath>
+ <radialGradient
+ cx="685.64899"
+ cy="995.40698"
+ r="96.022903"
+ id="SVGID_5_-4"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.315,0,0,0.315,-193.939,-303.123)">
+ <stop
+ id="stop3515"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3517"
+ style="stop-color:#57adff;stop-opacity:1"
+ offset="0.59549999" />
+ <stop
+ id="stop3519"
+ style="stop-color:#c9e6ff;stop-opacity:1"
+ offset="0.99440002" />
+ </radialGradient>
+ <linearGradient
+ x1="868.99597"
+ y1="-1149.41"
+ x2="868.99597"
+ y2="-1269.5601"
+ id="SVGID_6_"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.315,0,0,-0.315,-250.166,-358.406)">
+ <stop
+ id="stop3524"
+ style="stop-color:#006a00;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3526"
+ style="stop-color:#004000;stop-opacity:1"
+ offset="0.2" />
+ <stop
+ id="stop3528"
+ style="stop-color:#00bd00;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ cx="685.64899"
+ cy="995.40698"
+ r="96.022903"
+ id="radialGradient3603"
+ xlink:href="#SVGID_5_-4"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.315,0,0,0.315,-193.939,-303.123)" />
+ </defs>
+ <metadata
+ id="metadata3068">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="matrix(0.09164839,0,0,0.09164839,-0.05430278,-41.447306)"
+ id="layer1">
+ <path
+ d="m 200.897,116.781 c -1.04,0 -2.184,0.428 -3.348,1.089 2.741,-0.802 4.03,-1.089 3.348,-1.089 m 67.869,13.235 0.677,-9.925 -10.473,0.655 1.382,9.27 h 8.414 M 150.528,301.594 c -2.113,-1.988 -0.699,-10.608 -0.699,-10.608 0,0 -31.488,-16.545 -65.767,-26.493 -4.227,-1.225 -2.091,-9.932 2.091,-13.23 l -1.387,-9.297 c -0.693,-4.622 7.005,-27.148 14.698,-29.12 7.699,-2 -0.705,13.235 -0.705,13.235 l -7.688,4.637 c 0,0 9.092,10.592 11.199,10.592 2.092,0 5.591,-5.31 5.591,-5.31 l -9.79,-6.604 9.091,-3.988 0.574,-3.489 1.528,-0.487 15.062,-22.809 c 10.407,-4.258 23.199,-9.535 24.824,-10.31 2.806,-1.316 22.387,-12.569 25.887,-15.213 3.51,-2.666 11.187,-1.988 13.982,-1.988 2.812,0 7,-1.333 7.698,-8.631 0.699,-7.281 3.5,-8.608 5.607,-6.615 2.102,1.967 -2.107,5.293 2.796,6.615 4.893,1.333 9.092,4.644
+12.597,1.333 2.557,-2.422 -0.867,-5.186 -3.17,-7.271 h 38.846 l 4.205,-11.947 -9.097,-1.321 -33.596,-3.305 v -3.982 l -2.676,0.456 c 3.635,-19.987 25.236,-16.692 8.972,-28.259 -0.986,-0.71 -15.213,22.418 -18.837,21.97 -6.562,-0.868 -15.029,-0.938 -16.833,1.197 -2.396,2.817 5.363,-9.688 12.038,-13.479 -7.964,2.346 -22.234,-4.903 -47.964,13.273 -8.701,6.15 -30.541,31.066 -39.528,40.645 -37.968,44.826 -41.029,83.175 -41.029,84.876 0,3.31 8.04,5.179 8.733,9.167 0.704,3.95 -13.29,17.218 -13.29,23.839 0,3.044 -7.005,36.114 8.381,77.496 13.647,39.257 40.054,73.879 43.445,76.046 l 9.725,-5.158 c 0,0 -16.091,-28.486 -16.784,-31.141 -0.693,-2.647 18.188,-41.068 27.295,-39.727 9.091,1.29 6.994,3.968 12.591,0.65 5.602,-3.292 9.096,-30.479 15.392,-33.113 6.301,-2.663 13.29,-5.969 12.596,-12.592 -0.729,-6.644
+-24.513,-18.557 -26.604,-20.54 m 151.819,-194.755 -18.888,-6.626 3.5,10.608 15.388,-3.982 m -70.666,24.511 c 2.107,0 44.074,-27.81 39.881,-28.481 -4.188,-0.655 -4.887,0 -16.102,-1.327 -11.177,-1.322 -23.084,15.901 -25.875,18.562 -2.802,2.647 -1.859,11.246 2.096,11.246 m 192.63,199.731 5.42,-7.031 -5.42,-1.905 -4.062,5.104 -4.734,7.02 4.05,1.909 4.746,-5.097 m 23.687,22.995 -1.356,-10.228 h -8.785 l -0.682,7.659 -8.139,-1.269 -2.016,-8.3 -4.063,-2.559 -4.745,5.745 -4.735,-1.268 -1.366,4.452 5.428,1.301 v 41.479 l 19.159,4.615 c -0.445,0.759 -0.771,1.41 -0.879,1.756 -1.364,4.477 5.406,6.415 10.144,4.477 1.753,-0.705 12.797,-4.952 16.295,-13.283 4.879,-11.605 8.03,-28.314 8.877,-33.722 l -2.146,-4.693 -13.545,5.117 -7.466,-1.28 h 0.02 m -6.783,-169.88 c -30.978,-46.973 -105.41,-77.669 -105.41,-77.669
+l -19.166,10.039 -2.722,-4.453 -6.761,-2.563 v 5.753 l 6.091,5.115 -4.053,1.912 -15.582,1.268 -35.211,19.158 3.381,15.322 -4.075,1.284 -2.015,3.186 11.512,17.223 0.671,5.759 -9.476,1.913 v 11.486 l -5.412,1.273 0.677,8.944 -46.058,31.938 1.355,17.852 c 3.38,4.475 29.798,31.293 29.798,31.293 0,0 30.464,1.263 37.237,-2.551 6.777,-3.831 2.025,3.831 4.068,5.748 2.016,1.923 2.709,15.322 4.724,16.601 2.038,1.271 0,8.923 2.709,11.502 2.71,2.534 2.71,33.19 2.71,33.19 0,0 16.252,27.445 16.252,34.468 0,7.021 -0.683,6.382 12.189,5.742 12.863,-0.628 15.571,-5.742 18.281,-7.649 2.709,-1.908 2.709,-6.383 5.417,-10.229 2.731,-3.839 7.455,-18.499 13.556,-23.602 6.078,-5.126 22.343,-8.96 23.686,-17.879 1.356,-8.949 7.443,-15.972 7.443,-15.972 l 29.278,-30.968 -0.823,4.161 -0.671,15.95 8.81,-3.187
+-0.672,-17.25 -3.154,-3.343 0.446,-0.487 c 0,0 -2.037,-3.831 -4.734,-3.831 -2.712,0 -18.974,3.831 -21.672,3.196 -2.711,-0.644 -14.228,-31.292 -16.253,-32.549 -2.039,-1.279 -14.889,-22.359 -14.889,-22.359 0,0 29.776,35.751 34.521,49.795 2.751,8.18 13.089,0.563 21.497,-7.97 l 2.222,5.429 5.407,-1.29 -0.671,-6.381 h 6.088 v 9.573 l -2.024,5.115 -0.694,8.29 5.429,5.119 2.71,-4.459 8.776,-8.311 10.162,-5.108 2.721,5.108 1.354,7.027 -2.709,7.655 -5.417,4.47 -2.708,11.491 v 5.743 l -6.091,-3.836 -0.671,-12.118 -8.8,0.648 -4.051,10.842 6.089,8.948 14.216,1.92 11.507,-10.868 1.354,-21.044 5.127,-6.766 c 3.337,8.576 5.722,17.548 5.722,25.914 0,9.167 7.259,-4.628 3.707,-32.583 0.003,-0.001 -5.567,-66.402 -36.255,-97.088 z m -135.423,27.505 -36.561,-1.294 15.56,-12.759 h 8.127 l 12.874,8.928
+v 5.125 m 44.706,-4.469 v 5.743 h -15.569 l 1.354,3.841 -9.493,1.289 -0.66,3.169 -6.772,-1.256 -12.2,-2.568 2.038,-3.181 2.037,-3.846 6.771,-7.022 2.72,5.115 10.142,-0.646 5.418,-5.754 20.999,3.836 -6.785,1.28 m 1.345,-8.305 -8.128,1.273 -1.343,-5.753 10.143,-1.268 1.366,-5.743 7.454,7.666 -9.492,3.814 v 0.011 m 39.289,198.535 -4.746,3.837 0.674,9.579 h 6.088 v -8.278 l 5.441,-7.043 v -14.672 l -3.404,-0.662 -4.053,17.239 0,0 m -45.369,-19.135 c 0,0 -4.746,1.234 0.662,3.185 5.418,1.93 27.09,-31.271 27.09,-31.271 l -18.291,11.487 -9.472,16.6 h 0.011 m -36.862,122.355 -4.052,-3.858 -8.127,-1.289 -1.343,3.869 -10.836,-1.278 -0.681,-5.135 h -8.123 l -8.798,5.135 h -15.56 l -1.355,-3.856 -25.041,-2.59 -4.063,3.867 -10.138,-2.556 -1.359,-9.016 -4.735,-0.661 -5.418,9.677 -18.273,-0.65 c 3.272,1.538 30.551,17.824 72.403,21.214 55.5,4.487 81.896,-8.991 81.896,-8.991 l -2.025,-1.951 -24.371,-1.918 v -0.013 l -10e-4,0 z"
+ transform="matrix(1.1261275,0,0,1.1261275,592.13313,769.48419)"
+ clip-path="url(#SVGID_5_-12)"
+ id="path3315"
+ style="fill:#000000" />
+ <path
+ d="m 200.897,116.781 c -1.04,0 -2.184,0.428 -3.348,1.089 2.741,-0.802 4.03,-1.089 3.348,-1.089 m 67.869,13.235 0.677,-9.925 -10.473,0.655 1.382,9.27 h 8.414 M 150.528,301.594 c -2.113,-1.988 -0.699,-10.608 -0.699,-10.608 0,0 -31.488,-16.545 -65.767,-26.493 -4.227,-1.225 -2.091,-9.932 2.091,-13.23 l -1.387,-9.297 c -0.693,-4.622 7.005,-27.148 14.698,-29.12 7.699,-2 -0.705,13.235 -0.705,13.235 l -7.688,4.637 c 0,0 9.092,10.592 11.199,10.592 2.092,0 5.591,-5.31 5.591,-5.31 l -9.79,-6.604 9.091,-3.988 0.574,-3.489 1.528,-0.487 15.062,-22.809 c 10.407,-4.258 23.199,-9.535 24.824,-10.31 2.806,-1.316 22.387,-12.569 25.887,-15.213 3.51,-2.666 11.187,-1.988 13.982,-1.988 2.812,0 7,-1.333 7.698,-8.631 0.699,-7.281 3.5,-8.608 5.607,-6.615 2.102,1.967 -2.107,5.293 2.796,6.615 4.893,1.333 9.092,4.644 12.597,1.333 2.557,-2.422 -0.867,-5.186 -3.17,-7.271 h
+38.846 l 4.205,-11.947 -9.097,-1.321 -33.596,-3.305 v -3.982 l -2.676,0.456 c 3.635,-19.987 25.236,-16.692 8.972,-28.259 -0.986,-0.71 -15.213,22.418 -18.837,21.97 -6.562,-0.868 -15.029,-0.938 -16.833,1.197 -2.396,2.817 5.363,-9.688 12.038,-13.479 -7.964,2.346 -22.234,-4.903 -47.964,13.273 -8.701,6.15 -30.541,31.066 -39.528,40.645 -37.968,44.826 -41.029,83.175 -41.029,84.876 0,3.31 8.04,5.179 8.733,9.167 0.704,3.95 -13.29,17.218 -13.29,23.839 0,3.044 -7.005,36.114 8.381,77.496 13.647,39.257 40.054,73.879 43.445,76.046 l 9.725,-5.158 c 0,0 -16.091,-28.486 -16.784,-31.141 -0.693,-2.647 18.188,-41.068 27.295,-39.727 9.091,1.29 6.994,3.968 12.591,0.65 5.602,-3.292 9.096,-30.479 15.392,-33.113 6.301,-2.663 13.29,-5.969 12.596,-12.592 -0.729,-6.644 -24.513,-18.557 -26.604,-20.54 m 151.819,-194.755
+-18.888,-6.626 3.5,10.608 15.388,-3.982 m -70.666,24.511 c 2.107,0 44.074,-27.81 39.881,-28.481 -4.188,-0.655 -4.887,0 -16.102,-1.327 -11.177,-1.322 -23.084,15.901 -25.875,18.562 -2.802,2.647 -1.859,11.246 2.096,11.246 m 192.63,199.731 5.42,-7.031 -5.42,-1.905 -4.062,5.104 -4.734,7.02 4.05,1.909 4.746,-5.097 m 23.687,22.995 -1.356,-10.228 h -8.785 l -0.682,7.659 -8.139,-1.269 -2.016,-8.3 -4.063,-2.559 -4.745,5.745 -4.735,-1.268 -1.366,4.452 5.428,1.301 v 41.479 l 19.159,4.615 c -0.445,0.759 -0.771,1.41 -0.879,1.756 -1.364,4.477 5.406,6.415 10.144,4.477 1.753,-0.705 12.797,-4.952 16.295,-13.283 4.879,-11.605 8.03,-28.314 8.877,-33.722 l -2.146,-4.693 -13.545,5.117 -7.466,-1.28 h 0.02 m -6.783,-169.88 c -30.978,-46.973 -105.41,-77.669 -105.41,-77.669 l -19.166,10.039 -2.722,-4.453 -6.761,-2.563
+v 5.753 l 6.091,5.115 -4.053,1.912 -15.582,1.268 -35.211,19.158 3.381,15.322 -4.075,1.284 -2.015,3.186 11.512,17.223 0.671,5.759 -9.476,1.913 v 11.486 l -5.412,1.273 0.677,8.944 -46.058,31.938 1.355,17.852 c 3.38,4.475 29.798,31.293 29.798,31.293 0,0 30.464,1.263 37.237,-2.551 6.777,-3.831 2.025,3.831 4.068,5.748 2.016,1.923 2.709,15.322 4.724,16.601 2.038,1.271 0,8.923 2.709,11.502 2.71,2.534 2.71,33.19 2.71,33.19 0,0 16.252,27.445 16.252,34.468 0,7.021 -0.683,6.382 12.189,5.742 12.863,-0.628 15.571,-5.742 18.281,-7.649 2.709,-1.908 2.709,-6.383 5.417,-10.229 2.731,-3.839 7.455,-18.499 13.556,-23.602 6.078,-5.126 22.343,-8.96 23.686,-17.879 1.356,-8.949 7.443,-15.972 7.443,-15.972 l 29.278,-30.968 -0.823,4.161 -0.671,15.95 8.81,-3.187 -0.672,-17.25 -3.154,-3.343 0.446,-0.487 c 0,0 -2.037,-3.831
+-4.734,-3.831 -2.712,0 -18.974,3.831 -21.672,3.196 -2.711,-0.644 -14.228,-31.292 -16.253,-32.549 -2.039,-1.279 -14.889,-22.359 -14.889,-22.359 0,0 29.776,35.751 34.521,49.795 2.751,8.18 13.089,0.563 21.497,-7.97 l 2.222,5.429 5.407,-1.29 -0.671,-6.381 h 6.088 v 9.573 l -2.024,5.115 -0.694,8.29 5.429,5.119 2.71,-4.459 8.776,-8.311 10.162,-5.108 2.721,5.108 1.354,7.027 -2.709,7.655 -5.417,4.47 -2.708,11.491 v 5.743 l -6.091,-3.836 -0.671,-12.118 -8.8,0.648 -4.051,10.842 6.089,8.948 14.216,1.92 11.507,-10.868 1.354,-21.044 5.127,-6.766 c 3.337,8.576 5.722,17.548 5.722,25.914 0,9.167 7.259,-4.628 3.707,-32.583 0.003,-0.001 -5.567,-66.402 -36.255,-97.088 z m -135.423,27.505 -36.561,-1.294 15.56,-12.759 h 8.127 l 12.874,8.928 v 5.125 m 44.706,-4.469 v 5.743 h -15.569 l 1.354,3.841 -9.493,1.289
+-0.66,3.169 -6.772,-1.256 -12.2,-2.568 2.038,-3.181 2.037,-3.846 6.771,-7.022 2.72,5.115 10.142,-0.646 5.418,-5.754 20.999,3.836 -6.785,1.28 m 1.345,-8.305 -8.128,1.273 -1.343,-5.753 10.143,-1.268 1.366,-5.743 7.454,7.666 -9.492,3.814 v 0.011 m 39.289,198.535 -4.746,3.837 0.674,9.579 h 6.088 v -8.278 l 5.441,-7.043 v -14.672 l -3.404,-0.662 -4.053,17.239 0,0 m -45.369,-19.135 c 0,0 -4.746,1.234 0.662,3.185 5.418,1.93 27.09,-31.271 27.09,-31.271 l -18.291,11.487 -9.472,16.6 h 0.011 m -36.862,122.355 -4.052,-3.858 -8.127,-1.289 -1.343,3.869 -10.836,-1.278 -0.681,-5.135 h -8.123 l -8.798,5.135 h -15.56 l -1.355,-3.856 -25.041,-2.59 -4.063,3.867 -10.138,-2.556 -1.359,-9.016 -4.735,-0.661 -5.418,9.677 -18.273,-0.65 c 3.272,1.538 30.551,17.824 72.403,21.214 55.5,4.487 81.896,-8.991 81.896,-8.991 l -2.025,-1.951 -24.371,-1.918 v -0.013 l -10e-4,0 z"
+ transform="matrix(1.1261275,0,0,1.1261275,-123.16579,191.65755)"
+ clip-path="url(#SVGID_5_-3)"
+ id="path3315-1"
+ style="fill:#000000" />
+ <path
+ d="m 200.897,116.781 c -1.04,0 -2.184,0.428 -3.348,1.089 2.741,-0.802 4.03,-1.089 3.348,-1.089 m 67.869,13.235 0.677,-9.925 -10.473,0.655 1.382,9.27 h 8.414 M 150.528,301.594 c -2.113,-1.988 -0.699,-10.608 -0.699,-10.608 0,0 -31.488,-16.545 -65.767,-26.493 -4.227,-1.225 -2.091,-9.932 2.091,-13.23 l -1.387,-9.297 c -0.693,-4.622 7.005,-27.148 14.698,-29.12 7.699,-2 -0.705,13.235 -0.705,13.235 l -7.688,4.637 c 0,0 9.092,10.592 11.199,10.592 2.092,0 5.591,-5.31 5.591,-5.31 l -9.79,-6.604 9.091,-3.988 0.574,-3.489 1.528,-0.487 15.062,-22.809 c 10.407,-4.258 23.199,-9.535 24.824,-10.31 2.806,-1.316 22.387,-12.569 25.887,-15.213 3.51,-2.666 11.187,-1.988 13.982,-1.988 2.812,0 7,-1.333 7.698,-8.631 0.699,-7.281 3.5,-8.608 5.607,-6.615 2.102,1.967 -2.107,5.293 2.796,6.615 4.893,1.333 9.092,4.644
+12.597,1.333 2.557,-2.422 -0.867,-5.186 -3.17,-7.271 h 38.846 l 4.205,-11.947 -9.097,-1.321 -33.596,-3.305 v -3.982 l -2.676,0.456 c 3.635,-19.987 25.236,-16.692 8.972,-28.259 -0.986,-0.71 -15.213,22.418 -18.837,21.97 -6.562,-0.868 -15.029,-0.938 -16.833,1.197 -2.396,2.817 5.363,-9.688 12.038,-13.479 -7.964,2.346 -22.234,-4.903 -47.964,13.273 -8.701,6.15 -30.541,31.066 -39.528,40.645 -37.968,44.826 -41.029,83.175 -41.029,84.876 0,3.31 8.04,5.179 8.733,9.167 0.704,3.95 -13.29,17.218 -13.29,23.839 0,3.044 -7.005,36.114 8.381,77.496 13.647,39.257 40.054,73.879 43.445,76.046 l 9.725,-5.158 c 0,0 -16.091,-28.486 -16.784,-31.141 -0.693,-2.647 18.188,-41.068 27.295,-39.727 9.091,1.29 6.994,3.968 12.591,0.65 5.602,-3.292 9.096,-30.479 15.392,-33.113 6.301,-2.663 13.29,-5.969 12.596,-12.592 -0.729,-6.644
+-24.513,-18.557 -26.604,-20.54 m 151.819,-194.755 -18.888,-6.626 3.5,10.608 15.388,-3.982 m -70.666,24.511 c 2.107,0 44.074,-27.81 39.881,-28.481 -4.188,-0.655 -4.887,0 -16.102,-1.327 -11.177,-1.322 -23.084,15.901 -25.875,18.562 -2.802,2.647 -1.859,11.246 2.096,11.246 m 192.63,199.731 5.42,-7.031 -5.42,-1.905 -4.062,5.104 -4.734,7.02 4.05,1.909 4.746,-5.097 m 23.687,22.995 -1.356,-10.228 h -8.785 l -0.682,7.659 -8.139,-1.269 -2.016,-8.3 -4.063,-2.559 -4.745,5.745 -4.735,-1.268 -1.366,4.452 5.428,1.301 v 41.479 l 19.159,4.615 c -0.445,0.759 -0.771,1.41 -0.879,1.756 -1.364,4.477 5.406,6.415 10.144,4.477 1.753,-0.705 12.797,-4.952 16.295,-13.283 4.879,-11.605 8.03,-28.314 8.877,-33.722 l -2.146,-4.693 -13.545,5.117 -7.466,-1.28 h 0.02 m -6.783,-169.88 c -30.978,-46.973 -105.41,-77.669
+-105.41,-77.669 l -19.166,10.039 -2.722,-4.453 -6.761,-2.563 v 5.753 l 6.091,5.115 -4.053,1.912 -15.582,1.268 -35.211,19.158 3.381,15.322 -4.075,1.284 -2.015,3.186 11.512,17.223 0.671,5.759 -9.476,1.913 v 11.486 l -5.412,1.273 0.677,8.944 -46.058,31.938 1.355,17.852 c 3.38,4.475 29.798,31.293 29.798,31.293 0,0 30.464,1.263 37.237,-2.551 6.777,-3.831 2.025,3.831 4.068,5.748 2.016,1.923 2.709,15.322 4.724,16.601 2.038,1.271 0,8.923 2.709,11.502 2.71,2.534 2.71,33.19 2.71,33.19 0,0 16.252,27.445 16.252,34.468 0,7.021 -0.683,6.382 12.189,5.742 12.863,-0.628 15.571,-5.742 18.281,-7.649 2.709,-1.908 2.709,-6.383 5.417,-10.229 2.731,-3.839 7.455,-18.499 13.556,-23.602 6.078,-5.126 22.343,-8.96 23.686,-17.879 1.356,-8.949 7.443,-15.972 7.443,-15.972 l 29.278,-30.968 -0.823,4.161 -0.671,15.95
+8.81,-3.187 -0.672,-17.25 -3.154,-3.343 0.446,-0.487 c 0,0 -2.037,-3.831 -4.734,-3.831 -2.712,0 -18.974,3.831 -21.672,3.196 -2.711,-0.644 -14.228,-31.292 -16.253,-32.549 -2.039,-1.279 -14.889,-22.359 -14.889,-22.359 0,0 29.776,35.751 34.521,49.795 2.751,8.18 13.089,0.563 21.497,-7.97 l 2.222,5.429 5.407,-1.29 -0.671,-6.381 h 6.088 v 9.573 l -2.024,5.115 -0.694,8.29 5.429,5.119 2.71,-4.459 8.776,-8.311 10.162,-5.108 2.721,5.108 1.354,7.027 -2.709,7.655 -5.417,4.47 -2.708,11.491 v 5.743 l -6.091,-3.836 -0.671,-12.118 -8.8,0.648 -4.051,10.842 6.089,8.948 14.216,1.92 11.507,-10.868 1.354,-21.044 5.127,-6.766 c 3.337,8.576 5.722,17.548 5.722,25.914 0,9.167 7.259,-4.628 3.707,-32.583 0.003,-0.001 -5.567,-66.402 -36.255,-97.088 z m -135.423,27.505 -36.561,-1.294 15.56,-12.759 h 8.127
+l 12.874,8.928 v 5.125 m 44.706,-4.469 v 5.743 h -15.569 l 1.354,3.841 -9.493,1.289 -0.66,3.169 -6.772,-1.256 -12.2,-2.568 2.038,-3.181 2.037,-3.846 6.771,-7.022 2.72,5.115 10.142,-0.646 5.418,-5.754 20.999,3.836 -6.785,1.28 m 1.345,-8.305 -8.128,1.273 -1.343,-5.753 10.143,-1.268 1.366,-5.743 7.454,7.666 -9.492,3.814 v 0.011 m 39.289,198.535 -4.746,3.837 0.674,9.579 h 6.088 v -8.278 l 5.441,-7.043 v -14.672 l -3.404,-0.662 -4.053,17.239 0,0 m -45.369,-19.135 c 0,0 -4.746,1.234 0.662,3.185 5.418,1.93 27.09,-31.271 27.09,-31.271 l -18.291,11.487 -9.472,16.6 h 0.011 m -36.862,122.355 -4.052,-3.858 -8.127,-1.289 -1.343,3.869 -10.836,-1.278 -0.681,-5.135 h -8.123 l -8.798,5.135 h -15.56 l -1.355,-3.856 -25.041,-2.59 -4.063,3.867 -10.138,-2.556 -1.359,-9.016 -4.735,-0.661 -5.418,9.677 -18.273,-0.65
+c 3.272,1.538 30.551,17.824 72.403,21.214 55.5,4.487 81.896,-8.991 81.896,-8.991 l -2.025,-1.951 -24.371,-1.918 v -0.013 l -10e-4,0 z"
+ transform="matrix(1.1261275,0,0,1.1261275,-123.16579,191.65755)"
+ clip-path="url(#SVGID_5_-0)"
+ id="path3315-4"
+ style="fill:#000000" />
+ <path
+ d="m 200.897,116.781 c -1.04,0 -2.184,0.428 -3.348,1.089 2.741,-0.802 4.03,-1.089 3.348,-1.089 m 67.869,13.235 0.677,-9.925 -10.473,0.655 1.382,9.27 h 8.414 M 150.528,301.594 c -2.113,-1.988 -0.699,-10.608 -0.699,-10.608 0,0 -31.488,-16.545 -65.767,-26.493 -4.227,-1.225 -2.091,-9.932 2.091,-13.23 l -1.387,-9.297 c -0.693,-4.622 7.005,-27.148 14.698,-29.12 7.699,-2 -0.705,13.235 -0.705,13.235 l -7.688,4.637 c 0,0 9.092,10.592 11.199,10.592 2.092,0 5.591,-5.31 5.591,-5.31 l -9.79,-6.604 9.091,-3.988 0.574,-3.489 1.528,-0.487 15.062,-22.809 c 10.407,-4.258 23.199,-9.535 24.824,-10.31 2.806,-1.316 22.387,-12.569 25.887,-15.213 3.51,-2.666 11.187,-1.988 13.982,-1.988 2.812,0 7,-1.333 7.698,-8.631 0.699,-7.281 3.5,-8.608 5.607,-6.615 2.102,1.967 -2.107,5.293 2.796,6.615 4.893,1.333
+9.092,4.644 12.597,1.333 2.557,-2.422 -0.867,-5.186 -3.17,-7.271 h 38.846 l 4.205,-11.947 -9.097,-1.321 -33.596,-3.305 v -3.982 l -2.676,0.456 c 3.635,-19.987 25.236,-16.692 8.972,-28.259 -0.986,-0.71 -15.213,22.418 -18.837,21.97 -6.562,-0.868 -15.029,-0.938 -16.833,1.197 -2.396,2.817 5.363,-9.688 12.038,-13.479 -7.964,2.346 -22.234,-4.903 -47.964,13.273 -8.701,6.15 -30.541,31.066 -39.528,40.645 -37.968,44.826 -41.029,83.175 -41.029,84.876 0,3.31 8.04,5.179 8.733,9.167 0.704,3.95 -13.29,17.218 -13.29,23.839 0,3.044 -7.005,36.114 8.381,77.496 13.647,39.257 40.054,73.879 43.445,76.046 l 9.725,-5.158 c 0,0 -16.091,-28.486 -16.784,-31.141 -0.693,-2.647 18.188,-41.068 27.295,-39.727 9.091,1.29 6.994,3.968 12.591,0.65 5.602,-3.292 9.096,-30.479 15.392,-33.113 6.301,-2.663 13.29,-5.969
+12.596,-12.592 -0.729,-6.644 -24.513,-18.557 -26.604,-20.54 m 151.819,-194.755 -18.888,-6.626 3.5,10.608 15.388,-3.982 m -70.666,24.511 c 2.107,0 44.074,-27.81 39.881,-28.481 -4.188,-0.655 -4.887,0 -16.102,-1.327 -11.177,-1.322 -23.084,15.901 -25.875,18.562 -2.802,2.647 -1.859,11.246 2.096,11.246 m 192.63,199.731 5.42,-7.031 -5.42,-1.905 -4.062,5.104 -4.734,7.02 4.05,1.909 4.746,-5.097 m 23.687,22.995 -1.356,-10.228 h -8.785 l -0.682,7.659 -8.139,-1.269 -2.016,-8.3 -4.063,-2.559 -4.745,5.745 -4.735,-1.268 -1.366,4.452 5.428,1.301 v 41.479 l 19.159,4.615 c -0.445,0.759 -0.771,1.41 -0.879,1.756 -1.364,4.477 5.406,6.415 10.144,4.477 1.753,-0.705 12.797,-4.952 16.295,-13.283 4.879,-11.605 8.03,-28.314 8.877,-33.722 l -2.146,-4.693 -13.545,5.117 -7.466,-1.28 h 0.02 m -6.783,-169.88
+c -30.978,-46.973 -105.41,-77.669 -105.41,-77.669 l -19.166,10.039 -2.722,-4.453 -6.761,-2.563 v 5.753 l 6.091,5.115 -4.053,1.912 -15.582,1.268 -35.211,19.158 3.381,15.322 -4.075,1.284 -2.015,3.186 11.512,17.223 0.671,5.759 -9.476,1.913 v 11.486 l -5.412,1.273 0.677,8.944 -46.058,31.938 1.355,17.852 c 3.38,4.475 29.798,31.293 29.798,31.293 0,0 30.464,1.263 37.237,-2.551 6.777,-3.831 2.025,3.831 4.068,5.748 2.016,1.923 2.709,15.322 4.724,16.601 2.038,1.271 0,8.923 2.709,11.502 2.71,2.534 2.71,33.19 2.71,33.19 0,0 16.252,27.445 16.252,34.468 0,7.021 -0.683,6.382 12.189,5.742 12.863,-0.628 15.571,-5.742 18.281,-7.649 2.709,-1.908 2.709,-6.383 5.417,-10.229 2.731,-3.839 7.455,-18.499 13.556,-23.602 6.078,-5.126 22.343,-8.96 23.686,-17.879 1.356,-8.949 7.443,-15.972 7.443,-15.972 l 29.278,-30.968
+-0.823,4.161 -0.671,15.95 8.81,-3.187 -0.672,-17.25 -3.154,-3.343 0.446,-0.487 c 0,0 -2.037,-3.831 -4.734,-3.831 -2.712,0 -18.974,3.831 -21.672,3.196 -2.711,-0.644 -14.228,-31.292 -16.253,-32.549 -2.039,-1.279 -14.889,-22.359 -14.889,-22.359 0,0 29.776,35.751 34.521,49.795 2.751,8.18 13.089,0.563 21.497,-7.97 l 2.222,5.429 5.407,-1.29 -0.671,-6.381 h 6.088 v 9.573 l -2.024,5.115 -0.694,8.29 5.429,5.119 2.71,-4.459 8.776,-8.311 10.162,-5.108 2.721,5.108 1.354,7.027 -2.709,7.655 -5.417,4.47 -2.708,11.491 v 5.743 l -6.091,-3.836 -0.671,-12.118 -8.8,0.648 -4.051,10.842 6.089,8.948 14.216,1.92 11.507,-10.868 1.354,-21.044 5.127,-6.766 c 3.337,8.576 5.722,17.548 5.722,25.914 0,9.167 7.259,-4.628 3.707,-32.583 0.003,-0.001 -5.567,-66.402 -36.255,-97.088 z m -135.423,27.505 -36.561,-1.294 15.56,-12.759
+h 8.127 l 12.874,8.928 v 5.125 m 44.706,-4.469 v 5.743 h -15.569 l 1.354,3.841 -9.493,1.289 -0.66,3.169 -6.772,-1.256 -12.2,-2.568 2.038,-3.181 2.037,-3.846 6.771,-7.022 2.72,5.115 10.142,-0.646 5.418,-5.754 20.999,3.836 -6.785,1.28 m 1.345,-8.305 -8.128,1.273 -1.343,-5.753 10.143,-1.268 1.366,-5.743 7.454,7.666 -9.492,3.814 v 0.011 m 39.289,198.535 -4.746,3.837 0.674,9.579 h 6.088 v -8.278 l 5.441,-7.043 v -14.672 l -3.404,-0.662 -4.053,17.239 0,0 m -45.369,-19.135 c 0,0 -4.746,1.234 0.662,3.185 5.418,1.93 27.09,-31.271 27.09,-31.271 l -18.291,11.487 -9.472,16.6 h 0.011 m -36.862,122.355 -4.052,-3.858 -8.127,-1.289 -1.343,3.869 -10.836,-1.278 -0.681,-5.135 h -8.123 l -8.798,5.135 h -15.56 l -1.355,-3.856 -25.041,-2.59 -4.063,3.867 -10.138,-2.556 -1.359,-9.016 -4.735,-0.661 -5.418,9.677
+-18.273,-0.65 c 3.272,1.538 30.551,17.824 72.403,21.214 55.5,4.487 81.896,-8.991 81.896,-8.991 l -2.025,-1.951 -24.371,-1.918 v -0.013 l -10e-4,0 z"
+ transform="matrix(1.1261275,0,0,1.1261275,-123.16579,191.65755)"
+ clip-path="url(#SVGID_5_-8)"
+ id="path3315-0"
+ style="fill:#000000" />
+ <path
+ d="m 200.897,116.781 c -1.04,0 -2.184,0.428 -3.348,1.089 2.741,-0.802 4.03,-1.089 3.348,-1.089 m 67.869,13.235 0.677,-9.925 -10.473,0.655 1.382,9.27 h 8.414 M 150.528,301.594 c -2.113,-1.988 -0.699,-10.608 -0.699,-10.608 0,0 -31.488,-16.545 -65.767,-26.493 -4.227,-1.225 -2.091,-9.932 2.091,-13.23 l -1.387,-9.297 c -0.693,-4.622 7.005,-27.148 14.698,-29.12 7.699,-2 -0.705,13.235 -0.705,13.235 l -7.688,4.637 c 0,0 9.092,10.592 11.199,10.592 2.092,0 5.591,-5.31 5.591,-5.31 l -9.79,-6.604 9.091,-3.988 0.574,-3.489 1.528,-0.487 15.062,-22.809 c 10.407,-4.258 23.199,-9.535 24.824,-10.31 2.806,-1.316 22.387,-12.569 25.887,-15.213 3.51,-2.666 11.187,-1.988 13.982,-1.988 2.812,0 7,-1.333 7.698,-8.631 0.699,-7.281 3.5,-8.608 5.607,-6.615 2.102,1.967 -2.107,5.293 2.796,6.615 4.893,1.333 9.092,4.644 12.597,1.333
+2.557,-2.422 -0.867,-5.186 -3.17,-7.271 h 38.846 l 4.205,-11.947 -9.097,-1.321 -33.596,-3.305 v -3.982 l -2.676,0.456 c 3.635,-19.987 25.236,-16.692 8.972,-28.259 -0.986,-0.71 -15.213,22.418 -18.837,21.97 -6.562,-0.868 -15.029,-0.938 -16.833,1.197 -2.396,2.817 5.363,-9.688 12.038,-13.479 -7.964,2.346 -22.234,-4.903 -47.964,13.273 -8.701,6.15 -30.541,31.066 -39.528,40.645 -37.968,44.826 -41.029,83.175 -41.029,84.876 0,3.31 8.04,5.179 8.733,9.167 0.704,3.95 -13.29,17.218 -13.29,23.839 0,3.044 -7.005,36.114 8.381,77.496 13.647,39.257 40.054,73.879 43.445,76.046 l 9.725,-5.158 c 0,0 -16.091,-28.486 -16.784,-31.141 -0.693,-2.647 18.188,-41.068 27.295,-39.727 9.091,1.29 6.994,3.968 12.591,0.65 5.602,-3.292 9.096,-30.479 15.392,-33.113 6.301,-2.663 13.29,-5.969 12.596,-12.592 -0.729,-6.644
+-24.513,-18.557 -26.604,-20.54 m 151.819,-194.755 -18.888,-6.626 3.5,10.608 15.388,-3.982 m -70.666,24.511 c 2.107,0 44.074,-27.81 39.881,-28.481 -4.188,-0.655 -4.887,0 -16.102,-1.327 -11.177,-1.322 -23.084,15.901 -25.875,18.562 -2.802,2.647 -1.859,11.246 2.096,11.246 m 192.63,199.731 5.42,-7.031 -5.42,-1.905 -4.062,5.104 -4.734,7.02 4.05,1.909 4.746,-5.097 m 23.687,22.995 -1.356,-10.228 h -8.785 l -0.682,7.659 -8.139,-1.269 -2.016,-8.3 -4.063,-2.559 -4.745,5.745 -4.735,-1.268 -1.366,4.452 5.428,1.301 v 41.479 l 19.159,4.615 c -0.445,0.759 -0.771,1.41 -0.879,1.756 -1.364,4.477 5.406,6.415 10.144,4.477 1.753,-0.705 12.797,-4.952 16.295,-13.283 4.879,-11.605 8.03,-28.314 8.877,-33.722 l -2.146,-4.693 -13.545,5.117 -7.466,-1.28 h 0.02 m -6.783,-169.88 c -30.978,-46.973 -105.41,-77.669
+-105.41,-77.669 l -19.166,10.039 -2.722,-4.453 -6.761,-2.563 v 5.753 l 6.091,5.115 -4.053,1.912 -15.582,1.268 -35.211,19.158 3.381,15.322 -4.075,1.284 -2.015,3.186 11.512,17.223 0.671,5.759 -9.476,1.913 v 11.486 l -5.412,1.273 0.677,8.944 -46.058,31.938 1.355,17.852 c 3.38,4.475 29.798,31.293 29.798,31.293 0,0 30.464,1.263 37.237,-2.551 6.777,-3.831 2.025,3.831 4.068,5.748 2.016,1.923 2.709,15.322 4.724,16.601 2.038,1.271 0,8.923 2.709,11.502 2.71,2.534 2.71,33.19 2.71,33.19 0,0 16.252,27.445 16.252,34.468 0,7.021 -0.683,6.382 12.189,5.742 12.863,-0.628 15.571,-5.742 18.281,-7.649 2.709,-1.908 2.709,-6.383 5.417,-10.229 2.731,-3.839 7.455,-18.499 13.556,-23.602 6.078,-5.126 22.343,-8.96 23.686,-17.879 1.356,-8.949 7.443,-15.972 7.443,-15.972 l 29.278,-30.968 -0.823,4.161 -0.671,15.95
+8.81,-3.187 -0.672,-17.25 -3.154,-3.343 0.446,-0.487 c 0,0 -2.037,-3.831 -4.734,-3.831 -2.712,0 -18.974,3.831 -21.672,3.196 -2.711,-0.644 -14.228,-31.292 -16.253,-32.549 -2.039,-1.279 -14.889,-22.359 -14.889,-22.359 0,0 29.776,35.751 34.521,49.795 2.751,8.18 13.089,0.563 21.497,-7.97 l 2.222,5.429 5.407,-1.29 -0.671,-6.381 h 6.088 v 9.573 l -2.024,5.115 -0.694,8.29 5.429,5.119 2.71,-4.459 8.776,-8.311 10.162,-5.108 2.721,5.108 1.354,7.027 -2.709,7.655 -5.417,4.47 -2.708,11.491 v 5.743 l -6.091,-3.836 -0.671,-12.118 -8.8,0.648 -4.051,10.842 6.089,8.948 14.216,1.92 11.507,-10.868 1.354,-21.044 5.127,-6.766 c 3.337,8.576 5.722,17.548 5.722,25.914 0,9.167 7.259,-4.628 3.707,-32.583 0.003,-0.001 -5.567,-66.402 -36.255,-97.088 z m -135.423,27.505 -36.561,-1.294 15.56,-12.759 h 8.127 l 12.874,8.928
+v 5.125 m 44.706,-4.469 v 5.743 h -15.569 l 1.354,3.841 -9.493,1.289 -0.66,3.169 -6.772,-1.256 -12.2,-2.568 2.038,-3.181 2.037,-3.846 6.771,-7.022 2.72,5.115 10.142,-0.646 5.418,-5.754 20.999,3.836 -6.785,1.28 m 1.345,-8.305 -8.128,1.273 -1.343,-5.753 10.143,-1.268 1.366,-5.743 7.454,7.666 -9.492,3.814 v 0.011 m 39.289,198.535 -4.746,3.837 0.674,9.579 h 6.088 v -8.278 l 5.441,-7.043 v -14.672 l -3.404,-0.662 -4.053,17.239 0,0 m -45.369,-19.135 c 0,0 -4.746,1.234 0.662,3.185 5.418,1.93 27.09,-31.271 27.09,-31.271 l -18.291,11.487 -9.472,16.6 h 0.011 m -36.862,122.355 -4.052,-3.858 -8.127,-1.289 -1.343,3.869 -10.836,-1.278 -0.681,-5.135 h -8.123 l -8.798,5.135 h -15.56 l -1.355,-3.856 -25.041,-2.59 -4.063,3.867 -10.138,-2.556 -1.359,-9.016 -4.735,-0.661 -5.418,9.677 -18.273,-0.65 c 3.272,1.538
+30.551,17.824 72.403,21.214 55.5,4.487 81.896,-8.991 81.896,-8.991 l -2.025,-1.951 -24.371,-1.918 v -0.013 l -10e-4,0 z"
+ transform="matrix(1.1261275,0,0,1.1261275,-104.21727,237.13399)"
+ clip-path="url(#SVGID_5_-06)"
+ id="path3315-3"
+ style="fill:#ff00ff" />
+ <radialGradient
+ cx="24.223101"
+ cy="24.3286"
+ r="20.4727"
+ id="SVGID_1_"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(7.6562887,0,0,7.6562887,-72.160001,452.7993)">
+ <stop
+ id="stop3491"
+ style="stop-color:#000000;stop-opacity:0.40000001"
+ offset="0.94760001" />
+ <stop
+ id="stop3493"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </radialGradient>
+ <linearGradient
+ x1="625.57001"
+ y1="1036.85"
+ x2="755.56299"
+ y2="1036.85"
+ id="SVGID_2_"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.4117309,0,0,2.4117309,-1392.3581,-2431.4769)">
+ <stop
+ id="stop3498"
+ style="stop-color:#0053bd;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3500"
+ style="stop-color:#0032a4;stop-opacity:1"
+ offset="0.99440002" />
+ </linearGradient>
+ <g
+ transform="matrix(1.9140664,0,0,1.9140664,-1228.1565,-289.91756)"
+ id="g3606"
+ style="fill:#ffffff;fill-opacity:1;stroke:none">
+ <path
+ d="m 798.36657,387.8025 c -41.59662,0 -80.86439,16.33954 -110.59375,46 -29.75234,29.67577 -46.15625,68.91869 -46.15625,110.5 0,86.562 70.31816,156.96875 156.75,156.96875 86.4395,0 156.78125,-70.40675 156.78125,-156.96875 0,-86.28638 -70.34175,-156.5 -156.78125,-156.5 z m 0,6.46875 c 82.87167,0 150.3125,67.31271 150.3125,150.03125 0,83.00182 -67.44083,150.53125 -150.3125,150.53125 -82.86401,0 -150.28125,-67.53708 -150.28125,-150.53125 0,-39.84333 15.72267,-77.44782 44.25,-105.90625 28.51202,-28.44311 66.16496,-44.125 106.03125,-44.125 z"
+ id="path3502"
+ style="fill:#ffffff;fill-opacity:1;stroke:none" />
+ <path
+ d="m 17.279,6.581 c -0.094,0 -0.197,0.039 -0.302,0.098 0.247,-0.073 0.363,-0.098 0.302,-0.098 m 6.117,1.192 0.061,-0.895 -0.944,0.059 0.125,0.835 h 0.758 M 12.739,23.237 c -0.19,-0.179 -0.063,-0.956 -0.063,-0.956 0,0 -2.838,-1.491 -5.927,-2.388 -0.381,-0.11 -0.188,-0.895 0.188,-1.192 L 6.812,17.863 c -0.063,-0.417 0.631,-2.447 1.325,-2.625 0.694,-0.18 -0.063,1.193 -0.063,1.193 l -0.693,0.418 c 0,0 0.819,0.955 1.009,0.955 0.188,0 0.504,-0.479 0.504,-0.479 L 8.012,16.73 8.831,16.371 8.883,16.057 9.021,16.013 10.378,13.957 c 0.938,-0.384 2.091,-0.859 2.237,-0.929 0.253,-0.119 2.018,-1.133 2.333,-1.371 0.316,-0.24 1.008,-0.179 1.26,-0.179 0.253,0 0.631,-0.12 0.694,-0.778 0.063,-0.656 0.315,-0.776 0.505,-0.596 0.189,0.177 -0.19,0.477 0.252,0.596 0.441,0.12 0.819,0.418 1.135,0.12 0.23,-0.218
+-0.078,-0.467 -0.286,-0.655 h 3.501 L 22.388,9.088 21.568,8.969 18.542,8.67 V 8.312 L 18.3,8.353 C 18.628,6.552 20.574,6.849 19.109,5.806 19.02,5.742 17.738,7.827 17.411,7.786 16.82,7.708 16.057,7.702 15.894,7.894 15.678,8.148 16.377,7.021 16.979,6.679 16.261,6.89 14.975,6.237 12.656,7.875 c -0.784,0.554 -2.752,2.8 -3.563,3.663 -3.422,4.04 -3.698,7.496 -3.698,7.649 0,0.298 0.725,0.467 0.787,0.826 0.063,0.356 -1.198,1.552 -1.198,2.148 0,0.274 -0.631,3.255 0.755,6.984 1.23,3.538 3.61,6.658 3.916,6.854 l 0.876,-0.465 c 0,0 -1.45,-2.567 -1.513,-2.807 -0.063,-0.238 1.639,-3.701 2.46,-3.58 0.819,0.116 0.63,0.357 1.135,0.059 0.505,-0.297 0.82,-2.747 1.387,-2.984 0.568,-0.24 1.198,-0.538 1.135,-1.135 -0.064,-0.598 -2.207,-1.671 -2.396,-1.85 M 26.422,5.685 24.72,5.087 25.035,6.043 26.422,5.685
+m -6.369,2.209 c 0.19,0 3.972,-2.506 3.594,-2.567 -0.377,-0.059 -0.44,0 -1.451,-0.12 -1.007,-0.119 -2.081,1.433 -2.332,1.673 -0.252,0.239 -0.167,1.014 0.189,1.014 m 17.361,18.001 0.488,-0.634 -0.488,-0.172 -0.366,0.46 -0.427,0.633 0.365,0.172 0.428,-0.459 m 2.135,2.072 -0.122,-0.922 h -0.792 l -0.062,0.69 -0.733,-0.114 -0.182,-0.748 -0.366,-0.23 -0.428,0.518 -0.427,-0.114 -0.123,0.401 0.489,0.117 v 3.738 l 1.727,0.416 c -0.04,0.068 -0.069,0.127 -0.079,0.158 -0.123,0.403 0.487,0.578 0.914,0.403 0.158,-0.063 1.153,-0.446 1.469,-1.197 0.439,-1.046 0.724,-2.552 0.8,-3.039 l -0.193,-0.423 -1.221,0.461 -0.673,-0.115 h 0.002 M 38.938,12.656 c -2.792,-4.233 -9.5,-7 -9.5,-7 L 27.71,6.561 27.465,6.16 26.856,5.929 v 0.519 l 0.549,0.461 -0.365,0.172 -1.404,0.114 -3.173,1.727 0.305,1.381 -0.367,0.116
+-0.182,0.287 1.038,1.552 0.061,0.519 -0.854,0.172 v 1.035 l -0.488,0.115 0.061,0.806 -4.151,2.878 0.122,1.609 c 0.305,0.403 2.686,2.82 2.686,2.82 0,0 2.746,0.114 3.356,-0.23 0.611,-0.345 0.183,0.345 0.367,0.518 0.182,0.173 0.244,1.381 0.426,1.496 0.184,0.115 0,0.804 0.244,1.037 0.244,0.229 0.244,2.991 0.244,2.991 0,0 1.465,2.474 1.465,3.106 0,0.632 -0.062,0.575 1.099,0.518 1.159,-0.057 1.403,-0.518 1.647,-0.689 0.244,-0.171 0.244,-0.575 0.488,-0.922 0.246,-0.346 0.672,-1.667 1.222,-2.127 0.548,-0.462 2.014,-0.808 2.135,-1.611 0.122,-0.807 0.671,-1.439 0.671,-1.439 l 2.639,-2.791 -0.074,0.375 -0.061,1.438 0.794,-0.287 -0.061,-1.555 -0.284,-0.301 0.04,-0.044 c 0,0 -0.184,-0.345 -0.427,-0.345 -0.244,0 -1.71,0.345 -1.953,0.288 -0.244,-0.058 -1.282,-2.82 -1.465,-2.934 -0.184,-0.115 -1.342,-2.015
+-1.342,-2.015 0,0 2.684,3.222 3.111,4.488 0.248,0.737 1.18,0.051 1.938,-0.718 l 0.2,0.489 0.487,-0.116 -0.061,-0.575 h 0.549 v 0.863 l -0.183,0.461 -0.063,0.747 0.489,0.461 0.244,-0.402 0.791,-0.749 0.916,-0.46 0.245,0.46 0.122,0.633 -0.244,0.69 -0.488,0.403 -0.244,1.036 v 0.518 l -0.549,-0.346 -0.061,-1.092 -0.793,0.059 -0.365,0.977 0.549,0.807 1.281,0.173 1.037,-0.979 0.122,-1.896 0.462,-0.61 c 0.301,0.773 0.516,1.582 0.516,2.335 0,0.826 0.654,-0.417 0.334,-2.937 -0.001,-0.003 -0.503,-5.987 -3.268,-8.753 z m -12.206,2.479 -3.295,-0.117 1.402,-1.15 h 0.732 l 1.16,0.805 v 0.462 m 4.031,-0.403 v 0.518 h -1.403 l 0.122,0.346 -0.855,0.116 -0.06,0.286 -0.61,-0.113 -1.1,-0.231 0.184,-0.287 0.184,-0.347 0.61,-0.633 0.245,0.461 0.914,-0.058 0.488,-0.519 1.893,0.346 -0.612,0.115 m 0.121,-0.748
+-0.732,0.115 -0.121,-0.519 0.914,-0.114 0.123,-0.518 0.672,0.691 -0.856,0.345 0,0 m 3.541,17.893 -0.428,0.346 0.061,0.863 h 0.549 V 32.34 l 0.49,-0.635 v -1.322 l -0.307,-0.06 -0.365,1.554 0,0 m -4.089,-1.725 c 0,0 -0.428,0.111 0.06,0.287 0.488,0.174 2.441,-2.818 2.441,-2.818 l -1.648,1.035 -0.853,1.496 0,0 M 27.013,41.18 26.648,40.832 25.916,40.716 25.795,41.065 24.818,40.95 24.756,40.487 h -0.732 l -0.793,0.463 h -1.402 l -0.122,-0.348 -2.257,-0.233 -0.366,0.349 -0.914,-0.23 -0.123,-0.813 -0.427,-0.06 -0.488,0.872 -1.647,-0.059 c 0.295,0.139 2.753,1.606 6.525,1.912 5.002,0.404 7.381,-0.811 7.381,-0.811 l -0.183,-0.176 -2.195,-0.173 0,0 0,0 z"
+ transform="matrix(7.6562887,0,0,7.6562887,617.77417,363.90588)"
+ clip-path="url(#SVGID_4_)"
+ id="path3530"
+ style="fill:#ffffff;fill-opacity:1;stroke:none" />
+ </g>
+ <linearGradient
+ x1="690.94098"
+ y1="977.15698"
+ x2="690.94098"
+ y2="1069.14"
+ id="SVGID_7_"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.4117309,0,0,2.4117309,-1790.3582,-1817.4903)">
+ <stop
+ id="stop3533"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3535"
+ style="stop-color:#94caff;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="25.3057"
+ y1="5.1606002"
+ x2="19.853399"
+ y2="32.2952"
+ id="SVGID_8_"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(7.6562887,0,0,7.6562887,-188.32754,493.2054)">
+ <stop
+ id="stop3540"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3542"
+ style="stop-color:#00a100;stop-opacity:1"
+ offset="0.49720001" />
+ <stop
+ id="stop3544"
+ style="stop-color:#000000;stop-opacity:1"
+ offset="0.99440002" />
+ </linearGradient>
+ <g
+ transform="translate(501.9182,0)"
+ id="g3844">
+ <rect
+ width="227.90614"
+ height="227.90614"
+ ry="0"
+ x="-320.85956"
+ y="656.74127"
+ id="rect3805"
+ style="fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:24.57014275;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m -214.39085,651.34781 135.802859,-0.90944 0,232.96394 -136.712299,-58.35238 z"
+ id="rect3805-9"
+ style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:27.06029701;stroke-miterlimit:4;stroke-opacity:1" />
+ </g>
+ </g>
+</svg>
diff --git a/extensions/cpsection/proxy/Makefile.am b/extensions/cpsection/proxy/Makefile.am
new file mode 100644
index 0000000..4f73c37
--- /dev/null
+++ b/extensions/cpsection/proxy/Makefile.am
@@ -0,0 +1,6 @@
+sugardir = $(pkgdatadir)/extensions/cpsection/aboutme
+
+sugar_PYTHON = \
+ __init__.py \
+ model.py \
+ view.py
diff --git a/extensions/cpsection/proxy/__init__.py b/extensions/cpsection/proxy/__init__.py
new file mode 100644
index 0000000..399afa4
--- /dev/null
+++ b/extensions/cpsection/proxy/__init__.py
@@ -0,0 +1,21 @@
+# Copyright (C) 2011, Aleksey Lim
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+from gettext import gettext as _
+
+
+CLASS = 'Proxy'
+ICON = 'module-proxy'
+TITLE = _('Proxy')
diff --git a/extensions/cpsection/proxy/model.py b/extensions/cpsection/proxy/model.py
new file mode 100644
index 0000000..c88b116
--- /dev/null
+++ b/extensions/cpsection/proxy/model.py
@@ -0,0 +1,14 @@
+# Copyright (C) 2011, Aleksey Lim
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/extensions/cpsection/proxy/view.py b/extensions/cpsection/proxy/view.py
new file mode 100644
index 0000000..ad6a0a6
--- /dev/null
+++ b/extensions/cpsection/proxy/view.py
@@ -0,0 +1,367 @@
+# Copyright (C) 2011, Aleksey Lim
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import re
+
+import gtk
+import gconf
+from gettext import gettext as _
+
+from sugar.graphics import style
+
+from jarabe.controlpanel.sectionview import SectionView
+
+
+_widget_sensitivies = {}
+_gconf_origin_values = {}
+
+ICON = 'module-proxy'
+
+class Proxy(SectionView):
+
+ def __init__(self, model, alerts):
+ SectionView.__init__(self)
+
+ _widget_sensitivies.clear()
+
+ self.set_border_width(style.DEFAULT_SPACING * 2)
+ self.set_spacing(style.DEFAULT_SPACING)
+
+ workspace = gtk.VBox()
+ workspace.show()
+
+ scrolled = gtk.ScrolledWindow()
+ scrolled.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
+ scrolled.add_with_viewport(workspace)
+ scrolled.show()
+ self.add(scrolled)
+
+ def add_section(section, label_text):
+ separator = gtk.HSeparator()
+ separator.show()
+ workspace.pack_start(separator, expand=False)
+
+ label = gtk.Label(label_text)
+ label.set_alignment(0, 0)
+ label.show()
+ workspace.pack_start(label, expand=False)
+
+ section.set_border_width(style.DEFAULT_SPACING * 2)
+ section.show()
+ workspace.pack_start(section, expand=False)
+
+ add_section(_ProxySection(),
+ _('Configure Proxies to Access the Internet'))
+ add_section(_IgnoreSection(), _('Ignore Host List'))
+
+ def undo(self):
+ conf = gconf.client_get_default()
+ for key, value in _gconf_origin_values.items():
+ if value is None:
+ conf.unset(key)
+ else:
+ conf.set(key, value)
+
+
+class _ProxySection(gtk.VBox):
+
+ def __init__(self):
+ gtk.VBox.__init__(self)
+ self._common_hosts = {}
+ self._common_ports = {}
+
+ group = gtk.RadioButton()
+ group.props.label = _('Direct internet connection')
+ group.show()
+ self.pack_start(group, expand=False)
+ _register_selector_key('/system/proxy/mode', group, 'none')
+ _register_bool_key('/system/http_proxy/use_http_proxy', group, True)
+
+ manual_proxy = gtk.RadioButton(group)
+ manual_proxy.props.label = _('Manual proxy configuration')
+ manual_proxy.show()
+ self.pack_start(manual_proxy, expand=False)
+ _register_selector_key('/system/proxy/mode', manual_proxy, 'manual')
+
+ widgets = self._add_protos()
+ manual_proxy.connect('toggled', _set_sensitive, False, widgets)
+ _set_sensitive(manual_proxy, False, widgets)
+
+ auto_proxy = gtk.RadioButton(group)
+ auto_proxy.props.label = _('Automatic proxy configuration')
+ auto_proxy.show()
+ self.pack_start(auto_proxy, expand=False)
+ _register_selector_key('/system/proxy/mode', auto_proxy, 'auto')
+
+ grid = self._sub_section_new()
+ grid.attach_label(_('Autofiguration URL:'), 0, 1, 0, 1)
+ entry = grid.attach_entry(1, 2, 0, 1)
+ _register_string_key('/system/proxy/autoconfig_url', entry)
+ auto_proxy.connect('toggled', _set_sensitive, False, [grid])
+ _set_sensitive(auto_proxy, False, [grid])
+
+ def _add_protos(self):
+ commons = gtk.CheckButton()
+ commons.props.label = _('Use the same proxy for all protocols')
+ commons.show()
+ self.pack_start(commons)
+ _register_bool_key('/system/http_proxy/use_same_proxy', commons)
+
+ grid = self._sub_section_new()
+
+ def add_proto(row, is_common, label_text, host_key, port_key):
+ host_label = grid.attach_label(label_text, 0, 1, row, row + 1)
+ host = grid.attach_entry(1, 2, row, row + 1)
+
+ port_label = grid.attach_label(_('Port:'), 2, 3, row, row + 1)
+ port_value = gtk.Adjustment(8080, 0, 65536, 1, 10)
+ port = gtk.SpinButton()
+ port.configure(port_value, .1, 0)
+ port.show()
+ grid.attach(port, 3, 4, row, row + 1,
+ gtk.SHRINK | gtk.FILL, gtk.SHRINK)
+
+ if is_common:
+ _widget_sensitivies.update([
+ (host_label, None), (host, None),
+ (port_label, None), (port, None)])
+ self._common_hosts[host] = host.props.buffer
+ self._common_ports[port] = port.props.adjustment
+
+ _register_string_key(host_key, host)
+ _register_int_key(port_key, port)
+
+ return host, port
+
+ http_host, http_port = add_proto(1, False, _('HTTP proxy:'),
+ '/system/http_proxy/host', '/system/http_proxy/port')
+
+ auth_widget = _AuthWidget()
+ auth_widget.show()
+ grid.attach(auth_widget, 1, 2, 2, 3, gtk.SHRINK | gtk.FILL, gtk.SHRINK)
+
+ add_proto(3, True, _('Secure HTTP proxy:'),
+ '/system/proxy/secure_host', '/system/proxy/secure_port')
+ add_proto(4, True, _('FTP proxy:'),
+ '/system/proxy/ftp_host', '/system/proxy/ftp_port')
+ add_proto(5, True, _('Socks proxy:'),
+ '/system/proxy/socks_host', '/system/proxy/socks_port')
+
+ def commons_toggled_cb(sender):
+ for widget in _widget_sensitivies.keys():
+ _widget_sensitivies[widget] = not sender.props.active
+ _set_sensitive(sender, True, _widget_sensitivies.keys())
+
+ for widget, orig_buffer in self._common_hosts.items():
+ widget.props.buffer = http_host.props.buffer if \
+ sender.props.active else orig_buffer
+
+ for widget, orig_adjustment in self._common_ports.items():
+ widget.props.adjustment = http_port.props.adjustment if \
+ sender.props.active else orig_adjustment
+ widget.props.value = widget.props.adjustment.value
+
+ commons.connect('toggled', commons_toggled_cb)
+ commons_toggled_cb(commons)
+
+ return [commons, grid]
+
+ def _sub_section_new(self):
+ grid = _Grid(1, 1, False)
+ grid.props.column_spacing = style.DEFAULT_SPACING
+ grid.props.row_spacing = style.DEFAULT_SPACING
+ grid.show()
+
+ alignment = gtk.Alignment(0, 0, 1, 1)
+ alignment.props.left_padding = style.STANDARD_ICON_SIZE
+ alignment.props.right_padding = style.GRID_CELL_SIZE
+ alignment.add(grid)
+ alignment.show()
+ self.pack_start(alignment)
+
+ return grid
+
+
+class _IgnoreSection(gtk.VBox):
+
+ def __init__(self):
+ gtk.VBox.__init__(self)
+
+ entry = gtk.Entry()
+ entry.show()
+ self.pack_start(entry, expand=False)
+ _register_list_key('/system/http_proxy/ignore_hosts', entry)
+
+
+class _AuthWidget(gtk.VBox):
+
+ def __init__(self):
+ gtk.VBox.__init__(self)
+
+ enable = gtk.CheckButton()
+ enable.props.label = _('Use authentication')
+ enable.show()
+ self.pack_start(enable, expand=False)
+ _register_bool_key('/system/http_proxy/use_authentication', enable)
+
+ grid = _Grid(2, 2, False)
+ grid.props.column_spacing = style.DEFAULT_SPACING
+ grid.props.row_spacing = style.DEFAULT_SPACING
+ self.pack_start(grid)
+
+ grid.attach_label(_('Username:'), 0, 1, 0, 1)
+ entry = grid.attach_entry(1, 2, 0, 1)
+ _register_string_key('/system/http_proxy/authentication_user', entry)
+
+ grid.attach_label(_('Password:'), 0, 1, 1, 2)
+ entry = grid.attach_entry(1, 2, 1, 2)
+ entry.props.visibility = False
+ _register_string_key(
+ '/system/http_proxy/authentication_password', entry)
+
+ enable.connect('toggled', lambda sender:
+ grid.show() if sender.props.active else grid.hide())
+ if enable.props.active:
+ grid.show()
+
+
+class _Grid(gtk.Table):
+
+ def attach_label(self, label, left_attach, right_attach,
+ top_attach, bottom_attach):
+ widget = gtk.Label(label)
+ widget.set_alignment(0, 0)
+ self.attach(widget, left_attach, right_attach,
+ top_attach, bottom_attach, gtk.SHRINK | gtk.FILL, gtk.SHRINK)
+ widget.show()
+ return widget
+
+ def attach_entry(self, left_attach, right_attach,
+ top_attach, bottom_attach):
+ widget = gtk.Entry()
+ self.attach(widget, left_attach, right_attach,
+ top_attach, bottom_attach, gtk.EXPAND | gtk.FILL, gtk.SHRINK)
+ widget.show()
+ return widget
+
+
+def _set_sensitive(sender, reverse, widgets):
+ is_sensitive = sender.props.active
+ if reverse:
+ is_sensitive = not is_sensitive
+
+ for i in widgets:
+ if isinstance(i, gtk.Container):
+ _set_sensitive(sender, reverse, i.get_children())
+ i.props.sensitive = is_sensitive and _widget_sensitivies.get(i, True)
+
+
+def _register_bool_key(key, widget, reverse=False):
+
+ def set_cb(x):
+ value = x.get_bool()
+ if reverse:
+ value = not value
+ widget.props.active = value
+
+ def get_cb():
+ x = gconf.Value(gconf.VALUE_BOOL)
+ value = widget.props.active
+ if reverse:
+ value = not value
+ x.set_bool(value)
+ return x
+
+ _register_key(key, widget, 'toggled', set_cb, get_cb)
+
+
+def _register_string_key(key, widget):
+
+ def set_cb(x):
+ widget.props.text = x.get_string()
+
+ def get_cb():
+ x = gconf.Value(gconf.VALUE_STRING)
+ x.set_string(widget.props.text)
+ return x
+
+ _register_key(key, widget, 'changed', set_cb, get_cb)
+
+
+def _register_int_key(key, widget):
+
+ def set_cb(x):
+ widget.props.value = x.get_int()
+
+ def get_cb():
+ x = gconf.Value(gconf.VALUE_INT)
+ x.set_int(widget.props.value)
+ return x
+
+ _register_key(key, widget.props.adjustment, 'value_changed',
+ set_cb, get_cb)
+
+
+def _register_selector_key(key, widget, value):
+
+ def set_cb(x):
+ widget.props.active = x.get_string() == value
+
+ def get_cb():
+ if not widget.props.active:
+ return None
+ x = gconf.Value(gconf.VALUE_STRING)
+ x.set_string(value)
+ return x
+
+ _register_key(key, widget, 'toggled', set_cb, get_cb)
+
+
+def _register_list_key(key, widget):
+
+ def set_cb(x):
+ hosts = [i.get_string() for i in x.get_list()]
+ widget.props.text = ', '.join(hosts)
+
+ def get_cb():
+ hosts = []
+ for i in re.split('[\s,;:]+', widget.props.text or ''):
+ if not i.strip():
+ continue
+ value = gconf.Value(gconf.VALUE_STRING)
+ value.set_string(i.strip())
+ hosts.append(value)
+ x = gconf.Value(gconf.VALUE_LIST)
+ x.set_list_type(gconf.VALUE_STRING)
+ x.set_list(hosts)
+ return x
+
+ _register_key(key, widget, 'changed', set_cb, get_cb)
+
+
+def _register_key(key, widget, signal, set_cb, get_cb):
+ conf = gconf.client_get_default()
+ value = conf.get(key)
+ if value is not None:
+ set_cb(value)
+
+ _gconf_origin_values[key] = value
+
+ def signal_cb(*args):
+ value = get_cb()
+ if value is not None:
+ conf.set(key, value)
+
+ widget.connect(signal, signal_cb)
--
1.7.4.4
More information about the Dextrose
mailing list