summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-01-25 15:12:21 (UTC)
committer zautrix <zautrix>2005-01-25 15:12:21 (UTC)
commitfe4e6e85abc2ec90cc80108fc7434899b6e13048 (patch) (side-by-side diff)
tree9a3cf83ecf8796d0020076e4e8e275d193fb2584 /kaddressbook
parent165d969ce6ac38c5e3d7b5c629af0b00d0fff017 (diff)
downloadkdepimpi-fe4e6e85abc2ec90cc80108fc7434899b6e13048.zip
kdepimpi-fe4e6e85abc2ec90cc80108fc7434899b6e13048.tar.gz
kdepimpi-fe4e6e85abc2ec90cc80108fc7434899b6e13048.tar.bz2
small fixes
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp9
-rw-r--r--kaddressbook/kaddressbook.pro31
-rw-r--r--kaddressbook/mainembedded.cpp28
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
@@ -146,26 +146,27 @@ $Id$
#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 ) :
@@ -1282,25 +1283,25 @@ void KABCore::addEmail( QString aStr )
}
#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
@@ -2169,25 +2170,25 @@ void KABCore::addActionsManually()
#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 );
@@ -2212,26 +2213,26 @@ void KABCore::addActionsManually()
//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 );
diff --git a/kaddressbook/kaddressbook.pro b/kaddressbook/kaddressbook.pro
index fbbc026..e73de06 100644
--- a/kaddressbook/kaddressbook.pro
+++ b/kaddressbook/kaddressbook.pro
@@ -19,39 +19,42 @@ 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 \
@@ -99,25 +102,25 @@ 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 \
@@ -163,22 +166,12 @@ 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,58 +1,60 @@
#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;
}
}