summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-03-17 10:00:03 (UTC)
committer zautrix <zautrix>2005-03-17 10:00:03 (UTC)
commita1ae8a0c130aef01923b9a00c95919e0a9fea9d7 (patch) (unidiff)
tree09988c640bb71db2677dff6155cae0a6f027d194 /kaddressbook
parente0a510893ffcddb8d58f785832622d030900b2f9 (diff)
downloadkdepimpi-a1ae8a0c130aef01923b9a00c95919e0a9fea9d7.zip
kdepimpi-a1ae8a0c130aef01923b9a00c95919e0a9fea9d7.tar.gz
kdepimpi-a1ae8a0c130aef01923b9a00c95919e0a9fea9d7.tar.bz2
small kapi fixes
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 3f7a7da..e8f6132 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1398,96 +1398,101 @@ void KABCore::save()
1398 syncManager->setBlockSave(false); 1398 syncManager->setBlockSave(false);
1399} 1399}
1400 1400
1401 1401
1402void KABCore::undo() 1402void KABCore::undo()
1403{ 1403{
1404 UndoStack::instance()->undo(); 1404 UndoStack::instance()->undo();
1405 1405
1406 // Refresh the view 1406 // Refresh the view
1407 mViewManager->refreshView(); 1407 mViewManager->refreshView();
1408} 1408}
1409 1409
1410void KABCore::redo() 1410void KABCore::redo()
1411{ 1411{
1412 RedoStack::instance()->redo(); 1412 RedoStack::instance()->redo();
1413 1413
1414 // Refresh the view 1414 // Refresh the view
1415 mViewManager->refreshView(); 1415 mViewManager->refreshView();
1416} 1416}
1417void KABCore::setJumpButtonBar( bool visible ) 1417void KABCore::setJumpButtonBar( bool visible )
1418{ 1418{
1419 setJumpButtonBarVisible(visible ); 1419 setJumpButtonBarVisible(visible );
1420 saveSettings(); 1420 saveSettings();
1421} 1421}
1422void KABCore::setJumpButtonBarVisible( bool visible ) 1422void KABCore::setJumpButtonBarVisible( bool visible )
1423{ 1423{
1424 if (mMultipleViewsAtOnce) 1424 if (mMultipleViewsAtOnce)
1425 { 1425 {
1426 if ( visible ) 1426 if ( visible )
1427 mJumpButtonBar->show(); 1427 mJumpButtonBar->show();
1428 else 1428 else
1429 mJumpButtonBar->hide(); 1429 mJumpButtonBar->hide();
1430 } 1430 }
1431 else 1431 else
1432 { 1432 {
1433 // show the jumpbar only if "the details are hidden" == "viewmanager are shown" 1433 // show the jumpbar only if "the details are hidden" == "viewmanager are shown"
1434 if (mViewManager->isVisible()) 1434 if (mViewManager->isVisible())
1435 { 1435 {
1436 if ( visible ) 1436 if ( visible )
1437 mJumpButtonBar->show(); 1437 mJumpButtonBar->show();
1438 else 1438 else
1439 mJumpButtonBar->hide(); 1439 mJumpButtonBar->hide();
1440 } 1440 }
1441 else 1441 else
1442 { 1442 {
1443 mJumpButtonBar->hide(); 1443 mJumpButtonBar->hide();
1444 } 1444 }
1445 } 1445 }
1446 if ( visible ) {
1447 if ( mIncSearchWidget->currentItem() == 0 ) {
1448 message( i18n("Change search field enable jump bar") );
1449 }
1450 }
1446} 1451}
1447 1452
1448 1453
1449void KABCore::setDetailsToState() 1454void KABCore::setDetailsToState()
1450{ 1455{
1451 setDetailsVisible( mActionDetails->isChecked() ); 1456 setDetailsVisible( mActionDetails->isChecked() );
1452} 1457}
1453void KABCore::setDetailsToggle() 1458void KABCore::setDetailsToggle()
1454{ 1459{
1455 mActionDetails->setChecked( !mActionDetails->isChecked() ); 1460 mActionDetails->setChecked( !mActionDetails->isChecked() );
1456 setDetailsToState(); 1461 setDetailsToState();
1457} 1462}
1458 1463
1459 1464
1460 1465
1461void KABCore::setDetailsVisible( bool visible ) 1466void KABCore::setDetailsVisible( bool visible )
1462{ 1467{
1463 if (visible && mDetails->isHidden()) 1468 if (visible && mDetails->isHidden())
1464 { 1469 {
1465 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1470 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1466 if ( addrList.count() > 0 ) 1471 if ( addrList.count() > 0 )
1467 mDetails->setAddressee( addrList[ 0 ] ); 1472 mDetails->setAddressee( addrList[ 0 ] );
1468 } 1473 }
1469 1474
1470 // mMultipleViewsAtOnce=false: mDetails is always visible. But we switch between 1475 // mMultipleViewsAtOnce=false: mDetails is always visible. But we switch between
1471 // the listview and the detailview. We do that by changing the splitbar size. 1476 // the listview and the detailview. We do that by changing the splitbar size.
1472 if (mMultipleViewsAtOnce) 1477 if (mMultipleViewsAtOnce)
1473 { 1478 {
1474 if ( visible ) 1479 if ( visible )
1475 mDetails->show(); 1480 mDetails->show();
1476 else 1481 else
1477 mDetails->hide(); 1482 mDetails->hide();
1478 } 1483 }
1479 else 1484 else
1480 { 1485 {
1481 if ( visible ) { 1486 if ( visible ) {
1482 mViewManager->hide(); 1487 mViewManager->hide();
1483 mDetails->show(); 1488 mDetails->show();
1484 mIncSearchWidget->setFocus(); 1489 mIncSearchWidget->setFocus();
1485 } 1490 }
1486 else { 1491 else {
1487 mViewManager->show(); 1492 mViewManager->show();
1488 mDetails->hide(); 1493 mDetails->hide();
1489 mViewManager->setFocusAV(); 1494 mViewManager->setFocusAV();
1490 } 1495 }
1491 setJumpButtonBarVisible( !visible ); 1496 setJumpButtonBarVisible( !visible );
1492 } 1497 }
1493 1498