summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/icons22/listview.pngbin365 -> 657 bytes
-rw-r--r--kaddressbook/kabcore.cpp4
2 files changed, 3 insertions, 1 deletions
diff --git a/bin/kdepim/kaddressbook/icons22/listview.png b/bin/kdepim/kaddressbook/icons22/listview.png
index b19d9f8..7de6ba0 100644
--- a/bin/kdepim/kaddressbook/icons22/listview.png
+++ b/bin/kdepim/kaddressbook/icons22/listview.png
Binary files differ
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index cb9b992..f0f08f4 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1251,129 +1251,131 @@ void KABCore::extensionModified( const KABC::Addressee::List &list )
1251 mAddressBook->insertAddressee( *it ); 1251 mAddressBook->insertAddressee( *it );
1252 if ( list.count() > 1 ) 1252 if ( list.count() > 1 )
1253 setModified(); 1253 setModified();
1254 else 1254 else
1255 setModifiedWOrefresh(); 1255 setModifiedWOrefresh();
1256 } 1256 }
1257 if ( list.count() == 0 ) 1257 if ( list.count() == 0 )
1258 mViewManager->refreshView(); 1258 mViewManager->refreshView();
1259 else 1259 else
1260 mViewManager->refreshView( list[ 0 ].uid() ); 1260 mViewManager->refreshView( list[ 0 ].uid() );
1261 1261
1262 1262
1263 1263
1264} 1264}
1265 1265
1266QString KABCore::getNameByPhone( const QString &phone ) 1266QString KABCore::getNameByPhone( const QString &phone )
1267{ 1267{
1268#ifndef KAB_EMBEDDED 1268#ifndef KAB_EMBEDDED
1269 QRegExp r( "[/*/-/ ]" ); 1269 QRegExp r( "[/*/-/ ]" );
1270 QString localPhone( phone ); 1270 QString localPhone( phone );
1271 1271
1272 bool found = false; 1272 bool found = false;
1273 QString ownerName = ""; 1273 QString ownerName = "";
1274 KABC::AddressBook::Iterator iter; 1274 KABC::AddressBook::Iterator iter;
1275 KABC::PhoneNumber::List::Iterator phoneIter; 1275 KABC::PhoneNumber::List::Iterator phoneIter;
1276 KABC::PhoneNumber::List phoneList; 1276 KABC::PhoneNumber::List phoneList;
1277 for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) { 1277 for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) {
1278 phoneList = (*iter).phoneNumbers(); 1278 phoneList = (*iter).phoneNumbers();
1279 for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() ); 1279 for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() );
1280 ++phoneIter) { 1280 ++phoneIter) {
1281 // Get rid of separator chars so just the numbers are compared. 1281 // Get rid of separator chars so just the numbers are compared.
1282 if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) { 1282 if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) {
1283 ownerName = (*iter).formattedName(); 1283 ownerName = (*iter).formattedName();
1284 found = true; 1284 found = true;
1285 } 1285 }
1286 } 1286 }
1287 } 1287 }
1288 1288
1289 return ownerName; 1289 return ownerName;
1290#else //KAB_EMBEDDED 1290#else //KAB_EMBEDDED
1291 qDebug("KABCore::getNameByPhone finsih method"); 1291 qDebug("KABCore::getNameByPhone finsih method");
1292 return ""; 1292 return "";
1293#endif //KAB_EMBEDDED 1293#endif //KAB_EMBEDDED
1294 1294
1295} 1295}
1296 1296
1297void KABCore::openConfigDialog() 1297void KABCore::openConfigDialog()
1298{ 1298{
1299 KABPrefs* kab_prefs = KABPrefs::instance(); 1299 KABPrefs* kab_prefs = KABPrefs::instance();
1300 KPimGlobalPrefs* kpim_prefs = KPimGlobalPrefs::instance(); 1300 KPimGlobalPrefs* kpim_prefs = KPimGlobalPrefs::instance();
1301 1301
1302 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true ); 1302 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true );
1303 KCMKabConfig* kabcfg = new KCMKabConfig( kab_prefs, ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" ); 1303 KCMKabConfig* kabcfg = new KCMKabConfig( kab_prefs, ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" );
1304 ConfigureDialog->addModule(kabcfg ); 1304 ConfigureDialog->addModule(kabcfg );
1305 KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( kpim_prefs, ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" ); 1305 KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( kpim_prefs, ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" );
1306 ConfigureDialog->addModule(kdelibcfg ); 1306 ConfigureDialog->addModule(kdelibcfg );
1307 1307
1308 1308
1309 1309
1310 connect( ConfigureDialog, SIGNAL( applyClicked() ), 1310 connect( ConfigureDialog, SIGNAL( applyClicked() ),
1311 this, SLOT( configurationChanged() ) ); 1311 this, SLOT( configurationChanged() ) );
1312 connect( ConfigureDialog, SIGNAL( okClicked() ), 1312 connect( ConfigureDialog, SIGNAL( okClicked() ),
1313 this, SLOT( configurationChanged() ) ); 1313 this, SLOT( configurationChanged() ) );
1314 saveSettings(); 1314 saveSettings();
1315#ifndef DESKTOP_VERSION
1315 ConfigureDialog->showMaximized(); 1316 ConfigureDialog->showMaximized();
1317#endif
1316 if ( ConfigureDialog->exec() ) 1318 if ( ConfigureDialog->exec() )
1317 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); 1319 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") );
1318 delete ConfigureDialog; 1320 delete ConfigureDialog;
1319} 1321}
1320 1322
1321void KABCore::openLDAPDialog() 1323void KABCore::openLDAPDialog()
1322{ 1324{
1323#ifndef KAB_EMBEDDED 1325#ifndef KAB_EMBEDDED
1324 if ( !mLdapSearchDialog ) { 1326 if ( !mLdapSearchDialog ) {
1325 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this ); 1327 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this );
1326 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager, 1328 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager,
1327 SLOT( refreshView() ) ); 1329 SLOT( refreshView() ) );
1328 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this, 1330 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this,
1329 SLOT( setModified() ) ); 1331 SLOT( setModified() ) );
1330 } else 1332 } else
1331 mLdapSearchDialog->restoreSettings(); 1333 mLdapSearchDialog->restoreSettings();
1332 1334
1333 if ( mLdapSearchDialog->isOK() ) 1335 if ( mLdapSearchDialog->isOK() )
1334 mLdapSearchDialog->exec(); 1336 mLdapSearchDialog->exec();
1335#else //KAB_EMBEDDED 1337#else //KAB_EMBEDDED
1336 qDebug("KABCore::openLDAPDialog() finsih method"); 1338 qDebug("KABCore::openLDAPDialog() finsih method");
1337#endif //KAB_EMBEDDED 1339#endif //KAB_EMBEDDED
1338} 1340}
1339 1341
1340void KABCore::print() 1342void KABCore::print()
1341{ 1343{
1342#ifndef KAB_EMBEDDED 1344#ifndef KAB_EMBEDDED
1343 KPrinter printer; 1345 KPrinter printer;
1344 if ( !printer.setup( this ) ) 1346 if ( !printer.setup( this ) )
1345 return; 1347 return;
1346 1348
1347 KABPrinting::PrintingWizard wizard( &printer, mAddressBook, 1349 KABPrinting::PrintingWizard wizard( &printer, mAddressBook,
1348 mViewManager->selectedUids(), this ); 1350 mViewManager->selectedUids(), this );
1349 1351
1350 wizard.exec(); 1352 wizard.exec();
1351#else //KAB_EMBEDDED 1353#else //KAB_EMBEDDED
1352 qDebug("KABCore::print() finsih method"); 1354 qDebug("KABCore::print() finsih method");
1353#endif //KAB_EMBEDDED 1355#endif //KAB_EMBEDDED
1354 1356
1355} 1357}
1356 1358
1357 1359
1358void KABCore::addGUIClient( KXMLGUIClient *client ) 1360void KABCore::addGUIClient( KXMLGUIClient *client )
1359{ 1361{
1360 if ( mGUIClient ) 1362 if ( mGUIClient )
1361 mGUIClient->insertChildClient( client ); 1363 mGUIClient->insertChildClient( client );
1362 else 1364 else
1363 KMessageBox::error( this, "no KXMLGUICLient"); 1365 KMessageBox::error( this, "no KXMLGUICLient");
1364} 1366}
1365 1367
1366 1368
1367void KABCore::configurationChanged() 1369void KABCore::configurationChanged()
1368{ 1370{
1369 mExtensionManager->reconfigure(); 1371 mExtensionManager->reconfigure();
1370} 1372}
1371 1373
1372void KABCore::addressBookChanged() 1374void KABCore::addressBookChanged()
1373{ 1375{
1374/*US 1376/*US
1375 QDictIterator<AddresseeEditorDialog> it( mEditorDict ); 1377 QDictIterator<AddresseeEditorDialog> it( mEditorDict );
1376 while ( it.current() ) { 1378 while ( it.current() ) {
1377 if ( it.current()->dirty() ) { 1379 if ( it.current()->dirty() ) {
1378 QString text = i18n( "Data has been changed externally. Unsaved " 1380 QString text = i18n( "Data has been changed externally. Unsaved "
1379 "changes will be lost." ); 1381 "changes will be lost." );
@@ -1809,129 +1811,129 @@ void KABCore::addActionsManually()
1809 // mActionQuit->plug ( mMainWindow->toolBar()); 1811 // mActionQuit->plug ( mMainWindow->toolBar());
1810 1812
1811 1813
1812 1814
1813 //US Now connect the actions with the menue entries. 1815 //US Now connect the actions with the menue entries.
1814 mActionPrint->plug( fileMenu ); 1816 mActionPrint->plug( fileMenu );
1815 mActionMail->plug( fileMenu ); 1817 mActionMail->plug( fileMenu );
1816 fileMenu->insertSeparator(); 1818 fileMenu->insertSeparator();
1817 1819
1818 mActionNewContact->plug( fileMenu ); 1820 mActionNewContact->plug( fileMenu );
1819 mActionNewContact->plug( tb ); 1821 mActionNewContact->plug( tb );
1820 1822
1821 mActionEditAddressee->plug( fileMenu ); 1823 mActionEditAddressee->plug( fileMenu );
1822 if ((KGlobal::getDesktopSize() > KGlobal::Small ) || 1824 if ((KGlobal::getDesktopSize() > KGlobal::Small ) ||
1823 (!KABPrefs::instance()->mMultipleViewsAtOnce )) 1825 (!KABPrefs::instance()->mMultipleViewsAtOnce ))
1824 mActionEditAddressee->plug( tb ); 1826 mActionEditAddressee->plug( tb );
1825 1827
1826 fileMenu->insertSeparator(); 1828 fileMenu->insertSeparator();
1827 mActionSave->plug( fileMenu ); 1829 mActionSave->plug( fileMenu );
1828 fileMenu->insertItem( "&Import", ImportMenu ); 1830 fileMenu->insertItem( "&Import", ImportMenu );
1829 fileMenu->insertItem( "&Emport", ExportMenu ); 1831 fileMenu->insertItem( "&Emport", ExportMenu );
1830 fileMenu->insertSeparator(); 1832 fileMenu->insertSeparator();
1831 mActionMailVCard->plug( fileMenu ); 1833 mActionMailVCard->plug( fileMenu );
1832#ifndef DESKTOP_VERSION 1834#ifndef DESKTOP_VERSION
1833 if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu ); 1835 if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu );
1834 if ( Ir::supported() ) mActionBeam->plug(fileMenu ); 1836 if ( Ir::supported() ) mActionBeam->plug(fileMenu );
1835#endif 1837#endif
1836 fileMenu->insertSeparator(); 1838 fileMenu->insertSeparator();
1837 mActionQuit->plug( fileMenu ); 1839 mActionQuit->plug( fileMenu );
1838#ifdef _WIN32_ 1840#ifdef _WIN32_
1839 mActionImportOL->plug( ImportMenu ); 1841 mActionImportOL->plug( ImportMenu );
1840#endif 1842#endif
1841 // edit menu 1843 // edit menu
1842 mActionUndo->plug( editMenu ); 1844 mActionUndo->plug( editMenu );
1843 mActionRedo->plug( editMenu ); 1845 mActionRedo->plug( editMenu );
1844 editMenu->insertSeparator(); 1846 editMenu->insertSeparator();
1845 mActionCut->plug( editMenu ); 1847 mActionCut->plug( editMenu );
1846 mActionCopy->plug( editMenu ); 1848 mActionCopy->plug( editMenu );
1847 mActionPaste->plug( editMenu ); 1849 mActionPaste->plug( editMenu );
1848 mActionDelete->plug( editMenu ); 1850 mActionDelete->plug( editMenu );
1849 editMenu->insertSeparator(); 1851 editMenu->insertSeparator();
1850 mActionSelectAll->plug( editMenu ); 1852 mActionSelectAll->plug( editMenu );
1851 1853
1852 mActionRemoveVoice->plug( changeMenu ); 1854 mActionRemoveVoice->plug( changeMenu );
1853 // settings menu 1855 // settings menu
1854//US special menuentry to configure the addressbook resources. On KDE 1856//US special menuentry to configure the addressbook resources. On KDE
1855// you do that through the control center !!! 1857// you do that through the control center !!!
1856 mActionConfigResources->plug( settingsMenu ); 1858 mActionConfigResources->plug( settingsMenu );
1857 settingsMenu->insertSeparator(); 1859 settingsMenu->insertSeparator();
1858 1860
1859 mActionConfigKAddressbook->plug( settingsMenu ); 1861 mActionConfigKAddressbook->plug( settingsMenu );
1860 1862
1861 if ( mIsPart ) { 1863 if ( mIsPart ) {
1862 mActionConfigShortcuts->plug( settingsMenu ); 1864 mActionConfigShortcuts->plug( settingsMenu );
1863 mActionConfigureToolbars->plug( settingsMenu ); 1865 mActionConfigureToolbars->plug( settingsMenu );
1864 1866
1865 } else { 1867 } else {
1866 mActionKeyBindings->plug( settingsMenu ); 1868 mActionKeyBindings->plug( settingsMenu );
1867 } 1869 }
1868 1870
1869 settingsMenu->insertSeparator(); 1871 settingsMenu->insertSeparator();
1870 1872
1871 mActionJumpBar->plug( settingsMenu ); 1873 mActionJumpBar->plug( settingsMenu );
1872 mActionDetails->plug( settingsMenu ); 1874 mActionDetails->plug( settingsMenu );
1873 if (!KABPrefs::instance()->mMultipleViewsAtOnce ) 1875 if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop )
1874 mActionDetails->plug( tb ); 1876 mActionDetails->plug( tb );
1875 settingsMenu->insertSeparator(); 1877 settingsMenu->insertSeparator();
1876 1878
1877 mActionWhoAmI->plug( settingsMenu ); 1879 mActionWhoAmI->plug( settingsMenu );
1878 mActionCategories->plug( settingsMenu ); 1880 mActionCategories->plug( settingsMenu );
1879 1881
1880 mActionLicence->plug( helpMenu ); 1882 mActionLicence->plug( helpMenu );
1881 mActionFaq->plug( helpMenu ); 1883 mActionFaq->plug( helpMenu );
1882 mActionAboutKAddressbook->plug( helpMenu ); 1884 mActionAboutKAddressbook->plug( helpMenu );
1883 1885
1884 if (KGlobal::getDesktopSize() > KGlobal::Small ) { 1886 if (KGlobal::getDesktopSize() > KGlobal::Small ) {
1885 1887
1886 mActionSave->plug( tb ); 1888 mActionSave->plug( tb );
1887 mViewManager->getFilterAction()->plug ( tb); 1889 mViewManager->getFilterAction()->plug ( tb);
1888 if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { 1890 if (KGlobal::getDesktopSize() == KGlobal::Desktop ) {
1889 mActionUndo->plug( tb ); 1891 mActionUndo->plug( tb );
1890 mActionDelete->plug( tb ); 1892 mActionDelete->plug( tb );
1891 mActionRedo->plug( tb ); 1893 mActionRedo->plug( tb );
1892 } 1894 }
1893 } 1895 }
1894 //mActionQuit->plug ( tb ); 1896 //mActionQuit->plug ( tb );
1895 // tb->insertWidget(-1, 0, mIncSearchWidget, 6); 1897 // tb->insertWidget(-1, 0, mIncSearchWidget, 6);
1896 1898
1897 //US link the searchwidget first to this. 1899 //US link the searchwidget first to this.
1898 // The real linkage to the toolbar happens later. 1900 // The real linkage to the toolbar happens later.
1899//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); 1901//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE);
1900//US tb->insertItem( mIncSearchWidget ); 1902//US tb->insertItem( mIncSearchWidget );
1901/*US 1903/*US
1902 mIncSearchWidget = new IncSearchWidget( tb ); 1904 mIncSearchWidget = new IncSearchWidget( tb );
1903 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1905 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1904 SLOT( incrementalSearch( const QString& ) ) ); 1906 SLOT( incrementalSearch( const QString& ) ) );
1905 1907
1906 mJumpButtonBar = new JumpButtonBar( this, this ); 1908 mJumpButtonBar = new JumpButtonBar( this, this );
1907 1909
1908//US topLayout->addWidget( mJumpButtonBar ); 1910//US topLayout->addWidget( mJumpButtonBar );
1909 this->layout()->add( mJumpButtonBar ); 1911 this->layout()->add( mJumpButtonBar );
1910*/ 1912*/
1911 1913
1912#endif //KAB_EMBEDDED 1914#endif //KAB_EMBEDDED
1913} 1915}
1914void KABCore::showLicence() 1916void KABCore::showLicence()
1915{ 1917{
1916 KApplication::showLicence(); 1918 KApplication::showLicence();
1917} 1919}
1918void KABCore::removeVoice() 1920void KABCore::removeVoice()
1919{ 1921{
1920 if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No ) 1922 if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No )
1921 return; 1923 return;
1922 KABC::Addressee::List list = mViewManager->selectedAddressees(); 1924 KABC::Addressee::List list = mViewManager->selectedAddressees();
1923 KABC::Addressee::List::Iterator it; 1925 KABC::Addressee::List::Iterator it;
1924 for ( it = list.begin(); it != list.end(); ++it ) { 1926 for ( it = list.begin(); it != list.end(); ++it ) {
1925 PhoneNumber::List phoneNumbers = (*it).phoneNumbers(); 1927 PhoneNumber::List phoneNumbers = (*it).phoneNumbers();
1926 PhoneNumber::List::Iterator phoneIt; 1928 PhoneNumber::List::Iterator phoneIt;
1927 bool found = false; 1929 bool found = false;
1928 for ( phoneIt = phoneNumbers.begin(); phoneIt != phoneNumbers.end(); ++phoneIt ) { 1930 for ( phoneIt = phoneNumbers.begin(); phoneIt != phoneNumbers.end(); ++phoneIt ) {
1929 if ( (*phoneIt).type() & PhoneNumber::Voice) { // voice found 1931 if ( (*phoneIt).type() & PhoneNumber::Voice) { // voice found
1930 if ((*phoneIt).type() - PhoneNumber::Voice ) { 1932 if ((*phoneIt).type() - PhoneNumber::Voice ) {
1931 (*phoneIt).setType((*phoneIt).type() - PhoneNumber::Voice ); 1933 (*phoneIt).setType((*phoneIt).type() - PhoneNumber::Voice );
1932 (*it).insertPhoneNumber( (*phoneIt) ); 1934 (*it).insertPhoneNumber( (*phoneIt) );
1933 found = true; 1935 found = true;
1934 } 1936 }
1935 } 1937 }
1936 1938
1937 } 1939 }