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) (unidiff)
tree9a3cf83ecf8796d0020076e4e8e275d193fb2584 /kaddressbook
parent165d969ce6ac38c5e3d7b5c629af0b00d0fff017 (diff)
downloadkdepimpi-fe4e6e85abc2ec90cc80108fc7434899b6e13048.zip
kdepimpi-fe4e6e85abc2ec90cc80108fc7434899b6e13048.tar.gz
kdepimpi-fe4e6e85abc2ec90cc80108fc7434899b6e13048.tar.bz2
small fixes
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp11
-rw-r--r--kaddressbook/kaddressbook.pro31
-rw-r--r--kaddressbook/mainembedded.cpp30
3 files changed, 34 insertions, 38 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$
146#include "viewmanager.h" 146#include "viewmanager.h"
147#include "details/detailsviewcontainer.h" 147#include "details/detailsviewcontainer.h"
148#include "kabprefs.h" 148#include "kabprefs.h"
149#include "xxportmanager.h" 149#include "xxportmanager.h"
150#include "incsearchwidget.h" 150#include "incsearchwidget.h"
151#include "jumpbuttonbar.h" 151#include "jumpbuttonbar.h"
152#include "extensionmanager.h" 152#include "extensionmanager.h"
153#include "addresseeconfig.h" 153#include "addresseeconfig.h"
154#include "nameeditdialog.h" 154#include "nameeditdialog.h"
155#include <kcmultidialog.h> 155#include <kcmultidialog.h>
156 156
157#ifdef _WIN32_ 157#ifdef _WIN32_
158 158#ifdef _OL_IMPORT_
159#include "kaimportoldialog.h" 159#include "kaimportoldialog.h"
160#endif
160#else 161#else
161#include <unistd.h> 162#include <unistd.h>
162#endif 163#endif
163// sync includes 164// sync includes
164#include <libkdepim/ksyncprofile.h> 165#include <libkdepim/ksyncprofile.h>
165#include <libkdepim/ksyncprefsdialog.h> 166#include <libkdepim/ksyncprefsdialog.h>
166 167
167 168
168class KABCatPrefs : public QDialog 169class KABCatPrefs : public QDialog
169{ 170{
170 public: 171 public:
171 KABCatPrefs( QWidget *parent=0, const char *name=0 ) : 172 KABCatPrefs( QWidget *parent=0, const char *name=0 ) :
@@ -1282,25 +1283,25 @@ void KABCore::addEmail( QString aStr )
1282 } 1283 }
1283#else //KAB_EMBEDDED 1284#else //KAB_EMBEDDED
1284 qDebug("KABCore::addEmail finsih method"); 1285 qDebug("KABCore::addEmail finsih method");
1285#endif //KAB_EMBEDDED 1286#endif //KAB_EMBEDDED
1286} 1287}
1287 1288
1288void KABCore::importVCard( const KURL &url, bool showPreview ) 1289void KABCore::importVCard( const KURL &url, bool showPreview )
1289{ 1290{
1290 mXXPortManager->importVCard( url, showPreview ); 1291 mXXPortManager->importVCard( url, showPreview );
1291} 1292}
1292void KABCore::importFromOL() 1293void KABCore::importFromOL()
1293{ 1294{
1294#ifdef _WIN32_ 1295#ifdef _OL_IMPORT_
1295 KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this ); 1296 KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this );
1296 idgl->exec(); 1297 idgl->exec();
1297 KABC::Addressee::List list = idgl->getAddressList(); 1298 KABC::Addressee::List list = idgl->getAddressList();
1298 if ( list.count() > 0 ) { 1299 if ( list.count() > 0 ) {
1299 KABC::Addressee::List listNew; 1300 KABC::Addressee::List listNew;
1300 KABC::Addressee::List listExisting; 1301 KABC::Addressee::List listExisting;
1301 KABC::Addressee::List::Iterator it; 1302 KABC::Addressee::List::Iterator it;
1302 KABC::AddressBook::Iterator iter; 1303 KABC::AddressBook::Iterator iter;
1303 for ( it = list.begin(); it != list.end(); ++it ) { 1304 for ( it = list.begin(); it != list.end(); ++it ) {
1304 if ( mAddressBook->findByUid((*it).uid() ).isEmpty()) 1305 if ( mAddressBook->findByUid((*it).uid() ).isEmpty())
1305 listNew.append( (*it) ); 1306 listNew.append( (*it) );
1306 else 1307 else
@@ -2157,37 +2158,37 @@ void KABCore::addActionsManually()
2157 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || 2158 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) ||
2158 // (!KABPrefs::instance()->mMultipleViewsAtOnce )) 2159 // (!KABPrefs::instance()->mMultipleViewsAtOnce ))
2159 mActionEditAddressee->plug( tb ); 2160 mActionEditAddressee->plug( tb );
2160 2161
2161 fileMenu->insertSeparator(); 2162 fileMenu->insertSeparator();
2162 mActionSave->plug( fileMenu ); 2163 mActionSave->plug( fileMenu );
2163 fileMenu->insertItem( "&Import", ImportMenu ); 2164 fileMenu->insertItem( "&Import", ImportMenu );
2164 fileMenu->insertItem( "&Export", ExportMenu ); 2165 fileMenu->insertItem( "&Export", ExportMenu );
2165 fileMenu->insertItem( i18n("&Change"), changeMenu ); 2166 fileMenu->insertItem( i18n("&Change"), changeMenu );
2166#ifndef DESKTOP_VERSION 2167#ifndef DESKTOP_VERSION
2167 if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); 2168 if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu );
2168#endif 2169#endif
2169#if 0 2170#if 0
2170 // PENDING fix MailVCard 2171 // PENDING fix MailVCard
2171 fileMenu->insertSeparator(); 2172 fileMenu->insertSeparator();
2172 mActionMailVCard->plug( fileMenu ); 2173 mActionMailVCard->plug( fileMenu );
2173#endif 2174#endif
2174#ifndef DESKTOP_VERSION 2175#ifndef DESKTOP_VERSION
2175 if ( Ir::supported() ) mActionBR->plug( beamMenu ); 2176 if ( Ir::supported() ) mActionBR->plug( beamMenu );
2176 if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); 2177 if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu );
2177 if ( Ir::supported() ) mActionBeam->plug( beamMenu ); 2178 if ( Ir::supported() ) mActionBeam->plug( beamMenu );
2178#endif 2179#endif
2179 fileMenu->insertSeparator(); 2180 fileMenu->insertSeparator();
2180 mActionQuit->plug( fileMenu ); 2181 mActionQuit->plug( fileMenu );
2181#ifdef _WIN32_ 2182#ifdef _OL_IMPORT_
2182 mActionImportOL->plug( ImportMenu ); 2183 mActionImportOL->plug( ImportMenu );
2183#endif 2184#endif
2184 // edit menu 2185 // edit menu
2185 mActionUndo->plug( editMenu ); 2186 mActionUndo->plug( editMenu );
2186 mActionRedo->plug( editMenu ); 2187 mActionRedo->plug( editMenu );
2187 editMenu->insertSeparator(); 2188 editMenu->insertSeparator();
2188 mActionCut->plug( editMenu ); 2189 mActionCut->plug( editMenu );
2189 mActionCopy->plug( editMenu ); 2190 mActionCopy->plug( editMenu );
2190 mActionPaste->plug( editMenu ); 2191 mActionPaste->plug( editMenu );
2191 mActionDelete->plug( editMenu ); 2192 mActionDelete->plug( editMenu );
2192 editMenu->insertSeparator(); 2193 editMenu->insertSeparator();
2193 mActionSelectAll->plug( editMenu ); 2194 mActionSelectAll->plug( editMenu );
@@ -2212,26 +2213,26 @@ void KABCore::addActionsManually()
2212 //mActionKeyBindings->plug( settingsMenu ); 2213 //mActionKeyBindings->plug( settingsMenu );
2213 } 2214 }
2214 2215
2215 settingsMenu->insertSeparator(); 2216 settingsMenu->insertSeparator();
2216 2217
2217 mActionJumpBar->plug( settingsMenu ); 2218 mActionJumpBar->plug( settingsMenu );
2218 mActionDetails->plug( settingsMenu ); 2219 mActionDetails->plug( settingsMenu );
2219 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) 2220 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop )
2220 mActionDetails->plug( tb ); 2221 mActionDetails->plug( tb );
2221 settingsMenu->insertSeparator(); 2222 settingsMenu->insertSeparator();
2222#ifndef DESKTOP_VERSION 2223#ifndef DESKTOP_VERSION
2223 if ( Ir::supported() ) mActionBR->plug(settingsMenu ); 2224 if ( Ir::supported() ) mActionBR->plug(settingsMenu );
2224#endif
2225 settingsMenu->insertSeparator(); 2225 settingsMenu->insertSeparator();
2226#endif
2226 2227
2227 mActionWhoAmI->plug( settingsMenu ); 2228 mActionWhoAmI->plug( settingsMenu );
2228 mActionEditCategories->plug( settingsMenu ); 2229 mActionEditCategories->plug( settingsMenu );
2229 mActionEditCategories->plug( changeMenu ); 2230 mActionEditCategories->plug( changeMenu );
2230 mActionCategories->plug( changeMenu ); 2231 mActionCategories->plug( changeMenu );
2231 mActionManageCategories->plug( changeMenu ); 2232 mActionManageCategories->plug( changeMenu );
2232 2233
2233 mActionCategories->plug( settingsMenu ); 2234 mActionCategories->plug( settingsMenu );
2234 mActionManageCategories->plug( settingsMenu ); 2235 mActionManageCategories->plug( settingsMenu );
2235 2236
2236 2237
2237 mActionWN->plug( helpMenu ); 2238 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
19MOC_DIR = moc/unix 19MOC_DIR = moc/unix
20} 20}
21win32: { 21win32: {
22RC_FILE = winicons.rc 22RC_FILE = winicons.rc
23DEFINES += _WIN32_ 23DEFINES += _WIN32_
24LIBS += ../bin/microkdepim.lib 24LIBS += ../bin/microkdepim.lib
25LIBS += ../bin/microkcal.lib 25LIBS += ../bin/microkcal.lib
26LIBS += ../bin/microkde.lib 26LIBS += ../bin/microkde.lib
27LIBS += ../bin/microkabc.lib 27LIBS += ../bin/microkabc.lib
28QMAKE_LINK += /NODEFAULTLIB:LIBC 28QMAKE_LINK += /NODEFAULTLIB:LIBC
29OBJECTS_DIR = obj/win 29OBJECTS_DIR = obj/win
30MOC_DIR = moc/win 30MOC_DIR = moc/win
31#olimport section
32#blabla: {
33
31LIBS += mfc71u.lib 34LIBS += mfc71u.lib
35DEFINES += _OL_IMPORT_
36HEADERS = ../outport/msoutl9.h \
37 kaimportoldialog.h
38SOURCES = ../outport/msoutl9.cpp \
39 kaimportoldialog.cpp
40#}
41#olimport section end
32} 42}
33 43
34
35
36
37
38
39
40
41INTERFACES = \ 44INTERFACES = \
42# filteredit_base.ui \ 45# filteredit_base.ui \
43# kofilterview_base.ui \ 46# kofilterview_base.ui \
44 47
45HEADERS = \ 48HEADERS += \
46features/mergewidget.h \ 49features/mergewidget.h \
47features/distributionlistwidget.h \ 50features/distributionlistwidget.h \
48kcmconfigs/addresseewidget.h \ 51kcmconfigs/addresseewidget.h \
49kcmconfigs/extensionconfigdialog.h \ 52kcmconfigs/extensionconfigdialog.h \
50kcmconfigs/kcmkabconfig.h \ 53kcmconfigs/kcmkabconfig.h \
51kcmconfigs/kabconfigwidget.h \ 54kcmconfigs/kabconfigwidget.h \
52addresseeeditordialog.h \ 55addresseeeditordialog.h \
53addresseeeditorwidget.h \ 56addresseeeditorwidget.h \
54addresseditwidget.h \ 57addresseditwidget.h \
55addresseeconfig.h \ 58addresseeconfig.h \
56addresseeutil.h \ 59addresseeutil.h \
57emaileditwidget.h \ 60emaileditwidget.h \
@@ -99,25 +102,25 @@ xxport/kde2_xxport.h \
99xxport/csv_xxport.h \ 102xxport/csv_xxport.h \
100xxport/csvimportdialog.h \ 103xxport/csvimportdialog.h \
101xxport/opie_xxport.h \ 104xxport/opie_xxport.h \
102xxport/qtopia_xxport.h \ 105xxport/qtopia_xxport.h \
103xxport/sharpdtm_xxport.h \ 106xxport/sharpdtm_xxport.h \
104#details/look_details.h \ 107#details/look_details.h \
105#mainwindoiw.h \ 108#mainwindoiw.h \
106# alarmclient.h \ 109# alarmclient.h \
107# calendarview.h \ 110# calendarview.h \
108# customlistviewitem.h \ 111# customlistviewitem.h \
109# datenavigator.h 112# datenavigator.h
110 113
111SOURCES = \ 114SOURCES += \
112addresseeeditordialog.cpp \ 115addresseeeditordialog.cpp \
113addresseeeditorwidget.cpp \ 116addresseeeditorwidget.cpp \
114addresseditwidget.cpp \ 117addresseditwidget.cpp \
115addresseeconfig.cpp \ 118addresseeconfig.cpp \
116addresseeutil.cpp \ 119addresseeutil.cpp \
117extensionmanager.cpp \ 120extensionmanager.cpp \
118features/mergewidget.cpp \ 121features/mergewidget.cpp \
119features/distributionlistwidget.cpp \ 122features/distributionlistwidget.cpp \
120kcmconfigs/addresseewidget.cpp \ 123kcmconfigs/addresseewidget.cpp \
121kcmconfigs/extensionconfigdialog.cpp \ 124kcmconfigs/extensionconfigdialog.cpp \
122kcmconfigs/kcmkabconfig.cpp \ 125kcmconfigs/kcmkabconfig.cpp \
123kcmconfigs/kabconfigwidget.cpp \ 126kcmconfigs/kabconfigwidget.cpp \
@@ -163,22 +166,12 @@ views/colorlistbox.cpp \
163xxport/vcard_xxport.cpp \ 166xxport/vcard_xxport.cpp \
164xxport/kde2_xxport.cpp \ 167xxport/kde2_xxport.cpp \
165xxport/csv_xxport.cpp \ 168xxport/csv_xxport.cpp \
166xxport/csvimportdialog.cpp \ 169xxport/csvimportdialog.cpp \
167xxport/opie_xxport.cpp \ 170xxport/opie_xxport.cpp \
168xxport/qtopia_xxport.cpp \ 171xxport/qtopia_xxport.cpp \
169xxport/sharpdtm_xxport.cpp \ 172xxport/sharpdtm_xxport.cpp \
170#details/look_details.cpp \ 173#details/look_details.cpp \
171#mainwindow.cpp \ 174#mainwindow.cpp \
172# calendarview.cpp \ 175# calendarview.cpp \
173# timespanview.cpp 176# timespanview.cpp
174 177
175
176
177win32: {
178HEADERS += ../outport/msoutl9.h \
179 kaimportoldialog.h
180
181SOURCES += ../outport/msoutl9.cpp \
182 kaimportoldialog.cpp
183}
184
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 @@
1#ifndef DESKTOP_VERSION 1#ifndef DESKTOP_VERSION
2#include <qpe/qpeapplication.h> 2#include <qpe/qpeapplication.h>
3#include <qcopchannel_qws.h> 3#include <qcopchannel_qws.h>
4#include <stdlib.h> 4#include <stdlib.h>
5#else 5#else
6#include <qapplication.h> 6#include <qapplication.h>
7#include <qwindowsstyle.h> 7#include <qwindowsstyle.h>
8#include <qplatinumstyle.h> 8#include <qplatinumstyle.h>
9#include <qmainwindow.h> 9#include <qmainwindow.h>
10#include <qmessagebox.h>
11#include <stdlib.h>
10#endif 12#endif
11 13
12#include <qtextcodec.h> 14#include <qtextcodec.h>
13#include <kstandarddirs.h> 15#include <kstandarddirs.h>
14#include <qregexp.h> 16#include <qregexp.h>
15#include <kglobal.h> 17#include <kglobal.h>
16#include <stdio.h> 18#include <stdio.h>
17#include <qdir.h> 19#include <qdir.h>
18#include "kabprefs.h" 20#include "kabprefs.h"
19#include "kaddressbookmain.h" 21#include "kaddressbookmain.h"
20#include "externalapphandler.h" 22#include "externalapphandler.h"
21#include <libkdepim/kpimglobalprefs.h> 23#include <libkdepim/kpimglobalprefs.h>
22void dumpMissing(); 24void dumpMissing();
23int main( int argc, char **argv ) 25int main( int argc, char **argv )
24{ 26{
25#ifndef DESKTOP_VERSION 27#ifndef DESKTOP_VERSION
26 QPEApplication a( argc, argv ); 28 QPEApplication a( argc, argv );
27 a.setKeepRunning (); 29 a.setKeepRunning ();
28#else 30#else
29 QApplication a( argc, argv ); 31 QApplication a( argc, argv );
30 QApplication::setStyle( new QPlatinumStyle ()); 32 QApplication::setStyle( new QPlatinumStyle ());
31 QString hdir = QDir::homeDirPath(); 33#ifdef _WIN32_
32 // there is a bug when creating dirs for WIN 98 34 QString hdir ( getenv( "HOME") );
33 // it is difficult to fix, because we have no WIN 98 runnung 35 if ( hdir.isEmpty() ) {
34 // such that we try it to create the dirs at startup here 36 QString hd ("C:/" );
35 if ( hdir == "C:\\" ) { // win 98 or ME 37 //QMessageBox::information(0,"hh",QDir::homeDirPath()+" xx" +hd );
36 QDir app_dir; 38 if ( QDir::homeDirPath().lower() == hd.lower() ) {
37 if ( !app_dir.exists("C:\\kdepim") ) 39 _putenv( "HOME=C:");
38 app_dir.mkdir ("C:\\kdepim"); 40 //QMessageBox::information(0,"hh",QString ( getenv( "HOME") ) );
39 if ( !app_dir.exists("C:\\kdepim\\apps") ) 41 }
40 app_dir.mkdir ("C:\\kdepim\\apps"); 42 } else {
41 if ( !app_dir.exists("C:\\kdepim\\config") ) 43 QDir app_dir;
42 app_dir.mkdir ("C:\\kdepim\\config"); 44 if ( !app_dir.exists(hdir) )
43 if ( !app_dir.exists("C:\\kdepim\\apps\\kaddressbook") ) 45 app_dir.mkdir (hdir);
44 app_dir.mkdir ("C:\\kdepim\\apps\\kaddressbook");
45 } 46 }
46#endif 47#endif
48#endif
47 49
48 bool exitHelp = false; 50 bool exitHelp = false;
49 if ( argc > 1 ) { 51 if ( argc > 1 ) {
50 QString command = argv[1]; 52 QString command = argv[1];
51 if ( command == "-help" ){ 53 if ( command == "-help" ){
52 printf("KA/E command line commands:\n"); 54 printf("KA/E command line commands:\n");
53 printf(" no command: Start KA/E in usual way\n"); 55 printf(" no command: Start KA/E in usual way\n");
54 printf(" -help: This output\n"); 56 printf(" -help: This output\n");
55 printf(" KA/E is exiting now. Bye!\n"); 57 printf(" KA/E is exiting now. Bye!\n");
56 exitHelp = true; 58 exitHelp = true;
57 } 59 }
58 } 60 }