summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/formatter/formatter.cpp41
1 files changed, 25 insertions, 16 deletions
diff --git a/noncore/tools/formatter/formatter.cpp b/noncore/tools/formatter/formatter.cpp
index cca0c26..21de4d2 100644
--- a/noncore/tools/formatter/formatter.cpp
+++ b/noncore/tools/formatter/formatter.cpp
@@ -23,2 +23,3 @@
23#include <qstring.h> 23#include <qstring.h>
24#include <qlist.h>
24#include <qstringlist.h> 25#include <qstringlist.h>
@@ -27,3 +28,3 @@
27 28
28#include <qtextstream.h> 29#include <qtstream.h>
29 30
@@ -55,3 +56,3 @@
55 Blah blah blah blah */ 56 Blah blah blah blah */
56FormatterApp::FormatterApp( QWidget* parent, const char* name, bool modal, WFlags fl ) 57FormatterApp::FormatterApp( QWidget* parent, const char* name, bool , WFlags fl )
57 : QMainWindow( parent, name, fl ) 58 : QMainWindow( parent, name, fl )
@@ -122,5 +123,5 @@ FormatterApp::FormatterApp( QWidget* parent, const char* name, bool modal, WFla
122 TextLabel5->setText( tr( "CAUTION:\n" 123 TextLabel5->setText( tr( "CAUTION:\n"
123 "Changing parameters on this \n" 124 "Changing parameters on this\n"
124 "page may cause your system \n" 125 "page may cause your system\n"
125 "to stop functioning properly!!" ) );//idiot message 126 "to stop functioning properly!" ) );//idiot message
126 127
@@ -205,4 +206,10 @@ void FormatterApp::doFormat() {
205 206
206 switch ( QMessageBox::warning(this,tr("Format?!?"),tr("Really format\n") +diskName+" "+ currentText + 207 switch ( QMessageBox::warning(this,tr("Format?")
207 tr("\nwith ") + fs + tr(" filesystem?!?\nYou will loose all data!!"),tr("Yes"),tr("No"),0,1,1) ) { 208 , tr("Really format\n") +diskName+" "+ currentText +
209 tr("\nwith %1 filesystem?\nYou will loose all data!!").arg( fs )
210 ,tr("Yes")
211 ,tr("No")
212 ,0
213 ,1
214 ,1) ) {
208 case 0: { 215 case 0: {
@@ -223,3 +230,5 @@ void FormatterApp::doFormat() {
223 char line[130]; 230 char line[130];
224 outDlg->OutputEdit->append( tr("Trying to umount.") + currentText ); 231
232
233 outDlg->OutputEdit->append( tr("Trying to umount %1.").arg( currentText) );
225 outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); 234 outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE);
@@ -229,3 +238,3 @@ void FormatterApp::doFormat() {
229 fp = popen( (const char *) umountS, "r"); 238 fp = popen( (const char *) umountS, "r");
230 qDebug("%d", fp); 239 // qDebug("%d", fp);
231 if ( !fp ) { 240 if ( !fp ) {
@@ -278,3 +287,3 @@ void FormatterApp::doFormat() {
278 287
279 outDlg->OutputEdit->append( tr("Trying to mount.") + currentText ); 288 outDlg->OutputEdit->append( tr("Trying to mount %1.").arg( currentText) );
280 outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE); 289 outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,FALSE);
@@ -286,3 +295,3 @@ void FormatterApp::doFormat() {
286 } else { 295 } else {
287 outDlg->OutputEdit->append( currentText + tr("\nhas been successfully mounted.")); 296 outDlg->OutputEdit->append(tr("%1\nhas been successfully mounted.").arg( currentText ));
288 while ( fgets( line, sizeof line, fp)) { 297 while ( fgets( line, sizeof line, fp)) {
@@ -337,3 +346,3 @@ void FormatterApp::fillCombos() {
337 346
338void FormatterApp::fsComboSelected(int index) { 347void FormatterApp::fsComboSelected(int ) {
339 348
@@ -346,3 +355,3 @@ void FormatterApp::storageComboSelected(int index ) {
346 355
347 TextLabel4->setText( tr( "Storage Type : ") + nameS ); 356 TextLabel4->setText( tr( "Storage Type: %1").arg( nameS) );
348 currentText = currentText.right( currentText.length() - currentText.find(" -> ",0,TRUE) - 4); 357 currentText = currentText.right( currentText.length() - currentText.find(" -> ",0,TRUE) - 4);
@@ -393,3 +402,3 @@ void FormatterApp::deviceComboSelected(int index) {
393 402
394 TextLabel5->setText("Type: "+ nameS+"\nFormatted with "+ fsType + " \n" + totalS + usedS + avS); 403 TextLabel5->setText(tr("Type: %1\nFormatted with %1\n%1, %1, %1").arg( nameS).arg( fsType).arg(totalS).arg( usedS).arg( avS ));
395// storageComboSelected(0); 404// storageComboSelected(0);
@@ -565,3 +574,3 @@ bool FormatterApp::doFsckCheck() {
565 574
566int FormatterApp::formatCheck(const QString &deviceStr) { 575int FormatterApp::formatCheck(const QString &) {
567 576
@@ -570,3 +579,3 @@ int FormatterApp::formatCheck(const QString &deviceStr) {
570 579
571int FormatterApp::runCommand(const QString &command) { 580int FormatterApp::runCommand(const QString &) {
572 581