summaryrefslogtreecommitdiffstats
path: root/tdeioslave/iso
diff options
context:
space:
mode:
Diffstat (limited to 'tdeioslave/iso')
-rw-r--r--tdeioslave/iso/CMakeLists.txt27
-rw-r--r--tdeioslave/iso/Makefile.am2
-rw-r--r--tdeioslave/iso/iso.cpp8
-rw-r--r--tdeioslave/iso/isoservice.desktop6
-rw-r--r--tdeioslave/iso/kiso.cpp32
-rw-r--r--tdeioslave/iso/qfilehack.h2
-rw-r--r--tdeioslave/iso/tdeio_iso.desktop4
-rw-r--r--tdeioslave/iso/tdeiso_info.cpp4
8 files changed, 54 insertions, 31 deletions
diff --git a/tdeioslave/iso/CMakeLists.txt b/tdeioslave/iso/CMakeLists.txt
index 79c795ceb..baf35cfd3 100644
--- a/tdeioslave/iso/CMakeLists.txt
+++ b/tdeioslave/iso/CMakeLists.txt
@@ -30,10 +30,29 @@ link_directories(
##### other data ################################
-install( FILES iso.protocol DESTINATION ${SERVICES_INSTALL_DIR} )
-install( FILES isoservice.desktop DESTINATION ${DATA_INSTALL_DIR}/konqueror/servicemenus )
-install( FILES tdeio_isorc DESTINATION ${CONFIG_INSTALL_DIR} )
-install( FILES tdeio_iso.desktop DESTINATION ${APPS_INSTALL_DIR} )
+tde_create_translated_desktop(
+ SOURCE iso.protocol
+ DESTINATION ${SERVICES_INSTALL_DIR}
+ PO_DIR tdeioslave-desktops
+)
+
+tde_create_translated_desktop(
+ SOURCE isoservice.desktop
+ DESTINATION ${DATA_INSTALL_DIR}/konqueror/servicemenus
+ PO_DIR tdeioslave-desktops
+)
+
+tde_create_translated_desktop(
+ SOURCE tdeio_isorc
+ DESTINATION ${CONFIG_INSTALL_DIR}
+ PO_DIR tdeioslave-desktops
+)
+
+tde_create_translated_desktop(
+ SOURCE tdeio_iso.desktop
+ DESTINATION ${APPS_INSTALL_DIR}
+ PO_DIR tdeioslave-desktops
+)
##### tdeio_iso ###################################
diff --git a/tdeioslave/iso/Makefile.am b/tdeioslave/iso/Makefile.am
index ed8aaadfa..f0381203a 100644
--- a/tdeioslave/iso/Makefile.am
+++ b/tdeioslave/iso/Makefile.am
@@ -60,7 +60,7 @@ uninstall-local:
# make messages.po. Move this one to ../po/ and "make merge" in po
# the -x is for skipping messages already translated in tdelibs
messages:
- LIST=`find . -name \*.h -o -name \*.hh -o -name \*.H -o -name \*.hxx -o -name \*.hpp -o -name \*.cpp -o -name \*.cc -o -name \*.cxx -o -name \*.ecpp -o -name \*.C`; \
+ LIST=`find . -name \*.h -o -name \*.cpp -o -name \*.c`; \
if test -n "$$LIST"; then \
$(XGETTEXT) -C -ki18n -x $(kde_includes)/tde.pot $$LIST -o ../po/iso.pot; \
fi
diff --git a/tdeioslave/iso/iso.cpp b/tdeioslave/iso/iso.cpp
index 8696b0c67..40a7eb738 100644
--- a/tdeioslave/iso/iso.cpp
+++ b/tdeioslave/iso/iso.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
- /* This file is heavily based on tar.cc from tdebase
+ /* This file is heavily based on tar.cpp from tdebase
* (c) David Faure <faure@kde.org>
*/
@@ -30,7 +30,7 @@
#include <tqfile.h>
#include <kurl.h>
#include <kdebug.h>
-#include <kinstance.h>
+#include <tdeinstance.h>
#include <kiso.h>
#include <kmimemagic.h>
@@ -56,7 +56,7 @@ static const unsigned char zisofs_magic[8] = {
using namespace TDEIO;
-extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); }
+extern "C" { TDE_EXPORT int kdemain(int argc, char **argv); }
int kdemain( int argc, char **argv )
{
@@ -274,7 +274,7 @@ void tdeio_isoProtocol::listDir( const KURL & url )
const KArchiveDirectory* dir;
if (!path.isEmpty() && path != "/")
{
- kdDebug() << TQString(TQString("Looking for entry %1").arg(path)) << endl;
+ kdDebug() << TQString("Looking for entry %1").arg(path) << endl;
const KArchiveEntry* e = root->entry( path );
if ( !e )
{
diff --git a/tdeioslave/iso/isoservice.desktop b/tdeioslave/iso/isoservice.desktop
index 55b4b232e..3a49ae782 100644
--- a/tdeioslave/iso/isoservice.desktop
+++ b/tdeioslave/iso/isoservice.desktop
@@ -4,11 +4,7 @@ Actions=OpenISO
X-TDE-ServiceTypes=inode/blockdevice,application/x-iso
[Desktop Action OpenISO]
+Name=ISO9660 View
Comment=ISO9660 View
-Comment[hu]=ISO9660 Nézet
-Comment[fr]=Lecteur ISO9660
Icon=cd
-Name=ISO9660 View
-Name[hu]=ISO9660 Nézet
-Name[fr]=Lecteur ISO9660
Exec=kfmclient exec iso:%f
diff --git a/tdeioslave/iso/kiso.cpp b/tdeioslave/iso/kiso.cpp
index 513bd7c04..bcc11810d 100644
--- a/tdeioslave/iso/kiso.cpp
+++ b/tdeioslave/iso/kiso.cpp
@@ -16,7 +16,7 @@
***************************************************************************/
/* This file is heavily based on ktar.cpp from tdelibs (c) David Faure */
-
+
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@@ -125,6 +125,8 @@ KIso::KIso( const TQString& filename, const TQString & _mimetype )
mimetype = "application/x-gzip";
else if ( mimetype == "application/x-tbz" ) // that's a bzipped2 tar file, so ask for bz2 filter
mimetype = "application/x-bzip2";
+ else if ( mimetype == "application/x-txz" ) // that's a xzipped tar file, so ask for xz filter
+ mimetype = "application/x-xz";
else
{
// Something else. Check if it's not really gzip though (e.g. for KOffice docs)
@@ -144,6 +146,14 @@ KIso::KIso( const TQString& filename, const TQString & _mimetype )
if ( fourthByte == 4 )
mimetype = "application/x-zip";
}
+ else if ( firstByte == 0xfd && secondByte == '7' && thirdByte == 'z' )
+ {
+ unsigned char fourthByte = file.getch();
+ unsigned char fifthByte = file.getch();
+ unsigned char sixthByte = file.getch();
+ if ( fourthByte == 'X' && fifthByte == 'Z' && sixthByte == 0)
+ mimetype = "application/x-xz";
+ }
}
}
forced = false;
@@ -155,13 +165,13 @@ KIso::KIso( const TQString& filename, const TQString & _mimetype )
void KIso::prepareDevice( const TQString & filename,
const TQString & mimetype, bool forced )
{
- /* 'hack' for Qt's false assumption that only S_ISREG is seekable */
+ /* 'hack' for TQt's false assumption that only S_ISREG is seekable */
if( "inode/blockdevice" == mimetype )
- setDevice( TQT_TQIODEVICE(new QFileHack( filename )) );
+ setDevice( new QFileHack( filename ) );
else
{
- if( "application/x-gzip" == mimetype
- || "application/x-bzip2" == mimetype)
+ if("application/x-gzip" == mimetype || "application/x-bzip2" == mimetype ||
+ "application/x-xz" == mimetype)
forced = true;
TQIODevice *dev = KFilterDev::deviceForFile( filename, mimetype, forced );
@@ -190,7 +200,7 @@ KIso::~KIso()
/* callback function for libisofs */
static int readf(char *buf, long long start, long long len,void *udata) {
- TQIODevice* dev = ( static_cast<KIso*> (udata) )->device();
+ TQIODevice* dev = ( static_cast<KIso*>(udata) )->device();
if (dev->at(start<<11)) {
if ((dev->readBlock(buf, len<<11)) != -1) return (len);
@@ -295,7 +305,7 @@ void KIso::addBoot(struct el_torito_boot_descriptor* bootdesc) {
boot_entry *be;
TQString path;
KIsoFile *entry;
-
+
entry=new KIsoFile( this, "Catalog", dirent->permissions() & ~S_IFDIR,
dirent->date(), dirent->adate(), dirent->cdate(),
dirent->user(), dirent->group(), TQString::null,
@@ -327,7 +337,7 @@ void KIso::readParams()
TDEConfig *config;
config = new TDEConfig("tdeio_isorc");
-
+
showhidden=config->readBoolEntry("showhidden",false);
showrr=config->readBoolEntry("showrr",true);
delete config;
@@ -373,7 +383,7 @@ bool KIso::openArchive( int mode )
if (trackno==0) trackno=1;
for (i=0;i<trackno;i++) {
- c_b=1;c_i=1;c_j=1;
+ c_b=1;c_i=1;c_j=1;
root=rootDir();
if (trackno>1) {
path=TQString::null;
@@ -397,11 +407,11 @@ bool KIso::openArchive( int mode )
if ( !memcmp(EL_TORITO_ID,bootdesc->system_id,ISODCL(8,39)) ) {
path="El Torito Boot";
if (c_b>1) path += " (" + TQString::number(c_b) + ")";
-
+
dirent = new KIsoDirectory( this, path, access | S_IFDIR,
buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, TQString::null );
root->addEntry(dirent);
-
+
addBoot(bootdesc);
c_b++;
}
diff --git a/tdeioslave/iso/qfilehack.h b/tdeioslave/iso/qfilehack.h
index 3f0b1f6a6..fe43217b2 100644
--- a/tdeioslave/iso/qfilehack.h
+++ b/tdeioslave/iso/qfilehack.h
@@ -23,7 +23,7 @@
/**
*@author Szombathelyi György
- * Qt thinks if a file is not S_IFREG, you cannot seek in it. It's false (what about
+ * TQt thinks if a file is not S_IFREG, you cannot seek in it. It's false (what about
* block devices for example?
*/
diff --git a/tdeioslave/iso/tdeio_iso.desktop b/tdeioslave/iso/tdeio_iso.desktop
index 89b7f2e23..133adfa6c 100644
--- a/tdeioslave/iso/tdeio_iso.desktop
+++ b/tdeioslave/iso/tdeio_iso.desktop
@@ -1,13 +1,11 @@
[Desktop Entry]
Type=Application
+Name=ISO9660 Image Viewer
Exec=konqueror iso:%f
Icon=cd
Terminal=false
MimeType=application/x-iso;
X-TDE-InitialPreference=10
NoDisplay=true
-Name=ISO9660 Image Viewer
-Name[hu]=ISO9660 Nézet
-Name[fr]=Lecteur ISO9660
X-DCOP-ServiceType=None
Categories=Qt;TDE;System;
diff --git a/tdeioslave/iso/tdeiso_info.cpp b/tdeioslave/iso/tdeiso_info.cpp
index 4b9bbee6f..0233e15a1 100644
--- a/tdeioslave/iso/tdeiso_info.cpp
+++ b/tdeioslave/iso/tdeiso_info.cpp
@@ -23,7 +23,7 @@
#include <tdeapplication.h>
#include <tdestartupinfo.h>
#include <tdecmdlineargs.h>
-#include <kuniqueapplication.h>
+#include <tdeuniqueapplication.h>
#include <tdeaboutdata.h>
#include "libisofs/iso_fs.h"
@@ -53,7 +53,7 @@ int main(int argc, char *argv[])
aboutData.addAuthor("Timothy Pearson",0, "kb9vqf@pearsoncomputing.net");
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options);
- KUniqueApplication::addCmdLineOptions();
+ TDEUniqueApplication::addCmdLineOptions();
TDEApplication::disableAutoDcopRegistration();
TDEApplication app(false, false, false);