Philipp Hörist pushed to branch master at gajim / gajim

Commits:

3 changed files:

Changes:

  • src/common/helpers.py
    ... ... @@ -746,13 +746,13 @@ def play_sound_file(path_to_soundfile):
    746 746
         path_to_soundfile = check_soundfile_path(path_to_soundfile)
    
    747 747
         if path_to_soundfile is None:
    
    748 748
             return
    
    749
    -    elif os.name == 'nt' and HAS_WINSOUND:
    
    749
    +    elif sys.platform == 'win32' and HAS_WINSOUND:
    
    750 750
             try:
    
    751 751
                 winsound.PlaySound(path_to_soundfile,
    
    752 752
                         winsound.SND_FILENAME|winsound.SND_ASYNC)
    
    753 753
             except Exception:
    
    754 754
                 log.exception('Sound Playback Error')
    
    755
    -    elif os.name == 'posix':
    
    755
    +    elif sys.platform == 'linux':
    
    756 756
             if gajim.config.get('soundplayer') == '':
    
    757 757
                 def _oss_play():
    
    758 758
                     sndfile = wave.open(path_to_soundfile, 'rb')
    

  • src/config.py
    ... ... @@ -3254,7 +3254,9 @@ class ManageBookmarksWindow:
    3254 3254
             self.xml.connect_signals(self)
    
    3255 3255
             self.window.show_all()
    
    3256 3256
             # select root iter
    
    3257
    -        self.selection.select_iter(self.treestore.get_iter_first())
    
    3257
    +        first_iter = self.treestore.get_iter_first()
    
    3258
    +        if first_iter:
    
    3259
    +            self.selection.select_iter(first_iter)
    
    3258 3260
     
    
    3259 3261
         def on_key_press_event(self, widget, event):
    
    3260 3262
             if event.keyval == Gdk.KEY_Escape:
    

  • src/roster_window.py
    ... ... @@ -1558,6 +1558,8 @@ class RosterWindow:
    1558 1558
             """
    
    1559 1559
             if not self.tree.get_model():
    
    1560 1560
                 return
    
    1561
    +        if account not in gajim.connections:
    
    1562
    +            return
    
    1561 1563
             delimiter = gajim.connections[account].nested_group_delimiter
    
    1562 1564
             group_splited = group.split(delimiter)
    
    1563 1565
             i = 1