~ubuntu-branches/ubuntu/karmic/quodlibet/karmic

« back to all changes in this revision

Viewing changes to quodlibet/browsers/albums.py

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2009-07-27 14:02:54 UTC
  • mfrom: (2.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20090727140254-zxutnf2kkhtpubnp
Tags: 2.1-2ubuntu1
* Resync from debian unstable (LP: #401965)
* debian/patches:
  - fix-context-crashes.patch: Dropped. Included Upstream.
  - 60-popen2-deprecated.patch: Dropped. Included Upstream.
* debian/quodlibet-ext.install: Changed 'site-packages' to '*-packages'.
* debian/rules: Changed 'site-packages' to '*-packages'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
# it under the terms of the GNU General Public License version 2 as
6
6
# published by the Free Software Foundation
7
7
#
8
 
# $Id: albums.py 4330 2008-09-14 03:19:26Z piman $
 
8
# $Id: albums.py 7fb5bf908e15 2009/06/22 01:57:25 $
9
9
 
10
10
import os
11
11
 
575
575
        model, rows = selection.get_selected_rows()
576
576
        albums = [model[row][0] for row in rows]
577
577
        if None in albums:
578
 
            albums = [model[row][0] for row in model]
 
578
            albums = [row[0] for row in model]
579
579
        for album in albums:
580
 
            album.cover = type(album).cover
581
 
            album.finalize()
 
580
            if album:
 
581
                album.cover = type(album).cover
 
582
                album.finalize()
582
583
 
583
584
    def __get_selected_albums(self, selection):
584
585
        if not selection:
687
688
        for row in model:
688
689
            if row[0] is not None and row[0].key == album_key:
689
690
                view.scroll_to_cell(row.path[0], use_align=True, row_align=0.5)
 
691
                sel = view.get_selection()
 
692
                if row.path not in sel.get_selected_rows()[1]:
 
693
                    sel.unselect_all()
 
694
                    sel.select_path(row.path[0])
690
695
                break
691
696
 
692
697
    def __selection_changed(self, selection, sort):