[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeutils/kfloppy
From:       Nicolas Goutte <nicolasg () snafu ! de>
Date:       2004-09-08 22:23:16
Message-ID: 20040908222316.37BA21773 () office ! kde ! org
[Download RAW message or body]

CVS commit by goutte: 

Try to give better feedback to the user if the needed external programs
are found or not and explain what is disabled if not.
(The goal is that the user can try to find and to install the programs without
having to ask in a mailing list, in a forum or similar.)


  M +39 -5     floppy.cpp   1.78


--- kdeutils/kfloppy/floppy.cpp  #1.77:1.78
@@ -99,23 +99,51 @@ FloppyData::FloppyData(QWidget * parent,
         // If you modify the user visible string, change them also (far) below
 
+        QString userFeedBack;
         uint numFileSystems = 0;
 
+#if defined(ANY_LINUX)
         if (FATFilesystem::runtimeCheck()) {
             filesystemComboBox->insertItem(i18n("DOS"));
             ++numFileSystems;
+            userFeedBack += i18n( "Linux", "Program mkdosfs found." );
         }
-#if defined(ANY_LINUX)
+        else {
+            userFeedBack += i18n( "Linux", "Program mkdosfs <b>not found</b>. MSDOS \
formatting <b>not available</b>." ); +        }
+        userFeedBack += "<br>";
         if (Ext2Filesystem::runtimeCheck()) {
             filesystemComboBox->insertItem(i18n("ext2"));
             ++numFileSystems;
+            userFeedBack += i18n( "Linux", "Program mke2fs found." );
+        }
+        else {
+            userFeedBack += i18n( "Linux", "Program mke2fs <b>not found</b>. Ext2 \
formatting <b>not available</b>" );  }
+        userFeedBack += "<br>";
         if (MinixFilesystem::runtimeCheck()) {
             filesystemComboBox->insertItem(i18n("Minix"));
             ++numFileSystems;
+            userFeedBack += i18n( "Linux", "Program mkfs.minix found." );
+        }
+        else {
+            userFeedBack += i18n( "Linux", "Program mkfs.minix <b>not found</b>. \
Minix formatting <b>not available</b>" );  }
 #elif defined(ANY_BSD)
+        if (FATFilesystem::runtimeCheck()) {
+            filesystemComboBox->insertItem(i18n("DOS"));
+            ++numFileSystems;
+            userFeedBack += i18n( "BSD", "Program mewfs_msdos found." );
+        }
+        else {
+            userFeedBack += i18n( "BSD", "Program newfs_msdos <b>not found</b>. \
MSDOS formatting <b>not available</b>." ); +        }
+        userFeedBack += "<br>";
         if (UFSFilesystem::runtimeCheck()) {
             filesystemComboBox->insertItem(i18n("UFS"));
             ++numFileSystems;
+            userFeedBack += i18n( "BSD", "Program mewfs found." );
+        }
+        else {
+            userFeedBack += i18n( "BSD", "Program newfs <b>not found</b>. UFS \
formatting <b>not available</b>." );  }
 #endif
@@ -138,11 +166,14 @@ FloppyData::FloppyData(QWidget * parent,
 
         // ### TODO: we need some user feedback telling why full formatting is \
disabled. +        userFeedBack += "<br>";
         m_canLowLevel = FDFormat::runtimeCheck();
         if (m_canLowLevel){
             fullformat->setChecked(true);
+            userFeedBack += i18n( "Program fdformat found." );
         }
         else {
             fullformat->setDisabled(true);
             quick->setChecked(true);
+            userFeedBack += i18n( "Program fdformat <b>not found</b>! Full \
formatting <b>disabled</b>!" );  }
         
@@ -198,5 +229,10 @@ FloppyData::FloppyData(QWidget * parent,
         frame->setMinimumHeight( 50 );
         frame->setFrameStyle(QFrame::Panel | QFrame::Sunken);
-        frame->setAlignment(AlignCenter|WordBreak|ExpandTabs);
+        frame->setAlignment(WordBreak|ExpandTabs);
+
+        userFeedBack.prepend( "<qt>" );
+        userFeedBack.append( "</qt>" );
+        frame->setText( userFeedBack );
+        
         ml->addWidget( frame );
 
@@ -210,8 +246,6 @@ FloppyData::FloppyData(QWidget * parent,
 
     if (!numFileSystems) {
-        // ### TODO: better error message
         KMessageBox::error(this,
-            i18n("KFloppy cannot find the support programs needed "
-                    "for sensible operation."));
+            i18n("KFloppy cannot find any of the needed programs for creating file \
systems! Please check your installation!"));  }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic