diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-27 01:05:15 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-27 01:05:15 -0600 |
commit | 64df902cf71a8ee258fb85f6be26248f399aa01f (patch) | |
tree | dba58f705042c22cea26b678d5b0e4e9a34bf202 /kfile-plugins/vcf | |
parent | de53c98cab07e9c4b0f5e25dab82830fb6fc67ec (diff) | |
download | tdepim-64df902cf71a8ee258fb85f6be26248f399aa01f.tar.gz tdepim-64df902cf71a8ee258fb85f6be26248f399aa01f.zip |
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'kfile-plugins/vcf')
-rw-r--r-- | kfile-plugins/vcf/CMakeLists.txt | 35 | ||||
-rw-r--r-- | kfile-plugins/vcf/Makefile.am | 22 | ||||
-rw-r--r-- | kfile-plugins/vcf/kfile_vcf.cpp | 103 | ||||
-rw-r--r-- | kfile-plugins/vcf/kfile_vcf.desktop | 65 | ||||
-rw-r--r-- | kfile-plugins/vcf/kfile_vcf.h | 38 |
5 files changed, 0 insertions, 263 deletions
diff --git a/kfile-plugins/vcf/CMakeLists.txt b/kfile-plugins/vcf/CMakeLists.txt deleted file mode 100644 index 114c6da77..000000000 --- a/kfile-plugins/vcf/CMakeLists.txt +++ /dev/null @@ -1,35 +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} - ${CMAKE_BINARY_DIR} - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES kfile_vcf.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) - - -##### kfile_vcf (module) ######################## - -tde_add_kpart( kfile_vcf AUTOMOC - SOURCES kfile_vcf.cpp - LINK kabc-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kfile-plugins/vcf/Makefile.am b/kfile-plugins/vcf/Makefile.am deleted file mode 100644 index 087600d7c..000000000 --- a/kfile-plugins/vcf/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -## Makefile.am for vcf file meta info plugin - -# set the include path for X, qt and KDE -INCLUDES = $(all_includes) - -# these are the headers for your project -noinst_HEADERS = kfile_vcf.h - -kde_module_LTLIBRARIES = kfile_vcf.la - -kfile_vcf_la_SOURCES = kfile_vcf.cpp -kfile_vcf_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_QT) -ltdecore -kfile_vcf_la_LIBADD = $(LIB_KSYCOCA) $(LIB_KABC) - -# let automoc handle all of the meta source files (moc) -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) kfile_vcf.cpp -o $(podir)/kfile_vcf.pot - -services_DATA = kfile_vcf.desktop -servicesdir = $(kde_servicesdir) diff --git a/kfile-plugins/vcf/kfile_vcf.cpp b/kfile-plugins/vcf/kfile_vcf.cpp deleted file mode 100644 index c8c853f76..000000000 --- a/kfile-plugins/vcf/kfile_vcf.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* This file is part of the KDE project - * Copyright (C) 2002 Shane Wright <me@shanewright.co.uk> - * - * 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 version 2. - * - * 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; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#include <kdebug.h> -#include <config.h> -#include "kfile_vcf.h" - -#include <kprocess.h> -#include <klocale.h> -#include <kgenericfactory.h> -#include <kabc/vcardconverter.h> - -#include <tqdict.h> -#include <tqfile.h> - -typedef KGenericFactory<KVcfPlugin> VcfFactory; - -K_EXPORT_COMPONENT_FACTORY(kfile_vcf, VcfFactory( "kfile_vcf" )) - -KVcfPlugin::KVcfPlugin(TQObject *parent, const char *name, - const TQStringList &args) - - : KFilePlugin(parent, name, args) -{ - KFileMimeTypeInfo* info = addMimeTypeInfo( "text/x-vcard" ); - - KFileMimeTypeInfo::GroupInfo* group = 0L; - - group = addGroupInfo(info, "Technical", i18n("Technical Details")); - - KFileMimeTypeInfo::ItemInfo* item; - - item = addItemInfo(group, "Name", i18n("Name"), TQVariant::String); - item = addItemInfo(group, "Email", i18n("Email"), TQVariant::String); - item = addItemInfo(group, "Telephone", i18n("Telephone"), TQVariant::String); -} - - -bool KVcfPlugin::readInfo( KFileMetaInfo& info, uint /*what*/ ) -{ - TQFile file(info.path()); - - if (!file.open(IO_ReadOnly)) - { - kdDebug(7034) << "Couldn't open " << TQString(TQFile::encodeName(info.path())) << endl; - return false; - } - - // even the vcard thumbnail TQString::fromUtf8(buf_name));creator reads the full file ... - // The following is partly copied from there - TQString contents = file.readAll(); - file.close(); - - KABC::VCardConverter converter; -#if defined(KABC_VCARD_ENCODING_FIX) - KABC::Addressee addr = converter.parseVCardRaw( contents.utf8() ); -#else - KABC::Addressee addr = converter.parseVCard( contents ); -#endif - KFileMetaInfoGroup group = appendGroup(info, "Technical"); - - // prepare the text - TQString name = addr.formattedName().simplifyWhiteSpace(); - if ( name.isEmpty() ) - name = addr.givenName() + " " + addr.familyName(); - name = name.simplifyWhiteSpace(); - - if ( ! name.isEmpty() ) - appendItem(group, "Name", name); - - if ( ! addr.preferredEmail().isEmpty() ) - appendItem(group, "Email", addr.preferredEmail()); - - KABC::PhoneNumber::List pnList = addr.phoneNumbers(); - TQStringList phoneNumbers; - for (unsigned int no=0; no<pnList.count(); ++no) { - TQString pn = pnList[no].number().simplifyWhiteSpace(); - if (!pn.isEmpty() && !phoneNumbers.contains(pn)) - phoneNumbers.append(pn); - } - if ( !phoneNumbers.isEmpty() ) - appendItem(group, "Telephone", phoneNumbers.join("\n")); - - return true; -} - -#include "kfile_vcf.moc" diff --git a/kfile-plugins/vcf/kfile_vcf.desktop b/kfile-plugins/vcf/kfile_vcf.desktop deleted file mode 100644 index 88ba00d15..000000000 --- a/kfile-plugins/vcf/kfile_vcf.desktop +++ /dev/null @@ -1,65 +0,0 @@ -[Desktop Entry] -Type=Service -Name=vCard Info -Name[af]=Vkaart Inligting -Name[be]=Інфармацыя аб vCard -Name[bg]=Информация за vCard -Name[br]=Titouroù diwar-benn vCard -Name[ca]=Informació de vCard -Name[cs]=VCard info -Name[cy]=Gwybodaeth vCard -Name[da]=VCard-info -Name[de]=vCard-Info -Name[el]=Πληροφορίες vCard -Name[eo]=vCard-informo -Name[es]=Info de vCard -Name[et]=vCardi info -Name[eu]=vCard informazioa -Name[fa]=اطلاعات vCard -Name[fi]=vCard-tiedot -Name[fr]=Informations vCard -Name[fy]=vCard-ynformaasje -Name[gl]=Información de vCard -Name[he]=מידע vCard -Name[hi]=वी-कार्ड जानकारी -Name[hu]=VCard-jellemzők -Name[is]=vCard upplýsingar -Name[it]=Informazioni vCard -Name[ja]=vCard 情報 -Name[kk]=vCard мәліметі -Name[km]=ព័ត៌មាន vCard -Name[lt]=vCard informacija -Name[mk]=Информации за vCard -Name[ms]=Info vCard -Name[mt]=Informazzjoni vCard -Name[nb]=vCard info -Name[nds]=vCard-Informatschonen -Name[ne]=भी कार्ड सुचना -Name[nl]=vCard-informatie -Name[nn]=vCard-info -Name[nso]=Tshedimoso ya vKarata -Name[pa]=vCard ਜਾਣਕਾਰੀ -Name[pl]=Informacja vCard -Name[pt]=Informação do vCard -Name[pt_BR]=Informações sobre vCard -Name[ro]=Informaţii vCard -Name[ru]=Сведения о визитке vCard -Name[se]=vCard-dieđut -Name[sl]=Informacije o vCard -Name[sr]=vCard информације -Name[sr@Latn]=vCard informacije -Name[sv]=vCard-information -Name[ta]=விஅட்டை தகவல் -Name[tg]=Иттилоот дар бораи визиткаи vCard -Name[tr]=VCard Bilgisi -Name[uk]=Інформація про vCard -Name[ven]=Mafhungo a vCard -Name[xh]=Inkcukacha ye vCard -Name[zh_CN]=vCard 信息 -Name[zh_TW]=vCard 資訊 -Name[zu]=Ulwazi lwe-vCard -ServiceTypes=KFilePlugin -X-TDE-Library=kfile_vcf -MimeType=text/x-vcard -PreferredGroups=Technical -PreferredItems=Name,Email,Telephone diff --git a/kfile-plugins/vcf/kfile_vcf.h b/kfile-plugins/vcf/kfile_vcf.h deleted file mode 100644 index 0a66e880e..000000000 --- a/kfile-plugins/vcf/kfile_vcf.h +++ /dev/null @@ -1,38 +0,0 @@ -/* This file is part of the KDE project - * Copyright (C) 2002 Shane Wright <me@shanewright.co.uk> - * - * 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 version 2. - * - * 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; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#ifndef __KFILE_VCF_H__ -#define __KFILE_VCF_H__ - -#include <kfilemetainfo.h> - -class TQStringList; - -class KVcfPlugin: public KFilePlugin -{ - Q_OBJECT - - -public: - KVcfPlugin( TQObject *parent, const char *name, const TQStringList& args ); - - virtual bool readInfo( KFileMetaInfo& info, uint what); -}; - -#endif |