summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2004-07-04 12:40:46 (UTC)
committer zautrix <zautrix>2004-07-04 12:40:46 (UTC)
commitdeb87bff56cd9cbb41e352c2ccfa97be142d6e48 (patch) (unidiff)
treed711d6085e4143e1731da440732e823e69c092a3 /kaddressbook
parent4a947dbc08cc7640dda4f8a89ddb3c80ecc5f9ea (diff)
downloadkdepimpi-deb87bff56cd9cbb41e352c2ccfa97be142d6e48.zip
kdepimpi-deb87bff56cd9cbb41e352c2ccfa97be142d6e48.tar.gz
kdepimpi-deb87bff56cd9cbb41e352c2ccfa97be142d6e48.tar.bz2
Make sorting in KM working
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index a6d722d..68d3d2d 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -988,49 +988,50 @@ QString KABCore::getNameByPhone( const QString &phone )
988 found = true; 988 found = true;
989 } 989 }
990 } 990 }
991 } 991 }
992 992
993 return ownerName; 993 return ownerName;
994#else //KAB_EMBEDDED 994#else //KAB_EMBEDDED
995 qDebug("KABCore::getNameByPhone finsih method"); 995 qDebug("KABCore::getNameByPhone finsih method");
996 return ""; 996 return "";
997#endif //KAB_EMBEDDED 997#endif //KAB_EMBEDDED
998 998
999} 999}
1000 1000
1001void KABCore::openConfigDialog() 1001void KABCore::openConfigDialog()
1002{ 1002{
1003 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true ); 1003 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true );
1004 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" ); 1004 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" );
1005 ConfigureDialog->addModule(kabcfg ); 1005 ConfigureDialog->addModule(kabcfg );
1006 connect( ConfigureDialog, SIGNAL( applyClicked() ), 1006 connect( ConfigureDialog, SIGNAL( applyClicked() ),
1007 this, SLOT( configurationChanged() ) ); 1007 this, SLOT( configurationChanged() ) );
1008 connect( ConfigureDialog, SIGNAL( okClicked() ), 1008 connect( ConfigureDialog, SIGNAL( okClicked() ),
1009 this, SLOT( configurationChanged() ) ); 1009 this, SLOT( configurationChanged() ) );
1010 saveSettings(); 1010 saveSettings();
1011 ConfigureDialog->showMaximized(); 1011 ConfigureDialog->showMaximized();
1012 ConfigureDialog->exec(); 1012 if ( ConfigureDialog->exec() )
1013 KMessageBox::information( this, i18n("If you configured \nExtensions,\nplease restart!\n") );
1013 delete ConfigureDialog; 1014 delete ConfigureDialog;
1014} 1015}
1015 1016
1016void KABCore::openLDAPDialog() 1017void KABCore::openLDAPDialog()
1017{ 1018{
1018#ifndef KAB_EMBEDDED 1019#ifndef KAB_EMBEDDED
1019 if ( !mLdapSearchDialog ) { 1020 if ( !mLdapSearchDialog ) {
1020 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this ); 1021 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this );
1021 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager, 1022 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager,
1022 SLOT( refreshView() ) ); 1023 SLOT( refreshView() ) );
1023 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this, 1024 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this,
1024 SLOT( setModified() ) ); 1025 SLOT( setModified() ) );
1025 } else 1026 } else
1026 mLdapSearchDialog->restoreSettings(); 1027 mLdapSearchDialog->restoreSettings();
1027 1028
1028 if ( mLdapSearchDialog->isOK() ) 1029 if ( mLdapSearchDialog->isOK() )
1029 mLdapSearchDialog->exec(); 1030 mLdapSearchDialog->exec();
1030#else //KAB_EMBEDDED 1031#else //KAB_EMBEDDED
1031 qDebug("KABCore::openLDAPDialog() finsih method"); 1032 qDebug("KABCore::openLDAPDialog() finsih method");
1032#endif //KAB_EMBEDDED 1033#endif //KAB_EMBEDDED
1033} 1034}
1034 1035
1035void KABCore::print() 1036void KABCore::print()
1036{ 1037{
@@ -1340,56 +1341,57 @@ void KABCore::initActions()
1340 actionCollection(), "edit_delete" ); 1341 actionCollection(), "edit_delete" );
1341 1342
1342 mActionUndo->setEnabled( false ); 1343 mActionUndo->setEnabled( false );
1343 mActionRedo->setEnabled( false ); 1344 mActionRedo->setEnabled( false );
1344 1345
1345 // settings menu 1346 // settings menu
1346#ifdef KAB_EMBEDDED 1347#ifdef KAB_EMBEDDED
1347//US special menuentry to configure the addressbook resources. On KDE 1348//US special menuentry to configure the addressbook resources. On KDE
1348// you do that through the control center !!! 1349// you do that through the control center !!!
1349 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, 1350 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this,
1350 SLOT( configureResources() ), actionCollection(), 1351 SLOT( configureResources() ), actionCollection(),
1351 "kaddressbook_configure_resources" ); 1352 "kaddressbook_configure_resources" );
1352#endif //KAB_EMBEDDED 1353#endif //KAB_EMBEDDED
1353 1354
1354 if ( mIsPart ) { 1355 if ( mIsPart ) {
1355 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, 1356 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this,
1356 SLOT( openConfigDialog() ), actionCollection(), 1357 SLOT( openConfigDialog() ), actionCollection(),
1357 "kaddressbook_configure" ); 1358 "kaddressbook_configure" );
1358 1359
1359 mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, 1360 mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0,
1360 this, SLOT( configureKeyBindings() ), actionCollection(), 1361 this, SLOT( configureKeyBindings() ), actionCollection(),
1361 "kaddressbook_configure_shortcuts" ); 1362 "kaddressbook_configure_shortcuts" );
1362#ifdef KAB_EMBEDDED 1363#ifdef KAB_EMBEDDED
1363 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() ); 1364 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() );
1365 mActionConfigureToolbars->setEnabled( false );
1364#endif //KAB_EMBEDDED 1366#endif //KAB_EMBEDDED
1365 1367
1366 } else { 1368 } else {
1367 mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() ); 1369 mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() );
1368 1370
1369 mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() ); 1371 mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() );
1370 } 1372 }
1371 1373
1372 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, 1374 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0,
1373 actionCollection(), "options_show_jump_bar" ); 1375 actionCollection(), "options_show_jump_bar" );
1374 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBarVisible( bool ) ) ); 1376 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBarVisible( bool ) ) );
1375 1377
1376 mActionDetails = new KToggleAction( i18n( "Show Details" ), 0, 0, 1378 mActionDetails = new KToggleAction( i18n( "Show Details" ), 0, 0,
1377 actionCollection(), "options_show_details" ); 1379 actionCollection(), "options_show_details" );
1378 connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) ); 1380 connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) );
1379 1381
1380 // misc 1382 // misc
1381 // only enable LDAP lookup if we can handle the protocol 1383 // only enable LDAP lookup if we can handle the protocol
1382#ifndef KAB_EMBEDDED 1384#ifndef KAB_EMBEDDED
1383 if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { 1385 if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) {
1384 new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, 1386 new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0,
1385 this, SLOT( openLDAPDialog() ), actionCollection(), 1387 this, SLOT( openLDAPDialog() ), actionCollection(),
1386 "ldap_lookup" ); 1388 "ldap_lookup" );
1387 } 1389 }
1388#else //KAB_EMBEDDED 1390#else //KAB_EMBEDDED
1389 //qDebug("KABCore::initActions() LDAP has to be implemented"); 1391 //qDebug("KABCore::initActions() LDAP has to be implemented");
1390#endif //KAB_EMBEDDED 1392#endif //KAB_EMBEDDED
1391 1393
1392 1394
1393 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, 1395 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this,
1394 SLOT( setWhoAmI() ), actionCollection(), 1396 SLOT( setWhoAmI() ), actionCollection(),
1395 "set_personal" ); 1397 "set_personal" );
@@ -1575,32 +1577,33 @@ void KABCore::updateActionMenu()
1575 if ( !redo->top() ) 1577 if ( !redo->top() )
1576 mActionRedo->setText( i18n( "Redo" ) ); 1578 mActionRedo->setText( i18n( "Redo" ) );
1577 else 1579 else
1578 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); 1580 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) );
1579 1581
1580 mActionRedo->setEnabled( !redo->isEmpty() ); 1582 mActionRedo->setEnabled( !redo->isEmpty() );
1581} 1583}
1582 1584
1583void KABCore::configureKeyBindings() 1585void KABCore::configureKeyBindings()
1584{ 1586{
1585#ifndef KAB_EMBEDDED 1587#ifndef KAB_EMBEDDED
1586 KKeyDialog::configure( actionCollection(), true ); 1588 KKeyDialog::configure( actionCollection(), true );
1587#else //KAB_EMBEDDED 1589#else //KAB_EMBEDDED
1588 qDebug("KABCore::configureKeyBindings() not implemented"); 1590 qDebug("KABCore::configureKeyBindings() not implemented");
1589#endif //KAB_EMBEDDED 1591#endif //KAB_EMBEDDED
1590} 1592}
1591 1593
1592#ifdef KAB_EMBEDDED 1594#ifdef KAB_EMBEDDED
1593void KABCore::configureResources() 1595void KABCore::configureResources()
1594{ 1596{
1595 KRES::KCMKResources dlg( this, "" , 0 ); 1597 KRES::KCMKResources dlg( this, "" , 0 );
1596 1598
1597 if ( !dlg.exec() ) 1599 if ( !dlg.exec() )
1598 return; 1600 return;
1601 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") );
1599} 1602}
1600#endif //KAB_EMBEDDED 1603#endif //KAB_EMBEDDED
1601 1604
1602 1605
1603 1606
1604#ifndef KAB_EMBEDDED 1607#ifndef KAB_EMBEDDED
1605#include "kabcore.moc" 1608#include "kabcore.moc"
1606#endif //KAB_EMBEDDED 1609#endif //KAB_EMBEDDED