summaryrefslogtreecommitdiffstats
path: root/ark/arkwidget.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2012-06-17 19:09:27 +0200
committerSlávek Banko <slavek.banko@axis.cz>2012-06-17 19:15:56 +0200
commit1c84948d57c174bcd9732a5a0a51d42d3626d000 (patch)
treebea1edb0356d7d6809d03f27ff37e89273fbe595 /ark/arkwidget.cpp
parentba8d2a9f33e4921a7188936098ad76af8d9ab8be (diff)
downloadtdeutils-1c84948d57c174bcd9732a5a0a51d42d3626d000.tar.gz
tdeutils-1c84948d57c174bcd9732a5a0a51d42d3626d000.zip
[Ark] Repairs and extensions
Added support for Arj Added support for check archives Added support for password processing Fix show broken filenames into real UTF-8 This closes Bug 1030
Diffstat (limited to 'ark/arkwidget.cpp')
-rw-r--r--ark/arkwidget.cpp30
1 files changed, 28 insertions, 2 deletions
diff --git a/ark/arkwidget.cpp b/ark/arkwidget.cpp
index 80fd413..0935e38 100644
--- a/ark/arkwidget.cpp
+++ b/ark/arkwidget.cpp
@@ -739,7 +739,10 @@ ArkWidget::file_open(const KURL& url)
m_url = url;
//arch->clearShellOutput();
- openArchive( strFile );
+ if( url.hasPass() )
+ openArchive( strFile, url.pass() );
+ else
+ openArchive( strFile );
}
@@ -1184,6 +1187,8 @@ ArkWidget::slotAddDone(bool _bSuccess)
//simulate reload
KURL u;
u.setPath( arch->fileName() );
+ if( !arch->password().isEmpty() )
+ u.setPass( arch->password() );
file_close();
file_open( u );
emit setWindowCaption( u.path() );
@@ -1682,6 +1687,25 @@ ArkWidget::action_view()
}
void
+ArkWidget::action_test()
+{
+ connect( arch, TQT_SIGNAL( sigTest( bool ) ), this,
+ TQT_SLOT( slotTestDone( bool ) ) );
+ busy( i18n( "Testing..." ) );
+ arch->test();
+}
+
+void
+ArkWidget::slotTestDone(bool ok)
+{
+ disconnect( arch, TQT_SIGNAL( sigTest( bool ) ), this,
+ TQT_SLOT( slotTestDone( bool ) ) );
+ ready();
+ if( ok )
+ KMessageBox::information(0, i18n("Test successful."));
+}
+
+void
ArkWidget::viewSlotExtractDone( bool success )
{
if ( success )
@@ -2102,6 +2126,7 @@ ArkWidget::slotCreate(Arch * _newarch, bool _success, const TQString & _filename
m_bIsSimpleCompressedFile =
(m_archType == COMPRESSED_FORMAT);
fixEnables();
+ arch->createPassword();
}
else
{
@@ -2115,7 +2140,7 @@ ArkWidget::slotCreate(Arch * _newarch, bool _success, const TQString & _filename
//////////////////////////////////////////////////////////////////////
void
-ArkWidget::openArchive( const TQString & _filename )
+ArkWidget::openArchive( const TQString & _filename, const TQString & _password )
{
Arch *newArch = 0;
ArchType archtype;
@@ -2172,6 +2197,7 @@ ArkWidget::openArchive( const TQString & _filename )
busy( i18n( "Opening the archive..." ) );
m_fileListView->setUpdatesEnabled( false );
arch = newArch;
+ newArch->setPassword(_password);
newArch->open();
emit addRecentURL( m_url );
}