mirror of
				https://github.com/arcan1s/awesome-widgets.git
				synced 2025-10-30 04:43:42 +00:00 
			
		
		
		
	fix bug with reverse()
This commit is contained in:
		| @ -344,7 +344,9 @@ class pyTextWidget(plasmascript.Applet): | |||||||
|     def hddText(self): |     def hddText(self): | ||||||
|         """function to set hdd text""" |         """function to set hdd text""" | ||||||
|         line = self.ptm['vars']['formats']['hdd'] |         line = self.ptm['vars']['formats']['hdd'] | ||||||
|         for i in range(len(self.ptm['names']['hdd'])).reverse(): |         devices = range(len(self.ptm['names']['hdd'])) | ||||||
|  |         devices.reverse() | ||||||
|  |         for i in devices: | ||||||
|             if (line.split('$hdd' + str(i))[0] != line): |             if (line.split('$hdd' + str(i))[0] != line): | ||||||
|                 line = line.split('$hdd' + str(i))[0] + str(self.ptm['values']['hdd'][self.ptm['names']['hdd'][i]]) + line.split('$hdd' + str(i))[1] |                 line = line.split('$hdd' + str(i))[0] + str(self.ptm['values']['hdd'][self.ptm['names']['hdd'][i]]) + line.split('$hdd' + str(i))[1] | ||||||
|         text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1] |         text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1] | ||||||
| @ -354,7 +356,9 @@ class pyTextWidget(plasmascript.Applet): | |||||||
|     def hddtempText(self): |     def hddtempText(self): | ||||||
|         """function to set hddtemp text""" |         """function to set hddtemp text""" | ||||||
|         line = self.ptm['vars']['formats']['hddtemp'] |         line = self.ptm['vars']['formats']['hddtemp'] | ||||||
|         for i in range(len(self.ptm['names']['hddtemp'])).reverse(): |         devices = range(len(self.ptm['names']['hddtemp'])) | ||||||
|  |         devices.reverse() | ||||||
|  |         for i in devices: | ||||||
|             if (line.split('$hddtemp' + str(i))[0] != line): |             if (line.split('$hddtemp' + str(i))[0] != line): | ||||||
|                 line = line.split('$hddtemp' + str(i))[0] + self.ptm['values']['hddtemp'][self.ptm['names']['hddtemp'][i]] + line.split('$hddtemp' + str(i))[1] |                 line = line.split('$hddtemp' + str(i))[0] + self.ptm['values']['hddtemp'][self.ptm['names']['hddtemp'][i]] + line.split('$hddtemp' + str(i))[1] | ||||||
|         text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1] |         text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1] | ||||||
| @ -419,7 +423,9 @@ class pyTextWidget(plasmascript.Applet): | |||||||
|     def tempText(self): |     def tempText(self): | ||||||
|         """function to set temperature text""" |         """function to set temperature text""" | ||||||
|         line = self.ptm['vars']['formats']['temp'] |         line = self.ptm['vars']['formats']['temp'] | ||||||
|         for i in range(len(self.ptm['names']['temp'])).reverse(): |         devices = range(len(self.ptm['names']['temp'])) | ||||||
|  |         devices.reverse() | ||||||
|  |         for i in devices: | ||||||
|             if (line.split('$temp' + str(i))[0] != line): |             if (line.split('$temp' + str(i))[0] != line): | ||||||
|                 line = line.split('$temp' + str(i))[0] + self.ptm['values']['temp'][self.ptm['names']['temp'][i]] + line.split('$temp' + str(i))[1] |                 line = line.split('$temp' + str(i))[0] + self.ptm['values']['temp'][self.ptm['names']['temp'][i]] + line.split('$temp' + str(i))[1] | ||||||
|         text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1] |         text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1] | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user