Update for recent TDENewStuff changes

pull/1/head
Slávek Banko 10 years ago
parent bb4248e3ab
commit 6ed1cdba96

@ -43,7 +43,7 @@
#include <tdeapplication.h> #include <tdeapplication.h>
#include <kcolorcombo.h> #include <kcolorcombo.h>
#include <kcolorbutton.h> #include <kcolorbutton.h>
#include <tdeconfig.h> // for KNewStuff emoticon fetching #include <tdeconfig.h> // for TDENewStuff emoticon fetching
#include <kdebug.h> #include <kdebug.h>
#include <tdefontrequester.h> #include <tdefontrequester.h>
#include <kgenericfactory.h> #include <kgenericfactory.h>
@ -55,17 +55,17 @@
#include <kpushbutton.h> #include <kpushbutton.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <ktextedit.h> #include <ktextedit.h>
#include <kurl.h> // KNewStuff #include <kurl.h> // TDENewStuff
#include <kurlrequesterdlg.h> #include <kurlrequesterdlg.h>
#include <kurlrequester.h> #include <kurlrequester.h>
#include <krun.h> #include <krun.h>
#include <tdefiledialog.h> #include <tdefiledialog.h>
#include <knewstuff/downloaddialog.h> // knewstuff emoticon and chatwindow fetching #include <tdenewstuff/downloaddialog.h> //TDEnewstuff emoticon and chatwindow fetching
#include <knewstuff/engine.h> // " #include <tdenewstuff/engine.h> // "
#include <knewstuff/entry.h> // " #include <tdenewstuff/entry.h> // "
#include <knewstuff/knewstuff.h> // " #include <tdenewstuff/knewstuff.h> // "
#include <knewstuff/provider.h> // " #include <tdenewstuff/provider.h> // "
// For Kopete Chat Window Style configuration and preview. // For Kopete Chat Window Style configuration and preview.
#include <kopetechatwindowstylemanager.h> #include <kopetechatwindowstylemanager.h>
@ -128,11 +128,11 @@ public:
Kopete::ChatSession *previewChatSession; Kopete::ChatSession *previewChatSession;
}; };
class KopeteStyleNewStuff : public KNewStuff class KopeteStyleNewStuff : public TDENewStuff
{ {
public: public:
KopeteStyleNewStuff(const TQString &type, TQWidget *parentWidget = 0) KopeteStyleNewStuff(const TQString &type, TQWidget *parentWidget = 0)
: KNewStuff( type, parentWidget) : TDENewStuff( type, parentWidget)
{} {}
bool createUploadFile(const TQString &) bool createUploadFile(const TQString &)
@ -688,15 +688,15 @@ void AppearanceConfig::slotDeleteChatStyle()
void AppearanceConfig::slotGetChatStyles() void AppearanceConfig::slotGetChatStyles()
{ {
// we need this because KNewStuffGeneric's install function isn't clever enough // we need this because TDENewStuffGeneric's install function isn't clever enough
KopeteStyleNewStuff *kopeteNewStuff = new KopeteStyleNewStuff( "kopete/chatstyle", this ); KopeteStyleNewStuff *kopeteNewStuff = new KopeteStyleNewStuff( "kopete style 0.12+", this );
KNS::Engine *engine = new KNS::Engine( kopeteNewStuff, "kopete/chatstyle", this ); KNS::Engine *engine = new KNS::Engine( kopeteNewStuff, "kopete style 0.12+", this );
KNS::DownloadDialog *downloadDialog = new KNS::DownloadDialog( engine, 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 // you have to do this by hand when providing your own Engine
KNS::ProviderLoader *provider = new KNS::ProviderLoader( this ); KNS::ProviderLoader *provider = new KNS::ProviderLoader( this );
TQObject::connect( provider, TQT_SIGNAL( providersLoaded(Provider::List*) ), downloadDialog, TQT_SLOT( slotProviders (Provider::List *) ) ); 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(); downloadDialog->exec();
} }
@ -854,18 +854,13 @@ void AppearanceConfig::removeSelectedEmoticonTheme()
void AppearanceConfig::slotGetEmoticonThemes() void AppearanceConfig::slotGetEmoticonThemes()
{ {
TDEConfig* config = TDEGlobal::config(); TDEConfig* config = TDEGlobal::config();
config->setGroup( "KNewStuff" ); config->setGroup( "TDENewStuff" );
config->writeEntry( "ProvidersUrl", config->writeEntry( "ProvidersUrl", "https://www.trinitydesktop.org/ocs/providers.xml" );
"http://download.kde.org/khotnewstuff/emoticons-providers.xml" );
config->writeEntry( "StandardResource", "emoticons" ); config->writeEntry( "StandardResource", "emoticons" );
config->writeEntry( "Uncompress", "application/x-gzip" ); config->writeEntry( "Uncompress", "application/x-gzip" );
config->sync(); config->sync();
#if ( KDE_IS_VERSION(3,3,90) ) KNS::DownloadDialog::open( "emoticon theme", i18n( "Get New Emoticons") );
KNS::DownloadDialog::open( "emoticons", i18n( "Get New Emoticons") );
#else
KNS::DownloadDialog::open( i18n( "Get New Emoticons" ) );
#endif
updateEmoticonlist(); updateEmoticonlist();
} }

Loading…
Cancel
Save