From 9f60da2b6768e94d2aeb2f94a4479b6678f2aa76 Mon Sep 17 00:00:00 2001 From: zautrix Date: Thu, 16 Jun 2005 06:30:09 +0000 Subject: fixxx --- (limited to 'korganizer/kofilterview.cpp') diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 36ee2eb..e4dc751 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -196,7 +196,7 @@ void KOCalEditView::deleteCal( int id ) KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); QString name = kkf->mName; QString file = kkf->mFileName; - if ( KMessageBox::warningContinueCancel( this, i18n("The calendar%1is displaying file%2Do you want to removethis calendar from KO/Pi?(The file is not removed!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; + if ( KMessageBox::warningContinueCancel( this, i18n("The calendar %1 is displaying file %2. Do you want to remove this calendar from KO/Pi? (The file is not removed!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; if ( kkf->isStandard ) selectStdCal( 1, true ); emit removeCalendar ( id ); @@ -209,14 +209,14 @@ void KOCalEditView::infoCal( int id ) QString name = KOPrefs::instance()->getCalendar( id )->mName; QString file = KOPrefs::instance()->getCalendar( id )->mFileName; if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { - if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar %1 is not loaded! Loading of file %2failed!Try again to load the calendar?").arg(name).arg(file) ) ) { + if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar %1 is not loaded! Loading of file %2 failed! Try again to load the calendar?").arg(name).arg(file) ) ) { emit calendarAdded( id ); emit needsUpdate(); QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); } } else - KMessageBox::information( this, i18n("The calendar %1is displaying file%2").arg(name).arg(file) ); + KMessageBox::information( this, i18n("The calendar %1 is displaying file %2").arg(name).arg(file) ); } void KOCalEditView::readConfig() { @@ -344,8 +344,8 @@ void KOCalEditView::addCal() QString name, file; while ( tryagain ) { KONewCalPrefs prefs ( this ); - if ( !name.isEmpty() ) prefs.nameE->setText( name ); - if ( !file.isEmpty() ) prefs.url->setURL( file ); + prefs.nameE->setText( name ); + prefs.url->setURL( file ); if ( ! prefs.exec() ) return; name = prefs.calName(); @@ -354,26 +354,27 @@ void KOCalEditView::addCal() KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); while ( kkf ) { if ( kkf->mName == name ) { - KMessageBox::information( this, i18n("Sorry, the calendar name already exists!\nPlease choose another name!") ); + KMessageBox::information( this, i18n("Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!").arg( name ) ); name = ""; + tryagain = true; break; - tryagain = true; } if ( kkf->mFileName == file ) { - - break; + KMessageBox::information( this, i18n("Sorry, the file \n%1\nis already loaded!\nPlease choose another file!").arg( file) ); tryagain = true; + file = ""; + break; } kkf = KOPrefs::instance()->mCalendars.next(); } } QFileInfo fi ( file ); if (!fi.exists() ) { - if ( KMessageBox::questionYesNo(this, i18n("The file does not exist!\nShall I create it for you?")) == KMessageBox::No ) + if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( file ) )== KMessageBox::No ) return; QFile fileIn( file ); if (!fileIn.open( IO_WriteOnly ) ) { - KMessageBox::sorry( this, i18n("Sorry, cannot create the file!\nNo calendar added!") ); + KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) ); return; } QTextStream tsIn( &fileIn ); -- cgit v0.9.0.2