From 6ed1cdba966f94473bfd2231de721268e95863b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 30 Sep 2014 03:41:49 +0200 Subject: [PATCH] Update for recent TDENewStuff changes --- .../config/appearance/appearanceconfig.cpp | 39 ++++++++----------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/kopete/kopete/config/appearance/appearanceconfig.cpp b/kopete/kopete/config/appearance/appearanceconfig.cpp index 150c1be4..6cfd55ca 100644 --- a/kopete/kopete/config/appearance/appearanceconfig.cpp +++ b/kopete/kopete/config/appearance/appearanceconfig.cpp @@ -43,7 +43,7 @@ #include #include #include -#include // for KNewStuff emoticon fetching +#include // for TDENewStuff emoticon fetching #include #include #include @@ -55,17 +55,17 @@ #include #include #include -#include // KNewStuff +#include // TDENewStuff #include #include #include #include -#include // knewstuff emoticon and chatwindow fetching -#include // " -#include // " -#include // " -#include // " +#include //TDEnewstuff emoticon and chatwindow fetching +#include // " +#include // " +#include // " +#include // " // For Kopete Chat Window Style configuration and preview. #include @@ -128,11 +128,11 @@ public: Kopete::ChatSession *previewChatSession; }; -class KopeteStyleNewStuff : public KNewStuff +class KopeteStyleNewStuff : public TDENewStuff { public: KopeteStyleNewStuff(const TQString &type, TQWidget *parentWidget = 0) - : KNewStuff( type, parentWidget) + : TDENewStuff( type, parentWidget) {} bool createUploadFile(const TQString &) @@ -688,15 +688,15 @@ void AppearanceConfig::slotDeleteChatStyle() void AppearanceConfig::slotGetChatStyles() { - // we need this because KNewStuffGeneric's install function isn't clever enough - KopeteStyleNewStuff *kopeteNewStuff = new KopeteStyleNewStuff( "kopete/chatstyle", this ); - KNS::Engine *engine = new KNS::Engine( kopeteNewStuff, "kopete/chatstyle", this ); + // we need this because TDENewStuffGeneric's install function isn't clever enough + KopeteStyleNewStuff *kopeteNewStuff = new KopeteStyleNewStuff( "kopete style 0.12+", this ); + KNS::Engine *engine = new KNS::Engine( kopeteNewStuff, "kopete style 0.12+", this ); KNS::DownloadDialog *downloadDialog = new KNS::DownloadDialog( engine, this ); - downloadDialog->setType( "kopete/chatstyle" ); + downloadDialog->setType( "kopete style 0.12+" ); // you have to do this by hand when providing your own Engine KNS::ProviderLoader *provider = new KNS::ProviderLoader( this ); TQObject::connect( provider, TQT_SIGNAL( providersLoaded(Provider::List*) ), downloadDialog, TQT_SLOT( slotProviders (Provider::List *) ) ); - provider->load( "kopete/chatstyle", "http://download.kde.org/khotnewstuff/kopetestyles12-providers.xml" ); + provider->load( "kopete style 0.12+", "https://www.trinitydesktop.org/ocs/providers.xml" ); downloadDialog->exec(); } @@ -854,18 +854,13 @@ void AppearanceConfig::removeSelectedEmoticonTheme() void AppearanceConfig::slotGetEmoticonThemes() { TDEConfig* config = TDEGlobal::config(); - config->setGroup( "KNewStuff" ); - config->writeEntry( "ProvidersUrl", - "http://download.kde.org/khotnewstuff/emoticons-providers.xml" ); + config->setGroup( "TDENewStuff" ); + config->writeEntry( "ProvidersUrl", "https://www.trinitydesktop.org/ocs/providers.xml" ); config->writeEntry( "StandardResource", "emoticons" ); config->writeEntry( "Uncompress", "application/x-gzip" ); config->sync(); -#if ( KDE_IS_VERSION(3,3,90) ) - KNS::DownloadDialog::open( "emoticons", i18n( "Get New Emoticons") ); -#else - KNS::DownloadDialog::open( i18n( "Get New Emoticons" ) ); -#endif + KNS::DownloadDialog::open( "emoticon theme", i18n( "Get New Emoticons") ); updateEmoticonlist(); }