Update superkaramba for recent TDEHotNewStuff changes

pull/1/head
Timothy Pearson 10 years ago
parent 36230c0b5d
commit 9526b0bc2e

@ -40,7 +40,7 @@
#include "sknewstuff.h" #include "sknewstuff.h"
SKNewStuff::SKNewStuff( ThemesDlg *dlg ) : SKNewStuff::SKNewStuff( ThemesDlg *dlg ) :
KNewStuff( "superkaramba/themes", dlg ), TDENewStuff( "superkaramba/themes", dlg ),
mDlg( dlg ) mDlg( dlg )
{ {
} }

@ -29,13 +29,13 @@
#endif #endif
#ifdef HAVE_KNEWSTUFF #ifdef HAVE_KNEWSTUFF
#include "knewstuff/knewstuff.h" #include "tdenewstuff/knewstuff.h"
#include "knewstuff/entry.h" #include "tdenewstuff/entry.h"
class ThemesDlg; class ThemesDlg;
class KArchiveDirectory; class KArchiveDirectory;
class SKNewStuff : public KNewStuff class SKNewStuff : public TDENewStuff
{ {
public: public:
SKNewStuff( ThemesDlg * ); SKNewStuff( ThemesDlg * );

@ -218,12 +218,12 @@ void ThemesDlg::getNewStuff()
{ {
#ifdef HAVE_KNEWSTUFF #ifdef HAVE_KNEWSTUFF
TDEConfig* config = TDEGlobal::config(); TDEConfig* config = TDEGlobal::config();
config->setGroup("KNewStuff"); config->setGroup("TDENewStuff");
config->writePathEntry("ProvidersUrl", config->writePathEntry("ProvidersUrl",
TQString::fromLatin1("http://download.kde.org/khotnewstuff/karamba-providers.xml")); TQString::fromLatin1("https://www.trinitydesktop.org/ocs/karamba-providers.xml"));
config->sync(); config->sync();
m_newStuffStatus = config->entryMap("KNewStuffStatus").keys(); m_newStuffStatus = config->entryMap("TDENewStuffStatus").keys();
//This check is b/c KNewStuff will download, throw an error, //This check is b/c KNewStuff will download, throw an error,
//and still have the entry in the config that it was successful //and still have the entry in the config that it was successful
configSanityCheck(); configSanityCheck();
@ -302,7 +302,7 @@ void ThemesDlg::writeNewStuffConfig(const TQString &file)
{ {
#ifdef HAVE_KNEWSTUFF #ifdef HAVE_KNEWSTUFF
TDEConfig* config = TDEGlobal::config(); TDEConfig* config = TDEGlobal::config();
TQStringList keys = config->entryMap("KNewStuffStatus").keys(); TQStringList keys = config->entryMap("TDENewStuffStatus").keys();
for(TQStringList::Iterator it = m_newStuffStatus.begin(); for(TQStringList::Iterator it = m_newStuffStatus.begin();
it != m_newStuffStatus.end(); ++it) it != m_newStuffStatus.end(); ++it)
@ -311,7 +311,7 @@ void ThemesDlg::writeNewStuffConfig(const TQString &file)
} }
if(!keys.isEmpty()) if(!keys.isEmpty())
{ {
config->setGroup("KNewStuffNames"); config->setGroup("TDENewStuffNames");
config->writeEntry(file, keys[0]); config->writeEntry(file, keys[0]);
config->sync(); config->sync();
} }
@ -322,8 +322,8 @@ void ThemesDlg::configSanityCheck()
{ {
#ifdef HAVE_KNEWSTUFF #ifdef HAVE_KNEWSTUFF
TDEConfig* config = TDEGlobal::config(); TDEConfig* config = TDEGlobal::config();
TQStringList statusKeys = config->entryMap("KNewStuffStatus").keys(); TQStringList statusKeys = config->entryMap("TDENewStuffStatus").keys();
TQStringList nameKeys = config->entryMap("KNewStuffNames").keys(); TQStringList nameKeys = config->entryMap("TDENewStuffNames").keys();
TQStringList removeList; TQStringList removeList;
for(TQStringList::Iterator it = statusKeys.begin(); for(TQStringList::Iterator it = statusKeys.begin();
@ -331,7 +331,7 @@ void ThemesDlg::configSanityCheck()
{ {
TQString keyName(*it); TQString keyName(*it);
bool removeKey = true; bool removeKey = true;
config->setGroup("KNewStuffNames"); config->setGroup("TDENewStuffNames");
for(TQStringList::Iterator it2 = nameKeys.begin(); for(TQStringList::Iterator it2 = nameKeys.begin();
it2 != nameKeys.end(); ++it2) it2 != nameKeys.end(); ++it2)
{ {
@ -345,7 +345,7 @@ void ThemesDlg::configSanityCheck()
if( removeKey ) if( removeKey )
{ {
kdDebug() << "sanityCheck() deleting entry " << keyName << endl; kdDebug() << "sanityCheck() deleting entry " << keyName << endl;
config->setGroup("KNewStuffStatus"); config->setGroup("TDENewStuffStatus");
config->deleteEntry( keyName ); config->deleteEntry( keyName );
} }
} }
@ -428,7 +428,7 @@ bool ThemesDlg::isDownloaded( const TQString& path )
{ {
kdDebug() << "isDownloaded path: " << path << endl; kdDebug() << "isDownloaded path: " << path << endl;
TDEConfig* config = TDEGlobal::config(); TDEConfig* config = TDEGlobal::config();
config->setGroup("KNewStuffNames"); config->setGroup("TDENewStuffNames");
return !config->readEntry(path).isEmpty(); return !config->readEntry(path).isEmpty();
} }
@ -479,14 +479,14 @@ void ThemesDlg::uninstall()
#ifdef HAVE_KNEWSTUFF #ifdef HAVE_KNEWSTUFF
// Remove theme from KNewStuffStatus // Remove theme from KNewStuffStatus
TDEConfig* config = TDEGlobal::config(); TDEConfig* config = TDEGlobal::config();
config->setGroup("KNewStuffNames"); config->setGroup("TDENewStuffNames");
TQString name = config->readEntry(tempPath); TQString name = config->readEntry(tempPath);
if(!name.isEmpty()) if(!name.isEmpty())
{ {
kdDebug() << "removing " << tempPath << " under KNewStuffNames from superkarambarc" kdDebug() << "removing " << tempPath << " under KNewStuffNames from superkarambarc"
<< endl; << endl;
kapp->config()->deleteEntry(tempPath); kapp->config()->deleteEntry(tempPath);
config->setGroup("KNewStuffStatus"); config->setGroup("TDENewStuffStatus");
kdDebug() << "removing " << name << " under KNewStuffStatus from superkarambarc" kdDebug() << "removing " << name << " under KNewStuffStatus from superkarambarc"
<< endl; << endl;
kapp->config()->deleteEntry(name); kapp->config()->deleteEntry(name);
@ -509,13 +509,13 @@ void ThemesDlg::uninstall()
#ifdef HAVE_KNEWSTUFF #ifdef HAVE_KNEWSTUFF
// Remove theme from KNewStuffStatus // Remove theme from KNewStuffStatus
TDEConfig* config = TDEGlobal::config(); TDEConfig* config = TDEGlobal::config();
config->setGroup("KNewStuffNames"); config->setGroup("TDENewStuffNames");
TQString name = config->readEntry(theme.path()); TQString name = config->readEntry(theme.path());
if(!name.isEmpty()) if(!name.isEmpty())
{ {
kdDebug() << "removing " << theme.path() << " from superkarambarc" << endl; kdDebug() << "removing " << theme.path() << " from superkarambarc" << endl;
kapp->config()->deleteEntry(theme.path()); kapp->config()->deleteEntry(theme.path());
config->setGroup("KNewStuffStatus"); config->setGroup("TDENewStuffStatus");
kdDebug() << "removing " << name << " from superkarambarc" << endl; kdDebug() << "removing " << name << " from superkarambarc" << endl;
kapp->config()->deleteEntry(name); kapp->config()->deleteEntry(name);
kapp->config()->sync(); kapp->config()->sync();

Loading…
Cancel
Save