Mercurial > MadButterfly
annotate inkscape/firefox/MBServer.py @ 276:892d86c1a409
Refactory the inkscape.as to be OOP-style.
author | wycc |
---|---|
date | Thu, 29 Jan 2009 23:57:59 +0800 |
parents | 96aae15527c8 |
children |
rev | line source |
---|---|
262
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
1 #!/usr/bin/python |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
2 import inkex |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
3 import pygtk |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
4 import gtk |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
5 from copy import deepcopy |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
6 from lxml import etree |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
7 from twisted.web import server, resource,soap |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
8 from twisted.internet import reactor |
274 | 9 import traceback |
262
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
10 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
11 import random |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
12 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
13 # Please refer to http://www.assembla.com/wiki/show/MadButterfly/Inkscape_extention for the designed document. |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
14 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
15 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
16 # Algorithm: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
17 # |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
18 # We will parse the first two level of the SVG DOM. collect a table of layer and scene. |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
19 # 1. Collect the layer table which will be displayed as the first column of the grid. |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
20 # 2. Get the maximum scene number. This will decide the size of the grid. |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
21 # 3. When F6 is pressed, we will check if this scene has been defined. This can be done by scan all second level group and check if the current scene number is within the |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
22 # range specified by scene field. The function IsSceneDefined(scene) can be used for this purpose. |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
23 # 4. If this is a new scene, we will append a new group which duplication the content of the last scene in the same group. The scene field will contain the number from the |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
24 # last scene number of the last scene to the current scenen number. For example, if the last scene is from 4-7 and the new scene is 10, we will set the scene field as |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
25 # "8-10". |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
26 # 5. If this scene are filled screne, we will split the existing scene into two scenes with the same content. |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
27 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
28 class Layer: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
29 def __init__(self,node): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
30 self.scene = [] |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
31 self.node = node |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
32 self.nodes=[] |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
33 class Scene: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
34 def __init__(self, node, start,end): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
35 self.node = node |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
36 self.start = int(start) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
37 self.end = int(end) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
38 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
39 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
40 class MBScene(inkex.Effect): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
41 def confirm(self,msg): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
42 vbox = gtk.VBox() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
43 vbox.pack_start(gtk.Label(msg)) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
44 self.button = gtk.Button('OK') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
45 vbox.pack_start(self.button) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
46 self.button.connect("clicked", self.onQuit) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
47 self.window.add(vbox) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
48 def dumpattr(self,n): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
49 s = "" |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
50 for a,v in n.attrib.items(): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
51 s = s + ("%s=%s" % (a,v)) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
52 return s |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
53 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
54 def dump(self,node,l=0): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
55 print " " * l*2,"<", node.tag, self.dumpattr(node),">" |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
56 for n in node: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
57 self.dump(n,l+1) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
58 print " " * l * 2,"/>" |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
59 def parseMetadata(self,node): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
60 self.current = 1 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
61 for n in node: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
62 if n.tag == '{http://madbutterfly.sourceforge.net/DTD/madbutterfly.dtd}scenes': |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
63 self.scenemap={} |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
64 cur = int(n.get("current")) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
65 self.current = cur |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
66 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
67 for s in n: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
68 if s.tag == '{http://madbutterfly.sourceforge.net/DTD/madbutterfly.dtd}scene': |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
69 try: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
70 start = int(s.get("start")) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
71 except: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
72 continue |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
73 try: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
74 end = s.get("end") |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
75 if end == None: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
76 end = start |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
77 except: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
78 end = start |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
79 link = s.get("ref") |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
80 self.scenemap[link] = [int(start),int(end)] |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
81 if cur >= start and cur <= end: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
82 self.currentscene = link |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
83 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
84 pass |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
85 pass |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
86 pass |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
87 pass |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
88 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
89 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
90 def parseScene(self): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
91 """ |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
92 In this function, we will collect all items for the current scene and then relocate them back to the appropriate scene object. |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
93 """ |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
94 self.layer = [] |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
95 self.scenemap = None |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
96 for node in self.document.getroot(): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
97 if node.tag == '{http://www.w3.org/2000/svg}metadata': |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
98 self.parseMetadata(node) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
99 elif node.tag == '{http://www.w3.org/2000/svg}g': |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
100 oldscene = None |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
101 #print layer.attrib.get("id") |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
102 lyobj = Layer(node) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
103 self.layer.append(lyobj) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
104 lyobj.current_scene = [] |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
105 for scene in node: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
106 if scene.tag == '{http://www.w3.org/2000/svg}g': |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
107 try: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
108 scmap = self.scenemap[scene.get("id")] |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
109 if scmap == None: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
110 lyobj.current_scene.append(scene) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
111 continue |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
112 if self.current <= scmap[1] and self.current >= scmap[0]: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
113 oldscene = scene |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
114 except: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
115 lyobj.current_scene.append(scene) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
116 continue |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
117 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
118 lyobj.scene.append(Scene(scene,scmap[0],scmap[1])) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
119 else: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
120 lyobj.current_scene.append(scene) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
121 pass |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
122 pass |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
123 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
124 if oldscene != None: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
125 # Put the objects back to the current scene |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
126 for o in lyobj.current_scene: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
127 #print o.tag |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
128 oldscene.append(o) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
129 pass |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
130 pass |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
131 pass |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
132 pass |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
133 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
134 self.collectID() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
135 #self.dumpID() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
136 def collectID(self): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
137 self.ID = {} |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
138 root = self.document.getroot() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
139 for n in root: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
140 self.collectID_recursive(n) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
141 def collectID_recursive(self,node): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
142 self.ID[node.get("id")] = 1 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
143 for n in node: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
144 self.collectID_recursive(n) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
145 def newID(self): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
146 while True: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
147 n = 's%d' % int(random.random()*10000) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
148 #print "try %s" % n |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
149 if self.ID.has_key(n) == False: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
150 return n |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
151 def dumpID(self): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
152 for a,v in self.ID.items(): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
153 print a |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
154 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
155 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
156 def getLayer(self, layer): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
157 for l in self.layer: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
158 if l.node.attrib.get("id") == layer: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
159 return l |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
160 return None |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
161 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
162 |
274 | 163 def insertKeyScene(self,layer,nth): |
262
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
164 """ |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
165 Insert a new key scene into the stage. If the nth is always a key scene, we will return without changing anything. |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
166 If the nth is a filled scene, we will break the original scene into two parts. If the nth is out of any scene, we will |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
167 append a new scene. |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
168 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
169 """ |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
170 if layer == None: return |
274 | 171 |
172 # Check if the nth is in the middle of any scene | |
262
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
173 for i in range(0,len(layer.scene)): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
174 s = layer.scene[i] |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
175 if nth >= s.start and nth <= s.end: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
176 if nth == s.start: return |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
177 newscene = Scene(deepcopy(s.node),nth,s.end) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
178 newscene.node.set("id", self.newID()) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
179 layer.scene.insert(i+1,newscene) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
180 layer.scene[i].end = nth-1 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
181 return |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
182 if len(layer.scene) > 0: |
274 | 183 # extend the last scene befor eit automatically |
262
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
184 last = nth |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
185 lastscene = None |
274 | 186 # Find the last scene before it |
262
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
187 for s in layer.scene: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
188 if s.end < nth and last < s.end: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
189 last = s.end |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
190 lastscene = s |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
191 if lastscene == None: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
192 node = etree.Element('{http://madbutterfly.sourceforge.net/DTD/madbutterfly.dtd}scene') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
193 node.set("id", self.newID()) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
194 newscene = Scene(node,nth,nth) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
195 else: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
196 lastscene.end = nth-1 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
197 newscene = Scene(deepcopy(lastscene.node),nth,nth) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
198 newscene.node.set("id",self.newID()) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
199 layer.scene.append(newscene) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
200 else: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
201 # This is the first scene in the layer |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
202 node = etree.Element('{http://madbutterfly.sourceforge.net/DTD/madbutterfly.dtd}scene') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
203 node.set("id", self.newID()) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
204 newscene = Scene(node,nth,nth) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
205 layer.scene.append(newscene) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
206 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
207 |
274 | 208 def deleteScene(self,layer,nth): |
262
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
209 for i in range(0,len(layer.scene)): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
210 s = layer.scene[i] |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
211 if nth == s.start: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
212 if i == 0: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
213 layer.scene.remove(s) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
214 else: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
215 if s.start == layer.scene[i-1].end+1: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
216 # If the start of the delete scene segment is the end of the last scene segmenet, convert all scenes in the deleted |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
217 # scene segmenet to the last one |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
218 layer.scene[i-1].end = s.end |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
219 layer.scene.remove(s) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
220 else: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
221 # Convert all scenes into empty cell |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
222 layer.scene.remove(s) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
223 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
224 return |
274 | 225 pass |
226 pass | |
262
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
227 |
274 | 228 |
229 def extendScene(self,layer,nth): | |
262
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
230 if layer == None: return |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
231 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
232 for i in range(0,len(layer.scene)-1): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
233 s = layer.scene[i] |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
234 if nth >= layer.scene[i].start and nth <= layer.scene[i].end: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
235 return |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
236 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
237 for i in range(0,len(layer.scene)-1): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
238 s = layer.scene[i] |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
239 if nth >= layer.scene[i].start and nth < layer.scene[i+1].start: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
240 layer.scene[i].end = nth |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
241 return |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
242 if len(layer.scene) > 0 and nth > layer.scene[len(layer.scene)-1].end: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
243 layer.scene[len(layer.scene)-1].end = nth |
274 | 244 |
262
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
245 def setCurrentScene(self,nth): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
246 self.current = nth |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
247 for layer in self.layer: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
248 for s in layer.scene: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
249 if nth >= s.start and nth <= s.end: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
250 s.node.set("style","") |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
251 #print "Put the elemenets out" |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
252 layer.nodes = [] |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
253 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
254 for o in s.node: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
255 #print " ",o.tag |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
256 layer.nodes.append(o) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
257 for o in s.node: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
258 s.node.remove(o) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
259 else: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
260 s.node.set("style","display:none") |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
261 def generate(self): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
262 newdoc = deepcopy(self.document) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
263 root = newdoc.getroot() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
264 has_scene = False |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
265 for n in root: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
266 if n.tag == '{http://www.w3.org/2000/svg}metadata': |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
267 for nn in n: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
268 if nn.tag == '{http://madbutterfly.sourceforge.net/DTD/madbutterfly.dtd}scenes': |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
269 nn.clear() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
270 nn.set("current", "%d" % self.current) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
271 scenes = [] |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
272 for l in self.layer: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
273 for s in l.scene: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
274 id = s.node.get("id") |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
275 scene = etree.Element('{http://madbutterfly.sourceforge.net/DTD/madbutterfly.dtd}scene') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
276 scene.set("ref", id) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
277 if s.start == s.end: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
278 scene.set("start", "%d" % s.start) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
279 else: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
280 scene.set("start", "%d" % s.start) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
281 scene.set("end", "%d" % s.end) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
282 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
283 scenes.append(scene) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
284 for s in scenes: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
285 nn.append(s) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
286 has_scene = True |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
287 if has_scene == False: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
288 scenes = etree.Element('{http://madbutterfly.sourceforge.net/DTD/madbutterfly.dtd}scenes') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
289 scenes.set("current","%d" % self.current) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
290 for l in self.layer: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
291 for s in l.scene: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
292 scene = etree.Element('{http://madbutterfly.sourceforge.net/DTD/madbutterfly.dtd}scene') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
293 scene.set("ref", s.node.get("id")) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
294 if s.start == s.end: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
295 scene.set("start", "%d" % s.start) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
296 else: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
297 scene.set("start", "%d" % s.start) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
298 scene.set("end", "%d" % s.end) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
299 scenes.append(scene) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
300 n.append(scenes) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
301 if n.tag == '{http://www.w3.org/2000/svg}g': |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
302 root.remove(n) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
303 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
304 for l in self.layer: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
305 # Duplicate all attribute of the layer |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
306 lnode = etree.Element("{http://www.w3.org/2000/svg}g") |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
307 for a,v in l.node.attrib.items(): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
308 lnode.set(a,v) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
309 for n in l.nodes: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
310 lnode.append(n) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
311 root.append(lnode) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
312 for s in l.scene: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
313 snode = etree.Element("{http://www.w3.org/2000/svg}g") |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
314 for a,v in s.node.attrib.items(): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
315 snode.set(a,v) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
316 for n in s.node: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
317 snode.append(deepcopy(n)) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
318 lnode.append(snode) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
319 self.document = newdoc |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
320 def newCell(self,file): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
321 img = gtk.Image() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
322 img.set_from_file(file) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
323 btn = gtk.EventBox() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
324 btn.add(img) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
325 btn.connect("button_press_event", self.cellSelect) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
326 btn.modify_bg(gtk.STATE_NORMAL, btn.get_colormap().alloc_color("gray")) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
327 return btn |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
328 def showGrid(self): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
329 max = 0 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
330 for layer in self.layer: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
331 for s in layer.scene: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
332 if s.end > max: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
333 max = s.end |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
334 max = 50 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
335 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
336 self.grid = gtk.Table(len(self.layer)+1, 50) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
337 self.scrollwin = gtk.ScrolledWindow() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
338 self.scrollwin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
339 self.scrollwin.add_with_viewport(self.grid) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
340 for i in range(1,max): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
341 self.grid.attach(gtk.Label('%d'% i), i,i+1,0,1,0,0,0,0) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
342 for i in range(1,len(self.layer)+1): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
343 l = self.layer[i-1] |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
344 self.grid.attach(gtk.Label(l.node.get('{http://www.inkscape.org/namespaces/inkscape}label')), 0, 1, i, i+1,0,0,10,0) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
345 for s in l.scene: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
346 btn = self.newCell('start.png') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
347 btn.nScene = s.start |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
348 btn.layer = l.node.get('id') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
349 btn.nLayer = i |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
350 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
351 self.grid.attach(btn, s.start, s.start+1, i, i+1,0,0,0,0) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
352 for j in range(s.start+1,s.end+1): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
353 btn = self.newCell('fill.png') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
354 self.grid.attach(btn, j, j+1, i , i+1,0,0,0,0) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
355 btn.modify_bg(gtk.STATE_NORMAL, btn.get_colormap().alloc_color("gray")) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
356 btn.nScene = j |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
357 btn.layer = l.node.get('id') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
358 btn.nLayer = i |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
359 if len(l.scene) == 0: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
360 start = 0 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
361 else: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
362 start = l.scene[len(l.scene)-1].end |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
363 for j in range(start,max): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
364 btn = self.newCell('empty.png') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
365 self.grid.attach(btn, j+1, j+2,i,i+1,0,0,0,0) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
366 btn.modify_bg(gtk.STATE_NORMAL, btn.get_colormap().alloc_color("gray")) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
367 btn.nScene = j+1 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
368 btn.layer = l.node.get('id') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
369 btn.nLayer = i |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
370 self.last_cell = None |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
371 def cellSelect(self, cell, data): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
372 if self.last_cell: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
373 self.last_cell.modify_bg(gtk.STATE_NORMAL, self.last_cell.get_colormap().alloc_color("gray")) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
374 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
375 self.last_cell = cell |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
376 cell.modify_bg(gtk.STATE_NORMAL, cell.get_colormap().alloc_color("green")) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
377 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
378 def doEditScene(self,w): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
379 self.setCurrentScene(self.last_cell.nScene) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
380 self.generate() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
381 gtk.main_quit() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
382 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
383 def doRemoveScene(self,w): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
384 self.removeKeyScene() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
385 self.grid.show_all() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
386 self.generate() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
387 def addButtons(self,hbox): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
388 btn = gtk.Button('Edit') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
389 btn.connect('clicked', self.doEditScene) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
390 hbox.pack_start(btn) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
391 btn = gtk.Button('Insert Key') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
392 btn.connect('clicked',self.doInsertKeyScene) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
393 hbox.pack_start(btn) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
394 btn=gtk.Button('Remove Key') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
395 btn.connect('clicked', self.doRemoveScene) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
396 hbox.pack_start(btn) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
397 btn=gtk.Button('Extend scene') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
398 btn.connect('clicked', self.doExtendScene) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
399 hbox.pack_start(btn) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
400 def onQuit(self, event): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
401 self.OK = False |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
402 gtk.main_quit() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
403 def onOK(self,event): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
404 self.OK = True |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
405 gtk.main_quit() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
406 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
407 def onConfirmDelete(self): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
408 if self.scenemap == None: |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
409 vbox = gtk.VBox() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
410 vbox.pack_start(gtk.Label('Convert the SVG into a MadButterfly SVG file. All current element will be delted')) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
411 hbox = gtk.HBox() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
412 self.button = gtk.Button('OK') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
413 hbox.pack_start(self.button) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
414 self.button.connect('clicked', self.onOK) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
415 self.button = gtk.Button('Cancel') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
416 hbox.pack_start(self.button) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
417 self.button.connect("clicked", self.onQuit) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
418 vbox.pack_start(hbox) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
419 self.window.add(vbox) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
420 self.window.show_all() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
421 gtk.main() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
422 self.window.remove(vbox) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
423 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
424 def start_server(self): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
425 root = MB() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
426 root.target = self |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
427 site = server.Site(root) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
428 reactor.listenTCP(8080, site) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
429 reactor.run() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
430 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
431 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
432 def effect(self): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
433 self.OK = False |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
434 self.parseScene() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
435 self.start_server() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
436 self.generate() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
437 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
438 class MB(soap.SOAPPublisher): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
439 """ |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
440 SOAP server for inkscape extension. |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
441 """ |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
442 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
443 def soap_PUBLISH(self): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
444 reactor.callLater(1,self.quit) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
445 return "OK" |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
446 def quit(self): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
447 reactor.stop() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
448 def soap_SCENE(self,n): |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
449 self.target.setCurrentScene(int(n)) |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
450 return "OK" |
274 | 451 def soap_INSERTKEY(self,layer,n): |
452 try: | |
453 layer = self.target.getLayer(layer) | |
454 self.target.insertKeyScene(layer,int(n)) | |
455 return "OK" | |
456 except: | |
457 return traceback.format_exc() | |
458 def soap_EXTENDSCENE(self,layer,n): | |
459 try: | |
460 layer = self.target.getLayer(layer) | |
461 self.target.extendScene(layer,int(n)) | |
462 return "OK" | |
463 except: | |
464 return traceback.format_exc() | |
465 def soap_DELETESCENE(self,layer,n): | |
466 try: | |
467 layer = self.target.getLayer(layer) | |
468 self.target.deleteScene(layer,int(n)) | |
469 return "OK" | |
470 except: | |
471 return traceback.format_exc() | |
472 def soap_GETDOC(self): | |
473 try: | |
474 self.target.generate() | |
475 return etree.tostring(self.target.document) | |
476 except: | |
477 return traceback.format_exc() | |
262
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
478 import os |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
479 os.chdir('/usr/share/inkscape/extensions') |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
480 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
481 A = MBScene() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
482 A.affect() |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
483 |
c39b24036a75
Add proxy daemon and extention for the firefox integration. We need to implement javascript web client to repalce the unite test program testsoap.py
wycc@wycc-desktop
parents:
diff
changeset
|
484 |