Branch: master

6ed1cdba 2014-09-29 20:41:49 Slávek Banko
Update for recent TDENewStuff changes
M kopete/kopete/config/appearance/appearanceconfig.cpp
diff --git a/kopete/kopete/config/appearance/appearanceconfig.cpp b/kopete/kopete/config/appearance/appearanceconfig.cpp
index 150c1be..6cfd55c 100644
--- a/kopete/kopete/config/appearance/appearanceconfig.cpp
+++ b/kopete/kopete/config/appearance/appearanceconfig.cpp
@@ -43,7 +43,7 @@
 #include <tdeapplication.h>
 #include <kcolorcombo.h>
 #include <kcolorbutton.h>
-#include <tdeconfig.h> // for KNewStuff emoticon fetching
+#include <tdeconfig.h> // for TDENewStuff emoticon fetching
 #include <kdebug.h>
 #include <tdefontrequester.h>
 #include <kgenericfactory.h>
@@ -55,17 +55,17 @@
 #include <kpushbutton.h>
 #include <kstandarddirs.h>
 #include <ktextedit.h>
-#include <kurl.h> // KNewStuff
+#include <kurl.h> // TDENewStuff
 #include <kurlrequesterdlg.h>
 #include <kurlrequester.h>
 #include <krun.h>
 #include <tdefiledialog.h>
 
-#include <knewstuff/downloaddialog.h> // knewstuff emoticon and chatwindow fetching
-#include <knewstuff/engine.h>         // "
-#include <knewstuff/entry.h>          // "
-#include <knewstuff/knewstuff.h>      // "
-#include <knewstuff/provider.h>       // "
+#include <tdenewstuff/downloaddialog.h> //TDEnewstuff emoticon and chatwindow fetching
+#include <tdenewstuff/engine.h>         // "
+#include <tdenewstuff/entry.h>          // "
+#include <tdenewstuff/knewstuff.h>      // "
+#include <tdenewstuff/provider.h>       // "
 
 // For Kopete Chat Window Style configuration and preview.
 #include <kopetechatwindowstylemanager.h>
@@ -128,11 +128,11 @@
 	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::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::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();
 }