summaryrefslogtreecommitdiffstats
path: root/src/appimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/appimpl.cpp')
-rw-r--r--src/appimpl.cpp174
1 files changed, 87 insertions, 87 deletions
diff --git a/src/appimpl.cpp b/src/appimpl.cpp
index 2357815..29dc132 100644
--- a/src/appimpl.cpp
+++ b/src/appimpl.cpp
@@ -40,10 +40,10 @@
#include "appimpl.h"
#include <kdebug.h>
-#include <kglobalsettings.h>
+#include <tdeglobalsettings.h>
#include <kstandarddirs.h>
#include <kdesktopfile.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <kiconloader.h>
#include <kservice.h>
#include <kservicegroup.h>
@@ -59,7 +59,7 @@ AppImpl::AppImpl() : TQObject()
{
}
-bool AppImpl::listRoot(TQValueList<KIO::UDSEntry> &list)
+bool AppImpl::listRoot(TQValueList<TDEIO::UDSEntry> &list)
{
@@ -86,7 +86,7 @@ bool AppImpl::listRoot(TQValueList<KIO::UDSEntry> &list)
TQStringList filenames
= dir.entryList( TQDir::Files | TQDir::Readable );
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
TQStringList::ConstIterator filename = filenames.begin();
TQStringList::ConstIterator endf = filenames.end();
@@ -143,7 +143,7 @@ bool AppImpl::realURL(const TQString &name, const TQString &path,
return true;
}
-bool AppImpl::statByName(const TQString &filename, KIO::UDSEntry& entry)
+bool AppImpl::statByName(const TQString &filename, TDEIO::UDSEntry& entry)
{
@@ -184,7 +184,7 @@ KURL AppImpl::findBaseURL(const TQString &filename) const
{
kdDebug() << "AppImpl::findBaseURL" << endl;
- TQStringList dirList = KGlobal::dirs()->resourceDirs("system_entries");
+ TQStringList dirList = TDEGlobal::dirs()->resourceDirs("system_entries");
TQStringList::ConstIterator dirpath = dirList.begin();
TQStringList::ConstIterator end = dirList.end();
@@ -197,7 +197,7 @@ KURL AppImpl::findBaseURL(const TQString &filename) const
= dir.entryList( TQDir::Files | TQDir::Readable );
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
TQStringList::ConstIterator name = filenames.begin();
TQStringList::ConstIterator endf = filenames.end();
@@ -223,10 +223,10 @@ KURL AppImpl::findBaseURL(const TQString &filename) const
}
-static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l,
+static void addAtom(TDEIO::UDSEntry &entry, unsigned int ID, long l,
const TQString &s = TQString::null)
{
- KIO::UDSAtom atom;
+ TDEIO::UDSAtom atom;
atom.m_uds = ID;
atom.m_long = l;
atom.m_str = s;
@@ -234,41 +234,41 @@ static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l,
}
-void AppImpl::createTopLevelEntry(KIO::UDSEntry &entry) const
+void AppImpl::createTopLevelEntry(TDEIO::UDSEntry &entry) const
{
entry.clear();
- addAtom(entry, KIO::UDS_NAME, 0, ".");
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_ACCESS, 0555);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/system_directory");
- addAtom(entry, KIO::UDS_ICON_NAME, 0, "system");
+ addAtom(entry, TDEIO::UDS_NAME, 0, ".");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_ACCESS, 0555);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/system_directory");
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, "system");
}
-void AppImpl::createEntry(KIO::UDSEntry &entry,
+void AppImpl::createEntry(TDEIO::UDSEntry &entry,
// const TQString &directory,
const TQString &file)
{
entry.clear();
- addAtom(entry, KIO::UDS_NAME, 0, file);
+ addAtom(entry, TDEIO::UDS_NAME, 0, file);
TQString new_filename = file;
new_filename.truncate(file.length()-8);
- addAtom(entry, KIO::UDS_URL, 0, "app:/"+new_filename);
+ addAtom(entry, TDEIO::UDS_URL, 0, "app:/"+new_filename);
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/directory");
KService::Ptr service = KService::serviceByDesktopName( new_filename );
if (service && service->isValid())
- addAtom(entry, KIO::UDS_ICON_NAME, 0, service->icon());
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, service->icon());
else
- addAtom(entry, KIO::UDS_ICON_NAME, 0, "binary");
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, "binary");
}
-void AppImpl::createExeEntry(TQValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry,
+void AppImpl::createExeEntry(TQValueList<TDEIO::UDSEntry> &list,TDEIO::UDSEntry &entry,
const TQString &shortname,
const TQStringList &fullname)
{
@@ -280,7 +280,7 @@ void AppImpl::createExeEntry(TQValueList<KIO::UDSEntry> &list,KIO::UDSEntry &ent
continue;
entry.clear();
-/* TQStringList dirList = KGlobal::instance()->dirs()->resourceDirs("apps");
+/* TQStringList dirList = TDEGlobal::instance()->dirs()->resourceDirs("apps");
kdDebug() << dirList << endl;
TQStringList desktop = getFullLocation(dirList,shortname+".desktop",
TQDir::FilterSpec(TQDir::Files | TQDir::Dirs | TQDir::Readable),
@@ -297,11 +297,11 @@ void AppImpl::createExeEntry(TQValueList<KIO::UDSEntry> &list,KIO::UDSEntry &ent
// continue;
// entry.clear();
- addAtom(entry, KIO::UDS_NAME, 0, i18n("Application (%1)").arg(service->name()));
- addAtom(entry, KIO::UDS_URL, 0, locate("apps", service->desktopEntryPath()));
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "application/x-desktop");
- addAtom(entry, KIO::UDS_ICON_NAME, 0, service->icon());
+ addAtom(entry, TDEIO::UDS_NAME, 0, i18n("Application (%1)").arg(service->name()));
+ addAtom(entry, TDEIO::UDS_URL, 0, locate("apps", service->desktopEntryPath()));
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFREG);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "application/x-desktop");
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, service->icon());
// createFileEntry(entry, service->name(), url.url(1)+service->desktopEntryName(),
// "application/x-desktop", service->icon(), locate("apps",
// service->desktopEntryPath()) );
@@ -312,37 +312,37 @@ void AppImpl::createExeEntry(TQValueList<KIO::UDSEntry> &list,KIO::UDSEntry &ent
return;
}
- addAtom(entry, KIO::UDS_NAME, 0, i18n("Application (%1)").arg(*it));
- addAtom(entry, KIO::UDS_URL, 0, *it);
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "application");
- addAtom(entry, KIO::UDS_ICON_NAME, 0, "binary");
+ addAtom(entry, TDEIO::UDS_NAME, 0, i18n("Application (%1)").arg(*it));
+ addAtom(entry, TDEIO::UDS_URL, 0, *it);
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFREG);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "application");
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, "binary");
if ( !entry.isEmpty() )
list.append(entry);
}
}
-void AppImpl::createManPageEntry(KIO::UDSEntry &entry,
+void AppImpl::createManPageEntry(TDEIO::UDSEntry &entry,
const TQString &shortname)
{
entry.clear();
- addAtom(entry, KIO::UDS_NAME, 0, i18n("Manual for %1").arg(shortname));
+ addAtom(entry, TDEIO::UDS_NAME, 0, i18n("Manual for %1").arg(shortname));
/* TQString new_filename = file;
new_filename.truncate(file.length()-8);*/
- addAtom(entry, KIO::UDS_URL, 0, "man:/"+shortname);
+ addAtom(entry, TDEIO::UDS_URL, 0, "man:/"+shortname);
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "application/x-desktop");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFREG);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "application/x-desktop");
TQString icon = "man";
- addAtom(entry, KIO::UDS_ICON_NAME, 0, icon);
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, icon);
}
-void AppImpl::createHomeDirEntry(TQValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry,
+void AppImpl::createHomeDirEntry(TQValueList<TDEIO::UDSEntry> &list,TDEIO::UDSEntry &entry,
const TQString &shortname)
{
@@ -360,24 +360,24 @@ void AppImpl::createHomeDirEntry(TQValueList<KIO::UDSEntry> &list,KIO::UDSEntry
continue;
entry.clear();
- addAtom(entry, KIO::UDS_NAME, 0, i18n("User Data (%1)").arg(*it));
- addAtom(entry, KIO::UDS_URL, 0, *it);
+ addAtom(entry, TDEIO::UDS_NAME, 0, i18n("User Data (%1)").arg(*it));
+ addAtom(entry, TDEIO::UDS_URL, 0, *it);
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/directory");
TQString icon = "cachefolder";
- addAtom(entry, KIO::UDS_ICON_NAME, 0, icon);
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, icon);
if ( !entry.isEmpty() )
list.append(entry);
}
}
-void AppImpl::createKDEDataDirEntry(TQValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry,
+void AppImpl::createKDEDataDirEntry(TQValueList<TDEIO::UDSEntry> &list,TDEIO::UDSEntry &entry,
const TQString &shortname)
{
- TQStringList dirList = KGlobal::instance()->dirs()->resourceDirs("data");
+ TQStringList dirList = TDEGlobal::instance()->dirs()->resourceDirs("data");
TQStringList KDEDataDir = getFullLocation(dirList,shortname,
TQDir::FilterSpec(TQDir::Dirs | TQDir::Readable), false, false);
@@ -391,21 +391,21 @@ void AppImpl::createKDEDataDirEntry(TQValueList<KIO::UDSEntry> &list,KIO::UDSEnt
continue;
entry.clear();
- addAtom(entry, KIO::UDS_NAME, 0, i18n("App Data (%1)").arg(*it));
- addAtom(entry, KIO::UDS_URL, 0, *it);
+ addAtom(entry, TDEIO::UDS_NAME, 0, i18n("App Data (%1)").arg(*it));
+ addAtom(entry, TDEIO::UDS_URL, 0, *it);
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/directory");
TQString icon = "binaryfolder";
- addAtom(entry, KIO::UDS_ICON_NAME, 0, icon);
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, icon);
if ( !entry.isEmpty() )
list.append(entry);
}
}
-void AppImpl::createStandardDataDirEntry(TQValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry,
+void AppImpl::createStandardDataDirEntry(TQValueList<TDEIO::UDSEntry> &list, TDEIO::UDSEntry &entry,
const TQString &shortname)
{
@@ -428,21 +428,21 @@ void AppImpl::createStandardDataDirEntry(TQValueList<KIO::UDSEntry> &list, KIO::
continue;
entry.clear();
- addAtom(entry, KIO::UDS_NAME, 0, i18n("App Data (%1)").arg(*it));
- addAtom(entry, KIO::UDS_URL, 0, *it);
+ addAtom(entry, TDEIO::UDS_NAME, 0, i18n("App Data (%1)").arg(*it));
+ addAtom(entry, TDEIO::UDS_URL, 0, *it);
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/directory");
TQString icon = "binaryfolder";
- addAtom(entry, KIO::UDS_ICON_NAME, 0, icon);
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, icon);
if ( !entry.isEmpty() )
list.append(entry);
}
}
-void AppImpl::createKDEConfigEntry(KIO::UDSEntry &entry,
+void AppImpl::createKDEConfigEntry(TDEIO::UDSEntry &entry,
const TQString &shortname)
{
@@ -454,17 +454,17 @@ void AppImpl::createKDEConfigEntry(KIO::UDSEntry &entry,
if (KDEDataDir.isEmpty())
return;
- addAtom(entry, KIO::UDS_NAME, 0, i18n("Config File (%1)").arg(KDEDataDir));
- addAtom(entry, KIO::UDS_URL, 0, KDEDataDir);
+ addAtom(entry, TDEIO::UDS_NAME, 0, i18n("Config File (%1)").arg(KDEDataDir));
+ addAtom(entry, TDEIO::UDS_URL, 0, KDEDataDir);
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "text/plain");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "text/plain");
TQString icon = "configure";
- addAtom(entry, KIO::UDS_ICON_NAME, 0, icon);
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, icon);
}
-void AppImpl::createStandardConfigEntry(TQValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry,
+void AppImpl::createStandardConfigEntry(TQValueList<TDEIO::UDSEntry> &list, TDEIO::UDSEntry &entry,
const TQString &shortname)
{
@@ -495,27 +495,27 @@ void AppImpl::createStandardConfigEntry(TQValueList<KIO::UDSEntry> &list, KIO::U
kdDebug() << "createStandardConfigEntry: " << *it << endl;
- addAtom(entry, KIO::UDS_URL, 0, *it);
+ addAtom(entry, TDEIO::UDS_URL, 0, *it);
TQString icon;
if (isFolder){
- addAtom(entry, KIO::UDS_NAME, 0, i18n("Config Data(%1)").arg(*it));
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_NAME, 0, i18n("Config Data(%1)").arg(*it));
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/directory");
icon = "configfolder";
}else{
- addAtom(entry, KIO::UDS_NAME, 0, i18n("Config File(%1)").arg(*it));
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "text/plain");
+ addAtom(entry, TDEIO::UDS_NAME, 0, i18n("Config File(%1)").arg(*it));
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFREG);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "text/plain");
icon = "configure";
}
- addAtom(entry, KIO::UDS_ICON_NAME, 0, icon);
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, icon);
if ( !entry.isEmpty() )
list.append(entry);
}
}
-void AppImpl::createTmpDirEntry(TQValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry,
+void AppImpl::createTmpDirEntry(TQValueList<TDEIO::UDSEntry> &list, TDEIO::UDSEntry &entry,
const TQString &shortname)
{
@@ -544,27 +544,27 @@ void AppImpl::createTmpDirEntry(TQValueList<KIO::UDSEntry> &list, KIO::UDSEntry
kdDebug() << "createTmpDirEntry: " << *it << endl;
- addAtom(entry, KIO::UDS_URL, 0, *it);
+ addAtom(entry, TDEIO::UDS_URL, 0, *it);
TQString icon;
if (isFolder){
- addAtom(entry, KIO::UDS_NAME, 0, i18n("Tmp Data (%1)").arg(*it));
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_NAME, 0, i18n("Tmp Data (%1)").arg(*it));
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/directory");
icon = "tmpfolder";
}else{
- addAtom(entry, KIO::UDS_NAME, 0, i18n("Tmp File (%1)").arg(*it));
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "text/plain");
+ addAtom(entry, TDEIO::UDS_NAME, 0, i18n("Tmp File (%1)").arg(*it));
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFREG);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "text/plain");
icon = "eraser";
}
- addAtom(entry, KIO::UDS_ICON_NAME, 0, icon);
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, icon);
if ( !entry.isEmpty() )
list.append(entry);
}
}
-void AppImpl::slotEntries(KIO::Job *job, const KIO::UDSEntryList &list)
+void AppImpl::slotEntries(TDEIO::Job *job, const TDEIO::UDSEntryList &list)
{
if (list.size()>0)
{
@@ -574,17 +574,17 @@ void AppImpl::slotEntries(KIO::Job *job, const KIO::UDSEntryList &list)
}
}
-void AppImpl::slotResult(KIO::Job *)
+void AppImpl::slotResult(TDEIO::Job *)
{
tqApp->eventLoop()->exitLoop();
}
-bool AppImpl::listAppContents(const TQString &name, TQValueList<KIO::UDSEntry> &list)
+bool AppImpl::listAppContents(const TQString &name, TQValueList<TDEIO::UDSEntry> &list)
{
kdDebug() << "AppImpl::listAppEntries" << endl;
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
//Create entry for binary file
entry.clear();