|
|
|
@ -38,8 +38,8 @@
|
|
|
|
|
#include <tdelistview.h>
|
|
|
|
|
#include <tdelocale.h>
|
|
|
|
|
#include <tdemessagebox.h>
|
|
|
|
|
#include <knewstuff/knewstuff.h>
|
|
|
|
|
#include <knewstuff/entry.h>
|
|
|
|
|
#include <tdenewstuff/knewstuff.h>
|
|
|
|
|
#include <tdenewstuff/entry.h>
|
|
|
|
|
#include <kprocess.h>
|
|
|
|
|
#include <kstandarddirs.h>
|
|
|
|
|
#include <kstandarddirs.h>
|
|
|
|
@ -1081,9 +1081,9 @@ class KateTemplateItem : public TDEListViewItem
|
|
|
|
|
//END KateTemplateItem
|
|
|
|
|
|
|
|
|
|
//BEGIN KFTNewStuff
|
|
|
|
|
class KFTNewStuff : public KNewStuff {
|
|
|
|
|
class KFTNewStuff : public TDENewStuff {
|
|
|
|
|
public:
|
|
|
|
|
KFTNewStuff( const TQString &type, TQWidget *parent=0 ) : KNewStuff( type, parent ), m_win( parent ) {}
|
|
|
|
|
KFTNewStuff( const TQString &type, TQWidget *parent=0 ) : TDENewStuff( type, parent ), m_win( parent ) {}
|
|
|
|
|
~KFTNewStuff() {}
|
|
|
|
|
bool install( const TQString &/*filename*/ ) { return true; }
|
|
|
|
|
bool createUploadFile( const TQString &/*filename*/ ) { return false; }
|
|
|
|
@ -1212,11 +1212,11 @@ void KateTemplateManager::slotRemoveTemplate()
|
|
|
|
|
config->writeEntry( "Hidden", l, ';' );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// If we removed any files, we should delete a KNewStuff key
|
|
|
|
|
// If we removed any files, we should delete a TDENewStuff key
|
|
|
|
|
// for this template, so the template is installable again.
|
|
|
|
|
// ### This assumes that the knewstuff name is similar to the template name.
|
|
|
|
|
kdDebug()<<"trying to remove knewstuff key '"<<item->templateinfo->tmplate<<"'"<<endl;
|
|
|
|
|
config->setGroup("KNewStuffStatus");
|
|
|
|
|
// ### This assumes that the tdenewstuff name is similar to the template name.
|
|
|
|
|
kdDebug()<<"trying to remove tdenewstuff key '"<<item->templateinfo->tmplate<<"'"<<endl;
|
|
|
|
|
config->setGroup("TDENewStuffStatus");
|
|
|
|
|
config->deleteEntry( item->templateinfo->tmplate );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1225,7 +1225,7 @@ void KateTemplateManager::slotRemoveTemplate()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// KNewStuff upload
|
|
|
|
|
// TDENewStuff upload
|
|
|
|
|
void KateTemplateManager::slotUpload()
|
|
|
|
|
{
|
|
|
|
|
// TODO something nicer, like preparing the meta data from the template info.
|
|
|
|
@ -1237,7 +1237,7 @@ void KateTemplateManager::slotUpload()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// KNewStuff download
|
|
|
|
|
// TDENewStuff download
|
|
|
|
|
void KateTemplateManager::slotDownload()
|
|
|
|
|
{
|
|
|
|
|
KFTNewStuff *ns = new KFTNewStuff( "katefiletemplates/template", this );
|
|
|
|
|