author | zautrix <zautrix> | 2005-01-25 15:12:21 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-25 15:12:21 (UTC) |
commit | fe4e6e85abc2ec90cc80108fc7434899b6e13048 (patch) (side-by-side diff) | |
tree | 9a3cf83ecf8796d0020076e4e8e275d193fb2584 /kaddressbook | |
parent | 165d969ce6ac38c5e3d7b5c629af0b00d0fff017 (diff) | |
download | kdepimpi-fe4e6e85abc2ec90cc80108fc7434899b6e13048.zip kdepimpi-fe4e6e85abc2ec90cc80108fc7434899b6e13048.tar.gz kdepimpi-fe4e6e85abc2ec90cc80108fc7434899b6e13048.tar.bz2 |
small fixes
-rw-r--r-- | kaddressbook/kabcore.cpp | 9 | ||||
-rw-r--r-- | kaddressbook/kaddressbook.pro | 31 | ||||
-rw-r--r-- | kaddressbook/mainembedded.cpp | 28 |
3 files changed, 32 insertions, 36 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 505cbf4..590cc82 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -134,50 +134,51 @@ $Id$ #include <qtextstream.h> #include <qradiobutton.h> #include <qbuttongroup.h> #include <libkdepim/categoryselectdialog.h> #include <libkdepim/categoryeditdialog.h> #include <kabc/vcardconverter.h> #include "addresseeutil.h" #include "undocmds.h" #include "addresseeeditordialog.h" #include "viewmanager.h" #include "details/detailsviewcontainer.h" #include "kabprefs.h" #include "xxportmanager.h" #include "incsearchwidget.h" #include "jumpbuttonbar.h" #include "extensionmanager.h" #include "addresseeconfig.h" #include "nameeditdialog.h" #include <kcmultidialog.h> #ifdef _WIN32_ - +#ifdef _OL_IMPORT_ #include "kaimportoldialog.h" +#endif #else #include <unistd.h> #endif // sync includes #include <libkdepim/ksyncprofile.h> #include <libkdepim/ksyncprefsdialog.h> class KABCatPrefs : public QDialog { public: KABCatPrefs( QWidget *parent=0, const char *name=0 ) : QDialog( parent, name, true ) { setCaption( i18n("Manage new Categories") ); QVBoxLayout* lay = new QVBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); lay->addWidget( lab ); QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); lay->addWidget( format ); format->setExclusive ( true ) ; addCatBut = new QRadioButton(i18n("Add to category list"), format ); @@ -1270,49 +1271,49 @@ void KABCore::addEmail( QString aStr ) editContact( (*it).uid() ); } } if ( !found ) { KABC::Addressee addr; addr.setNameFromString( fullName ); addr.insertEmail( email, true ); mAddressBook->insertAddressee( addr ); mViewManager->refreshView( addr.uid() ); editContact( addr.uid() ); } #else //KAB_EMBEDDED qDebug("KABCore::addEmail finsih method"); #endif //KAB_EMBEDDED } void KABCore::importVCard( const KURL &url, bool showPreview ) { mXXPortManager->importVCard( url, showPreview ); } void KABCore::importFromOL() { -#ifdef _WIN32_ +#ifdef _OL_IMPORT_ KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this ); idgl->exec(); KABC::Addressee::List list = idgl->getAddressList(); if ( list.count() > 0 ) { KABC::Addressee::List listNew; KABC::Addressee::List listExisting; KABC::Addressee::List::Iterator it; KABC::AddressBook::Iterator iter; for ( it = list.begin(); it != list.end(); ++it ) { if ( mAddressBook->findByUid((*it).uid() ).isEmpty()) listNew.append( (*it) ); else listExisting.append( (*it) ); } if ( listExisting.count() > 0 ) KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() )); if ( listNew.count() > 0 ) { pasteWithNewUid = false; pasteContacts( listNew ); pasteWithNewUid = true; } } delete idgl; #endif @@ -2157,93 +2158,93 @@ void KABCore::addActionsManually() // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || // (!KABPrefs::instance()->mMultipleViewsAtOnce )) mActionEditAddressee->plug( tb ); fileMenu->insertSeparator(); mActionSave->plug( fileMenu ); fileMenu->insertItem( "&Import", ImportMenu ); fileMenu->insertItem( "&Export", ExportMenu ); fileMenu->insertItem( i18n("&Change"), changeMenu ); #ifndef DESKTOP_VERSION if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); #endif #if 0 // PENDING fix MailVCard fileMenu->insertSeparator(); mActionMailVCard->plug( fileMenu ); #endif #ifndef DESKTOP_VERSION if ( Ir::supported() ) mActionBR->plug( beamMenu ); if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); if ( Ir::supported() ) mActionBeam->plug( beamMenu ); #endif fileMenu->insertSeparator(); mActionQuit->plug( fileMenu ); -#ifdef _WIN32_ +#ifdef _OL_IMPORT_ mActionImportOL->plug( ImportMenu ); #endif // edit menu mActionUndo->plug( editMenu ); mActionRedo->plug( editMenu ); editMenu->insertSeparator(); mActionCut->plug( editMenu ); mActionCopy->plug( editMenu ); mActionPaste->plug( editMenu ); mActionDelete->plug( editMenu ); editMenu->insertSeparator(); mActionSelectAll->plug( editMenu ); mActionSetFormattedName->plug( changeMenu ); mActionRemoveVoice->plug( changeMenu ); // settings menu //US special menuentry to configure the addressbook resources. On KDE // you do that through the control center !!! mActionConfigResources->plug( settingsMenu ); settingsMenu->insertSeparator(); mActionConfigKAddressbook->plug( settingsMenu ); if ( mIsPart ) { //US not implemented yet //mActionConfigShortcuts->plug( settingsMenu ); //mActionConfigureToolbars->plug( settingsMenu ); } else { //US not implemented yet //mActionKeyBindings->plug( settingsMenu ); } settingsMenu->insertSeparator(); mActionJumpBar->plug( settingsMenu ); mActionDetails->plug( settingsMenu ); //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) mActionDetails->plug( tb ); settingsMenu->insertSeparator(); #ifndef DESKTOP_VERSION if ( Ir::supported() ) mActionBR->plug(settingsMenu ); -#endif settingsMenu->insertSeparator(); +#endif mActionWhoAmI->plug( settingsMenu ); mActionEditCategories->plug( settingsMenu ); mActionEditCategories->plug( changeMenu ); mActionCategories->plug( changeMenu ); mActionManageCategories->plug( changeMenu ); mActionCategories->plug( settingsMenu ); mActionManageCategories->plug( settingsMenu ); mActionWN->plug( helpMenu ); mActionSyncHowto->plug( helpMenu ); mActionKdeSyncHowto->plug( helpMenu ); mActionMultiSyncHowto->plug( helpMenu ); mActionFaq->plug( helpMenu ); mActionLicence->plug( helpMenu ); mActionAboutKAddressbook->plug( helpMenu ); if (KGlobal::getDesktopSize() > KGlobal::Small ) { mActionSave->plug( tb ); mViewManager->getFilterAction()->plug ( tb); //LR hide filteraction on started in 480x640 diff --git a/kaddressbook/kaddressbook.pro b/kaddressbook/kaddressbook.pro index fbbc026..e73de06 100644 --- a/kaddressbook/kaddressbook.pro +++ b/kaddressbook/kaddressbook.pro @@ -7,63 +7,66 @@ include( ../variables.pri ) INCLUDEPATH += . ./details ./features ./xxport ../libkdepim ../microkde ../microkde/kdecore ../microkde/kutils ../microkde/kio/kfile ../microkde/kio/kio ../microkde/kdeui ../microkde/kresources ../kabc ../ interfaces DEFINES += KAB_EMBEDDED KAB_NOSPLITTER DESKTOP_VERSION unix : { LIBS += ../bin/libmicrokdepim.so LIBS += ../bin/libmicrokde.so LIBS += ../bin/libmicrokabc.so LIBS += ../bin/libmicrokcal.so #LIBS += -lldap OBJECTS_DIR = obj/unix MOC_DIR = moc/unix } win32: { RC_FILE = winicons.rc DEFINES += _WIN32_ LIBS += ../bin/microkdepim.lib LIBS += ../bin/microkcal.lib LIBS += ../bin/microkde.lib LIBS += ../bin/microkabc.lib QMAKE_LINK += /NODEFAULTLIB:LIBC OBJECTS_DIR = obj/win MOC_DIR = moc/win +#olimport section +#blabla: { + LIBS += mfc71u.lib +DEFINES += _OL_IMPORT_ +HEADERS = ../outport/msoutl9.h \ + kaimportoldialog.h +SOURCES = ../outport/msoutl9.cpp \ + kaimportoldialog.cpp +#} +#olimport section end } - - - - - - - INTERFACES = \ # filteredit_base.ui \ # kofilterview_base.ui \ -HEADERS = \ +HEADERS += \ features/mergewidget.h \ features/distributionlistwidget.h \ kcmconfigs/addresseewidget.h \ kcmconfigs/extensionconfigdialog.h \ kcmconfigs/kcmkabconfig.h \ kcmconfigs/kabconfigwidget.h \ addresseeeditordialog.h \ addresseeeditorwidget.h \ addresseditwidget.h \ addresseeconfig.h \ addresseeutil.h \ emaileditwidget.h \ filtereditdialog.h \ kaddressbookmain.h \ kabprefs.h \ kabcore.h \ viewmanager.h \ extensionmanager.h \ extensionwidget.h \ kaddressbookview.h \ geowidget.h \ imagewidget.h \ incsearchwidget.h \ jumpbuttonbar.h \ @@ -87,49 +90,49 @@ details/detailsviewcontainer.h \ details/look_basic.h \ details/look_html.h \ views/kaddressbookiconview.h \ views/kaddressbooktableview.h \ views/kaddressbookcardview.h \ views/configuretableviewdialog.h \ views/configurecardviewdialog.h \ views/cardview.h \ views/colorlistbox.h \ views/contactlistview.h \ xxport/vcard_xxport.h \ xxport/kde2_xxport.h \ xxport/csv_xxport.h \ xxport/csvimportdialog.h \ xxport/opie_xxport.h \ xxport/qtopia_xxport.h \ xxport/sharpdtm_xxport.h \ #details/look_details.h \ #mainwindoiw.h \ # alarmclient.h \ # calendarview.h \ # customlistviewitem.h \ # datenavigator.h -SOURCES = \ +SOURCES += \ addresseeeditordialog.cpp \ addresseeeditorwidget.cpp \ addresseditwidget.cpp \ addresseeconfig.cpp \ addresseeutil.cpp \ extensionmanager.cpp \ features/mergewidget.cpp \ features/distributionlistwidget.cpp \ kcmconfigs/addresseewidget.cpp \ kcmconfigs/extensionconfigdialog.cpp \ kcmconfigs/kcmkabconfig.cpp \ kcmconfigs/kabconfigwidget.cpp \ emaileditwidget.cpp \ filtereditdialog.cpp \ mainembedded.cpp \ kaddressbookmain.cpp \ kabcore.cpp \ kabprefs.cpp \ viewmanager.cpp \ kaddressbookview.cpp \ extensionwidget.cpp \ geowidget.cpp \ imagewidget.cpp \ incsearchwidget.cpp \ @@ -151,34 +154,24 @@ xxportobject.cpp \ xxportselectdialog.cpp \ details/detailsviewcontainer.cpp \ details/look_basic.cpp \ details/look_html.cpp \ views/kaddressbookiconview.cpp \ views/kaddressbooktableview.cpp \ views/kaddressbookcardview.cpp \ views/configuretableviewdialog.cpp \ views/configurecardviewdialog.cpp \ views/cardview.cpp \ views/contactlistview.cpp \ views/colorlistbox.cpp \ xxport/vcard_xxport.cpp \ xxport/kde2_xxport.cpp \ xxport/csv_xxport.cpp \ xxport/csvimportdialog.cpp \ xxport/opie_xxport.cpp \ xxport/qtopia_xxport.cpp \ xxport/sharpdtm_xxport.cpp \ #details/look_details.cpp \ #mainwindow.cpp \ # calendarview.cpp \ # timespanview.cpp - - -win32: { -HEADERS += ../outport/msoutl9.h \ - kaimportoldialog.h - -SOURCES += ../outport/msoutl9.cpp \ - kaimportoldialog.cpp -} - diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 1e03dba..d9968f3 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp @@ -1,70 +1,72 @@ #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #include <qcopchannel_qws.h> #include <stdlib.h> #else #include <qapplication.h> #include <qwindowsstyle.h> #include <qplatinumstyle.h> #include <qmainwindow.h> +#include <qmessagebox.h> +#include <stdlib.h> #endif #include <qtextcodec.h> #include <kstandarddirs.h> #include <qregexp.h> #include <kglobal.h> #include <stdio.h> #include <qdir.h> #include "kabprefs.h" #include "kaddressbookmain.h" #include "externalapphandler.h" #include <libkdepim/kpimglobalprefs.h> void dumpMissing(); int main( int argc, char **argv ) { #ifndef DESKTOP_VERSION QPEApplication a( argc, argv ); a.setKeepRunning (); #else QApplication a( argc, argv ); QApplication::setStyle( new QPlatinumStyle ()); - QString hdir = QDir::homeDirPath(); - // there is a bug when creating dirs for WIN 98 - // it is difficult to fix, because we have no WIN 98 runnung - // such that we try it to create the dirs at startup here - if ( hdir == "C:\\" ) { // win 98 or ME +#ifdef _WIN32_ + QString hdir ( getenv( "HOME") ); + if ( hdir.isEmpty() ) { + QString hd ("C:/" ); + //QMessageBox::information(0,"hh",QDir::homeDirPath()+" xx" +hd ); + if ( QDir::homeDirPath().lower() == hd.lower() ) { + _putenv( "HOME=C:"); + //QMessageBox::information(0,"hh",QString ( getenv( "HOME") ) ); + } + } else { QDir app_dir; - if ( !app_dir.exists("C:\\kdepim") ) - app_dir.mkdir ("C:\\kdepim"); - if ( !app_dir.exists("C:\\kdepim\\apps") ) - app_dir.mkdir ("C:\\kdepim\\apps"); - if ( !app_dir.exists("C:\\kdepim\\config") ) - app_dir.mkdir ("C:\\kdepim\\config"); - if ( !app_dir.exists("C:\\kdepim\\apps\\kaddressbook") ) - app_dir.mkdir ("C:\\kdepim\\apps\\kaddressbook"); + if ( !app_dir.exists(hdir) ) + app_dir.mkdir (hdir); } #endif +#endif bool exitHelp = false; if ( argc > 1 ) { QString command = argv[1]; if ( command == "-help" ){ printf("KA/E command line commands:\n"); printf(" no command: Start KA/E in usual way\n"); printf(" -help: This output\n"); printf(" KA/E is exiting now. Bye!\n"); exitHelp = true; } } if ( ! exitHelp ) { KGlobal::setAppName( "kaddressbook" ); #ifndef DESKTOP_VERSION if ( QApplication::desktop()->width() > 320 ) KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/"); else KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); #else QString fileName ; fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/"; KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |