introduce play_sound_file function in helpers
This commit is contained in:
		
							parent
							
								
									335870646d
								
							
						
					
					
						commit
						a54ee0229d
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -418,6 +418,9 @@ def play_sound(event):
 | 
			
		|||
	if not gajim.config.get('sounds_on'):
 | 
			
		||||
		return
 | 
			
		||||
	path_to_soundfile = gajim.config.get_per('soundevents', event, 'path')
 | 
			
		||||
	play_sound_file(path_to_soundfile)
 | 
			
		||||
 | 
			
		||||
def play_sound_file(path_to_soundfile):
 | 
			
		||||
	if path_to_soundfile == 'beep':
 | 
			
		||||
		print '\a' # make a speaker beep
 | 
			
		||||
		return
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue