|
Lines 38-45
Link Here
|
| 38 |
#include <tdelistview.h> |
38 |
#include <tdelistview.h> |
| 39 |
#include <tdelocale.h> |
39 |
#include <tdelocale.h> |
| 40 |
#include <tdemessagebox.h> |
40 |
#include <tdemessagebox.h> |
| 41 |
#include <knewstuff/knewstuff.h> |
41 |
#include <tdenewstuff/knewstuff.h> |
| 42 |
#include <knewstuff/entry.h> |
42 |
#include <tdenewstuff/entry.h> |
| 43 |
#include <kprocess.h> |
43 |
#include <kprocess.h> |
| 44 |
#include <kstandarddirs.h> |
44 |
#include <kstandarddirs.h> |
| 45 |
#include <kstandarddirs.h> |
45 |
#include <kstandarddirs.h> |
|
Lines 1081-1090
class KateTemplateItem : public TDEListViewItem
Link Here
|
| 1081 |
//END KateTemplateItem |
1081 |
//END KateTemplateItem |
| 1082 |
|
1082 |
|
| 1083 |
//BEGIN KFTNewStuff |
1083 |
//BEGIN KFTNewStuff |
| 1084 |
class KFTNewStuff : public KNewStuff { |
1084 |
class KFTNewStuff : public TDENewStuff { |
| 1085 |
public: |
1085 |
public: |
| 1086 |
KFTNewStuff( const TQString &type, TQWidget *parent=0 ) : KNewStuff( type, parent ), m_win( parent ) {} |
1086 |
TDENewStuff( const TQString &type, TQWidget *parent=0 ) : TDENewStuff( type, parent ), m_win( parent ) {} |
| 1087 |
~KFTNewStuff() {} |
1087 |
~TDENewStuff() {} |
| 1088 |
bool install( const TQString &/*filename*/ ) { return true; } |
1088 |
bool install( const TQString &/*filename*/ ) { return true; } |
| 1089 |
bool createUploadFile( const TQString &/*filename*/ ) { return false; } |
1089 |
bool createUploadFile( const TQString &/*filename*/ ) { return false; } |
| 1090 |
TQString downloadDestination( KNS::Entry *entry ) |
1090 |
TQString downloadDestination( KNS::Entry *entry ) |
|
Lines 1212-1222
void KateTemplateManager::slotRemoveTemplate()
Link Here
|
| 1212 |
config->writeEntry( "Hidden", l, ';' ); |
1212 |
config->writeEntry( "Hidden", l, ';' ); |
| 1213 |
} |
1213 |
} |
| 1214 |
|
1214 |
|
| 1215 |
// If we removed any files, we should delete a KNewStuff key |
1215 |
// If we removed any files, we should delete a TDENewStuff key |
| 1216 |
// for this template, so the template is installable again. |
1216 |
// for this template, so the template is installable again. |
| 1217 |
// ### This assumes that the knewstuff name is similar to the template name. |
1217 |
// ### This assumes that the TDENewStuff name is similar to the template name. |
| 1218 |
kdDebug()<<"trying to remove knewstuff key '"<<item->templateinfo->tmplate<<"'"<<endl; |
1218 |
kdDebug()<<"trying to remove tdenewstuff key '"<<item->templateinfo->tmplate<<"'"<<endl; |
| 1219 |
config->setGroup("KNewStuffStatus"); |
1219 |
config->setGroup("TDENewStuffStatus"); |
| 1220 |
config->deleteEntry( item->templateinfo->tmplate ); |
1220 |
config->deleteEntry( item->templateinfo->tmplate ); |
| 1221 |
|
1221 |
|
| 1222 |
|
1222 |
|
|
Lines 1225-1231
void KateTemplateManager::slotRemoveTemplate()
Link Here
|
| 1225 |
} |
1225 |
} |
| 1226 |
} |
1226 |
} |
| 1227 |
|
1227 |
|
| 1228 |
// KNewStuff upload |
1228 |
// TDENewStuff upload |
| 1229 |
void KateTemplateManager::slotUpload() |
1229 |
void KateTemplateManager::slotUpload() |
| 1230 |
{ |
1230 |
{ |
| 1231 |
// TODO something nicer, like preparing the meta data from the template info. |
1231 |
// TODO something nicer, like preparing the meta data from the template info. |
|
Lines 1237-1243
void KateTemplateManager::slotUpload()
Link Here
|
| 1237 |
} |
1237 |
} |
| 1238 |
} |
1238 |
} |
| 1239 |
|
1239 |
|
| 1240 |
// KNewStuff download |
1240 |
// TDENewStuff download |
| 1241 |
void KateTemplateManager::slotDownload() |
1241 |
void KateTemplateManager::slotDownload() |
| 1242 |
{ |
1242 |
{ |
| 1243 |
KFTNewStuff *ns = new KFTNewStuff( "katefiletemplates/template", this ); |
1243 |
KFTNewStuff *ns = new KFTNewStuff( "katefiletemplates/template", this ); |