Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:wolfi323:branches:home:wolfi323
kde3-amarok
amarok-restore-playlist-filter.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File amarok-restore-playlist-filter.patch of Package kde3-amarok
--- amarok/src/playlistwindow.h.orig 2006-08-27 12:53:57.000000000 +0200 +++ amarok/src/playlistwindow.h 2006-08-27 12:54:14.000000000 +0200 @@ -49,6 +49,9 @@ void init(); void applySettings(); + //allows us to set filter text when restoring playlist filter + void setFilterText( const QString& filter ); + void createGUI(); //should be private but App::slowConfigToolbars requires it void recreateGUI(); --- amarok/src/playlistwindow.cpp.orig 2006-08-27 12:53:24.000000000 +0200 +++ amarok/src/playlistwindow.cpp 2006-08-27 12:53:52.000000000 +0200 @@ -470,6 +470,13 @@ } } +/** + * Set the filter text + */ +void PlaylistWindow::setFilterText( const QString& filter ) +{ + m_lineEdit->setText( filter ); +} /** * Reload the amarokui.rc xml file. --- amarok/src/playlist.cpp.orig 2006-08-27 12:52:36.000000000 +0200 +++ amarok/src/playlist.cpp 2006-08-27 12:52:58.000000000 +0200 @@ -3665,6 +3665,12 @@ updateNextPrev(); } +QString +Playlist::getPlaylistFilter() //SLOT +{ + return m_filter; +} + void Playlist::scoreChanged( const QString &path, float score ) { --- amarok/src/app.cpp.orig 2006-08-27 12:51:34.000000000 +0200 +++ amarok/src/app.cpp 2006-08-27 12:52:31.000000000 +0200 @@ -215,6 +215,9 @@ AmarokConfig::setResumeTime( engine->position() ); } else AmarokConfig::setResumeTrack( QString::null ); //otherwise it'll play previous resume next time! + + // save playlist filter + AmarokConfig::setResumePlaylistFilter( Playlist::instance()->getPlaylistFilter() ); } EngineController::instance()->endSession(); //records final statistics @@ -821,6 +824,14 @@ //restore session as long as the user didn't specify media to play etc. //do this after applySettings() so OSD displays correctly EngineController::instance()->restoreSession(); + + //restore saved playlist filter + //TODO: Pop-up message about filters being restored, or expand clicklinedit.cpp + // to have a red or yellow background when restored (until edited). + QString m_playlistFilter = AmarokConfig::resumePlaylistFilter(); + Playlist::instance()->setFilter( m_playlistFilter ); + m_pPlaylistWindow->setFilterText( m_playlistFilter ); + Playlist::instance()->showCurrentTrack(); } CollectionDB *collDB = CollectionDB::instance(); --- amarok/src/amarokcore/amarok.kcfg.orig 2006-08-27 12:51:08.000000000 +0200 +++ amarok/src/amarokcore/amarok.kcfg 2006-08-27 12:51:27.000000000 +0200 @@ -475,6 +475,10 @@ <label>Time to resume at, in milliseconds</label> <whatsthis>Internal: Playback position in the track to resume on startup.</whatsthis> </entry> + <entry key="Resume Playlist Filter" type="String"> + <label>Playlist filter to restore upon startup</label> + <whatsthis>Internal: The playlist filter string to restore on startup.</whatsthis> + </entry> </group> <group name="Collection"> --- amarok/src/playlist.h.orig 2006-08-27 12:53:02.000000000 +0200 +++ amarok/src/playlist.h 2006-08-27 12:53:12.000000000 +0200 @@ -155,6 +155,8 @@ void lock(); void unlock(); + QString getPlaylistFilter(); + //reimplemented to save columns by name instead of index, to be more resilient to reorderings and such void saveLayout(KConfig *config, const QString &group) const; void restoreLayout(KConfig *config, const QString &group);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor