|
|
@ -24,7 +24,7 @@
|
|
|
|
#include <tqprinter.h>
|
|
|
|
#include <tqprinter.h>
|
|
|
|
|
|
|
|
|
|
|
|
#include <kdesktopfile.h>
|
|
|
|
#include <kdesktopfile.h>
|
|
|
|
#include <ksimpleconfig.h>
|
|
|
|
#include <tdesimpleconfig.h>
|
|
|
|
#include <kdebug.h>
|
|
|
|
#include <kdebug.h>
|
|
|
|
#include <tdeversion.h>
|
|
|
|
#include <tdeversion.h>
|
|
|
|
#include <kinstance.h>
|
|
|
|
#include <kinstance.h>
|
|
|
@ -226,7 +226,7 @@ void KoTemplateTree::readGroups() {
|
|
|
|
TQString defaultTab;
|
|
|
|
TQString defaultTab;
|
|
|
|
int sortingWeight = 1000;
|
|
|
|
int sortingWeight = 1000;
|
|
|
|
if(templateDir.exists(".directory")) {
|
|
|
|
if(templateDir.exists(".directory")) {
|
|
|
|
KSimpleConfig config(templateDir.absPath()+"/.directory", true);
|
|
|
|
TDESimpleConfig config(templateDir.absPath()+"/.directory", true);
|
|
|
|
config.setDesktopGroup();
|
|
|
|
config.setDesktopGroup();
|
|
|
|
name=config.readEntry("Name");
|
|
|
|
name=config.readEntry("Name");
|
|
|
|
defaultTab=config.readEntry("X-TDE-DefaultTab");
|
|
|
|
defaultTab=config.readEntry("X-TDE-DefaultTab");
|
|
|
@ -271,7 +271,7 @@ void KoTemplateTree::readTemplates() {
|
|
|
|
// If a desktop file, then read the name from it.
|
|
|
|
// If a desktop file, then read the name from it.
|
|
|
|
// Otherwise (or if no name in it?) use file name
|
|
|
|
// Otherwise (or if no name in it?) use file name
|
|
|
|
if (KDesktopFile::isDesktopFile(filePath)) {
|
|
|
|
if (KDesktopFile::isDesktopFile(filePath)) {
|
|
|
|
KSimpleConfig config(filePath, true);
|
|
|
|
TDESimpleConfig config(filePath, true);
|
|
|
|
config.setDesktopGroup();
|
|
|
|
config.setDesktopGroup();
|
|
|
|
if (config.readEntry("Type")=="Link") {
|
|
|
|
if (config.readEntry("Type")=="Link") {
|
|
|
|
text=config.readEntry("Name");
|
|
|
|
text=config.readEntry("Name");
|
|
|
@ -356,7 +356,7 @@ void KoTemplateTree::writeTemplate(KoTemplate *t, KoTemplateGroup *group,
|
|
|
|
fileName = path + fill + name + ".desktop";
|
|
|
|
fileName = path + fill + name + ".desktop";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KSimpleConfig config( fileName );
|
|
|
|
TDESimpleConfig config( fileName );
|
|
|
|
config.setDesktopGroup();
|
|
|
|
config.setDesktopGroup();
|
|
|
|
config.writeEntry("Type", "Link");
|
|
|
|
config.writeEntry("Type", "Link");
|
|
|
|
config.writePathEntry("URL", t->file());
|
|
|
|
config.writePathEntry("URL", t->file());
|
|
|
|