From de7e5867a65e0a46f1388e3e50bc7eeddd1aecbf Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 27 Jan 2013 01:02:02 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- kioslave/home/kdedmodule/CMakeLists.txt | 41 ----- kioslave/home/kdedmodule/Makefile.am | 13 -- kioslave/home/kdedmodule/homedirnotify.cpp | 185 ----------------------- kioslave/home/kdedmodule/homedirnotify.desktop | 61 -------- kioslave/home/kdedmodule/homedirnotify.h | 48 ------ kioslave/home/kdedmodule/homedirnotifymodule.cpp | 37 ----- kioslave/home/kdedmodule/homedirnotifymodule.h | 36 ----- 7 files changed, 421 deletions(-) delete mode 100644 kioslave/home/kdedmodule/CMakeLists.txt delete mode 100644 kioslave/home/kdedmodule/Makefile.am delete mode 100644 kioslave/home/kdedmodule/homedirnotify.cpp delete mode 100644 kioslave/home/kdedmodule/homedirnotify.desktop delete mode 100644 kioslave/home/kdedmodule/homedirnotify.h delete mode 100644 kioslave/home/kdedmodule/homedirnotifymodule.cpp delete mode 100644 kioslave/home/kdedmodule/homedirnotifymodule.h (limited to 'kioslave/home/kdedmodule') diff --git a/kioslave/home/kdedmodule/CMakeLists.txt b/kioslave/home/kdedmodule/CMakeLists.txt deleted file mode 100644 index 64d343f84..000000000 --- a/kioslave/home/kdedmodule/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES homedirnotify.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded ) - - -##### kded_homedirnotify (module) ############### - -set( target kded_homedirnotify ) - -set( ${target}_SRCS - homedirnotify.cpp homedirnotify.skel - homedirnotifymodule.cpp homedirnotifymodule.skel -) - -tde_add_kpart( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK tdeinit_kded-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kioslave/home/kdedmodule/Makefile.am b/kioslave/home/kdedmodule/Makefile.am deleted file mode 100644 index 3d7a54f9b..000000000 --- a/kioslave/home/kdedmodule/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -kde_module_LTLIBRARIES = kded_homedirnotify.la - -METASOURCES = AUTO -INCLUDES = $(all_includes) - -kded_homedirnotify_la_SOURCES = homedirnotify.cpp homedirnotify.skel homedirnotifymodule.cpp homedirnotifymodule.skel -kded_homedirnotify_la_LDFLAGS = $(all_libraries) -module -avoid-version -kded_homedirnotify_la_LIBADD = $(LIB_KSYCOCA) - - -servicesdir = $(kde_servicesdir)/kded -services_DATA = homedirnotify.desktop - diff --git a/kioslave/home/kdedmodule/homedirnotify.cpp b/kioslave/home/kdedmodule/homedirnotify.cpp deleted file mode 100644 index 823027fe2..000000000 --- a/kioslave/home/kdedmodule/homedirnotify.cpp +++ /dev/null @@ -1,185 +0,0 @@ -/* This file is part of the KDE Project - Copyright (c) 2005 Kévin Ottens - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "homedirnotify.h" - -#include -#include - -#include - -#define MINIMUM_UID 500 - -HomeDirNotify::HomeDirNotify() -: mInited( false ) -{ -} - -void HomeDirNotify::init() -{ - if( mInited ) - return; - mInited = true; - - KUser current_user; - TQValueList groups = current_user.groups(); - TQValueList uid_list; - - TQValueList::iterator groups_it = groups.begin(); - TQValueList::iterator groups_end = groups.end(); - - for(; groups_it!=groups_end; ++groups_it) - { - TQValueList users = (*groups_it).users(); - - TQValueList::iterator it = users.begin(); - TQValueList::iterator users_end = users.end(); - - for(; it!=users_end; ++it) - { - if ((*it).uid()>=MINIMUM_UID - && !uid_list.contains( (*it).uid() ) ) - { - uid_list.append( (*it).uid() ); - - TQString name = (*it).loginName(); - KURL url; - url.setPath( (*it).homeDir() ); - - m_homeFoldersMap[name] = url; - } - } - } -} - -KURL HomeDirNotify::toHomeURL(const KURL &url) -{ - kdDebug() << "HomeDirNotify::toHomeURL(" << url << ")" << endl; - - init(); - TQMap::iterator it = m_homeFoldersMap.begin(); - TQMap::iterator end = m_homeFoldersMap.end(); - - for (; it!=end; ++it) - { - TQString name = it.key(); - KURL base = it.data(); - - if ( base.isParentOf(url) ) - { - TQString path = KURL::relativePath(base.path(), - url.path()); - KURL result("home:/"+name+"/"+path); - result.cleanPath(); - kdDebug() << "result => " << result << endl; - return result; - } - } - - kdDebug() << "result => KURL()" << endl; - return KURL(); -} - -KURL::List HomeDirNotify::toHomeURLList(const KURL::List &list) -{ - init(); - KURL::List new_list; - - KURL::List::const_iterator it = list.begin(); - KURL::List::const_iterator end = list.end(); - - for (; it!=end; ++it) - { - KURL url = toHomeURL(*it); - - if (url.isValid()) - { - new_list.append(url); - } - } - - return new_list; -} - -ASYNC HomeDirNotify::FilesAdded(const KURL &directory) -{ - kdDebug() << "HomeDirNotify::FilesAdded" << endl; - - KURL new_dir = toHomeURL(directory); - - if (new_dir.isValid()) - { - KDirNotify_stub notifier("*", "*"); - notifier.FilesAdded( new_dir ); - } -} - -// This hack is required because of the way we manage .desktop files with -// Forwarding Slaves, their URL is out of the ioslave (some home:/ files -// have a file:/ based UDS_URL so that they are executed correctly. -// Hence, FilesRemoved and FilesChanged does nothing... We're forced to use -// FilesAdded to re-list the modified directory. -inline void evil_hack(const KURL::List &list) -{ - KDirNotify_stub notifier("*", "*"); - - KURL::List notified; - - KURL::List::const_iterator it = list.begin(); - KURL::List::const_iterator end = list.end(); - - for (; it!=end; ++it) - { - KURL url = (*it).upURL(); - - if (!notified.contains(url)) - { - notifier.FilesAdded(url); - notified.append(url); - } - } -} - - -ASYNC HomeDirNotify::FilesRemoved(const KURL::List &fileList) -{ - kdDebug() << "HomeDirNotify::FilesRemoved" << endl; - - KURL::List new_list = toHomeURLList(fileList); - - if (!new_list.isEmpty()) - { - //KDirNotify_stub notifier("*", "*"); - //notifier.FilesRemoved( new_list ); - evil_hack(new_list); - } -} - -ASYNC HomeDirNotify::FilesChanged(const KURL::List &fileList) -{ - kdDebug() << "HomeDirNotify::FilesChanged" << endl; - - KURL::List new_list = toHomeURLList(fileList); - - if (!new_list.isEmpty()) - { - //KDirNotify_stub notifier("*", "*"); - //notifier.FilesChanged( new_list ); - evil_hack(new_list); - } -} diff --git a/kioslave/home/kdedmodule/homedirnotify.desktop b/kioslave/home/kdedmodule/homedirnotify.desktop deleted file mode 100644 index aec11b69f..000000000 --- a/kioslave/home/kdedmodule/homedirnotify.desktop +++ /dev/null @@ -1,61 +0,0 @@ -[Desktop Entry] -Type=Service -Name=KDED Home Base URL Notifier -Name[af]=KDED tuis URL inkennissteller -Name[be]=Праверка зменаў мÑÑцовых файлаў KDED -Name[bs]=KDED lokalno obavjeÅ¡tenje o baznom URLu -Name[ca]=Notificador KDED de l'URL d'inici -Name[cs]=Démon upozorňování na domovské URL -Name[csb]=Dôwanié wiédzë o URL-ach domôcegò katalogù dlô KDED -Name[da]=KDED Hjemmebasis-URL pÃ¥mindelser -Name[de]=Ãœberwachung für persönliche Ordner -Name[el]=KDED ειδοποιητής URL αÏχικής βάσης -Name[eo]=KDED Hejmo Bazo URL Avertilo -Name[es]=Notificador de URL de KDED -Name[et]=KDED kodu baas-URLi teadustaja -Name[eu]=KDED hasierako URL oinarriaren iragarlea -Name[fa]=اخطاردهندۀ نشانی وب پایۀ آغازۀ KDED -Name[fi]=KDED:in etä-verkko-osoitteen ilmaisin -Name[fr]=Notification de l'URL de base KDED -Name[fy]=KDED Thúsbasis-URL-adres notifikaasje -Name[gl]=Notificador de URL base de KDED -Name[hr]=KDED URL obavjeÅ¡tavanje domaće baze -Name[hu]=ÉrtesítÅ‘ a KDE saját URL-hez -Name[is]=KDED grunnslóðar tilkynnari -Name[it]=Notifica KDED Home Base URL -Name[ja]=KDED ホームベース URL Nofitier -Name[ka]=KDED ძირითáƒáƒ“ი თáƒáƒ•áƒ¤áƒ£áƒ áƒªáƒšáƒ˜áƒ¡ URL შემტყáƒáƒ‘ინებელი -Name[kk]=KDED Home Base URL құлақтандыру -Name[km]=KDED Remote Base URL Notifier -Name[ko]=KDED ì›ê²© 기반 URL 알리미 -Name[lt]=KDED pagrindinio namų URL priminiklis -Name[nb]=KDED-pÃ¥minner for eksterne nettadresser -Name[nds]=KDED-Narichten för Tohuusorner-URLs -Name[ne]=KDED गृह आधारित यूआरà¤à¤² सूचक -Name[nl]=KDED Thuisbasis-URL-adres notificatie -Name[nn]=KDED-varsel for heimebase -Name[pa]=KDED ਮà©à©±à¨– ਅਧਾਰ URL ਸੂਚਕ -Name[pl]=Powiadamianie o URL-ach katalogu domowego dla KDED -Name[pt]=Notificador de URLs de Base Remotos do KDED -Name[pt_BR]=Serviço de Notificação da URL do KDED -Name[ro]=Notificare KDED pentru URL acasă -Name[ru]=Уведомление о Ñмене базового адреÑа KDED -Name[sk]=KDED notifikátor domovskej URL -Name[sl]=Obvestilnik KDED domaÄega osnovnega URL-ja -Name[sr]=Обавештавач о домаћем базном URL-у, KDED -Name[sr@Latn]=ObaveÅ¡tavaÄ o domaćem baznom URL-u, KDED -Name[sv]=KDED-meddelande om hembaswebbadresser -Name[th]=ตัวà¹à¸ˆà¹‰à¸‡à¹€à¸•à¸·à¸­à¸™ Home Base URL KDED -Name[tr]=KDED Yerel Tabanlı URL Hatırlatıcı -Name[uk]=Сповіщувач домашньої базової адреÑи URL KDED -Name[vi]=Trình thông báo URL trong máy KDED -Name[wa]=Notifieu di l' URL di bÃ¥ze del mÃ¥jhon KDED -Name[zh_CN]=KDED 主页基 URL 通知器 -Name[zh_TW]=KDED 家用基礎 URL é€šçŸ¥ç¨‹å¼ -Comment=Provides change notification for user's home folder ($HOME) -ServiceTypes=KDEDModule -X-TDE-ModuleType=Library -X-TDE-Library=homedirnotify -X-TDE-FactoryName=homedirnotify -X-TDE-Kded-load-on-demand=true -X-TDE-Kded-autoload=true diff --git a/kioslave/home/kdedmodule/homedirnotify.h b/kioslave/home/kdedmodule/homedirnotify.h deleted file mode 100644 index dbbd0845e..000000000 --- a/kioslave/home/kdedmodule/homedirnotify.h +++ /dev/null @@ -1,48 +0,0 @@ -/* This file is part of the KDE Project - Copyright (c) 2005 Kévin Ottens - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef HOMEDIRNOTIFY_H -#define HOMEDIRNOTIFY_H - -#include -#include - -#include - -class HomeDirNotify : public KDirNotify -{ -K_DCOP - -public: - HomeDirNotify(); - -k_dcop: - virtual ASYNC FilesAdded (const KURL &directory); - virtual ASYNC FilesRemoved (const KURL::List &fileList); - virtual ASYNC FilesChanged (const KURL::List &fileList); - -private: - void init(); - KURL toHomeURL(const KURL &url); - KURL::List toHomeURLList(const KURL::List &list); - - TQMap m_homeFoldersMap; - bool mInited; -}; - -#endif diff --git a/kioslave/home/kdedmodule/homedirnotifymodule.cpp b/kioslave/home/kdedmodule/homedirnotifymodule.cpp deleted file mode 100644 index 4eb71c332..000000000 --- a/kioslave/home/kdedmodule/homedirnotifymodule.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* This file is part of the KDE Project - Copyright (c) 2005 Kévin Ottens - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "homedirnotifymodule.h" - -#include -#include -#include - -HomeDirNotifyModule::HomeDirNotifyModule(const TQCString &obj) - : KDEDModule(obj) -{ -} - -extern "C" { - KDE_EXPORT KDEDModule *create_homedirnotify(const TQCString &obj) - { - TDEGlobal::locale()->insertCatalogue("kio_home"); - return new HomeDirNotifyModule(obj); - } -} - diff --git a/kioslave/home/kdedmodule/homedirnotifymodule.h b/kioslave/home/kdedmodule/homedirnotifymodule.h deleted file mode 100644 index 69d96dfc9..000000000 --- a/kioslave/home/kdedmodule/homedirnotifymodule.h +++ /dev/null @@ -1,36 +0,0 @@ -/* This file is part of the KDE Project - Copyright (c) 2005 Kévin Ottens - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef HOMEDIRNOTIFYMODULE_H -#define HOMEDIRNOTIFYMODULE_H - -#include - -#include "homedirnotify.h" - -class HomeDirNotifyModule : public KDEDModule -{ -K_DCOP - -public: - HomeDirNotifyModule(const TQCString &obj); -private: - HomeDirNotify notifier; -}; - -#endif -- cgit v1.2.1