Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activity/activity-vnc.svg12
-rwxr-xr-xactivity/activity-vnclauncher.svg38
-rwxr-xr-xactivity/activity.info9
-rw-r--r--activity/test_icon.py16
-rw-r--r--icons/clear_console.svg83
-rwxr-xr-xicons/get_ip.svg77
-rw-r--r--icons/start_vnc.svg78
-rw-r--r--icons/stop_vnc.svg88
-rw-r--r--po/VncLauncher.pot52
-rwxr-xr-xvnclauncher.py360
10 files changed, 520 insertions, 293 deletions
diff --git a/activity/activity-vnc.svg b/activity/activity-vnc.svg
new file mode 100644
index 0000000..b23dd31
--- /dev/null
+++ b/activity/activity-vnc.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" ?><!-- Creator: CorelDRAW --><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
+ <!ENTITY stroke_color "#000000">
+ <!ENTITY fill_color "#ffffff">
+]><svg height="55" id="svg2" inkscape:version="0.48.4 r9939" sodipodi:docname="activity-vnc.svg" style="fill-rule:evenodd" version="1.1" viewBox="0 0 4.163192 4.163192" width="55" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"><metadata id="metadata22"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/></cc:Work></rdf:RDF></metadata><sodipodi:namedview bordercolor="#666666" borderopacity="1" gridtolerance="10" guidetolerance="10" id="namedview20" inkscape:current-layer="svg2" inkscape:cx="23.32786" inkscape:cy="25" inkscape:guide-bbox="true" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="551" inkscape:window-maximized="1" inkscape:window-width="1024" inkscape:window-x="0" inkscape:window-y="25" inkscape:zoom="4" objecttolerance="10" pagecolor="#ffffff" showgrid="false" showguides="true"/><defs id="defs4"><style id="style6" type="text/css">
+ .str0 {stroke:white;stroke-width:0.0481685}
+ .str1 {stroke:#010101;stroke-width:0.192674}
+ .str3 {stroke:#010101;stroke-width:0.192674}
+ .str2 {stroke:#010101;stroke-width:0.192674;stroke-linecap:round}
+ .fil0 {fill:#FFFFFF}
+ .fil2 {fill:#FFFFFF}
+ .fil1 {fill:#FFFFFF}
+ </style></defs><g id="g11781" style="fill:&fill_color;;stroke:&stroke_color;" transform="matrix(0.9284033,0,0,0.9284033,0.14902598,0.15138908)"><rect height="35.25" id="rect11779" rx="5.5534733e-11" ry="1.0235328e-10" style="fill:&fill_color;;fill-opacity:1;stroke:none" transform="scale(0.0756944,0.0756944)" width="46.75" x="4.5" y="4.75"/><g id="layer11-1" style="fill:&fill_color;;fill-rule:evenodd;stroke:&stroke_color;;stroke-width:0.50534099;stroke-miterlimit:4;stroke-dasharray:none" transform="matrix(0.26018307,0,0,0.26018307,-21.595325,-137.63684)"><path d="m 85.188,529 c -1.2016,0 -2.1875,0.98751 -2.1875,2.1874 v 8.6244 c 0,1.1998 0.98591,2.1874 2.1875,2.1874 h 11.625 c 1.2016,0 2.1875,-0.98751 2.1875,-2.1874 v -8.6244 C 99.0005,529.9876 98.01459,529 96.813,529 H 85.188 z m 0,1.9999 h 11.625 c 0.1238,0 0.1875,0.0566 0.1875,0.18749 v 8.6244 c 0,0.13088 -0.0637,0.18749 -0.1875,0.18749 H 85.188 c -0.1238,0 -0.1875,-0.0566 -0.1875,-0.18749 v -8.6244 c 0,-0.13088 0.0637,-0.18749 0.1875,-0.18749 z" id="rect11749-9" inkscape:connector-curvature="0" style="text-indent:0;text-transform:none;block-progression:tb;color:#bebebe;fill:&stroke_color;;stroke:&stroke_color;;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none"/><path d="m 87.248233,542.71779 a 1.1518831,1.1517681 0 0 0 0.107864,2.30101 h 6.903343 a 1.1506723,1.1505571 0 1 0 0,-2.30101 h -6.903343 a 1.1506723,1.1505571 0 0 0 -0.107807,0 z" id="path11751-0" inkscape:connector-curvature="0" style="text-indent:0;text-transform:none;block-progression:tb;color:#bebebe;fill:&fill_color;;stroke:&stroke_color;;stroke-width:0.90604287;stroke-miterlimit:4;stroke-dasharray:none"/><path d="m 86.438,534 c -0.24298,0 -0.4375,0.29728 -0.4375,0.6562 v 3.6872 c 0,0.35893 0.19452,0.65621 0.4375,0.65621 h 4.125 c 0.24298,0 0.4375,-0.29728 0.4375,-0.65621 v -3.6872 C 91.0005,534.29728 90.80598,534 90.563,534 z m 0.5625,1.9999 h 3 v 1.9999 h -3 z" id="rect5771" inkscape:connector-curvature="0" style="color:#bebebe;fill:&fill_color;;stroke:&stroke_color;;stroke-width:0.50534099;stroke-miterlimit:4;stroke-dasharray:none"/><path d="m 92.438,532 c -0.24298,0 -0.4375,0.28489 -0.4375,0.62495 l 0,2.7498 c 0,0.34006 0.19452,0.62496 0.4375,0.62496 l 3.125,0 c 0.24298,0 0.4375,-0.2849 0.4375,-0.62496 l 0,-2.7498 C 96.0005,532.28489 95.80598,532 95.563,532 z m 0.5625,1.73349 2,0 0,1.26634 -2,0 z" id="rect7987" inkscape:connector-curvature="0" sodipodi:nodetypes="sssssssssccccc" style="color:#bebebe;fill:&fill_color;;stroke:&stroke_color;;stroke-width:0.50534099;stroke-miterlimit:4;stroke-dasharray:none"/></g></g></svg> \ No newline at end of file
diff --git a/activity/activity-vnclauncher.svg b/activity/activity-vnclauncher.svg
deleted file mode 100755
index f0f9d74..0000000
--- a/activity/activity-vnclauncher.svg
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
- <!ENTITY stroke_color "#010101">
- <!ENTITY fill_color "#FFFFFF">
-]><!-- Creator: CorelDRAW --><svg height="50px" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" viewBox="0 0 3.78472 3.78472" width="50px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <defs style="">
- <style style="" type="text/css">
- <![CDATA[
- .str0 {stroke:white;stroke-width:0.0481685}
- .str1 {stroke:#010101;stroke-width:0.192674}
- .str3 {stroke:#010101;stroke-width:0.192674}
- .str2 {stroke:#010101;stroke-width:0.192674;stroke-linecap:round}
- .fil0 {fill:#FFFFFF}
- .fil2 {fill:#FFFFFF}
- .fil1 {fill:#FFFFFF}
- ]]>
- </style>
- </defs>
- <g id="Layer_x0020_1" style="">
- <metadata id="CorelCorpID_0Corel-Layer" style=""/>
-
- <rect stroke="&stroke_color;" fill="&fill_color;"
-class="fill0 str0" stroke-width="0.192"
-height="2.20865" rx="0.196661"
-ry="0.196661" style=""
-width="2.91" x="0.653715" y="0.644322"/>
-
- <rect stroke="&stroke_color;" fill="&fill_color;"
-stroke-width="0.192"
-height="2.20865" rx="0.196661" ry="0.196661" style="" width="2.91966" x="0.145106" y="1.09815"/>
- <g id="_60706736" style="">
- <g style="">
- <line class="fil0 str2" id="_60781952" style="" x1="1.31819" x2="1.89165" y1="2.11687" y2="2.69034"/>
- <line class="fil0 str2" id="_60615656" style="" x1="1.89168" x2="1.31822" y1="2.11687" y2="2.69034"/>
- </g>
- <circle class="fil2 str3" cx="1.60493" cy="1.82808" id="_60601288" r="0.113458" style=""/>
- </g>
- </g>
-</svg>
diff --git a/activity/activity.info b/activity/activity.info
index 4341868..97d548b 100755
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,7 +1,6 @@
[Activity]
-name = VncLauncher
-activity_version = 8
-bundle_id = org.laptop.VncLauncher
+name = Servidor VNC
+activity_version = 1
+bundle_id = org.somosazucar.VncServer
exec = sugar-activity vnclauncher.VncLauncherActivity
-icon = activity-vnclauncher
-summary = With this activity you can show the content of your screen on other computers using the VNC protocol.
+icon = activity-vnc
diff --git a/activity/test_icon.py b/activity/test_icon.py
new file mode 100644
index 0000000..aebacfd
--- /dev/null
+++ b/activity/test_icon.py
@@ -0,0 +1,16 @@
+from sugar.graphics.icon import Icon
+import gtk
+from sugar.graphics.xocolor import XoColor
+gtk.icon_theme_get_default().append_search_path("./")
+
+def press(widget, event):
+ for x in widget:
+ widget.remove(x)
+ widget.add(Icon(icon_name="activity-vnc", xo_color=XoColor(), pixel_size=500))
+ widget.show_all()
+
+ventana = gtk.Window()
+ventana.connect("key-press-event", press)
+ventana.show_all()
+ventana.fullscreen()
+gtk.main()
diff --git a/icons/clear_console.svg b/icons/clear_console.svg
new file mode 100644
index 0000000..b46ae68
--- /dev/null
+++ b/icons/clear_console.svg
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Creator: CorelDRAW -->
+
+<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ height="55"
+ id="svg2"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="clear_console.svg"
+ style="fill-rule:evenodd"
+ version="1.1"
+ viewBox="0 0 4.163192 4.163192"
+ width="55"
+ xml:space="preserve"><metadata
+ id="metadata22"><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 /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
+ bordercolor="#666666"
+ borderopacity="1"
+ gridtolerance="10"
+ guidetolerance="10"
+ id="namedview20"
+ inkscape:current-layer="svg2"
+ inkscape:cx="23.32786"
+ inkscape:cy="25"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-height="551"
+ inkscape:window-maximized="1"
+ inkscape:window-width="1024"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ inkscape:zoom="4"
+ objecttolerance="10"
+ pagecolor="#ffffff"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true" /><defs
+ id="defs4"><inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 27.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="55 : 27.5 : 1"
+ inkscape:persp3d-origin="27.5 : 18.333333 : 1"
+ id="perspective6000" /><style
+ id="style6"
+ type="text/css">
+ .str0 {stroke:white;stroke-width:0.0481685}
+ .str1 {stroke:#010101;stroke-width:0.192674}
+ .str3 {stroke:#010101;stroke-width:0.192674}
+ .str2 {stroke:#010101;stroke-width:0.192674;stroke-linecap:round}
+ .fil0 {fill:#FFFFFF}
+ .fil2 {fill:#FFFFFF}
+ .fil1 {fill:#FFFFFF}
+ </style></defs><g
+ transform="matrix(0.25780156,0,0,0.25780156,-72.434878,-162.1266)"
+ id="layer11"
+ style="fill:#ffffff"><path
+ d="m 284.12,629.03 c -0.56869,5e-5 -1.0937,0.50285 -1.0938,1.0625 v 12.844 0.25 0.78125 c 5e-5,0.55965 0.52506,1.0624 1.0938,1.0625 h 4.3438 1.125 5.3438 c 0.55754,-5e-5 1.074,-0.48468 1.0938,-1.0312 3.9e-4,-0.0109 0,-0.0204 0,-0.0312 v -6.9376 l -2,2 v 4 h -9 v -12 h 5 l 2,2 1.5312,-1.5312 -2.1875,-2.125 c -0.20046,-0.20837 -0.48969,-0.3416 -0.78125,-0.34375 z"
+ style="text-indent:0;text-transform:none;block-progression:tb;color:#000000;fill:#ffffff"
+ id="path6682-6"
+ inkscape:connector-curvature="0" /></g><g
+ transform="matrix(0.17881185,0.05117905,-0.05117905,0.17881185,4.9851259,-147.08744)"
+ id="layer12"
+ style="fill:#ffffff;stroke:#000000"><path
+ d="m 211.88,767.06 a 1.0001,1.0001 0 0 0 -0.6875,0.5 l -3.3125,5.625 a 1.0078,1.0078 0 1 0 1.75,1 l 3.3125,-5.625 a 1.0001,1.0001 0 0 0 -1.0625,-1.5 z"
+ style="text-indent:0;text-transform:none;block-progression:tb;color:#000000;fill:#ffffff;stroke:#000000;enable-background:new"
+ id="path36048"
+ inkscape:connector-curvature="0" /><path
+ d="m 206.53,771.72 4.9474,3.0538 c 0.60355,0.31472 0.68739,0.89216 0.20883,1.5087 l -0.625,0.8125 -6.5938,-3.875 0.55118,-1.0614 c 0.28883,-0.58524 0.75466,-0.81586 1.5113,-0.43864 z"
+ style="color:#000000;fill:#ffffff;stroke:#000000;enable-background:new"
+ id="path36050"
+ inkscape:connector-curvature="0" /><path
+ d="m 204.56,774.58 c 0,0 -2.8547,3.0362 -1.3326,4.6991 1.6875,1.8438 4.758,1.7674 5.8628,1.7232 h 4.0087 c -1.875,-0.375 -3.8371,-1.8156 -2.9027,-3.2446 z"
+ style="color:#000000;fill:#ffffff;stroke:#000000;enable-background:new"
+ id="path36052"
+ inkscape:connector-curvature="0" /></g></svg> \ No newline at end of file
diff --git a/icons/get_ip.svg b/icons/get_ip.svg
new file mode 100755
index 0000000..6404fdb
--- /dev/null
+++ b/icons/get_ip.svg
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Creator: CorelDRAW -->
+
+<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ height="55"
+ id="svg2"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="start_vnc.svg"
+ style="fill-rule:evenodd"
+ version="1.1"
+ viewBox="0 0 4.163192 4.163192"
+ width="55"
+ xml:space="preserve"><metadata
+ id="metadata22"><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><sodipodi:namedview
+ bordercolor="#666666"
+ borderopacity="1"
+ gridtolerance="10"
+ guidetolerance="10"
+ id="namedview20"
+ inkscape:current-layer="svg2"
+ inkscape:cx="23.32786"
+ inkscape:cy="25"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-height="551"
+ inkscape:window-maximized="1"
+ inkscape:window-width="1024"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ inkscape:zoom="4"
+ objecttolerance="10"
+ pagecolor="#ffffff"
+ showgrid="false" /><defs
+ id="defs4"><inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 27.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="55 : 27.5 : 1"
+ inkscape:persp3d-origin="27.5 : 18.333333 : 1"
+ id="perspective6000" /><style
+ id="style6"
+ type="text/css">
+ .str0 {stroke:white;stroke-width:0.0481685}
+ .str1 {stroke:#010101;stroke-width:0.192674}
+ .str3 {stroke:#010101;stroke-width:0.192674}
+ .str2 {stroke:#010101;stroke-width:0.192674;stroke-linecap:round}
+ .fil0 {fill:#FFFFFF}
+ .fil2 {fill:#FFFFFF}
+ .fil1 {fill:#FFFFFF}
+ </style></defs><g
+ transform="matrix(0.26018307,0,0,0.26018307,-21.595325,-137.63684)"
+ id="layer11-1"
+ style="fill:#ffffff"><path
+ d="m 85.188,529 c -1.2016,0 -2.1875,0.98751 -2.1875,2.1874 v 8.6244 c 0,1.1998 0.98591,2.1874 2.1875,2.1874 h 11.625 c 1.2016,0 2.1875,-0.98751 2.1875,-2.1874 v -8.6244 C 99.0005,529.9876 98.01459,529 96.813,529 H 85.188 z m 0,1.9999 h 11.625 c 0.1238,0 0.1875,0.0566 0.1875,0.18749 v 8.6244 c 0,0.13088 -0.0637,0.18749 -0.1875,0.18749 H 85.188 c -0.1238,0 -0.1875,-0.0566 -0.1875,-0.18749 v -8.6244 c 0,-0.13088 0.0637,-0.18749 0.1875,-0.18749 z"
+ style="text-indent:0;text-transform:none;block-progression:tb;color:#bebebe;fill:#ffffff"
+ id="rect11749-9"
+ inkscape:connector-curvature="0" /><path
+ d="m 87.907,543 a 1.0011479,1.0010479 0 1 0 0.09375,1.9999 h 6 a 1.0001,1 0 1 0 0,-1.9999 h -6 a 1.0001,1 0 0 0 -0.0937,0 z"
+ style="text-indent:0;text-transform:none;block-progression:tb;color:#bebebe;fill:#ffffff"
+ id="path11751-0"
+ inkscape:connector-curvature="0" /></g><g
+ transform="matrix(0.14697431,0,0,0.14697431,-40.431827,-37.263645)"
+ id="layer9"
+ style="fill:#ffffff"><path
+ d="m 289,257.03 c -0.40018,0 -0.81534,0.15911 -1.125,0.46875 l -6.375,6.375 c -0.61932,0.61929 -0.61932,1.6307 0,2.25 l 6.375,6.375 c 0.61931,0.61929 1.6307,0.61929 2.25,0 l 6.375,-6.375 c 0.61932,-0.61929 0.61931,-1.6307 0,-2.25 l -6.375,-6.375 C 289.81534,257.18911 289.40018,257.03 289,257.03 z m -0.19,2.97 c 1.6424,-0.092 3.0955,1.1701 3.1875,2.8125 -10e-5,1.4014 -0.37771,1.9218 -1.5938,2.8438 -0.19093,0.14364 -0.3256,0.2506 -0.375,0.3125 -0.05,0.06 -0.03,0.03 -0.03,0.03 0.007,0.52831 -0.47163,1 -1,1 -0.52837,0 -1.007,-0.47169 -1,-1 0,-0.50239 0.22424,-0.94342 0.46875,-1.25 0.24451,-0.30663 0.4913,-0.51638 0.71875,-0.6875 0.20405,-0.16056 0.46083,-0.38454 0.6875,-0.65625 0.0935,-0.1121 0.129,-0.30766 0.125,-0.4375 v -0.0313 c -0.0316,-0.56324 -0.49926,-0.9691 -1.0625,-0.9375 -0.56324,0.0316 -0.9691,0.43676 -0.9375,1 h -2 c -0.092,-1.6424 1.1701,-2.9079 2.8125,-3 z m 0.19,8 c 0.55228,0 1,0.44772 1,1 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 z"
+ style="color:#bebebe;fill:#ffffff"
+ id="path19592"
+ inkscape:connector-curvature="0" /></g></svg> \ No newline at end of file
diff --git a/icons/start_vnc.svg b/icons/start_vnc.svg
new file mode 100644
index 0000000..f7235ea
--- /dev/null
+++ b/icons/start_vnc.svg
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Creator: CorelDRAW -->
+
+<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ height="55"
+ id="svg2"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="stop_vnc.svg"
+ style="fill-rule:evenodd"
+ version="1.1"
+ viewBox="0 0 4.163192 4.163192"
+ width="55"
+ xml:space="preserve"><metadata
+ id="metadata22"><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><sodipodi:namedview
+ bordercolor="#666666"
+ borderopacity="1"
+ gridtolerance="10"
+ guidetolerance="10"
+ id="namedview20"
+ inkscape:current-layer="svg2"
+ inkscape:cx="23.32786"
+ inkscape:cy="25"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-height="551"
+ inkscape:window-maximized="1"
+ inkscape:window-width="1024"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ inkscape:zoom="4"
+ objecttolerance="10"
+ pagecolor="#ffffff"
+ showgrid="false" /><defs
+ id="defs4"><inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 27.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="55 : 27.5 : 1"
+ inkscape:persp3d-origin="27.5 : 18.333333 : 1"
+ id="perspective6000" /><style
+ id="style6"
+ type="text/css">
+ .str0 {stroke:white;stroke-width:0.0481685}
+ .str1 {stroke:#010101;stroke-width:0.192674}
+ .str3 {stroke:#010101;stroke-width:0.192674}
+ .str2 {stroke:#010101;stroke-width:0.192674;stroke-linecap:round}
+ .fil0 {fill:#FFFFFF}
+ .fil2 {fill:#FFFFFF}
+ .fil1 {fill:#FFFFFF}
+ </style></defs><g
+ transform="matrix(0.26018307,0,0,0.26018307,-21.595325,-137.63684)"
+ id="layer11-1"
+ style="fill:#ffffff"><path
+ d="m 85.188,529 c -1.2016,0 -2.1875,0.98751 -2.1875,2.1874 v 8.6244 c 0,1.1998 0.98591,2.1874 2.1875,2.1874 h 11.625 c 1.2016,0 2.1875,-0.98751 2.1875,-2.1874 v -8.6244 C 99.0005,529.9876 98.01459,529 96.813,529 H 85.188 z m 0,1.9999 h 11.625 c 0.1238,0 0.1875,0.0566 0.1875,0.18749 v 8.6244 c 0,0.13088 -0.0637,0.18749 -0.1875,0.18749 H 85.188 c -0.1238,0 -0.1875,-0.0566 -0.1875,-0.18749 v -8.6244 c 0,-0.13088 0.0637,-0.18749 0.1875,-0.18749 z"
+ style="text-indent:0;text-transform:none;block-progression:tb;color:#bebebe;fill:#ffffff"
+ id="rect11749-9"
+ inkscape:connector-curvature="0" /><path
+ d="m 87.907,543 a 1.0011479,1.0010479 0 1 0 0.09375,1.9999 h 6 a 1.0001,1 0 1 0 0,-1.9999 h -6 a 1.0001,1 0 0 0 -0.0937,0 z"
+ style="text-indent:0;text-transform:none;block-progression:tb;color:#bebebe;fill:#ffffff"
+ id="path11751-0"
+ inkscape:connector-curvature="0" /><path
+ d="m 86.438,534 c -0.24298,0 -0.4375,0.29728 -0.4375,0.6562 v 3.6872 c 0,0.35893 0.19452,0.65621 0.4375,0.65621 h 4.125 c 0.24298,0 0.4375,-0.29728 0.4375,-0.65621 v -3.6872 C 91.0005,534.29728 90.80598,534 90.563,534 z m 0.5625,1.9999 h 3 v 1.9999 h -3 z"
+ style="color:#bebebe;fill:#ffffff"
+ id="rect5771"
+ inkscape:connector-curvature="0" /><path
+ d="m 92.438,532 c -0.24298,0 -0.4375,0.28489 -0.4375,0.62495 v 2.7498 c 0,0.34006 0.19452,0.62496 0.4375,0.62496 h 3.125 c 0.24298,0 0.4375,-0.2849 0.4375,-0.62496 v -2.7498 C 96.0005,532.28489 95.80598,532 95.563,532 z m 0.5625,1.9999 h 2 v 0.99993 h -2 z"
+ style="color:#bebebe;fill:#ffffff"
+ id="rect7987"
+ inkscape:connector-curvature="0" /></g></svg> \ No newline at end of file
diff --git a/icons/stop_vnc.svg b/icons/stop_vnc.svg
new file mode 100644
index 0000000..4480e74
--- /dev/null
+++ b/icons/stop_vnc.svg
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Creator: CorelDRAW -->
+
+<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ height="55"
+ id="svg2"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="start_vnc.svg"
+ style="fill-rule:evenodd"
+ version="1.1"
+ viewBox="0 0 4.163192 4.163192"
+ width="55"
+ xml:space="preserve"><metadata
+ id="metadata22"><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><sodipodi:namedview
+ bordercolor="#666666"
+ borderopacity="1"
+ gridtolerance="10"
+ guidetolerance="10"
+ id="namedview20"
+ inkscape:current-layer="svg2"
+ inkscape:cx="23.32786"
+ inkscape:cy="25"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-height="551"
+ inkscape:window-maximized="1"
+ inkscape:window-width="1024"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ inkscape:zoom="4"
+ objecttolerance="10"
+ pagecolor="#ffffff"
+ showgrid="false" /><defs
+ id="defs4"><inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 27.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="55 : 27.5 : 1"
+ inkscape:persp3d-origin="27.5 : 18.333333 : 1"
+ id="perspective6000" /><style
+ id="style6"
+ type="text/css">
+ .str0 {stroke:white;stroke-width:0.0481685}
+ .str1 {stroke:#010101;stroke-width:0.192674}
+ .str3 {stroke:#010101;stroke-width:0.192674}
+ .str2 {stroke:#010101;stroke-width:0.192674;stroke-linecap:round}
+ .fil0 {fill:#FFFFFF}
+ .fil2 {fill:#FFFFFF}
+ .fil1 {fill:#FFFFFF}
+ </style></defs><g
+ transform="matrix(0.26018307,0,0,0.26018307,-21.595325,-137.63684)"
+ id="layer11-1"
+ style="fill:#ffffff"><path
+ d="m 85.188,529 c -1.2016,0 -2.1875,0.98751 -2.1875,2.1874 v 8.6244 c 0,1.1998 0.98591,2.1874 2.1875,2.1874 h 11.625 c 1.2016,0 2.1875,-0.98751 2.1875,-2.1874 v -8.6244 C 99.0005,529.9876 98.01459,529 96.813,529 H 85.188 z m 0,1.9999 h 11.625 c 0.1238,0 0.1875,0.0566 0.1875,0.18749 v 8.6244 c 0,0.13088 -0.0637,0.18749 -0.1875,0.18749 H 85.188 c -0.1238,0 -0.1875,-0.0566 -0.1875,-0.18749 v -8.6244 c 0,-0.13088 0.0637,-0.18749 0.1875,-0.18749 z"
+ style="text-indent:0;text-transform:none;block-progression:tb;color:#bebebe;fill:#ffffff"
+ id="rect11749-9"
+ inkscape:connector-curvature="0" /><path
+ d="m 87.907,543 a 1.0011479,1.0010479 0 1 0 0.09375,1.9999 h 6 a 1.0001,1 0 1 0 0,-1.9999 h -6 a 1.0001,1 0 0 0 -0.0937,0 z"
+ style="text-indent:0;text-transform:none;block-progression:tb;color:#bebebe;fill:#ffffff"
+ id="path11751-0"
+ inkscape:connector-curvature="0" /><path
+ d="m 86.438,534 c -0.24298,0 -0.4375,0.29728 -0.4375,0.6562 v 3.6872 c 0,0.35893 0.19452,0.65621 0.4375,0.65621 h 4.125 c 0.24298,0 0.4375,-0.29728 0.4375,-0.65621 v -3.6872 C 91.0005,534.29728 90.80598,534 90.563,534 z m 0.5625,1.9999 h 3 v 1.9999 h -3 z"
+ style="color:#bebebe;fill:#ffffff"
+ id="rect5771"
+ inkscape:connector-curvature="0" /><path
+ d="m 92.438,532 c -0.24298,0 -0.4375,0.28489 -0.4375,0.62495 v 2.7498 c 0,0.34006 0.19452,0.62496 0.4375,0.62496 h 3.125 c 0.24298,0 0.4375,-0.2849 0.4375,-0.62496 v -2.7498 C 96.0005,532.28489 95.80598,532 95.563,532 z m 0.5625,1.9999 h 2 v 0.99993 h -2 z"
+ style="color:#bebebe;fill:#ffffff"
+ id="rect7987"
+ inkscape:connector-curvature="0" /></g><g
+ transform="matrix(0.3302357,0,0,0.3302357,-20.392753,-171.86891)"
+ id="layer12"
+ style="fill:#ffffff;stroke:#000000"><g
+ transform="translate(19,-242)"
+ id="layer4-4-1"
+ style="fill:#ffffff;stroke:#000000"><path
+ d="m 45,764 h 1 c 0.01037,-1.2e-4 0.02079,-4.6e-4 0.03125,0 0.25495,0.0112 0.50987,0.12858 0.6875,0.3125 l 2.281,2.28 2.312,-2.28 c 0.266,-0.23 0.447,-0.3 0.688,-0.31 h 1 v 1 c 0,0.28647 -0.03434,0.55065 -0.25,0.75 l -2.2812,2.2812 2.25,2.25 c 0.188,0.19 0.281,0.45 0.281,0.72 v 1 h -1 c -0.2653,-10e-6 -0.53059,-0.0931 -0.71875,-0.28125 l -2.281,-2.28 -2.281,2.28 c -0.188,0.19 -0.454,0.28 -0.719,0.28 h -1 v -1 c -3e-6,-0.26529 0.09306,-0.53058 0.28125,-0.71875 l 2.2812,-2.25 -2.281,-2.28 c -0.21,-0.19 -0.303,-0.47 -0.281,-0.75 v -1 z"
+ style="text-indent:0;text-transform:none;block-progression:tb;color:#bebebe;fill:#ffffff;stroke:#000000;enable-background:new"
+ id="path10839-9"
+ inkscape:connector-curvature="0" /></g></g></svg> \ No newline at end of file
diff --git a/po/VncLauncher.pot b/po/VncLauncher.pot
deleted file mode 100644
index 87714ce..0000000
--- a/po/VncLauncher.pot
+++ /dev/null
@@ -1,52 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-05-13 16:57-0300\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: activity/activity.info:2
-msgid "VncLauncher"
-msgstr ""
-
-#: vnclauncher.py:52
-msgid "Error!! check wireless connection"
-msgstr ""
-
-#: vnclauncher.py:66
-msgid ""
-"Please Click to find current IP address \n"
-"\n"
-msgstr ""
-
-#: vnclauncher.py:75
-msgid "X11 VNC Server Activity"
-msgstr ""
-
-#: vnclauncher.py:77
-msgid "Please Click to find current IP address"
-msgstr ""
-
-#: vnclauncher.py:84
-msgid "Start X11 VNC Server"
-msgstr ""
-
-#: vnclauncher.py:89
-msgid "Stop X11 VNC Server"
-msgstr ""
-
-#: vnclauncher.py:94
-msgid "Exit VncLauncherActivity"
-msgstr ""
diff --git a/vnclauncher.py b/vnclauncher.py
index 5eefe09..7576591 100755
--- a/vnclauncher.py
+++ b/vnclauncher.py
@@ -1,6 +1,7 @@
-# Copyright (C) 2007, Eduardo Silva <edsiper@gmail.com>.
-# Copyright (C) 2008, One Laptop Per Child
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
# Copyright (C) 2013, SomosAzucar
+# Version especial de VncLauncher con nuevos cambios.
#
# 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
@@ -16,228 +17,191 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+import gtk
+import time
+import gobject
import os
+import commands
+import platform
+from threading import Thread
-import logging
from gettext import gettext as _
-import gtk
-import dbus
-
from sugar.activity import activity
-from sugar import env
+from sugar.graphics.radiotoolbutton import RadioToolButton
from sugar.graphics.toolbutton import ToolButton
-from sugar.graphics.palette import Palette
-from sugar.graphics.roundbox import CanvasRoundBox
-import ConfigParser
-import os
-import os.path
-import vte
-import pango
-import commands
-import sys
-import platform
-import logging
+from sugar.graphics.toolbarbox import ToolbarBox
+from sugar.activity.widgets import StopButton
+from sugar.activity.widgets import ActivityToolbarButton
class VncLauncherActivity(activity.Activity):
- def _ipaddr_(self,button):
- ifconfig="/sbin/ifconfig"
- ifaces=['eth0','msh0']
- for iface in ifaces:
- cmd="%s %s" % (ifconfig, iface)
- output=commands.getoutput(cmd)
- ipaddr="Error!!"
- error=_("Error!! check wireless connection")
- inet = output.find('inet')
- if inet >= 0:
- print iface
- start=inet + len('inet')
- end=output.find(" ",start + 1)
- if iface == 'eth0':
- ipaddr='Ethernet IP= '+ output[start:end]
- else:
- ipaddr='Mesh IP='+ output[start:end]
- break
- else:
- ipaddr=error
-
- button.set_label(_('Please Click to find current IP address \n\n') +
- ipaddr)
-
def __init__(self, handle):
activity.Activity.__init__(self, handle)
-
- logging.debug('Starting the X11 VNC activity')
-
- self.set_title(_('X11 VNC Server Activity'))
- self.connect('key-press-event', self.__key_press_cb)
- args=_("Please Click to find current IP address")
- box = gtk.HBox(False, 10)
- table=gtk.Table(4,1,True)
- button=gtk.Button(args)
- button.connect("clicked",self._ipaddr_)
- table.attach(button,0,1,0,1,gtk.FILL|gtk.EXPAND,gtk.EXPAND|gtk.FILL,25,25)
- button.show()
- button=gtk.Button(_("Start X11 VNC Server"))
- button.connect("clicked",self.connectVNC)
- table.attach(button,0,1,1,2,gtk.FILL|gtk.EXPAND,gtk.FILL|gtk.EXPAND,25,25)
- button.show()
-
- button=gtk.Button(_("Stop X11 VNC Server"))
- button.connect("clicked",self.stopVNC)
- table.attach(button,0,1,2,3,gtk.FILL,gtk.FILL,25,25)
- button.show()
-
- button=gtk.Button(_("Exit VncLauncherActivity"))
- button.connect("clicked",lambda w:gtk.main_quit())
- table.attach(button,0,1,3,4,gtk.FILL,gtk.FILL,25,25)
- button.show()
- table.show()
-
- self._vte = VTE()
- self._vte.show()
-
- box.pack_start(self._vte)
- box.pack_start(table, False, False, 0)
-
- self.set_canvas(box)
- box.show()
-
- def stopVNC(self,button):
-
- cmd = "kill " + commands.getoutput('pidof x11vnc')
- self._vte.fork_command(cmd)
-
- def connectVNC(self,button):
- self._vte.grab_focus()
- # check if x11vnc is installed
- cmd = '/usr/bin/x11vnc'
- if os.path.isfile(cmd) and os.access(cmd, os.X_OK) and os.path.exists(cmd):
- logging.error('Using x11vnc installed in the system')
- self.env = "/usr/lib"
- else:
- if platform.machine().startswith('arm'):
- path = os.path.join(activity.get_bundle_path(),
- 'bin/arm')
- elif platform.machine().startswith('x86_64'):
- path = os.path.join(activity.get_bundle_path(),
- 'bin/x86')
- else:
- path = os.path.join(activity.get_bundle_path(),
- 'bin/i586')
- self.env = {'LD_LIBRARY_PATH':'%s/lib' % path}
- cmd = os.path.join(path, 'x11vnc')
- logging.error('Using %s', cmd)
+ self.max_participants = 1
- self._vte.fork_command(cmd, envv=self.env)
+ self.toolbarbox = ToolbarBox()
+ self.toolbar = self.toolbarbox.toolbar
- def __key_press_cb(self, window, event):
- return False
+ self.start_vnc = RadioToolButton(icon_name="start_vnc",
+ tooltip=_("Iniciar servidor VNC"))
-class VTE(vte.Terminal):
- def __init__(self):
- vte.Terminal.__init__(self)
- self._configure_vte()
- self.connect("child-exited", lambda term: term.fork_command())
+ self.stop_vnc = RadioToolButton(icon_name="stop_vnc",
+ tooltip=_("Detener servidor VNC"),
+ group=self.start_vnc)
- os.chdir(os.environ["HOME"])
- self.fork_command()
+ self.stop_vnc.set_active(True)
- def _configure_vte(self):
- conf = ConfigParser.ConfigParser()
- conf_file = os.path.join(env.get_profile_path(), 'terminalrc')
+ self.get_ipbutton = ToolButton(icon_name="get_ip",
+ tooltip=_("Obtener la IP actual"))
+
+
+ ##
+ self.messages = gtk.TreeView()
+ self.messages.set_rules_hint(True)
+ modelo = gtk.ListStore(str, str, gtk.gdk.Color)
+ self.messages.set_model(modelo)
+ render = gtk.CellRendererText()
+ render1 = gtk.CellRendererText()
+
+ column1 = gtk.TreeViewColumn(_("Hora"), render, markup=0)
+ column2 = gtk.TreeViewColumn(_("Mensaje"), render1, markup=1)
+ column1.add_attribute(render, 'foreground-gdk', 2)
+ column2.add_attribute(render1, 'foreground-gdk', 2)
+
+
+ self.messages.append_column(column1)
+ self.messages.append_column(column2)
+ color = gtk.gdk.color_parse("dark blue")
+ modelo.insert(0, [time.strftime("\n<b>%H:%M:%S</b>\n"), _("\n<b>Inicio de actividad.</b>\n"), color])
+
+ self.showed_message_stop = True
+ self.showed_message_start = False
+
+ self.stop_vnc.connect("clicked", self.__stop_vnc)
+ self.start_vnc.connect("clicked", self.__start_vnc)
+ self.clear_model = ToolButton(icon_name="clear_console",
+ tooltip=_("Eliminar mensajes"))
+ self.clear_model.connect("clicked", lambda x: modelo.clear())
+ self.get_ipbutton.connect("clicked", self.__get_ip)
+ self.last_message = 1
+
+ self.__get_x11vnc_path()
+ ##
+ separator = gtk.SeparatorToolItem()
+ separator.props.draw = False
+ separator.set_expand(True)
+
+ self.stop_activity = StopButton(self)
- if os.path.isfile(conf_file):
- f = open(conf_file, 'r')
- conf.readfp(f)
- f.close()
+ self.toolbar.insert(ActivityToolbarButton(self), -1)
+ self.toolbar.insert(gtk.SeparatorToolItem(), -1)
+ self.toolbar.insert(self.start_vnc, -1)
+ self.toolbar.insert(self.stop_vnc, -1)
+ self.toolbar.insert(gtk.SeparatorToolItem(), -1)
+ self.toolbar.insert(self.get_ipbutton, -1)
+ self.toolbar.insert(self.clear_model, -1)
+ self.toolbar.insert(separator, -1)
+ self.toolbar.insert(self.stop_activity, -1)
+
+ self.messages_scroll = gtk.ScrolledWindow()
+ self.messages_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+ self.messages_scroll.add_with_viewport(self.messages)
+
+ self.set_toolbar_box(self.toolbarbox)
+ self.set_canvas(self.messages_scroll)
+
+ self.show_all()
+ gobject.timeout_add(100, self.__check_is_on)
+
+ def __check_is_on(self):
+ pid = commands.getoutput("pidof x11vnc")
+ if self.start_vnc.get_active() and pid == "":
+ self.showed_message_stop = True
+ self.stop_vnc.set_active(True)
+ self.start_vnc.set_active(False)
+ self.showed_message_start = False
+
+ color = gtk.gdk.color_parse("dark red")
+ self.messages.get_model().insert(self.last_message, [time.strftime("\n<b>%H:%M:%S</b>\n"), _("\n<b>Se ha detenido inhesperadamente el servidor.</b>\n"), color])
+ self.last_message += 1
+
+ return True
+
+ def __get_x11vnc_path(self):
+ system = platform.machine()
+ color = gtk.gdk.color_parse("dark red")
+ if os.path.exists("/usr/bin/x11vnc"):
+ self.path = "/usr/bin/x11vnc"
+ message = _("PATH: %s") % self.path
else:
- conf.add_section('terminal')
+ if "arm" in system:
+ self.path = os.path.join(activity.get_bundle_path(), "bin", "arm", "x11vnc")
+ os.environ["LD_LIBRARY_PATH"] = self.path.replace("x11vnc", "lib/")
+ elif "64" in system:
+ self.path = os.path.join(activity.get_bundle_path(), "bin", "x64", "x11vnc")
+ os.environ["LD_LIBRARY_PATH"] = self.path.replace("x11vnc", "lib/")
+ else:
+ self.path = os.path.join(activity.get_bundle_path(), "bin", "i586", "x11vnc")
+ os.environ["LD_LIBRARY_PATH"] = self.path.replace("x11vnc", "lib/")
+ message = _("PATH: %s") % self.path
+
+ self.messages.get_model().insert(self.last_message, [time.strftime("\n<b>%H:%M:%S</b>\n"), "<b>" + message + "</b>", color])
+ self.last_message += 1
+
+ def __start_vnc(self, widget):
- if conf.has_option('terminal', 'font'):
- font = conf.get('terminal', 'font')
- else:
- font = 'Monospace 8'
- conf.set('terminal', 'font', font)
- self.set_font(pango.FontDescription(font))
+ def servidor():
+ commands.getoutput(self.path)
+ Thread(target=servidor).start()
- if conf.has_option('terminal', 'fg_color'):
- fg_color = conf.get('terminal', 'fg_color')
+ if not self.showed_message_start:
+ self.showed_message_start = True
+ pass
else:
- fg_color = '#000000'
- conf.set('terminal', 'fg_color', fg_color)
- if conf.has_option('terminal', 'bg_color'):
- bg_color = conf.get('terminal', 'bg_color')
+ return
+
+ self.showed_message_stop = False
+ self.isrunning = True
+ color = gtk.gdk.color_parse("green")
+ self.messages.get_model().insert(self.last_message, [time.strftime("\n<b>%H:%M:%S</b>\n"), _("\n<b>Se inició el servidor VNC</b>\n"), color])
+ self.last_message += 1
+
+ def __stop_vnc(self, widget):
+
+ if not self.showed_message_stop:
+ self.showed_message_stop = True
+ pass
else:
- bg_color = '#FFFFFF'
- conf.set('terminal', 'bg_color', bg_color)
- self.set_colors(gtk.gdk.color_parse (fg_color),
- gtk.gdk.color_parse (bg_color),
- [])
-
- if conf.has_option('terminal', 'cursor_blink'):
- blink = conf.getboolean('terminal', 'cursor_blink')
- else:
- blink = False
- conf.set('terminal', 'cursor_blink', blink)
-
- self.set_cursor_blinks(blink)
+ return
- if conf.has_option('terminal', 'bell'):
- bell = conf.getboolean('terminal', 'bell')
- else:
- bell = False
- conf.set('terminal', 'bell', bell)
- self.set_audible_bell(bell)
+ self.showed_message_start = False
+ self.pid_nuevo = commands.getoutput("pidof x11vnc")
+ color = gtk.gdk.color_parse('red')
+
+ os.system("kill " + self.pid_nuevo)
- if conf.has_option('terminal', 'scrollback_lines'):
- scrollback_lines = conf.getint('terminal', 'scrollback_lines')
+ self.messages.get_model().insert(self.last_message, [time.strftime("\n<b>%H:%M:%S</b>\n"), _("\n<b>El servidor VNC está ahora detenido.</b>\n"), color])
+ self.last_message += 1
+
+
+ def close(self):
+ pid = commands.getoutput("pidof x11vnc")
+ commands.getoutput("kill " + pid)
+ self.destroy()
+
+ def __get_ip(self, widget):
+ system = platform.platform()
+ if "olpc" in system:
+ target = "eth0"
else:
- scrollback_lines = 1000
- conf.set('terminal', 'scrollback_lines', scrollback_lines)
-
- self.set_scrollback_lines(scrollback_lines)
- self.set_allow_bold(True)
+ target = "wlan0"
- if conf.has_option('terminal', 'scroll_on_keystroke'):
- scroll_key = conf.getboolean('terminal', 'scroll_on_keystroke')
- else:
- scroll_key = False
- conf.set('terminal', 'scroll_on_keystroke', scroll_key)
- self.set_scroll_on_keystroke(scroll_key)
-
- if conf.has_option('terminal', 'scroll_on_output'):
- scroll_output = conf.getboolean('terminal', 'scroll_on_output')
- else:
- scroll_output = False
- conf.set('terminal', 'scroll_on_output', scroll_output)
- self.set_scroll_on_output(scroll_output)
+ ip = "10.42.43.1"
- if conf.has_option('terminal', 'emulation'):
- emulation = conf.get('terminal', 'emulation')
- else:
- emulation = 'xterm'
- conf.set('terminal', 'emulation', emulation)
- self.set_emulation(emulation)
-
- if conf.has_option('terminal', 'visible_bell'):
- visible_bell = conf.getboolean('terminal', 'visible_bell')
- else:
- visible_bell = False
- conf.set('terminal', 'visible_bell', visible_bell)
- self.set_visible_bell(visible_bell)
- conf.write(open(conf_file, 'w'))
-
- def on_gconf_notification(self, client, cnxn_id, entry, what):
- self.reconfigure_vte()
-
- def on_vte_button_press(self, term, event):
- if event.button == 3:
- self.do_popup(event)
- return True
-
- def on_vte_popup_menu(self, term):
- pass
+ color = gtk.gdk.color_parse("dark blue")
+ self.messages.get_model().insert(self.last_message, [time.strftime("\n<b>%H:%M:%S</b>\n"), "\n<b>IP: " + ip + "</b>\n", color])
+
+ self.last_message += 1