From bb4f9e1653675f267153368721cfcf166018d037 Mon Sep 17 00:00:00 2001 From: "giantpune@gmail.com" Date: Thu, 24 Mar 2011 08:57:59 +0000 Subject: [PATCH] git-svn-id: http://wiiqt.googlecode.com/svn/trunk@75 389f4c8b-5dfe-645f-db0e-df882bc27289 --- nandExtract/nandthread.cpp | 12 +++++++++++- nandExtract/nandthread.h | 3 +++ nandExtract/nandwindow.cpp | 5 +++++ nandExtract/nandwindow.h | 3 ++- nandExtract/nandwindow.ui | 11 ++++++++++- 5 files changed, 31 insertions(+), 3 deletions(-) diff --git a/nandExtract/nandthread.cpp b/nandExtract/nandthread.cpp index f85ebf7..328eaa8 100644 --- a/nandExtract/nandthread.cpp +++ b/nandExtract/nandthread.cpp @@ -3,6 +3,7 @@ NandThread::NandThread( QObject *parent ) : QThread( parent ) { abort = false; + fatNames = false; itemToExtract = NULL; connect( &nandBin, SIGNAL( SendError( QString ) ), this, SLOT( GetError( QString ) ) ); @@ -40,7 +41,16 @@ bool NandThread::SetPath( const QString &path ) emit SendError( tr( "Wait till the current job is done" ) ); return false; } - return nandBin.SetPath( path ); + if( !nandBin.SetPath( path ) ) + return false; + + nandBin.SetFixNamesForFAT( fatNames ); + return true; +} + +void NandThread::SetFixNamesForFat( bool fix ) +{ + nandBin.SetFixNamesForFAT( fix ); } const Blocks0to7 NandThread::BootBlocks() diff --git a/nandExtract/nandthread.h b/nandExtract/nandthread.h index 65164e7..08f8a49 100644 --- a/nandExtract/nandthread.h +++ b/nandExtract/nandthread.h @@ -34,6 +34,8 @@ public: const QList Boot2Infos(); quint8 Boot1Version(); + void SetFixNamesForFat( bool fix = true ); + protected: void run(); @@ -56,6 +58,7 @@ private: quint32 idx; bool abort; + bool fatNames; //count the number of files in a given folder quint32 FileCount( QTreeWidgetItem *item ); diff --git a/nandExtract/nandwindow.cpp b/nandExtract/nandwindow.cpp index c814eb6..6c7342f 100755 --- a/nandExtract/nandwindow.cpp +++ b/nandExtract/nandwindow.cpp @@ -456,3 +456,8 @@ void NandWindow::on_actionBoot2_triggered() Boot2InfoDialog d( this, b, boot1 ); d.exec(); } + +void NandWindow::on_actionFix_Names_For_FAT_triggered( bool checked ) +{ + nThread.SetFixNamesForFat( checked ); +} diff --git a/nandExtract/nandwindow.h b/nandExtract/nandwindow.h index a16ad24..98e624f 100755 --- a/nandExtract/nandwindow.h +++ b/nandExtract/nandwindow.h @@ -48,7 +48,8 @@ public slots: void ThreadIsDone(); private slots: - void on_actionBoot2_triggered(); + void on_actionFix_Names_For_FAT_triggered(bool checked); + void on_actionBoot2_triggered(); void on_treeWidget_currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous); void on_actionShow_Usage_triggered(); void on_actionOpen_Nand_triggered(); diff --git a/nandExtract/nandwindow.ui b/nandExtract/nandwindow.ui index 65b770f..ec586bc 100755 --- a/nandExtract/nandwindow.ui +++ b/nandExtract/nandwindow.ui @@ -11,7 +11,7 @@ - NandWindow + NAND Extract @@ -126,6 +126,7 @@ + @@ -169,6 +170,14 @@ Ctrl+B + + + true + + + Fix Names For FAT + +