~ubuntu-branches/ubuntu/karmic/sonata/karmic

« back to all changes in this revision

Viewing changes to sonata/main.py

  • Committer: Bazaar Package Importer
  • Author(s): Michal Čihař
  • Date: 2009-09-25 14:00:02 UTC
  • mfrom: (4.2.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090925140002-579l5kikl1ik48p6
Tags: 1.6.2.1-1
* New upstream version.
  - Fixes lyricswiki support (Closes: #542366).
  - No need for ZSI as Sonata now does html scraping.
* Do not depend unconditionally on elementtree, newer python is enough 
  (LP: #377706).
* Bump standards to 3.8.3.
* Simplify debian/rules by using new dh support for distutils.

Show diffs side-by-side

added added

removed removed

Lines of Context:
467
467
                self.playlists_selection = self.playlists.get_selection()
468
468
 
469
469
                playlistsactions = [
470
 
                        ('savemenu', None, _('_New...'), '<Ctrl><Shift>s', None, self.playlists.on_playlist_save),
 
470
                        ('savemenu', None, _('_New Playlist...'), '<Ctrl><Shift>s', None, self.playlists.on_playlist_save),
471
471
                        ('renamemenu', None, _('_Rename...'), None, None, self.playlists.on_playlist_rename),
472
472
                        ]
473
473
 
1989
1989
        def on_window_lost_focus(self, _widget, _event):
1990
1990
                self.volume_hide()
1991
1991
 
1992
 
        def on_window_configure(self, _widget, _event):
1993
 
                width, height = self.window.get_size()
 
1992
        def on_window_configure(self, window, _event):
 
1993
                # When withdrawing an app, extra configure events (with wrong coords)
 
1994
                # are fired (at least on Openbox). This prevents a user from moving
 
1995
                # the window, withdrawing it, then unwithdrawing it and finding it in
 
1996
                # an older position
 
1997
                if not window.props.visible:
 
1998
                        return
 
1999
                
 
2000
                width, height = window.get_size()
1994
2001
                if self.config.expanded: self.config.w, self.config.h = width, height
1995
2002
                else: self.config.w = width
1996
 
                self.config.x, self.config.y = self.window.get_position()
 
2003
                self.config.x, self.config.y = window.get_position()
1997
2004
                self.expander_ellipse_workaround()
1998
2005
        
1999
2006
        def on_notebook_resize(self, _widget, _event):
2315
2322
                        retsongs = []
2316
2323
                        for song in songs:
2317
2324
                                if unicode(mpdh.get(song, 'album')).lower() == unicode(library.library_get_data(datalist[0], 'album')).lower() \
2318
 
                                and mpdh.get(song, 'date', '') == library.library_get_data(datalist[0], 'year'):
 
2325
                                and mpdh.get(song, 'date', None) == library.library_get_data(datalist[0], 'year'):
2319
2326
                                        retsongs.append(song)
2320
2327
                        
2321
2328
                        artist = library.library_get_data(datalist[0], 'artist')
3030
3037
 
3031
3038
        def prefs_stylized_toggled(self, button):
3032
3039
                self.config.covers_type = button.get_active()
 
3040
                self.library.library_browse(root=self.config.wd)
3033
3041
                self.artwork.artwork_update(True)
3034
3042
 
3035
3043
        def prefs_lyrics_toggled(self, button, lyrics_hbox):