|
Lines 36-51
Link Here
|
| 36 |
#include <tdetoolbar.h> |
36 |
#include <tdetoolbar.h> |
| 37 |
|
37 |
|
| 38 |
#if KDE_IS_VERSION(3, 4, 0) |
38 |
#if KDE_IS_VERSION(3, 4, 0) |
| 39 |
// The KNewStuffSecure we use internaly for the GetHotNewStuff-functionality |
39 |
// The TDENewStuffSecure we use internaly for the GetHotNewStuff-functionality |
| 40 |
// was introduced with KDE 3.4. |
40 |
// was introduced with KDE 3.4. |
| 41 |
#define KROSS_SUPPORT_NEWSTUFF |
41 |
#define KROSS_SUPPORT_NEWSTUFF |
| 42 |
#endif |
42 |
#endif |
| 43 |
|
43 |
|
| 44 |
#ifdef KROSS_SUPPORT_NEWSTUFF |
44 |
#ifdef KROSS_SUPPORT_NEWSTUFF |
| 45 |
#include <knewstuff/provider.h> |
45 |
#include <tdenewstuff/provider.h> |
| 46 |
#include <knewstuff/engine.h> |
46 |
#include <tdenewstuff/engine.h> |
| 47 |
#include <knewstuff/downloaddialog.h> |
47 |
#include <tdenewstuff/downloaddialog.h> |
| 48 |
#include <knewstuff/knewstuffsecure.h> |
48 |
#include <tdenewstuff/knewstuffsecure.h> |
| 49 |
#endif |
49 |
#endif |
| 50 |
|
50 |
|
| 51 |
#include "scriptguiclient.h" |
51 |
#include "scriptguiclient.h" |
|
Lines 54-64
Link Here
|
| 54 |
namespace Kross { namespace Api { |
54 |
namespace Kross { namespace Api { |
| 55 |
|
55 |
|
| 56 |
#ifdef KROSS_SUPPORT_NEWSTUFF |
56 |
#ifdef KROSS_SUPPORT_NEWSTUFF |
| 57 |
class ScriptNewStuff : public KNewStuffSecure |
57 |
class ScriptNewStuff : public TDENewStuffSecure |
| 58 |
{ |
58 |
{ |
| 59 |
public: |
59 |
public: |
| 60 |
ScriptNewStuff(ScriptGUIClient* scripguiclient, const TQString& type, TQWidget *parentWidget = 0) |
60 |
ScriptNewStuff(ScriptGUIClient* scripguiclient, const TQString& type, TQWidget *parentWidget = 0) |
| 61 |
: KNewStuffSecure(type, parentWidget) |
61 |
: TDENewStuffSecure(type, parentWidget) |
| 62 |
, m_scripguiclient(scripguiclient) {} |
62 |
, m_scripguiclient(scripguiclient) {} |
| 63 |
virtual ~ScriptNewStuff() {} |
63 |
virtual ~ScriptNewStuff() {} |
| 64 |
private: |
64 |
private: |
|
Lines 148-154
WdgScriptsManager::WdgScriptsManager(ScriptGUIClient* scr, TQWidget* parent, con
Link Here
|
| 148 |
btnUninstall->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "fileclose", TDEIcon::MainToolbar, 16 )); |
148 |
btnUninstall->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "fileclose", TDEIcon::MainToolbar, 16 )); |
| 149 |
connect(btnUninstall, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUninstallScript())); |
149 |
connect(btnUninstall, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUninstallScript())); |
| 150 |
#ifdef KROSS_SUPPORT_NEWSTUFF |
150 |
#ifdef KROSS_SUPPORT_NEWSTUFF |
| 151 |
btnNewStuff->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "knewstuff", TDEIcon::MainToolbar, 16 )); |
151 |
btnNewStuff->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "tdenewstuff", TDEIcon::MainToolbar, 16 )); |
| 152 |
connect(btnNewStuff, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGetNewScript())); |
152 |
connect(btnNewStuff, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGetNewScript())); |
| 153 |
#endif |
153 |
#endif |
| 154 |
/* |
154 |
/* |
|
Lines 168-174
WdgScriptsManager::WdgScriptsManager(ScriptGUIClient* scr, TQWidget* parent, con
Link Here
|
| 168 |
toolBar->addConnection(WdgScriptsManagerPrivate::UninstallBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUninstallScript())); |
168 |
toolBar->addConnection(WdgScriptsManagerPrivate::UninstallBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUninstallScript())); |
| 169 |
#ifdef KROSS_SUPPORT_NEWSTUFF |
169 |
#ifdef KROSS_SUPPORT_NEWSTUFF |
| 170 |
toolBar->insertLineSeparator(); |
170 |
toolBar->insertLineSeparator(); |
| 171 |
toolBar->insertButton("knewstuff", WdgScriptsManagerPrivate::NewStuffBtn, true, i18n("Get More Scripts")); |
171 |
toolBar->insertButton("tdenewstuff", WdgScriptsManagerPrivate::NewStuffBtn, true, i18n("Get More Scripts")); |
| 172 |
toolBar->addConnection(WdgScriptsManagerPrivate::NewStuffBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGetNewScript())); |
172 |
toolBar->addConnection(WdgScriptsManagerPrivate::NewStuffBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGetNewScript())); |
| 173 |
#endif |
173 |
#endif |
| 174 |
*/ |
174 |
*/ |
|
Lines 343-352
void WdgScriptsManager::slotGetNewScript()
Link Here
|
| 343 |
|
343 |
|
| 344 |
void WdgScriptsManager::slotResourceInstalled() |
344 |
void WdgScriptsManager::slotResourceInstalled() |
| 345 |
{ |
345 |
{ |
| 346 |
// Delete KNewStuff's configuration entries. These entries reflect what has |
346 |
// Delete TDENewStuff's configuration entries. These entries reflect what has |
| 347 |
// already been installed. As we cannot yet keep them in sync after uninstalling |
347 |
// already been installed. As we cannot yet keep them in sync after uninstalling |
| 348 |
// scripts, we deactivate the check marks entirely. |
348 |
// scripts, we deactivate the check marks entirely. |
| 349 |
TDEGlobal::config()->deleteGroup("KNewStuffStatus"); |
349 |
TDEGlobal::config()->deleteGroup("TDENewStuffStatus"); |
| 350 |
} |
350 |
} |
| 351 |
|
351 |
|
| 352 |
}} |
352 |
}} |