summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-06-13 14:12:46 (UTC)
committer zautrix <zautrix>2005-06-13 14:12:46 (UTC)
commit0000f74badd326f62620d818a5e5d9944e55bda0 (patch) (unidiff)
treee5de7a34f12efab3a4fa27f6534a06a4cbf406fe /korganizer
parent56de219c5ce910a470a01a0e5003d1a113837ef4 (diff)
downloadkdepimpi-0000f74badd326f62620d818a5e5d9944e55bda0.zip
kdepimpi-0000f74badd326f62620d818a5e5d9944e55bda0.tar.gz
kdepimpi-0000f74badd326f62620d818a5e5d9944e55bda0.tar.bz2
fixxii
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kofilterview.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index 2b16347..361eec8 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -199,50 +199,53 @@ void KOCalEditView::selectStdCal( int id, bool b )
199void KOCalEditView::selectCalAlarm(int id ,bool b ) 199void KOCalEditView::selectCalAlarm(int id ,bool b )
200{ 200{
201 KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b; 201 KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b;
202 emit alarmEnabled ( id , b ); 202 emit alarmEnabled ( id , b );
203 emit needsUpdate(); 203 emit needsUpdate();
204} 204}
205void KOCalEditView::selectReadOnly(int id ,bool b ) 205void KOCalEditView::selectReadOnly(int id ,bool b )
206{ 206{
207 KOPrefs::instance()->getCalendar( id )->isReadOnly = b; 207 KOPrefs::instance()->getCalendar( id )->isReadOnly = b;
208 emit calendarReadonly ( id , b ); 208 emit calendarReadonly ( id , b );
209 emit needsUpdate(); 209 emit needsUpdate();
210 210
211} 211}
212void KOCalEditView::setColor( const QColor& c, int id ) 212void KOCalEditView::setColor( const QColor& c, int id )
213{ 213{
214 KOPrefs::instance()->getCalendar( id )->mDefaultColor = c; 214 KOPrefs::instance()->getCalendar( id )->mDefaultColor = c;
215 emit needsUpdate(); 215 emit needsUpdate();
216} 216}
217void KOCalEditView::deleteCal( int id ) 217void KOCalEditView::deleteCal( int id )
218{ 218{
219 KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); 219 KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id );
220 QString name = kkf->mName; 220 QString name = kkf->mName;
221 QString file = kkf->mFileName; 221 QString file = kkf->mFileName;
222 if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b><tr> Do you want to remove this calendar from KO/Pi? (The file is not removed, of course!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; 222 if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b><tr> Do you want to remove this calendar from KO/Pi? (The file is not removed, of course!)").arg(name).arg(file) ) != KMessageBox::Continue ) return;
223 if ( kkf->isStandard )
224 selectStdCal( 1, true );
223 emit removeCalendar ( id ); 225 emit removeCalendar ( id );
224 KOPrefs::instance()->mCalendars.remove ( kkf ); 226 KOPrefs::instance()->mCalendars.remove ( kkf );
227 emit needsUpdate();
225 readConfig(); 228 readConfig();
226} 229}
227void KOCalEditView::infoCal( int id ) 230void KOCalEditView::infoCal( int id )
228{ 231{
229 QString name = KOPrefs::instance()->getCalendar( id )->mName; 232 QString name = KOPrefs::instance()->getCalendar( id )->mName;
230 QString file = KOPrefs::instance()->getCalendar( id )->mFileName; 233 QString file = KOPrefs::instance()->getCalendar( id )->mFileName;
231 KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) ); 234 KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) );
232} 235}
233void KOCalEditView::readConfig() 236void KOCalEditView::readConfig()
234{ 237{
235 238
236 mStdandardB.clear(); 239 mStdandardB.clear();
237 mEnabledB.clear(); 240 mEnabledB.clear();
238 mAlarmB.clear(); 241 mAlarmB.clear();
239 mROB.clear(); 242 mROB.clear();
240 243
241 if ( mw ) delete mw; 244 if ( mw ) delete mw;
242 mw = new QWidget ( this ); 245 mw = new QWidget ( this );
243 ml->addWidget ( mw ); 246 ml->addWidget ( mw );
244 247
245 mainLayout = new QGridLayout ( mw , 2, 8 ); 248 mainLayout = new QGridLayout ( mw , 2, 8 );
246 //mainLayout->setSpacing( 3 ); 249 //mainLayout->setSpacing( 3 );
247 QPushButton * addBut = new QPushButton ( mw ); 250 QPushButton * addBut = new QPushButton ( mw );
248 mainLayout->addWidget( addBut,0,0 ); 251 mainLayout->addWidget( addBut,0,0 );
@@ -330,48 +333,49 @@ void KOCalEditView::readConfig()
330 } 333 }
331 lab = new QLabel ( "", mw ); 334 lab = new QLabel ( "", mw );
332 mainLayout->addWidget( lab,row,0 ); 335 mainLayout->addWidget( lab,row,0 );
333 mw->show(); 336 mw->show();
334 337
335} 338}
336void KOCalEditView::addCal() 339void KOCalEditView::addCal()
337{ 340{
338 qDebug("addcal "); 341 qDebug("addcal ");
339 KONewCalPrefs prefs ( this ); 342 KONewCalPrefs prefs ( this );
340 if ( ! prefs.exec() ) 343 if ( ! prefs.exec() )
341 return; 344 return;
342 QString name = prefs.calName(); 345 QString name = prefs.calName();
343 QString file = prefs.calFileName(); 346 QString file = prefs.calFileName();
344 QFileInfo fi ( file ); 347 QFileInfo fi ( file );
345 if (!fi.exists() ) { 348 if (!fi.exists() ) {
346 KMessageBox::information( this, i18n("File does not exist!\nNo calendar added!")); 349 KMessageBox::information( this, i18n("File does not exist!\nNo calendar added!"));
347 return; 350 return;
348 } 351 }
349 KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar(); 352 KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar();
350 kkf->mName = name; 353 kkf->mName = name;
351 kkf->mFileName = file; 354 kkf->mFileName = file;
352 emit calendarAdded( kkf->mCalNumber ); 355 emit calendarAdded( kkf->mCalNumber );
353 readConfig(); 356 readConfig();
357 emit needsUpdate();
354} 358}
355void KOCalEditView::enableAll() 359void KOCalEditView::enableAll()
356{ 360{
357 toggleList( mEnabledB ); 361 toggleList( mEnabledB );
358} 362}
359void KOCalEditView::enableAlarm() 363void KOCalEditView::enableAlarm()
360{ 364{
361 toggleList( mAlarmB ); 365 toggleList( mAlarmB );
362} 366}
363void KOCalEditView::disableRO() 367void KOCalEditView::disableRO()
364{ 368{
365 toggleList( mROB ); 369 toggleList( mROB );
366} 370}
367void KOCalEditView::toggleList ( QPtrList<KOCalCheckButton> list ) 371void KOCalEditView::toggleList ( QPtrList<KOCalCheckButton> list )
368{ 372{
369 bool dis = false; 373 bool dis = false;
370 KOCalCheckButton* it = list.first(); 374 KOCalCheckButton* it = list.first();
371 while ( it ) { 375 while ( it ) {
372 if ( !it->isChecked() ) { 376 if ( !it->isChecked() ) {
373 dis = true; 377 dis = true;
374 break; 378 break;
375 } 379 }
376 it = list.next(); 380 it = list.next();
377 } 381 }