From 8e55bfc59469faf50b41d90ac716b89f5fc1c684 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 7 May 2022 20:46:21 +0900 Subject: Removed 'app:/' protocol. Removed unnecessary icons. Signed-off-by: Michele Calgaro --- src/CMakeLists.txt | 5 +- src/app.cpp | 175 --------------------------------- src/app.h | 47 --------- src/app.protocol | 18 ---- src/appimpl.cpp | 5 +- src/appinfo.cpp | 175 +++++++++++++++++++++++++++++++++ src/appinfo.h | 47 +++++++++ src/icons/CMakeLists.txt | 1 - src/icons/hi64-action-binaryfolder.png | Bin 9287 -> 0 bytes src/icons/hi64-action-cachefolder.png | Bin 8630 -> 0 bytes src/icons/hi64-action-configfolder.png | Bin 8715 -> 0 bytes src/icons/hi64-action-tmpfolder.png | Bin 8641 -> 0 bytes 12 files changed, 225 insertions(+), 248 deletions(-) delete mode 100644 src/app.cpp delete mode 100644 src/app.h delete mode 100644 src/app.protocol create mode 100644 src/appinfo.cpp create mode 100644 src/appinfo.h delete mode 100644 src/icons/CMakeLists.txt delete mode 100644 src/icons/hi64-action-binaryfolder.png delete mode 100644 src/icons/hi64-action-cachefolder.png delete mode 100644 src/icons/hi64-action-configfolder.png delete mode 100644 src/icons/hi64-action-tmpfolder.png diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 331739e..ff123d5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,8 +9,6 @@ # ################################################# -add_subdirectory( icons ) - include_directories( ${TQT_INCLUDE_DIRS} ${TDE_INCLUDE_DIR} @@ -26,7 +24,6 @@ link_directories( ##### other data ################################ -install( FILES app.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) install( FILES appinfo.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) @@ -35,7 +32,7 @@ install( FILES appinfo.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) set( target tdeio_appinfo ) set( ${target}_SRCS - app.cpp appimpl.cpp + appinfo.cpp appimpl.cpp ) tde_add_kpart( ${target} AUTOMOC diff --git a/src/app.cpp b/src/app.cpp deleted file mode 100644 index 6580df8..0000000 --- a/src/app.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/*************************************************************************** - * $Id: tork.cpp,v 1.160 2007/12/30 12:58:22 hoganrobert Exp $ - * Copyright (C) 2006 by Robert Hogan * - * robert@roberthogan.net * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#include - -#include -#include -#include -#include - -#include "app.h" - -using namespace TDEIO; - -extern "C" -{ - int kdemain(int argc, char **argv) - { - kdDebug(7101) << "*** Starting tdeio_app " << endl; - - if (argc != 4) - { - kdDebug(7101) << "Usage: tdeio_app protocol domain-socket1 domain-socket2" << endl; - exit(255); - } - - TDEInstance instance("tdeio_app"); - tdeio_appProtocol slave(argv[2], argv[3]); - slave.dispatchLoop(); - return 0; - } -} - - -tdeio_appProtocol::tdeio_appProtocol(const TQCString &pool_socket, const TQCString &app_socket) - : SlaveBase("tdeio_app", pool_socket, app_socket) -{ - kdDebug() << "tdeio_appProtocol::tdeio_appProtocol()" << endl; -} - - -tdeio_appProtocol::~tdeio_appProtocol() -{ - kdDebug() << "tdeio_appProtocol::~tdeio_appProtocol()" << endl; -} - - -void tdeio_appProtocol::stat(const KURL &url) -{ - kdDebug() << "tdeio_appProtocol::stat: " << url << endl; - - TQString path = url.path(); - if (path.isEmpty() || path == "/") - { - kdDebug() << "tdeio_appProtocol::stat: " << "creating top level entry" << endl; - // The root is "virtual" - it's not a single physical directory - TDEIO::UDSEntry entry; - m_impl.createTopLevelEntry(entry); - statEntry(entry); - finished(); - return; - } - - TQString name; - bool ok = m_impl.parseURL(url, name, path); - if (!ok) - { - kdDebug() << "tdeio_appProtocol::stat: " << "can't parse url" << endl; - error(TDEIO::ERR_MALFORMED_URL, url.prettyURL()); - return; - } - - if (path.isEmpty()) - { - kdDebug() << "tdeio_appProtocol::stat: " << "url empty after parsing" << endl; - - TDEIO::UDSEntry entry; - if (m_impl.statByName(name, entry)) - { - statEntry(entry); - finished(); - } - else - { - error(TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL()); - } - } - else - { - kdDebug() << "tdeio_appProtocol::stat: " << "url not empty after parsing: statting" << endl; - SlaveBase::stat(url); - } -} - -void tdeio_appProtocol::listDir(const KURL &url) -{ - kdDebug() << "tdeio_appProtocol::listDir: " << url << endl; - - if (url.path().length() <= 1) - { - kdDebug() << "tdeio_appProtocol::listDir: " << "url empty: listing root" << endl; - listRoot(); - return; - } - - TQString name, path; - bool ok = m_impl.parseURL(url, name, path); - if (!ok) - { - error(TDEIO::ERR_MALFORMED_URL, url.prettyURL()); - return; - } - - kdDebug() << "tdeio_appProtocol::listDir: " << "name is " << name << endl; - kdDebug() << "tdeio_appProtocol::listDir: " << "path is " << path << endl; - - // We've been given something like appinfo:/name - listAppContents(name); -} - -void tdeio_appProtocol::listRoot() -{ - TDEIO::UDSEntryList system_entries; - bool ok = m_impl.listRoot(system_entries); - if (!ok) - { - error(m_impl.lastErrorCode(), m_impl.lastErrorMessage()); - return; - } - - totalSize(system_entries.count() + 1); - - TDEIO::UDSEntry entry; - m_impl.createTopLevelEntry(entry); - listEntry(entry, false); - listEntries(system_entries); - finished(); -} - -void tdeio_appProtocol::listAppContents(const TQString &name) -{ - TDEIO::UDSEntryList app_entries; - bool ok = m_impl.listAppContents(name, app_entries); - if (!ok) - { - error(m_impl.lastErrorCode(), m_impl.lastErrorMessage()); - return; - } - - totalSize(app_entries.count() + 1); - - TDEIO::UDSEntry entry; - m_impl.createTopLevelEntry(entry); - listEntry(entry, false); - listEntries(app_entries); - finished(); -} diff --git a/src/app.h b/src/app.h deleted file mode 100644 index 3cf089a..0000000 --- a/src/app.h +++ /dev/null @@ -1,47 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006 by Robert Hogan * - * robert@roberthogan.net * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#ifndef TDEIO_APP_H_ -#define TDEIO_APP_H_ - -#include - -#include "appimpl.h" - -class TQCString; -class TQString; -class KURL; - -class tdeio_appProtocol : public TDEIO::SlaveBase -{ -public: - 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); - -private: - void listRoot(); - void listAppContents(const TQString &name); - - AppImpl m_impl; -}; - -#endif diff --git a/src/app.protocol b/src/app.protocol deleted file mode 100644 index 7e11046..0000000 --- a/src/app.protocol +++ /dev/null @@ -1,18 +0,0 @@ -[Protocol] -exec=tdeio_appinfo -protocol=app -input=none -output=filesystem -listing=Type,Name,Size,Date,AccessDate,Access,Owner,Group,Link -reading=true -writing=true -makedir=true -deleting=true -linking=true -moving=true -Icon=computer -maxInstances=4 -#TODO DocPath=tdeioslave/file.html -Class=:local -deleteRecursive=true -fileNameUsedForCopying=Name diff --git a/src/appimpl.cpp b/src/appimpl.cpp index 0f5639e..f0efb32 100644 --- a/src/appimpl.cpp +++ b/src/appimpl.cpp @@ -20,6 +20,8 @@ #include "appimpl.h" +#include + #include #include @@ -28,11 +30,8 @@ #include #include #include -#include #include -#include - AppImpl::AppImpl() : TQObject() { diff --git a/src/appinfo.cpp b/src/appinfo.cpp new file mode 100644 index 0000000..6cc34f8 --- /dev/null +++ b/src/appinfo.cpp @@ -0,0 +1,175 @@ +/*************************************************************************** + * $Id: tork.cpp,v 1.160 2007/12/30 12:58:22 hoganrobert Exp $ + * Copyright (C) 2006 by Robert Hogan * + * robert@roberthogan.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#include + +#include +#include +#include +#include + +#include "appinfo.h" + +using namespace TDEIO; + +extern "C" +{ + int kdemain(int argc, char **argv) + { + kdDebug(7101) << "*** Starting tdeio_appinfo " << endl; + + if (argc != 4) + { + kdDebug(7101) << "Usage: tdeio_appinfo protocol domain-socket1 domain-socket2" << endl; + exit(255); + } + + TDEInstance instance("tdeio_appinfo"); + tdeio_appInfoProtocol slave(argv[2], argv[3]); + slave.dispatchLoop(); + return 0; + } +} + + +tdeio_appInfoProtocol::tdeio_appInfoProtocol(const TQCString &pool_socket, + const TQCString &app_socket) : SlaveBase("tdeio_appinfo", pool_socket, app_socket) +{ + kdDebug() << "tdeio_appInfoProtocol::tdeio_appInfoProtocol()" << endl; +} + + +tdeio_appInfoProtocol::~tdeio_appInfoProtocol() +{ + kdDebug() << "tdeio_appInfoProtocol::~tdeio_appInfoProtocol()" << endl; +} + + +void tdeio_appInfoProtocol::stat(const KURL &url) +{ + kdDebug() << "tdeio_appInfoProtocol::stat: " << url << endl; + + TQString path = url.path(); + if (path.isEmpty() || path == "/") + { + kdDebug() << "tdeio_appInfoProtocol::stat: " << "creating top level entry" << endl; + // The root is "virtual" - it's not a single physical directory + TDEIO::UDSEntry entry; + m_impl.createTopLevelEntry(entry); + statEntry(entry); + finished(); + return; + } + + TQString name; + bool ok = m_impl.parseURL(url, name, path); + if (!ok) + { + kdDebug() << "tdeio_appInfoProtocol::stat: " << "can't parse url" << endl; + error(TDEIO::ERR_MALFORMED_URL, url.prettyURL()); + return; + } + + if (path.isEmpty()) + { + kdDebug() << "tdeio_appInfoProtocol::stat: " << "url empty after parsing" << endl; + + TDEIO::UDSEntry entry; + if (m_impl.statByName(name, entry)) + { + statEntry(entry); + finished(); + } + else + { + error(TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL()); + } + } + else + { + kdDebug() << "tdeio_appInfoProtocol::stat: " << "url not empty after parsing: statting" << endl; + SlaveBase::stat(url); + } +} + +void tdeio_appInfoProtocol::listDir(const KURL &url) +{ + kdDebug() << "tdeio_appInfoProtocol::listDir: " << url << endl; + + if (url.path().length() <= 1) + { + kdDebug() << "tdeio_appInfoProtocol::listDir: " << "url empty: listing root" << endl; + listRoot(); + return; + } + + TQString name, path; + bool ok = m_impl.parseURL(url, name, path); + if (!ok) + { + error(TDEIO::ERR_MALFORMED_URL, url.prettyURL()); + return; + } + + kdDebug() << "tdeio_appInfoProtocol::listDir: " << "name is " << name << endl; + kdDebug() << "tdeio_appInfoProtocol::listDir: " << "path is " << path << endl; + + // We've been given something like appinfo:/name + listAppContents(name); +} + +void tdeio_appInfoProtocol::listRoot() +{ + TDEIO::UDSEntryList system_entries; + bool ok = m_impl.listRoot(system_entries); + if (!ok) + { + error(m_impl.lastErrorCode(), m_impl.lastErrorMessage()); + return; + } + + totalSize(system_entries.count() + 1); + + TDEIO::UDSEntry entry; + m_impl.createTopLevelEntry(entry); + listEntry(entry, false); + listEntries(system_entries); + finished(); +} + +void tdeio_appInfoProtocol::listAppContents(const TQString &name) +{ + TDEIO::UDSEntryList app_entries; + bool ok = m_impl.listAppContents(name, app_entries); + if (!ok) + { + error(m_impl.lastErrorCode(), m_impl.lastErrorMessage()); + return; + } + + totalSize(app_entries.count() + 1); + + TDEIO::UDSEntry entry; + m_impl.createTopLevelEntry(entry); + listEntry(entry, false); + listEntries(app_entries); + finished(); +} diff --git a/src/appinfo.h b/src/appinfo.h new file mode 100644 index 0000000..c8b6c57 --- /dev/null +++ b/src/appinfo.h @@ -0,0 +1,47 @@ +/*************************************************************************** + * Copyright (C) 2006 by Robert Hogan * + * robert@roberthogan.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#ifndef TDEIO_APPINFO_H_ +#define TDEIO_APPINFO_H_ + +#include + +#include "appimpl.h" + +class TQCString; +class TQString; +class KURL; + +class tdeio_appInfoProtocol : public TDEIO::SlaveBase +{ +public: + tdeio_appInfoProtocol(const TQCString &pool_socket, const TQCString &app_socket); + virtual ~tdeio_appInfoProtocol(); + virtual void listDir(const KURL &url); + virtual void stat(const KURL &url); + +private: + void listRoot(); + void listAppContents(const TQString &name); + + AppImpl m_impl; +}; + +#endif diff --git a/src/icons/CMakeLists.txt b/src/icons/CMakeLists.txt deleted file mode 100644 index 6aad750..0000000 --- a/src/icons/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -tde_install_icons( tdeio_appinfo ) diff --git a/src/icons/hi64-action-binaryfolder.png b/src/icons/hi64-action-binaryfolder.png deleted file mode 100644 index cd02b16..0000000 Binary files a/src/icons/hi64-action-binaryfolder.png and /dev/null differ diff --git a/src/icons/hi64-action-cachefolder.png b/src/icons/hi64-action-cachefolder.png deleted file mode 100644 index 950ba08..0000000 Binary files a/src/icons/hi64-action-cachefolder.png and /dev/null differ diff --git a/src/icons/hi64-action-configfolder.png b/src/icons/hi64-action-configfolder.png deleted file mode 100644 index e47ed4b..0000000 Binary files a/src/icons/hi64-action-configfolder.png and /dev/null differ diff --git a/src/icons/hi64-action-tmpfolder.png b/src/icons/hi64-action-tmpfolder.png deleted file mode 100644 index 20c3057..0000000 Binary files a/src/icons/hi64-action-tmpfolder.png and /dev/null differ -- cgit v1.2.1