Changeset 9906

Show
Ignore:
Timestamp:
07/11/08 08:29:40 (5 months ago)
Author:
asterix
Message:

detect sound player on first start as soon as gajim is started, not first time we open preferences window. Fixes #3566

Location:
trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/config.py

    r9886 r9906  
    285285                # sound player 
    286286                player = gajim.config.get('soundplayer') 
    287                 if player == '': # only on first time Gajim starts 
    288                         commands = ('aplay', 'play', 'esdplay', 'artsplay') 
    289                         for command in commands: 
    290                                 if helpers.is_in_path(command): 
    291                                         if command == 'aplay': 
    292                                                 command += ' -q' 
    293                                         gajim.config.set('soundplayer', command) 
    294                                         break 
    295287 
    296288                # sounds treeview 
  • trunk/src/gajim.py

    r9898 r9906  
    31233123                        except: 
    31243124                                dialogs.AspellDictError(lang) 
     3125 
     3126                if gajim.config.get('soundplayer') == '': 
     3127                        print 'first' 
     3128                        # only on first time Gajim starts 
     3129                        commands = ('aplay', 'play', 'esdplay', 'artsplay') 
     3130                        for command in commands: 
     3131                                if helpers.is_in_path(command): 
     3132                                        if command == 'aplay': 
     3133                                                command += ' -q' 
     3134                                        gajim.config.set('soundplayer', command) 
     3135                                        break 
     3136 
    31253137                self.last_ftwindow_update = 0 
    31263138