|
|
|
@ -339,7 +339,7 @@ PlayList::PlayList( TQWidget* parent, TQObject *objParent, const char *name ) :
|
|
|
|
|
|
|
|
|
|
m_playlistDirectory = locateLocal("appdata", "playlists");
|
|
|
|
|
m_playlistDirectory.append("/");
|
|
|
|
|
KIO::NetAccess::mkdir(m_playlistDirectory, mainWidget);
|
|
|
|
|
TDEIO::NetAccess::mkdir(m_playlistDirectory, mainWidget);
|
|
|
|
|
kdDebug() << "PLAYLIST" << endl;
|
|
|
|
|
|
|
|
|
|
TQGridLayout* layout = new TQGridLayout( playlist, 4, 2, 3 );
|
|
|
|
@ -364,7 +364,7 @@ PlayList::PlayList( TQWidget* parent, TQObject *objParent, const char *name ) :
|
|
|
|
|
m_list->setColumnWidthMode(TRACK_COLUMN, TQListView::Manual);
|
|
|
|
|
m_list->setColumnWidthMode(LENGTH_COLUMN, TQListView::Manual);
|
|
|
|
|
m_list->setResizeMode(TQListView::NoColumn);
|
|
|
|
|
KConfig* config = kapp->config();
|
|
|
|
|
TDEConfig* config = kapp->config();
|
|
|
|
|
m_list->restoreLayout(config, "Playlist Layout");
|
|
|
|
|
m_list->setFullWidth(true);
|
|
|
|
|
m_list->setSorting(-1);
|
|
|
|
@ -590,7 +590,7 @@ TQWidget* PlayList::inputMainWidget()
|
|
|
|
|
return mainWidget;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PlayList::loadConfig(KConfig* config)
|
|
|
|
|
void PlayList::loadConfig(TDEConfig* config)
|
|
|
|
|
{
|
|
|
|
|
TQValueList<int> sl;
|
|
|
|
|
bool b;
|
|
|
|
@ -649,7 +649,7 @@ void PlayList::saveConfig()
|
|
|
|
|
saveConfig( TDEGlobal::config() );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PlayList::saveConfig(KConfig* config)
|
|
|
|
|
void PlayList::saveConfig(TDEConfig* config)
|
|
|
|
|
{
|
|
|
|
|
saveCurrentPlaylist();
|
|
|
|
|
config->setGroup("Playlist");
|
|
|
|
@ -1710,7 +1710,7 @@ void PlayList::setCover( TQString s1, TQString s2, bool forceFetch )
|
|
|
|
|
TQString path = locate("appdata", "nocover.png");
|
|
|
|
|
if ( !path )
|
|
|
|
|
path = locate("data", "kaffeine/nocover.png");
|
|
|
|
|
KIO::file_copy( KURL::fromPathOrURL( path ), KURL::fromPathOrURL( fname ), -1, true );
|
|
|
|
|
TDEIO::file_copy( KURL::fromPathOrURL( path ), KURL::fromPathOrURL( fname ), -1, true );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1862,8 +1862,8 @@ void PlayList::slotNewPlaylistName(const TQString& text)
|
|
|
|
|
}
|
|
|
|
|
TQString oldPl = m_playlistDirectory + m_playlistSelector->text(m_currentPlaylist) + ".kaffeine";
|
|
|
|
|
kdDebug() << "Playlist: removing file: " << oldPl << endl;
|
|
|
|
|
if (!KIO::NetAccess::del(oldPl, mainWidget))
|
|
|
|
|
kdError() << "Playlist: " << KIO::NetAccess::lastErrorString() << endl;
|
|
|
|
|
if (!TDEIO::NetAccess::del(oldPl, mainWidget))
|
|
|
|
|
kdError() << "Playlist: " << TDEIO::NetAccess::lastErrorString() << endl;
|
|
|
|
|
|
|
|
|
|
kdDebug() << "PlayList: Set playlist name to: " << text << endl;
|
|
|
|
|
m_playlistSelector->changeItem(text, m_currentPlaylist);
|
|
|
|
@ -1890,8 +1890,8 @@ void PlayList::removeCurrentPlaylist()
|
|
|
|
|
if (code == KMessageBox::Continue)
|
|
|
|
|
{
|
|
|
|
|
TQString pl = m_playlistDirectory + m_playlistSelector->text(m_currentPlaylist) + ".kaffeine";
|
|
|
|
|
if (!KIO::NetAccess::del(pl, mainWidget))
|
|
|
|
|
kdError() << "Playlist: " << KIO::NetAccess::lastErrorString() << endl;
|
|
|
|
|
if (!TDEIO::NetAccess::del(pl, mainWidget))
|
|
|
|
|
kdError() << "Playlist: " << TDEIO::NetAccess::lastErrorString() << endl;
|
|
|
|
|
|
|
|
|
|
m_playlistSelector->removeItem(m_currentPlaylist);
|
|
|
|
|
m_currentPlaylist = m_playlistSelector->currentItem();
|
|
|
|
|