|
|
|
@ -105,7 +105,7 @@ void SkinSettings::slotPopulate()
|
|
|
|
|
for (TQStringList::Iterator it = skins_dirs.begin(); it != skins_dirs.end(); ++it)
|
|
|
|
|
{
|
|
|
|
|
TQUrl titles_url = locate("appdata", (*it) + "/title.skin");
|
|
|
|
|
KConfig titles_config(titles_url.path());
|
|
|
|
|
TDEConfig titles_config(titles_url.path());
|
|
|
|
|
titles_config.setGroup("Description");
|
|
|
|
|
|
|
|
|
|
TQString titles_name(titles_config.readEntry("Skin", ""));
|
|
|
|
@ -113,7 +113,7 @@ void SkinSettings::slotPopulate()
|
|
|
|
|
TQString titles_icon_name(titles_config.readEntry("Icon", ""));
|
|
|
|
|
|
|
|
|
|
TQUrl tabs_url = locate("appdata", (*it) + "/tabs.skin");
|
|
|
|
|
KConfig tabs_config(tabs_url.path());
|
|
|
|
|
TDEConfig tabs_config(tabs_url.path());
|
|
|
|
|
tabs_config.setGroup("Description");
|
|
|
|
|
|
|
|
|
|
TQString tabs_name(tabs_config.readEntry("Skin", ""));
|
|
|
|
@ -179,10 +179,10 @@ void SkinSettings::slotInstallSkin()
|
|
|
|
|
|
|
|
|
|
if (skin_url.isEmpty()) return;
|
|
|
|
|
|
|
|
|
|
if (!KIO::NetAccess::download(skin_url, install_skin_file, NULL))
|
|
|
|
|
if (!TDEIO::NetAccess::download(skin_url, install_skin_file, NULL))
|
|
|
|
|
{
|
|
|
|
|
KMessageBox::error(0L,
|
|
|
|
|
KIO::NetAccess::lastErrorString(),
|
|
|
|
|
TDEIO::NetAccess::lastErrorString(),
|
|
|
|
|
i18n("Failed to Download Skin"),
|
|
|
|
|
KMessageBox::Notify
|
|
|
|
|
);
|
|
|
|
@ -194,29 +194,29 @@ void SkinSettings::slotInstallSkin()
|
|
|
|
|
|
|
|
|
|
if (!skin_dir.exists())
|
|
|
|
|
{
|
|
|
|
|
KIO::ListJob* job = KIO::listRecursive("tar:" + install_skin_file, false, false);
|
|
|
|
|
TDEIO::ListJob* job = TDEIO::listRecursive("tar:" + install_skin_file, false, false);
|
|
|
|
|
|
|
|
|
|
connect(job, TQT_SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList&)),
|
|
|
|
|
this, TQT_SLOT(slotListSkinArchive(KIO::Job*, const KIO::UDSEntryList&)));
|
|
|
|
|
connect(job, TQT_SIGNAL(entries(TDEIO::Job*, const TDEIO::UDSEntryList&)),
|
|
|
|
|
this, TQT_SLOT(slotListSkinArchive(TDEIO::Job*, const TDEIO::UDSEntryList&)));
|
|
|
|
|
|
|
|
|
|
connect(job, TQT_SIGNAL(result(KIO::Job*)),
|
|
|
|
|
this, TQT_SLOT(slotValidateSkinArchive(KIO::Job*)));
|
|
|
|
|
connect(job, TQT_SIGNAL(result(TDEIO::Job*)),
|
|
|
|
|
this, TQT_SLOT(slotValidateSkinArchive(TDEIO::Job*)));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
failInstall(i18n("The installer was given a directory, not a file."));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SkinSettings::slotListSkinArchive(KIO::Job* /* job */, const KIO::UDSEntryList& list)
|
|
|
|
|
void SkinSettings::slotListSkinArchive(TDEIO::Job* /* job */, const TDEIO::UDSEntryList& list)
|
|
|
|
|
{
|
|
|
|
|
KIO::UDSEntryList::const_iterator it = list.begin();
|
|
|
|
|
TDEIO::UDSEntryList::const_iterator it = list.begin();
|
|
|
|
|
|
|
|
|
|
for(; it != list.end(); ++it)
|
|
|
|
|
{
|
|
|
|
|
KIO::UDSEntry::const_iterator itUSDEntry = (*it).begin();
|
|
|
|
|
TDEIO::UDSEntry::const_iterator itUSDEntry = (*it).begin();
|
|
|
|
|
|
|
|
|
|
for (; itUSDEntry != (*it).end(); ++itUSDEntry )
|
|
|
|
|
{
|
|
|
|
|
if((*itUSDEntry).m_uds == KIO::UDS_NAME)
|
|
|
|
|
if((*itUSDEntry).m_uds == TDEIO::UDS_NAME)
|
|
|
|
|
{
|
|
|
|
|
install_skin_file_list.append((*itUSDEntry).m_str);
|
|
|
|
|
}
|
|
|
|
@ -224,7 +224,7 @@ void SkinSettings::slotListSkinArchive(KIO::Job* /* job */, const KIO::UDSEntryL
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SkinSettings::slotValidateSkinArchive(KIO::Job* job)
|
|
|
|
|
void SkinSettings::slotValidateSkinArchive(TDEIO::Job* job)
|
|
|
|
|
{
|
|
|
|
|
if (!job->error())
|
|
|
|
|
{
|
|
|
|
@ -276,8 +276,8 @@ void SkinSettings::checkForExistingSkin()
|
|
|
|
|
if (remove == KMessageBox::Continue)
|
|
|
|
|
{
|
|
|
|
|
unlink(TQFile::encodeName(item->dir()));
|
|
|
|
|
KIO::DeleteJob* job = KIO::del(KURL(item->dir()), false, false);
|
|
|
|
|
connect(job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotInstallSkinArchive(KIO::Job*)));
|
|
|
|
|
TDEIO::DeleteJob* job = TDEIO::del(KURL(item->dir()), false, false);
|
|
|
|
|
connect(job, TQT_SIGNAL(result(TDEIO::Job*)), this, TQT_SLOT(slotInstallSkinArchive(TDEIO::Job*)));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
cleanupAfterInstall();
|
|
|
|
@ -287,7 +287,7 @@ void SkinSettings::checkForExistingSkin()
|
|
|
|
|
slotInstallSkinArchive();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SkinSettings::slotInstallSkinArchive(KIO::Job* delete_job)
|
|
|
|
|
void SkinSettings::slotInstallSkinArchive(TDEIO::Job* delete_job)
|
|
|
|
|
{
|
|
|
|
|
if (delete_job && delete_job->error())
|
|
|
|
|
{
|
|
|
|
@ -331,7 +331,7 @@ void SkinSettings::failInstall(const TQString& error)
|
|
|
|
|
|
|
|
|
|
void SkinSettings::cleanupAfterInstall()
|
|
|
|
|
{
|
|
|
|
|
KIO::NetAccess::removeTempFile(install_skin_file);
|
|
|
|
|
TDEIO::NetAccess::removeTempFile(install_skin_file);
|
|
|
|
|
install_skin_file = TQString();
|
|
|
|
|
install_skin_name = TQString();
|
|
|
|
|
install_skin_file_list.clear();
|
|
|
|
@ -354,8 +354,8 @@ void SkinSettings::slotRemoveSkin()
|
|
|
|
|
if (remove == KMessageBox::Continue)
|
|
|
|
|
{
|
|
|
|
|
unlink(TQFile::encodeName(selected_item->dir()));
|
|
|
|
|
KIO::DeleteJob* job = KIO::del(KURL(selected_item->dir()), false, false);
|
|
|
|
|
connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotPopulate()));
|
|
|
|
|
TDEIO::DeleteJob* job = TDEIO::del(KURL(selected_item->dir()), false, false);
|
|
|
|
|
connect(job, TQT_SIGNAL(result(TDEIO::Job *)), this, TQT_SLOT(slotPopulate()));
|
|
|
|
|
|
|
|
|
|
if (selected_item->name() == Settings::skin())
|
|
|
|
|
{
|
|
|
|
|