diff options
| author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-27 01:05:39 -0600 |
|---|---|---|
| committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-27 01:05:39 -0600 |
| commit | ff94d46e423398804d2ae63faeb114c2cf604fc4 (patch) | |
| tree | 4481ffd491d15ac15081cea46d7cc298ef6351a4 /kfile-plugins/ts | |
| parent | b9553cef2a3cd9f5b89c8aca6f4b7781a079dbb7 (diff) | |
| download | tdesdk-ff94d46e423398804d2ae63faeb114c2cf604fc4.tar.gz tdesdk-ff94d46e423398804d2ae63faeb114c2cf604fc4.zip | |
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'kfile-plugins/ts')
| -rw-r--r-- | kfile-plugins/ts/CMakeLists.txt | 35 | ||||
| -rw-r--r-- | kfile-plugins/ts/Makefile.am | 21 | ||||
| -rw-r--r-- | kfile-plugins/ts/kfile_ts.cpp | 93 | ||||
| -rw-r--r-- | kfile-plugins/ts/kfile_ts.desktop | 54 | ||||
| -rw-r--r-- | kfile-plugins/ts/kfile_ts.h | 40 |
5 files changed, 0 insertions, 243 deletions
diff --git a/kfile-plugins/ts/CMakeLists.txt b/kfile-plugins/ts/CMakeLists.txt deleted file mode 100644 index 4e68beb6..00000000 --- a/kfile-plugins/ts/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -################################################# -# -# (C) 2012 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 kfile_ts.desktop - DESTINATION ${SERVICES_INSTALL_DIR} ) - - -##### kfile_ts (module) ######################### - -tde_add_kpart( kfile_ts AUTOMOC - SOURCES kfile_ts.cpp - LINK kio-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kfile-plugins/ts/Makefile.am b/kfile-plugins/ts/Makefile.am deleted file mode 100644 index dd64ec48..00000000 --- a/kfile-plugins/ts/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -## Makefile.am for text file meta info plugin - -# set the include path for X, qt and KDE -INCLUDES = $(all_includes) - -noinst_HEADERS = kfile_ts.h - -kde_module_LTLIBRARIES = kfile_ts.la - -kfile_ts_la_SOURCES = kfile_ts.cpp -kfile_ts_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -kfile_ts_la_LIBADD = $(LIB_KIO) - -# let automoc handle all of the meta source files (moc) -METASOURCES = AUTO - -messages: - $(XGETTEXT) *.cpp -o $(podir)/kfile_ts.pot - -services_DATA = kfile_ts.desktop -servicesdir = $(kde_servicesdir) diff --git a/kfile-plugins/ts/kfile_ts.cpp b/kfile-plugins/ts/kfile_ts.cpp deleted file mode 100644 index 0d6f5dc1..00000000 --- a/kfile-plugins/ts/kfile_ts.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* This file is part of the KDE project - * Copyright (C) 2002 Carsten Niehaus <cniehaus@kde.org> - * - * 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 "kfile_ts.h" - -#include <kgenericfactory.h> -#include <kdebug.h> - -#include <tqfile.h> -#include <tqstringlist.h> - -typedef KGenericFactory<KTsPlugin> TsFactory; - -K_EXPORT_COMPONENT_FACTORY(kfile_ts, TsFactory("kfile_ts")) - -KTsPlugin::KTsPlugin(TQObject *parent, const char *name, - const TQStringList &args) : KFilePlugin(parent, name, args) -{ - makeMimeTypeInfo( "application/x-linguist" ); -} - -void KTsPlugin::makeMimeTypeInfo(const TQString& mimeType) -{ - KFileMimeTypeInfo* info = addMimeTypeInfo(mimeType); - - KFileMimeTypeInfo::GroupInfo* group = - addGroupInfo(info, "General", i18n("General")); - - KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo(group, "Messages", i18n("Messages"), TQVariant::Int); - setAttributes(item, KFileMimeTypeInfo::Averaged); - item = addItemInfo(group, "Translated", i18n("Translated"), TQVariant::Int); - setAttributes(item, KFileMimeTypeInfo::Averaged); - item = addItemInfo(group, "Untranslated", i18n("Untranslated"), TQVariant::Int); - setAttributes(item, KFileMimeTypeInfo::Averaged); - item = addItemInfo(group, "Obsolete", i18n("Obsolete"), TQVariant::Int); -} - -bool KTsPlugin::readInfo(KFileMetaInfo& info, uint) -{ - TQFile f(info.path()); - if (!f.open(IO_ReadOnly)) - return false; - - int messages = 0; - int untranslated = 0; - int obsolete = 0; - - TQTextStream stream( &f ); - TQString line = stream.readLine(); - - // is it really a linguist file? - if (!line.contains("<!DOCTYPE TS>", false)) - return false; - - while (!stream.eof()) - { - line = stream.readLine(); - - if (line.contains("type=\"obsolete\"")) obsolete++; - - if (line.contains("<source>")) messages++; - - if (line.contains("type=\"unfinished\"")) untranslated++; - - } - - KFileMetaInfoGroup group = appendGroup(info, "General"); - appendItem(group, "Messages", messages); - appendItem(group, "Translated", messages-untranslated-obsolete); - appendItem(group, "Untranslated", untranslated); - appendItem(group, "Obsolete", obsolete); - - return true; -} - -#include "kfile_ts.moc" diff --git a/kfile-plugins/ts/kfile_ts.desktop b/kfile-plugins/ts/kfile_ts.desktop deleted file mode 100644 index be4954ad..00000000 --- a/kfile-plugins/ts/kfile_ts.desktop +++ /dev/null @@ -1,54 +0,0 @@ -[Desktop Entry] -Type=Service -Name=Qt Linguist File Info -Name[bg]=Информация за файла Qt Linguist -Name[br]=Restr titouroù Qt Linguist -Name[bs]=Qt Linguist informacije o datoteci -Name[ca]=Informació fitxer de Qt Linguist -Name[cs]=Info o souboru Qt Linguist -Name[cy]=Gwybodaeth Ffeil Qt Linguist -Name[da]=Qt Linguist Fil-info -Name[de]=Qt Linguist-Dateiinfo -Name[el]=Πληροφορίες αρχείου Qt Linguist -Name[es]=Información de archivo de Qt Linguist -Name[et]=Qt Linguisti faili info -Name[eu]=Qt Linguist fitxategi informazioa -Name[fa]=اطلاعات پروندۀ زبانشناسQt -Name[fi]=Qt Linquist -tiedoston tiedot -Name[fr]=Fichier d'informations Qt Linguist -Name[ga]=Eolas faoi Chomhad Qt Linguist -Name[gl]=Información do Ficheiro de Qt Linguist -Name[hi]=क्यूटी लिंग्विस्ट फ़ाइल जानकारी -Name[hu]=Qt Linguist fájljellemzők -Name[is]=Qt Linguist skráarupplýsingar -Name[it]=Informazioni file per Qt Linguist -Name[ja]=Qt Linguist ファイル情報 -Name[ka]=Qt Linguist ფაილის ინფორმაცია -Name[kk]=Qt Linguist файл мәліметі -Name[lt]=Qt Linguist bylos informacija -Name[nb]=Informasjon om Qt Linguist-fil -Name[nds]=QtLinguist-Datei-Info -Name[ne]=Qt बहुभाषी फाइल सूचना -Name[nl]=Qt Linquïst-bestandsinformatie -Name[nn]=Informasjon om Qt Linguist-fil -Name[pa]=Qt Linguist ਫਾਇਲ ਜਾਣਕਾਰੀ -Name[pl]=Informacja pliku Qt Linguist -Name[pt]=Informação do Ficheiro do Qt Linguist -Name[pt_BR]=Arquivo de Informações de Lingüística do Qt -Name[ru]=Информация о файле в формате Qt Linguist -Name[sk]=Informácie pre Qt Linguist -Name[sl]=Informacije o Qt Linguist -Name[sr]=Информације о фајлу Qt Linguist-а -Name[sr@Latn]=Informacije o fajlu Qt Linguist-a -Name[sv]=Qt Linguist-filinformation -Name[ta]=Qt மொழியியல் கோப்புகள் தகவல் -Name[tg]=Ахборот дар бораи файл дар формати Qt Linguist -Name[tr]=Qt Dilbilimci Dosya Bilgisi -Name[uk]=інформація про файл формату Qt Linguist -Name[zh_CN]=Qt 语言大师文件信息 -Name[zh_TW]=Qt 語言檔資訊 -ServiceTypes=KFilePlugin -X-TDE-Library=kfile_ts -MimeType=application/x-linguist -PreferredGroups=General -PreferredItems=Messages,Translated,Untranslated,Fuzzi diff --git a/kfile-plugins/ts/kfile_ts.h b/kfile-plugins/ts/kfile_ts.h deleted file mode 100644 index f60972e1..00000000 --- a/kfile-plugins/ts/kfile_ts.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - * Copyright (C) 2002 Carsten Niehaus <cniehaus@kde.org> - * - * 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_TS_H_ -#define __KFILE_TS_H_ - -#include <kfilemetainfo.h> - -class TQStringList; - -class KTsPlugin: public KFilePlugin -{ - Q_OBJECT - - -public: - KTsPlugin(TQObject *parent, const char *name, const TQStringList& args); - virtual bool readInfo(KFileMetaInfo& info, uint what); - -private: - void makeMimeTypeInfo(const TQString& mimeType); -}; - -#endif |
