diff options
author | Timothy Pearson <[email protected]> | 2013-01-27 01:03:37 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-01-27 01:03:37 -0600 |
commit | 2e25fa39cd67cca2472d3eabdb478feb517d72a5 (patch) | |
tree | 63725962f632d152cbf20709191d39f6fc865966 /kfile-plugins/xbm | |
parent | 190d88dfc662f3fc466c9d1f53acbbea65f33c49 (diff) | |
download | tdegraphics-2e25fa39cd67cca2472d3eabdb478feb517d72a5.tar.gz tdegraphics-2e25fa39cd67cca2472d3eabdb478feb517d72a5.zip |
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'kfile-plugins/xbm')
-rw-r--r-- | kfile-plugins/xbm/CMakeLists.txt | 35 | ||||
-rw-r--r-- | kfile-plugins/xbm/Makefile.am | 22 | ||||
-rw-r--r-- | kfile-plugins/xbm/kfile_xbm.cpp | 128 | ||||
-rw-r--r-- | kfile-plugins/xbm/kfile_xbm.desktop | 65 | ||||
-rw-r--r-- | kfile-plugins/xbm/kfile_xbm.h | 43 |
5 files changed, 0 insertions, 293 deletions
diff --git a/kfile-plugins/xbm/CMakeLists.txt b/kfile-plugins/xbm/CMakeLists.txt deleted file mode 100644 index 37a9aa6b..00000000 --- a/kfile-plugins/xbm/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -################################################# -# -# (C) 2010-2011 Calvin Morrison -# -# 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_xbm.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) - - -#### kfile_xbm (module) ######################## - -tde_add_kpart( kfile_xbm AUTOMOC - SOURCES kfile_xbm.cpp - LINK kio-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kfile-plugins/xbm/Makefile.am b/kfile-plugins/xbm/Makefile.am deleted file mode 100644 index 1b9d7ff9..00000000 --- a/kfile-plugins/xbm/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -## Makefile.am for xbm 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_xbm.h - -kde_module_LTLIBRARIES = kfile_xbm.la - -kfile_xbm_la_SOURCES = kfile_xbm.cpp -kfile_xbm_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -kfile_xbm_la_LIBADD = $(LIB_KSYCOCA) - -# let automoc handle all of the meta source files (moc) -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) kfile_xbm.cpp -o $(podir)/kfile_xbm.pot - -services_DATA = kfile_xbm.desktop -servicesdir = $(kde_servicesdir) diff --git a/kfile-plugins/xbm/kfile_xbm.cpp b/kfile-plugins/xbm/kfile_xbm.cpp deleted file mode 100644 index 2d246c97..00000000 --- a/kfile-plugins/xbm/kfile_xbm.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* This file is part of the KDE project - * Copyright (C) 2002 Shane Wright <[email protected]> - * - * 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 <config.h> -#include "kfile_xbm.h" - -#include <kprocess.h> -#include <klocale.h> -#include <kgenericfactory.h> -#include <kstringvalidator.h> -#include <kdebug.h> - -#include <tqdict.h> -#include <tqvalidator.h> -#include <tqcstring.h> -#include <tqfile.h> -#include <tqdatetime.h> - -#if !defined(__osf__) -#include <inttypes.h> -#else -typedef unsigned short uint32_t; -#endif - -typedef KGenericFactory<KXbmPlugin> XbmFactory; - -K_EXPORT_COMPONENT_FACTORY(kfile_xbm, XbmFactory( "kfile_xbm" )) - -KXbmPlugin::KXbmPlugin(TQObject *parent, const char *name, - const TQStringList &args) - - : KFilePlugin(parent, name, args) -{ - KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-xbm" ); - - KFileMimeTypeInfo::GroupInfo* group = 0L; - - group = addGroupInfo(info, "Technical", i18n("Technical Details")); - - KFileMimeTypeInfo::ItemInfo* item; - - item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size); - setHint( item, KFileMimeTypeInfo::Size ); - setUnit(item, KFileMimeTypeInfo::Pixels); -} - - -unsigned long KXbmPlugin::xbm_processLine(char * linebuf) -{ - const char * fsig = "#define "; - - // check it starts with #define - if (memcmp(linebuf, fsig, 8)) - return 0; - - // scan for the 2nd space and set up a pointer - uint32_t slen = strlen(linebuf); - bool done = false; - uint32_t spos = 0; - unsigned char spacecount = 0; - do { - - if (linebuf[spos] == 0x00) - return 0; - - if (linebuf[spos] == ' ') - ++spacecount; - - if (spacecount == 2) - done = true; - else - ++spos; - - } while (!done); - - return atoi(linebuf + spos); -} - - -bool KXbmPlugin::readInfo( KFileMetaInfo& info, uint what) -{ - - TQFile file(info.path()); - - if (!file.open(IO_ReadOnly)) - { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; - return false; - } - - // we need a buffer for lines - char linebuf[1000]; - - // read the first line - file.readLine(linebuf, sizeof( linebuf )); - uint32_t width = xbm_processLine(linebuf); - - // read the 2nd line - file.readLine(linebuf, sizeof( linebuf )); - uint32_t height = xbm_processLine(linebuf); - - if ((width > 0) && (height > 0)) { - // we have valid looking data - KFileMetaInfoGroup group = appendGroup(info, "Technical"); - appendItem(group, "Dimensions", TQSize(width, height)); - return true; - } - - return false; -} - -#include "kfile_xbm.moc" diff --git a/kfile-plugins/xbm/kfile_xbm.desktop b/kfile-plugins/xbm/kfile_xbm.desktop deleted file mode 100644 index 127a5c9d..00000000 --- a/kfile-plugins/xbm/kfile_xbm.desktop +++ /dev/null @@ -1,65 +0,0 @@ -[Desktop Entry] -Type=Service -Name=XBM Info -Name[af]=Xbm Inligting -Name[ar]=معلومات XBM -Name[br]=Titouroù XBM -Name[ca]=Informació d'XBM -Name[cs]=XBM info -Name[cy]=Gwybodaeth XBM -Name[da]=XBM-info -Name[de]=XBM-Info -Name[el]=Πληροφορίες XBM -Name[eo]=XBM-informo -Name[es]=Info XBM -Name[et]=XBM info -Name[fa]=اطلاعات XBM -Name[fi]=XBM-tiedot -Name[fr]=Informations sur XBM -Name[gl]=Inf. XBM -Name[he]=מידע XBM -Name[hi]=XBM जानकारी -Name[hr]=XBM Infoformacije -Name[hu]=XBM-jellemzők -Name[is]=XBM upplýsingar -Name[it]=Informazioni XBM -Name[ja]=XBM 情報 -Name[kk]=XBM мәліметі -Name[km]=ព័ត៌មាន XBM -Name[lt]=XBM informacija -Name[ms]=Maklumat XBM -Name[nds]=XBM-Info -Name[ne]=XBM सूचना -Name[nl]=XBM-info -Name[nn]=XBM-info -Name[nso]=Tshedimoso ya XBM -Name[pa]=XBM ਜਾਣਕਾਰੀ -Name[pl]=Informacja o pliku XBM -Name[pt]=Informação do XBM -Name[pt_BR]=Informação sobre XBM -Name[ro]=Informaţii XBM -Name[ru]=Информация о XBM -Name[se]=XBM-dieđut -Name[sl]=Podatki o XBM -Name[sr]=XBM информације -Name[sr@Latn]=XBM informacije -Name[sv]=XBM-information -Name[ta]=XBM தகவல் -Name[tg]=Иттилоот оиди XBM -Name[th]=ข้อมูลแฟ้ม XBM -Name[tr]=XBM Bilgisi -Name[uk]=Інформація по XBM -Name[uz]=XBM haqida maʼlumot -Name[uz@cyrillic]=XBM ҳақида маълумот -Name[ven]=Mafhungo a XBM -Name[wa]=Informåcion sol imådje XBM -Name[xh]=Ulwazi lwe XBM -Name[zh_CN]=XBM 信息 -Name[zh_HK]=XBM 資訊 -Name[zh_TW]=XBM 資訊 -Name[zu]=Ulwazi lwe-XBM -ServiceTypes=KFilePlugin -X-TDE-Library=kfile_xbm -MimeType=image/x-xbm -PreferredGroups=Technical -PreferredItems=Resolution diff --git a/kfile-plugins/xbm/kfile_xbm.h b/kfile-plugins/xbm/kfile_xbm.h deleted file mode 100644 index cf4450ef..00000000 --- a/kfile-plugins/xbm/kfile_xbm.h +++ /dev/null @@ -1,43 +0,0 @@ -/* This file is part of the KDE project - * Copyright (C) 2002 Shane Wright <[email protected]> - * - * 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_XBM_H__ -#define __KFILE_XBM_H__ - -#include <kfilemetainfo.h> - -class TQStringList; - -class KXbmPlugin: public KFilePlugin -{ - Q_OBJECT - - -public: - KXbmPlugin( TQObject *parent, const char *name, const TQStringList& args ); - - virtual bool readInfo( KFileMetaInfo& info, uint what); - -private: - - unsigned long xbm_processLine(char * linebuf); - -}; - -#endif |