gnome-schedule r1116 - in branches/x-output-support: . src



Author: gauteh
Date: Fri Dec 12 20:10:52 2008
New Revision: 1116
URL: http://svn.gnome.org/viewvc/gnome-schedule?rev=1116&view=rev

Log:
x on crontab working

Modified:
   branches/x-output-support/ChangeLog
   branches/x-output-support/src/crontab.py
   branches/x-output-support/src/xwrapper.py

Modified: branches/x-output-support/src/crontab.py
==============================================================================
--- branches/x-output-support/src/crontab.py	(original)
+++ branches/x-output-support/src/crontab.py	Fri Dec 12 20:10:52 2008
@@ -237,9 +237,6 @@
 		
 		easystring = self.__easy__ (minute, hour, day, month, weekday)
 
-		if comment:
-			record = record + " #" + comment
-		
 		if job_id == False:
 			## Create a job_id for an existing task
 			f = os.path.join (self.crontabdata, "last_id")
@@ -604,6 +601,7 @@
 			job_id = int (comment[i + 7:].rstrip ())
 		else:
 			job_id = False
+
 		
 		# Retrive title and icon data
 		if nofile == False:
@@ -669,15 +667,15 @@
 			desc = d[5:d.find ("\n")]
 			d = d[d.find ("\n") + 1:]
 			
-			if ver >= 2:
-				nooutput_str = d[9:d.find ("\n")]
-				if (nooutput_str == "0") or (nooutput_str == "1"):
-					output = int (nooutput_str)
-					d = d[d.find ("\n") + 1:]
-				else:
-					output = 0
-			else:
-				output = 0
+			if (ver >= 2) and (ver < 4):
+				output_str = d[9:d.find ("\n")]
+				output = int (output_str)
+				d = d[d.find("\n")]
+
+			if ver >= 4:
+				output_str = d[7:d.find ("\n")]
+				output = int (output_str)
+				d = d[d.find ("\n") + 1:]
 				
 			if ver >= 4:
 				display = d[8:d.find ("\n")]

Modified: branches/x-output-support/src/xwrapper.py
==============================================================================
--- branches/x-output-support/src/xwrapper.py	(original)
+++ branches/x-output-support/src/xwrapper.py	Fri Dec 12 20:10:52 2008
@@ -100,7 +100,8 @@
 		sys.exit ()
 		
 	#TODO: Check for DISPLAY and user
-	ex = "export DISPLAY=" + display + " " + command
+	ex = "/bin/sh -c \"DISPLAY=" + display + " " + command + "\""
+	print ex
 	os.system (ex)
 	sys.exit ()
 	



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]