From 8cc395707c71d7969386b4e365ef827ce2492c74 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 27 Jan 2013 00:52:29 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- fileplugin/Makefile.am | 12 +++--- fileplugin/kfile_kbarcode.cpp | 84 ------------------------------------- fileplugin/kfile_kbarcode.desktop | 9 ---- fileplugin/kfile_kbarcode.h | 24 ----------- fileplugin/tdefile_kbarcode.cpp | 84 +++++++++++++++++++++++++++++++++++++ fileplugin/tdefile_kbarcode.desktop | 9 ++++ fileplugin/tdefile_kbarcode.h | 24 +++++++++++ 7 files changed, 123 insertions(+), 123 deletions(-) delete mode 100644 fileplugin/kfile_kbarcode.cpp delete mode 100644 fileplugin/kfile_kbarcode.desktop delete mode 100644 fileplugin/kfile_kbarcode.h create mode 100644 fileplugin/tdefile_kbarcode.cpp create mode 100644 fileplugin/tdefile_kbarcode.desktop create mode 100644 fileplugin/tdefile_kbarcode.h (limited to 'fileplugin') diff --git a/fileplugin/Makefile.am b/fileplugin/Makefile.am index da17f8d..12e5903 100644 --- a/fileplugin/Makefile.am +++ b/fileplugin/Makefile.am @@ -1,18 +1,18 @@ # set the include path for X, qt and KDE INCLUDES = $(all_includes) -kde_module_LTLIBRARIES = kfile_kbarcode.la +kde_module_LTLIBRARIES = tdefile_kbarcode.la -kfile_kbarcode_la_SOURCES = kfile_kbarcode.cpp -kfile_kbarcode_la_LDFLAGS = -module $(KDE_PLUGIN) $(LIB_QT) $(all_libraries) -kfile_kbarcode_la_LIBADD = $(LIB_KSYCOCA) $(LIB_TDECORE) +tdefile_kbarcode_la_SOURCES = tdefile_kbarcode.cpp +tdefile_kbarcode_la_LDFLAGS = -module $(KDE_PLUGIN) $(LIB_QT) $(all_libraries) +tdefile_kbarcode_la_LIBADD = $(LIB_KSYCOCA) $(LIB_TDECORE) # let automoc handle all of the meta source files (moc) METASOURCES = AUTO # messages: rc.cpp -# $(XGETTEXT) *.cpp -o $(podir)/kfile_kbarcode.pot +# $(XGETTEXT) *.cpp -o $(podir)/tdefile_kbarcode.pot -services_DATA = kfile_kbarcode.desktop +services_DATA = tdefile_kbarcode.desktop servicesdir = $(kde_servicesdir) diff --git a/fileplugin/kfile_kbarcode.cpp b/fileplugin/kfile_kbarcode.cpp deleted file mode 100644 index dbb9aac..0000000 --- a/fileplugin/kfile_kbarcode.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (C) 2003 Dominik Seichter - */ - -#include "kfile_kbarcode.h" - -#include -#include - -#include -#include - -K_EXPORT_COMPONENT_FACTORY(kfile_kbarcode, KGenericFactory( "kfile_kbarcode" )); - -KBarcodePlugin::KBarcodePlugin(TQObject *parent, const char *name, - const TQStringList &args) - - : KFilePlugin(parent, name, args) -{ - KFileMimeTypeInfo* info = addMimeTypeInfo( "application/kbarcode-label" ); - - KFileMimeTypeInfo::GroupInfo* group = 0L; - - group = addGroupInfo(info, "Label", i18n("Label")); - - KFileMimeTypeInfo::ItemInfo* item; - - item = addItemInfo(group, "Manufacturer", i18n("Manufacturer"), TQVariant::String ); - item = addItemInfo(group, "Type", i18n("Type"), TQVariant::String); - item = addItemInfo(group, "Description", i18n("Description"), TQVariant::String ); - item = addItemInfo(group, "Id", i18n("Label Id"), TQVariant::String ); - item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size); - setHint( item, KFileMimeTypeInfo::Size ); - setUnit(item, KFileMimeTypeInfo::Centimeters ); -} - - -bool KBarcodePlugin::readInfo( KFileMetaInfo& info, uint ) -{ - TQFile f( info.path() ); - if ( !f.open( IO_ReadOnly ) ) - return false; - - TQDomDocument doc( "KBarcodeLabel" ); - if ( !doc.setContent( &f ) ) { - f.close(); - return false; - } - - KFileMetaInfoGroup group = appendGroup(info, "Label"); - - TQDomNode n = doc.documentElement().firstChild(); - while( !n.isNull() ) { - TQDomElement e = n.toElement(); // try to convert the node to an element. - if( !e.isNull() ) - if( e.tagName() == "label" ) { - TQDomNode node = e.firstChild(); - while( !node.isNull() ) { - TQDomElement e = node.toElement(); // try to convert the node to an element. - if( !e.isNull() ) - if( e.tagName() == "description" ) - appendItem(group, "Description", e.text() ); - else if( e.tagName() == "id" ) { - appendItem(group, "Manufacturer", e.attribute("producer", "") ); - appendItem(group, "Type", e.attribute("type", "") ); - appendItem(group, "Id", e.text() ); - appendItem(group, "Dimensions", - TQSize( int(e.attribute("width", "0").toDouble()/10), int(e.attribute("height", "0").toDouble()/10) ) ); - } - - node = node.nextSibling(); - } - n = n.nextSibling(); - } - - n = n.nextSibling(); - } - - - f.close(); - return true; -} - -#include "kfile_kbarcode.moc" diff --git a/fileplugin/kfile_kbarcode.desktop b/fileplugin/kfile_kbarcode.desktop deleted file mode 100644 index 4e43a28..0000000 --- a/fileplugin/kfile_kbarcode.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Type=Service -Name=KBarcode Info -Comment=KBarcode Info -Icon=kbarcode -ServiceTypes=KFilePlugin -MimeType=application/kbarcode-label -X-TDE-Library=kfile_kbarcode -SupportsThumbnail= diff --git a/fileplugin/kfile_kbarcode.h b/fileplugin/kfile_kbarcode.h deleted file mode 100644 index 2ac3a4c..0000000 --- a/fileplugin/kfile_kbarcode.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2003 Dominik Seichter - */ - -#ifndef _PLUGIN_KBARCODEFILEPLUGIN_H_ -#define _PLUGIN_KBARCODEFILEPLUGIN_H_ - -#include - -class TQStringList; - -class KBarcodePlugin: public KFilePlugin -{ - Q_OBJECT - - -public: - KBarcodePlugin( TQObject *parent, const char *name, const TQStringList& args ); - - virtual bool readInfo( KFileMetaInfo& info, uint ); -}; - - -#endif // _PLUGIN_KBARCODEFILEPLUGIN_H_ diff --git a/fileplugin/tdefile_kbarcode.cpp b/fileplugin/tdefile_kbarcode.cpp new file mode 100644 index 0000000..4b1e253 --- /dev/null +++ b/fileplugin/tdefile_kbarcode.cpp @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2003 Dominik Seichter + */ + +#include "tdefile_kbarcode.h" + +#include +#include + +#include +#include + +K_EXPORT_COMPONENT_FACTORY(tdefile_kbarcode, KGenericFactory( "tdefile_kbarcode" )); + +KBarcodePlugin::KBarcodePlugin(TQObject *parent, const char *name, + const TQStringList &args) + + : KFilePlugin(parent, name, args) +{ + KFileMimeTypeInfo* info = addMimeTypeInfo( "application/kbarcode-label" ); + + KFileMimeTypeInfo::GroupInfo* group = 0L; + + group = addGroupInfo(info, "Label", i18n("Label")); + + KFileMimeTypeInfo::ItemInfo* item; + + item = addItemInfo(group, "Manufacturer", i18n("Manufacturer"), TQVariant::String ); + item = addItemInfo(group, "Type", i18n("Type"), TQVariant::String); + item = addItemInfo(group, "Description", i18n("Description"), TQVariant::String ); + item = addItemInfo(group, "Id", i18n("Label Id"), TQVariant::String ); + item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size); + setHint( item, KFileMimeTypeInfo::Size ); + setUnit(item, KFileMimeTypeInfo::Centimeters ); +} + + +bool KBarcodePlugin::readInfo( KFileMetaInfo& info, uint ) +{ + TQFile f( info.path() ); + if ( !f.open( IO_ReadOnly ) ) + return false; + + TQDomDocument doc( "KBarcodeLabel" ); + if ( !doc.setContent( &f ) ) { + f.close(); + return false; + } + + KFileMetaInfoGroup group = appendGroup(info, "Label"); + + TQDomNode n = doc.documentElement().firstChild(); + while( !n.isNull() ) { + TQDomElement e = n.toElement(); // try to convert the node to an element. + if( !e.isNull() ) + if( e.tagName() == "label" ) { + TQDomNode node = e.firstChild(); + while( !node.isNull() ) { + TQDomElement e = node.toElement(); // try to convert the node to an element. + if( !e.isNull() ) + if( e.tagName() == "description" ) + appendItem(group, "Description", e.text() ); + else if( e.tagName() == "id" ) { + appendItem(group, "Manufacturer", e.attribute("producer", "") ); + appendItem(group, "Type", e.attribute("type", "") ); + appendItem(group, "Id", e.text() ); + appendItem(group, "Dimensions", + TQSize( int(e.attribute("width", "0").toDouble()/10), int(e.attribute("height", "0").toDouble()/10) ) ); + } + + node = node.nextSibling(); + } + n = n.nextSibling(); + } + + n = n.nextSibling(); + } + + + f.close(); + return true; +} + +#include "tdefile_kbarcode.moc" diff --git a/fileplugin/tdefile_kbarcode.desktop b/fileplugin/tdefile_kbarcode.desktop new file mode 100644 index 0000000..5b3d77e --- /dev/null +++ b/fileplugin/tdefile_kbarcode.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Service +Name=KBarcode Info +Comment=KBarcode Info +Icon=kbarcode +ServiceTypes=KFilePlugin +MimeType=application/kbarcode-label +X-TDE-Library=tdefile_kbarcode +SupportsThumbnail= diff --git a/fileplugin/tdefile_kbarcode.h b/fileplugin/tdefile_kbarcode.h new file mode 100644 index 0000000..ae0a64d --- /dev/null +++ b/fileplugin/tdefile_kbarcode.h @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2003 Dominik Seichter + */ + +#ifndef _PLUGIN_KBARCODEFILEPLUGIN_H_ +#define _PLUGIN_KBARCODEFILEPLUGIN_H_ + +#include + +class TQStringList; + +class KBarcodePlugin: public KFilePlugin +{ + Q_OBJECT + + +public: + KBarcodePlugin( TQObject *parent, const char *name, const TQStringList& args ); + + virtual bool readInfo( KFileMetaInfo& info, uint ); +}; + + +#endif // _PLUGIN_KBARCODEFILEPLUGIN_H_ -- cgit v1.2.1