author | zautrix <zautrix> | 2005-01-18 23:10:44 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-18 23:10:44 (UTC) |
commit | c626089f47244d0c0a9ba73bcd12f42927acb28f (patch) (unidiff) | |
tree | 2f0ca8591dab470ed3ddd6c2af860c2a8081db97 /microkde/kresources/configpage.cpp | |
parent | bfb2947510c52f9c6b35c35786490f261adf30e3 (diff) | |
download | kdepimpi-c626089f47244d0c0a9ba73bcd12f42927acb28f.zip kdepimpi-c626089f47244d0c0a9ba73bcd12f42927acb28f.tar.gz kdepimpi-c626089f47244d0c0a9ba73bcd12f42927acb28f.tar.bz2 |
fix
Diffstat (limited to 'microkde/kresources/configpage.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kresources/configpage.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/microkde/kresources/configpage.cpp b/microkde/kresources/configpage.cpp index 533be51..011e47e 100644 --- a/microkde/kresources/configpage.cpp +++ b/microkde/kresources/configpage.cpp | |||
@@ -452,38 +452,35 @@ void ConfigPage::slotSelectionChanged() | |||
452 | mRemoveButton->setEnabled( state ); | 452 | mRemoveButton->setEnabled( state ); |
453 | mEditButton->setEnabled( state ); | 453 | mEditButton->setEnabled( state ); |
454 | mStandardButton->setEnabled( state ); | 454 | mStandardButton->setEnabled( state ); |
455 | } | 455 | } |
456 | 456 | ||
457 | void ConfigPage::resourceAdded( Resource* resource ) | 457 | void ConfigPage::resourceAdded( Resource* resource ) |
458 | { | 458 | { |
459 | qDebug("ConfigPage::resourceAdded : %s", resource->resourceName().latin1()); | 459 | qDebug("ConfigPage::resourceAdded : %s", resource->resourceName().latin1()); |
460 | kdDebug(5650) << "ConfigPage::resourceAdded( " << resource->resourceName() << " )" << endl; | ||
461 | ConfigViewItem *item = new ConfigViewItem( mListView, resource ); | 460 | ConfigViewItem *item = new ConfigViewItem( mListView, resource ); |
462 | 461 | ||
463 | // FIXME: this sucks. This should be in the config file, | 462 | // FIXME: this sucks. This should be in the config file, |
464 | // or application-dependent, in which case it's always Off | 463 | // or application-dependent, in which case it's always Off |
465 | item->setOn( false ); | 464 | item->setOn( false ); |
466 | 465 | ||
467 | mLastItem = item; | 466 | mLastItem = item; |
468 | 467 | ||
469 | emit changed( true ); | 468 | emit changed( true ); |
470 | } | 469 | } |
471 | 470 | ||
472 | void ConfigPage::resourceModified( Resource* resource ) | 471 | void ConfigPage::resourceModified( Resource* resource ) |
473 | { | 472 | { |
474 | qDebug("ConfigPage::resourceModified : %s", resource->resourceName().latin1()); | 473 | qDebug("ConfigPage::resourceModified : %s", resource->resourceName().latin1()); |
475 | kdDebug(5650) << "ConfigPage::resourceModified( " << resource->resourceName() << " )" << endl; | ||
476 | } | 474 | } |
477 | 475 | ||
478 | void ConfigPage::resourceDeleted( Resource* resource ) | 476 | void ConfigPage::resourceDeleted( Resource* resource ) |
479 | { | 477 | { |
480 | qDebug("ConfigPage::resourceDeleted : %s", resource->resourceName().latin1()); | 478 | qDebug("ConfigPage::resourceDeleted : %s", resource->resourceName().latin1()); |
481 | kdDebug(5650) << "ConfigPage::resourceDeleted( " << resource->resourceName() << " )" << endl; | ||
482 | } | 479 | } |
483 | 480 | ||
484 | void ConfigPage::slotItemClicked( QListViewItem *item ) | 481 | void ConfigPage::slotItemClicked( QListViewItem *item ) |
485 | { | 482 | { |
486 | ConfigViewItem *configItem = static_cast<ConfigViewItem *>( item ); | 483 | ConfigViewItem *configItem = static_cast<ConfigViewItem *>( item ); |
487 | if ( !configItem ) return; | 484 | if ( !configItem ) return; |
488 | 485 | ||
489 | if ( configItem->standard() && !configItem->isOn() ) { | 486 | if ( configItem->standard() && !configItem->isOn() ) { |
@@ -494,17 +491,17 @@ void ConfigPage::slotItemClicked( QListViewItem *item ) | |||
494 | 491 | ||
495 | if ( configItem->isOn() != configItem->resource()->isActive() ) { | 492 | if ( configItem->isOn() != configItem->resource()->isActive() ) { |
496 | emit changed( true ); | 493 | emit changed( true ); |
497 | } | 494 | } |
498 | } | 495 | } |
499 | 496 | ||
500 | void ConfigPage::saveResourceSettings() | 497 | void ConfigPage::saveResourceSettings() |
501 | { | 498 | { |
502 | qDebug("ConfigPage::saveResourceSettings() begin"); | 499 | //qDebug("ConfigPage::saveResourceSettings() begin"); |
503 | 500 | ||
504 | if ( mCurrentManager ) { | 501 | if ( mCurrentManager ) { |
505 | 502 | ||
506 | QListViewItem *item = mListView->firstChild(); | 503 | QListViewItem *item = mListView->firstChild(); |
507 | while ( item ) { | 504 | while ( item ) { |
508 | ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item ); | 505 | ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item ); |
509 | 506 | ||
510 | // check if standard resource | 507 | // check if standard resource |
@@ -520,14 +517,14 @@ void ConfigPage::saveResourceSettings() | |||
520 | item = item->nextSibling(); | 517 | item = item->nextSibling(); |
521 | } | 518 | } |
522 | mCurrentManager->writeConfig( mCurrentConfig ); | 519 | mCurrentManager->writeConfig( mCurrentConfig ); |
523 | 520 | ||
524 | if ( !mCurrentManager->standardResource() ) | 521 | if ( !mCurrentManager->standardResource() ) |
525 | KMessageBox::sorry( this, i18n( "There is no valid standard resource!<br>Please select one which is neither read-only nor inactive." ) ); | 522 | KMessageBox::sorry( this, i18n( "There is no valid standard resource!<br>Please select one which is neither read-only nor inactive." ) ); |
526 | } | 523 | } |
527 | 524 | ||
528 | qDebug("ConfigPage::saveResourceSettings() end"); | 525 | //qDebug("ConfigPage::saveResourceSettings() end"); |
529 | 526 | ||
530 | } | 527 | } |
531 | 528 | ||
532 | //US #include "configpage.moc" | 529 | //US #include "configpage.moc" |
533 | 530 | ||