mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	Fixed PR#106: winfo_visualsavailable() with the includeids=1 option
didn't properly handle the hex numbers returned.
This commit is contained in:
		
							parent
							
								
									dcb8583c18
								
							
						
					
					
						commit
						f8d8e07601
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -423,9 +423,11 @@ class Misc:
 | 
				
			||||||
		data = self.tk.split(
 | 
							data = self.tk.split(
 | 
				
			||||||
			self.tk.call('winfo', 'visualsavailable', self._w,
 | 
								self.tk.call('winfo', 'visualsavailable', self._w,
 | 
				
			||||||
				     includeids and 'includeids' or None))
 | 
									     includeids and 'includeids' or None))
 | 
				
			||||||
		def parseitem(x, self=self):
 | 
							return map(self.__winfo_parseitem, data)
 | 
				
			||||||
			return x[:1] + tuple(map(getint, x[1:]))
 | 
						def __winfo_parseitem(self, t):
 | 
				
			||||||
		return map(parseitem, data)
 | 
							return t[:1] + tuple(map(self.__winfo_getint, t[1:]))
 | 
				
			||||||
 | 
						def __winfo_getint(self, x):
 | 
				
			||||||
 | 
							return _string.atoi(x, 0)
 | 
				
			||||||
	def winfo_vrootheight(self):
 | 
						def winfo_vrootheight(self):
 | 
				
			||||||
		return getint(
 | 
							return getint(
 | 
				
			||||||
			self.tk.call('winfo', 'vrootheight', self._w))
 | 
								self.tk.call('winfo', 'vrootheight', self._w))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue