summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/ico
diff options
context:
space:
mode:
Diffstat (limited to 'kfile-plugins/ico')
-rw-r--r--kfile-plugins/ico/CMakeLists.txt35
-rw-r--r--kfile-plugins/ico/Makefile.am22
-rw-r--r--kfile-plugins/ico/kfile_ico.cpp148
-rw-r--r--kfile-plugins/ico/kfile_ico.desktop65
-rw-r--r--kfile-plugins/ico/kfile_ico.h38
5 files changed, 0 insertions, 308 deletions
diff --git a/kfile-plugins/ico/CMakeLists.txt b/kfile-plugins/ico/CMakeLists.txt
deleted file mode 100644
index 1fdbed2b..00000000
--- a/kfile-plugins/ico/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-#################################################
-#
-# (C) 2010-2011 Calvin Morrison
-# mutantturkey@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_ico.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
-
-
-#### kfile_ico (module) ########################
-
-tde_add_kpart( kfile_ico AUTOMOC
- SOURCES kfile_ico.cpp
- LINK kio-shared
- DESTINATION ${PLUGIN_INSTALL_DIR}
-)
diff --git a/kfile-plugins/ico/Makefile.am b/kfile-plugins/ico/Makefile.am
deleted file mode 100644
index df3d65ca..00000000
--- a/kfile-plugins/ico/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-## Makefile.am for ico 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_ico.h
-
-kde_module_LTLIBRARIES = kfile_ico.la
-
-kfile_ico_la_SOURCES = kfile_ico.cpp
-kfile_ico_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
-kfile_ico_la_LIBADD = $(LIB_KSYCOCA)
-
-# let automoc handle all of the meta source files (moc)
-METASOURCES = AUTO
-
-messages: rc.cpp
- $(XGETTEXT) kfile_ico.cpp -o $(podir)/kfile_ico.pot
-
-services_DATA = kfile_ico.desktop
-servicesdir = $(kde_servicesdir)
diff --git a/kfile-plugins/ico/kfile_ico.cpp b/kfile-plugins/ico/kfile_ico.cpp
deleted file mode 100644
index 44fa28d6..00000000
--- a/kfile-plugins/ico/kfile_ico.cpp
+++ /dev/null
@@ -1,148 +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 <config.h>
-#include "kfile_ico.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 long uint32_t;
-typedef unsigned short uint16_t;
-typedef unsigned char uint8_t;
-#endif
-
-typedef KGenericFactory<KIcoPlugin> IcoFactory;
-
-K_EXPORT_COMPONENT_FACTORY(kfile_ico, IcoFactory( "kfile_ico" ))
-
-KIcoPlugin::KIcoPlugin(TQObject *parent, const char *name,
- const TQStringList &args)
-
- : KFilePlugin(parent, name, args)
-{
- KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-ico" );
-
- KFileMimeTypeInfo::GroupInfo* group = 0L;
-
- group = addGroupInfo(info, "Technical", i18n("Technical Details"));
-
- KFileMimeTypeInfo::ItemInfo* item;
-
- item = addItemInfo(group, "Number", i18n("Number of Icons"), TQVariant::Int);
-
- item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size);
- item = addItemInfo(group, "Colors", i18n("Colors"), TQVariant::Int);
-
- item = addItemInfo(group, "DimensionsM", i18n("Dimensions (1st icon)"), TQVariant::Size);
- item = addItemInfo(group, "ColorsM", i18n("Colors (1st icon)"), TQVariant::Int);
-}
-
-
-bool KIcoPlugin::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;
- }
-
- TQDataStream dstream(&file);
-
- // ICO files are little-endian
- dstream.setByteOrder(TQDataStream::LittleEndian);
-
-
- // read the beginning of the file and make sure it looks ok
- uint16_t ico_reserved;
- uint16_t ico_type;
- uint16_t ico_count;
-
- dstream >> ico_reserved;
- dstream >> ico_type;
- dstream >> ico_count;
-
- if ((ico_reserved != 0) || (ico_type != 1) || (ico_count < 1))
- return false;
-
-
- // now loop through each of the icon entries
- uint8_t icoe_width;
- uint8_t icoe_height;
- uint8_t icoe_colorcount;
- uint8_t icoe_reserved;
- uint16_t icoe_planes;
- uint16_t icoe_bitcount;
- uint32_t icoe_bytesinres;
- uint32_t icoe_imageoffset;
-
- // read the data on the 1st icon
- dstream >> icoe_width;
- dstream >> icoe_height;
- dstream >> icoe_colorcount;
- dstream >> icoe_reserved;
- dstream >> icoe_planes;
- dstream >> icoe_bitcount;
- dstream >> icoe_bytesinres;
- dstream >> icoe_imageoffset;
-
-
- // output the useful bits
- KFileMetaInfoGroup group = appendGroup(info, "Technical");
- appendItem(group, "Number", ico_count);
-
- if (ico_count == 1) {
- appendItem(group, "Dimensions", TQSize(icoe_width, icoe_height));
-
- if (icoe_colorcount > 0)
- appendItem(group, "Colors", icoe_colorcount);
- else if (icoe_bitcount > 0)
- appendItem(group, "Colors", 2 ^ icoe_bitcount);
-
- } else {
-
- appendItem(group, "DimensionsM", TQSize(icoe_width, icoe_height));
-
- if (icoe_colorcount > 0)
- appendItem(group, "ColorsM", icoe_colorcount);
- else if (icoe_bitcount > 0)
- appendItem(group, "ColorsM", 2 ^ icoe_bitcount);
-
- }
-
- return true;
-}
-
-#include "kfile_ico.moc"
diff --git a/kfile-plugins/ico/kfile_ico.desktop b/kfile-plugins/ico/kfile_ico.desktop
deleted file mode 100644
index 1c63f92c..00000000
--- a/kfile-plugins/ico/kfile_ico.desktop
+++ /dev/null
@@ -1,65 +0,0 @@
-[Desktop Entry]
-Type=Service
-Name=ICO Info
-Name[af]=Ico Inligting
-Name[ar]=معلومات ICO
-Name[br]=Titouroù ICO
-Name[ca]=Informació d'ICO
-Name[cs]=ICO info
-Name[cy]=Gwybodaeth ICO
-Name[da]=ICO-info
-Name[de]=ICO-Info
-Name[el]=Πληροφορίες ICO
-Name[eo]=ICO-informo
-Name[es]=Info ICO
-Name[et]=ICO info
-Name[fa]=اطلاعات ICO
-Name[fi]=ICO-tiedot
-Name[fr]=Informations ICO
-Name[gl]=Inf. ICO
-Name[he]=מידע ICO
-Name[hi]=ICO जानकारी
-Name[hr]=ICO informacije
-Name[hu]=ICO-jellemzők
-Name[is]=ICO upplýsingar
-Name[it]=Informazioni ICO
-Name[ja]=ICO 情報
-Name[kk]=ICO мәліметі
-Name[km]=ព័ត៌មាន ICO
-Name[lt]=ICO informacija
-Name[ms]= Maklumat ICO
-Name[nds]=ICO-Info
-Name[ne]=ICO सूचना
-Name[nl]=ICO-info
-Name[nn]=ICO-info
-Name[nso]=Tshedimoso ya ICO
-Name[pa]=ICO ਜਾਣਕਾਰੀ
-Name[pl]=Informacja o pliku ICO
-Name[pt]=Informação do ICO
-Name[pt_BR]=Informação sobre ICO
-Name[ro]=Informaţii ICO
-Name[ru]=Информация об ICO
-Name[se]=ICO-dieđut
-Name[sl]=Podatki o ICO
-Name[sr]=ICO информације
-Name[sr@Latn]=ICO informacije
-Name[sv]=Ico-information
-Name[ta]=ICO தகவல்
-Name[tg]=Иттилоот оиди ICO
-Name[th]=ข้อมูลแฟ้ม ICO
-Name[tr]=ICO Bilgisi
-Name[uk]=Інформація по ICO
-Name[uz]=ICO haqida maʼlumot
-Name[uz@cyrillic]=ICO ҳақида маълумот
-Name[ven]=Mafhungo a ICO
-Name[wa]=Informåcion sol imådjete ICO
-Name[xh]=Ulwazi lwe ICO
-Name[zh_CN]=ICO 信息
-Name[zh_HK]=ICO 資訊
-Name[zh_TW]=ICO 資訊
-Name[zu]=Ulwazi lwe-ICO
-ServiceTypes=KFilePlugin
-X-TDE-Library=kfile_ico
-MimeType=image/x-ico
-PreferredGroups=Technical
-PreferredItems=Number,Resolution,Colors,ResolutionM,ColorsM
diff --git a/kfile-plugins/ico/kfile_ico.h b/kfile-plugins/ico/kfile_ico.h
deleted file mode 100644
index ed447e50..00000000
--- a/kfile-plugins/ico/kfile_ico.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_ICO_H__
-#define __KFILE_ICO_H__
-
-#include <kfilemetainfo.h>
-
-class TQStringList;
-
-class KIcoPlugin: public KFilePlugin
-{
- Q_OBJECT
-
-
-public:
- KIcoPlugin( TQObject *parent, const char *name, const TQStringList& args );
-
- virtual bool readInfo( KFileMetaInfo& info, uint what);
-};
-
-#endif