From 43f6b98c7d792763cce00715765748056049307d Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 1 May 2022 21:52:17 +0900 Subject: Raw KDE->TDE conversion using tde/scripts/conversions/kde-tde/convert_existing_kde3_app_to_tde. Signed-off-by: Michele Calgaro --- README | 2 +- src/app.cpp | 84 ++++++++++++------------- src/app.h | 12 ++-- src/app.protocol | 6 +- src/appimpl.cpp | 174 +++++++++++++++++++++++++-------------------------- src/appimpl.h | 34 +++++----- src/appinfo.protocol | 6 +- 7 files changed, 159 insertions(+), 159 deletions(-) diff --git a/README b/README index 8d34e4c..d973259 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -The appinfo:/ KIO slave combines an application's configuration, data, manual and +The appinfo:/ TDEIO slave combines an application's configuration, data, manual and temp files and folders into a single view. This version is a prototype (i.e. the result of two evenings' work). If you think diff --git a/src/app.cpp b/src/app.cpp index 99f570b..ef19b67 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -40,65 +40,65 @@ #include #include -#include +#include #include -#include +#include #include -#include +#include #include -#include +#include #include #include #include "app.h" -using namespace KIO; +using namespace TDEIO; extern "C" { int kdemain(int argc, char **argv) { - KInstance instance( "kio_app" ); + TDEInstance instance( "tdeio_app" ); - kdDebug(7101) << "*** Starting kio_app " << endl; + kdDebug(7101) << "*** Starting tdeio_app " << endl; if (argc != 4) { - kdDebug(7101) << "Usage: kio_app protocol domain-socket1 domain-socket2" << endl; + kdDebug(7101) << "Usage: tdeio_app protocol domain-socket1 domain-socket2" << endl; exit(-1); } - kio_appProtocol slave(argv[2], argv[3]); + tdeio_appProtocol slave(argv[2], argv[3]); slave.dispatchLoop(); - kdDebug(7101) << "*** kio_app Done" << endl; + kdDebug(7101) << "*** tdeio_app Done" << endl; return 0; } } -kio_appProtocol::kio_appProtocol(const TQCString &pool_socket, const TQCString &app_socket) - : SlaveBase("kio_app", pool_socket, app_socket) +tdeio_appProtocol::tdeio_appProtocol(const TQCString &pool_socket, const TQCString &app_socket) + : SlaveBase("tdeio_app", pool_socket, app_socket) { - kdDebug() << "kio_appProtocol::kio_appProtocol()" << endl; + kdDebug() << "tdeio_appProtocol::tdeio_appProtocol()" << endl; } -kio_appProtocol::~kio_appProtocol() +tdeio_appProtocol::~tdeio_appProtocol() { - kdDebug() << "kio_appProtocol::~kio_appProtocol()" << endl; + kdDebug() << "tdeio_appProtocol::~tdeio_appProtocol()" << endl; } -void kio_appProtocol::stat(const KURL &url) +void tdeio_appProtocol::stat(const KURL &url) { - kdDebug() << "kio_appProtocol::stat: " << url << endl; + kdDebug() << "tdeio_appProtocol::stat: " << url << endl; TQString path = url.path(); if ( path.isEmpty() || path == "/" ) { - kdDebug() << "kio_appProtocol::stat: " << "creating top level entry" << endl; + kdDebug() << "tdeio_appProtocol::stat: " << "creating top level entry" << endl; // The root is "virtual" - it's not a single physical directory - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; m_impl.createTopLevelEntry( entry ); statEntry( entry ); finished(); @@ -110,17 +110,17 @@ void kio_appProtocol::stat(const KURL &url) if ( !ok ) { - kdDebug() << "kio_appProtocol::stat: " << "can't parse url" << endl; - error(KIO::ERR_MALFORMED_URL, url.prettyURL()); + kdDebug() << "tdeio_appProtocol::stat: " << "can't parse url" << endl; + error(TDEIO::ERR_MALFORMED_URL, url.prettyURL()); return; } if( path.isEmpty() ) { - kdDebug() << "kio_appProtocol::stat4: " << "url empty after parsing" << endl; + kdDebug() << "tdeio_appProtocol::stat4: " << "url empty after parsing" << endl; - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; if ( m_impl.statByName(name, entry) ) { @@ -129,23 +129,23 @@ void kio_appProtocol::stat(const KURL &url) } else { - error(KIO::ERR_DOES_NOT_EXIST, url.prettyURL()); + error(TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL()); } } else { - kdDebug() << "kio_appProtocol::stat4: " << "url not empty after parsing: statting" << endl; + kdDebug() << "tdeio_appProtocol::stat4: " << "url not empty after parsing: statting" << endl; SlaveBase::stat(url); } } -void kio_appProtocol::listDir(const KURL &url) +void tdeio_appProtocol::listDir(const KURL &url) { - kdDebug() << "kio_appProtocol::listDir: " << url << endl; + kdDebug() << "tdeio_appProtocol::listDir: " << url << endl; if ( url.path().length() <= 1 ) { - kdDebug() << "kio_appProtocol::listDir: " << "url empty: listing root" << endl; + kdDebug() << "tdeio_appProtocol::listDir: " << "url empty: listing root" << endl; listRoot(); return; } @@ -155,22 +155,22 @@ void kio_appProtocol::listDir(const KURL &url) if ( !ok ) { - error(KIO::ERR_MALFORMED_URL, url.prettyURL()); + error(TDEIO::ERR_MALFORMED_URL, url.prettyURL()); return; } - kdDebug() << "kio_appProtocol::listDir: " << "url is " << url << ": doing a listDir" << endl; - kdDebug() << "kio_appProtocol::listDir: " << "name is " << name << ": doing a listDir" << endl; - kdDebug() << "kio_appProtocol::listDir: " << "path is " << path << ": doing a listDir" << endl; + kdDebug() << "tdeio_appProtocol::listDir: " << "url is " << url << ": doing a listDir" << endl; + kdDebug() << "tdeio_appProtocol::listDir: " << "name is " << name << ": doing a listDir" << endl; + kdDebug() << "tdeio_appProtocol::listDir: " << "path is " << path << ": doing a listDir" << endl; // We've been given something like app:/appname listAppContents(name); } -void kio_appProtocol::listRoot() +void tdeio_appProtocol::listRoot() { - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; - KIO::UDSEntryList system_entries; + TDEIO::UDSEntryList system_entries; bool ok = m_impl.listRoot(system_entries); if (!ok) @@ -184,8 +184,8 @@ void kio_appProtocol::listRoot() m_impl.createTopLevelEntry(entry); listEntry(entry, false); - KIO::UDSEntryListIterator it = system_entries.begin(); - KIO::UDSEntryListIterator end = system_entries.end(); + TDEIO::UDSEntryListIterator it = system_entries.begin(); + TDEIO::UDSEntryListIterator end = system_entries.end(); for(; it!=end; ++it) { @@ -199,11 +199,11 @@ void kio_appProtocol::listRoot() } -void kio_appProtocol::listAppContents(const TQString &name) +void tdeio_appProtocol::listAppContents(const TQString &name) { - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; - KIO::UDSEntryList app_entries; + TDEIO::UDSEntryList app_entries; bool ok = m_impl.listAppContents(name, app_entries); if (!ok) @@ -217,8 +217,8 @@ void kio_appProtocol::listAppContents(const TQString &name) m_impl.createTopLevelEntry(entry); listEntry(entry, false); - KIO::UDSEntryListIterator it = app_entries.begin(); - KIO::UDSEntryListIterator end = app_entries.end(); + TDEIO::UDSEntryListIterator it = app_entries.begin(); + TDEIO::UDSEntryListIterator end = app_entries.end(); for(; it!=end; ++it) { diff --git a/src/app.h b/src/app.h index 481e5fa..9ffc542 100644 --- a/src/app.h +++ b/src/app.h @@ -27,21 +27,21 @@ #include -#include +#include #include -#include -#include +#include +#include #include "appimpl.h" class TQCString; -class kio_appProtocol : public KIO::SlaveBase +class tdeio_appProtocol : public TDEIO::SlaveBase { public: - kio_appProtocol(const TQCString &pool_socket, const TQCString &app_socket); - virtual ~kio_appProtocol(); + tdeio_appProtocol(const TQCString &pool_socket, const TQCString &app_socket); + virtual ~tdeio_appProtocol(); virtual void listDir(const KURL & url); virtual void stat(const KURL & url); diff --git a/src/app.protocol b/src/app.protocol index 836f41a..6c03794 100644 --- a/src/app.protocol +++ b/src/app.protocol @@ -1,5 +1,5 @@ [Protocol] -exec=kio_app +exec=tdeio_app protocol=app input=none output=filesystem @@ -10,9 +10,9 @@ makedir=true deleting=true linking=true moving=true -Icon=system +Icon=computer maxInstances=4 -#TODO DocPath=kioslave/file.html +#TODO DocPath=tdeioslave/file.html Class=:local deleteRecursive=true fileNameUsedForCopying=Name 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 -#include +#include #include #include -#include +#include #include #include #include @@ -59,7 +59,7 @@ AppImpl::AppImpl() : TQObject() { } -bool AppImpl::listRoot(TQValueList &list) +bool AppImpl::listRoot(TQValueList &list) { @@ -86,7 +86,7 @@ bool AppImpl::listRoot(TQValueList &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 &list,KIO::UDSEntry &entry, +void AppImpl::createExeEntry(TQValueList &list,TDEIO::UDSEntry &entry, const TQString &shortname, const TQStringList &fullname) { @@ -280,7 +280,7 @@ void AppImpl::createExeEntry(TQValueList &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 &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 &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 &list,KIO::UDSEntry &entry, +void AppImpl::createHomeDirEntry(TQValueList &list,TDEIO::UDSEntry &entry, const TQString &shortname) { @@ -360,24 +360,24 @@ void AppImpl::createHomeDirEntry(TQValueList &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 &list,KIO::UDSEntry &entry, +void AppImpl::createKDEDataDirEntry(TQValueList &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 &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 &list, KIO::UDSEntry &entry, +void AppImpl::createStandardDataDirEntry(TQValueList &list, TDEIO::UDSEntry &entry, const TQString &shortname) { @@ -428,21 +428,21 @@ void AppImpl::createStandardDataDirEntry(TQValueList &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 &list, KIO::UDSEntry &entry, +void AppImpl::createStandardConfigEntry(TQValueList &list, TDEIO::UDSEntry &entry, const TQString &shortname) { @@ -495,27 +495,27 @@ void AppImpl::createStandardConfigEntry(TQValueList &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 &list, KIO::UDSEntry &entry, +void AppImpl::createTmpDirEntry(TQValueList &list, TDEIO::UDSEntry &entry, const TQString &shortname) { @@ -544,27 +544,27 @@ void AppImpl::createTmpDirEntry(TQValueList &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 &list) +bool AppImpl::listAppContents(const TQString &name, TQValueList &list) { kdDebug() << "AppImpl::listAppEntries" << endl; - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; //Create entry for binary file entry.clear(); diff --git a/src/appimpl.h b/src/appimpl.h index b8a2ac4..974f648 100644 --- a/src/appimpl.h +++ b/src/appimpl.h @@ -40,8 +40,8 @@ #ifndef APPIMPL_H #define APPIMPL_H -#include -#include +#include +#include #include #include @@ -55,45 +55,45 @@ Q_OBJECT public: AppImpl(); - void createTopLevelEntry(KIO::UDSEntry& entry) const; - bool statByName(const TQString &filename, KIO::UDSEntry& entry); + void createTopLevelEntry(TDEIO::UDSEntry& entry) const; + bool statByName(const TQString &filename, TDEIO::UDSEntry& entry); - bool listRoot(TQValueList &list); + bool listRoot(TQValueList &list); bool parseURL(const KURL &url, TQString &name, TQString &path) const; bool realURL(const TQString &name, const TQString &path, KURL &url) const; int lastErrorCode() const { return m_lastErrorCode; } TQString lastErrorMessage() const { return m_lastErrorMessage; } - bool listAppContents(const TQString &name, TQValueList &list); + bool listAppContents(const TQString &name, TQValueList &list); private slots: KURL findBaseURL(const TQString &filename) const; - void slotEntries(KIO::Job *job, const KIO::UDSEntryList &list); - void slotResult(KIO::Job *job); - void createManPageEntry(KIO::UDSEntry &entry, + void slotEntries(TDEIO::Job *job, const TDEIO::UDSEntryList &list); + void slotResult(TDEIO::Job *job); + void createManPageEntry(TDEIO::UDSEntry &entry, const TQString &shortname); - void createExeEntry(TQValueList &list,KIO::UDSEntry &entry, + void createExeEntry(TQValueList &list,TDEIO::UDSEntry &entry, const TQString &shortname, const TQStringList &fullname); - void createHomeDirEntry(TQValueList &list,KIO::UDSEntry &entry, + void createHomeDirEntry(TQValueList &list,TDEIO::UDSEntry &entry, const TQString &shortname); - void createKDEDataDirEntry(TQValueList &list,KIO::UDSEntry &entry, + void createKDEDataDirEntry(TQValueList &list,TDEIO::UDSEntry &entry, const TQString &shortname); - void createKDEConfigEntry(KIO::UDSEntry &entry, + void createKDEConfigEntry(TDEIO::UDSEntry &entry, const TQString &shortname); - void createStandardConfigEntry(TQValueList &list, KIO::UDSEntry &entry, + void createStandardConfigEntry(TQValueList &list, TDEIO::UDSEntry &entry, const TQString &shortname); - void createStandardDataDirEntry(TQValueList &list, KIO::UDSEntry &entry, + void createStandardDataDirEntry(TQValueList &list, TDEIO::UDSEntry &entry, const TQString &shortname); - void createTmpDirEntry(TQValueList &list, KIO::UDSEntry &entry, + void createTmpDirEntry(TQValueList &list, TDEIO::UDSEntry &entry, const TQString &shortname); TQStringList getAppAddress(const TQString &name); TQStringList getFullLocation(const TQStringList & dirList, const TQString &name, const TQDir::FilterSpec &filter, bool beginswith, bool recursive); private: - void createEntry(KIO::UDSEntry& entry, /*const TQString &directory,*/ + void createEntry(TDEIO::UDSEntry& entry, /*const TQString &directory,*/ const TQString &file); bool m_lastListingEmpty; diff --git a/src/appinfo.protocol b/src/appinfo.protocol index 1831d85..f99b4ed 100644 --- a/src/appinfo.protocol +++ b/src/appinfo.protocol @@ -1,5 +1,5 @@ [Protocol] -exec=kio_app +exec=tdeio_app protocol=appinfo input=none output=filesystem @@ -10,9 +10,9 @@ makedir=true deleting=true linking=true moving=true -Icon=system +Icon=computer maxInstances=4 -#TODO DocPath=kioslave/file.html +#TODO DocPath=tdeioslave/file.html Class=:local deleteRecursive=true fileNameUsedForCopying=Name -- cgit v1.2.1