Commits

Anonymous committed 83279d2

Now we can launch the programs via Popen - we just use the same names as for the icons (TODO: change).

Comments (0)

Files changed (1)

 import sys
 # for circles
 from math import sin, cos, pi
+# For starting programs
+from subprocess import Popen
 
 ### Constants
 
 	hit = False
 	for i in self.circle: 
 	    if self.isInside(event.pos(), i): 
-		print i.name
-		hit = True
-		if i.name == "center": 
-		    for label in self.circle: 
-			label.destroy()
-		    self.close()
+		if not i.name == "center": 
+		    # start the program
+		    Popen(i.name)
+		# TODO: Add folders which change the circle 
+		# but don't destroy everything.
+		for label in self.circle: 
+		    label.destroy()
+		self.close()
+		    
+		    
+		    
 		    
     def isInside(self, point, thing):
 	"""Check, if the point is inside the thing."""