summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/openetext.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/noncore/apps/opie-gutenbrowser/openetext.cpp b/noncore/apps/opie-gutenbrowser/openetext.cpp
index a5d855d..75edacd 100644
--- a/noncore/apps/opie-gutenbrowser/openetext.cpp
+++ b/noncore/apps/opie-gutenbrowser/openetext.cpp
@@ -355,43 +355,41 @@ bool OpenEtext::checkConf()
config.setGroup( "Files");
QString ramble = config.readEntry(temp, "" );
if(ramble == file ) {
return true;
}
}
return false;
}
void OpenEtext::remove()
{
title_text = QListBox_1->text( QListBox_1->currentItem() );
title_text=title_text.stripWhiteSpace();
QString msg ="<p>Do you really want to REMOVE\n" + title_text +
"?\nThis will not delete the file.</P>";
- switch( QMessageBox::information( this, tr("Remove Etext"),
+ unsigned short clickVal =
+ QMessageBox::information( this, tr("Remove Etext"),
tr(msg),
- tr("&Yes"), tr("&Cancel"), 0 ) )
- {
- case 0: // Yes clicked,
+ tr("&Yes"), tr("&Cancel"), 0 );
+ if ( clickVal == 0 ) {
+ // The yes button was clicked
removeSelection();
QListBox_1->clear();
getTitles();
- break;
- case 1:
- default:
}
}
/*!
* This removes selected title entry
*/
void OpenEtext::removeSelection()
{
Config config("Gutenbrowser");
config.setGroup( "Files" );
s_numofFiles = config.readEntry("NumberOfFiles", "0");
int rem=0;
int i_numofFiles = s_numofFiles.toInt();
QString fileNum2;
QString fileNum;