summaryrefslogtreecommitdiffabout
path: root/kaddressbook/mainembedded.cpp
authorzautrix <zautrix>2004-06-29 11:59:46 (UTC)
committer zautrix <zautrix>2004-06-29 11:59:46 (UTC)
commitda43dbdc6c82453228f34766fc74585615cba938 (patch) (unidiff)
tree16576932cea08bf117b2d0320b0d5f66ee8ad093 /kaddressbook/mainembedded.cpp
parent627489ea2669d3997676bc3cee0f5d0d0c16c4d4 (diff)
downloadkdepimpi-da43dbdc6c82453228f34766fc74585615cba938.zip
kdepimpi-da43dbdc6c82453228f34766fc74585615cba938.tar.gz
kdepimpi-da43dbdc6c82453228f34766fc74585615cba938.tar.bz2
New lib ical.Some minor changes as well.
Diffstat (limited to 'kaddressbook/mainembedded.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/mainembedded.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index ffa37a5..3f6f69d 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -39,70 +39,66 @@ int main( int argc, char **argv )
39 if ( ! exitHelp ) { 39 if ( ! exitHelp ) {
40 40
41 KGlobal::setAppName( "kaddressbook" ); 41 KGlobal::setAppName( "kaddressbook" );
42#ifndef DESKTOP_VERSION 42#ifndef DESKTOP_VERSION
43 KStandardDirs::setAppDir( Global::applicationFileName( "kaddressbook", "" ) ); 43 KStandardDirs::setAppDir( Global::applicationFileName( "kaddressbook", "" ) );
44 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); 44 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/");
45#else 45#else
46 QString fileName ; 46 QString fileName ;
47#ifndef _WIN32_ 47#ifndef _WIN32_
48 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons16/"; 48 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons16/";
49#else 49#else
50 fileName = qApp->applicationDirPath () + "\\kdepim\\kaddressbook\\icons16\\"; 50 fileName = qApp->applicationDirPath () + "\\kdepim\\kaddressbook\\icons16\\";
51#endif 51#endif
52 KGlobal::iconLoader()->setIconPath(fileName); 52 KGlobal::iconLoader()->setIconPath(fileName);
53 QString appdir = QDir::homeDirPath(); 53 QString appdir = QDir::homeDirPath();
54 if ( appdir.right(1) == "\\" || appdir.right(1) == "/" ) 54 if ( appdir.right(1) == "\\" || appdir.right(1) == "/" )
55 appdir += "kaddressbook"; 55 appdir += "kaddressbook";
56 else 56 else
57 appdir += "/kaddressbook"; 57 appdir += "/kaddressbook";
58 KStandardDirs::setAppDir( QDir::convertSeparators( appdir )); 58 KStandardDirs::setAppDir( QDir::convertSeparators( appdir ));
59 // qDebug(" %s ",KStandardDirs::appDir().latin1() ); 59 // qDebug(" %s ",KStandardDirs::appDir().latin1() );
60#endif // desktop 60#endif // desktop
61 QDir app_dir; 61 QDir app_dir;
62 if ( !app_dir.exists(KStandardDirs::appDir()) ) 62 if ( !app_dir.exists(KStandardDirs::appDir()) )
63 app_dir.mkdir (KStandardDirs::appDir()); 63 app_dir.mkdir (KStandardDirs::appDir());
64 64
65 KAddressBookMain* m = new KAddressBookMain(); 65 KAddressBookMain* m = new KAddressBookMain();
66//US MainWindow m; 66//US MainWindow m;
67//US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); 67//US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& )));
68 68
69#ifndef DESKTOP_VERSION 69#ifndef DESKTOP_VERSION
70 a.showMainWidget(m ); 70 a.showMainWidget(m );
71 m->showFullScreen(); 71 m->showMaximized();
72 int min = 20; 72
73 if ( QApplication::desktop()->width() > 320 )
74 min += 20;
75 m->setGeometry( 0,0,QApplication::desktop()->width(), QApplication::desktop()->height() - min );
76
77#else 73#else
78 a.setMainWidget(m ); 74 a.setMainWidget(m );
79 m->show(); 75 m->show();
80 //m->resize( 640, 480 ); 76 //m->resize( 640, 480 );
81#endif 77#endif
82 a.exec(); 78 a.exec();
83 79
84 } 80 }
85 qDebug("KA: Bye! "); 81 qDebug("KA: Bye! ");
86} 82}
87 83
88/* 84/*
89#include <stdlib.h> 85#include <stdlib.h>
90 86
91#include <qstring.h> 87#include <qstring.h>
92 88
93#include <kabc/stdaddressbook.h> 89#include <kabc/stdaddressbook.h>
94#include <kaboutdata.h> 90#include <kaboutdata.h>
95#include <kcmdlineargs.h> 91#include <kcmdlineargs.h>
96#include <kcrash.h> 92#include <kcrash.h>
97#include <kdebug.h> 93#include <kdebug.h>
98#include <klocale.h> 94#include <klocale.h>
99#include <kstartupinfo.h> 95#include <kstartupinfo.h>
100#include <kuniqueapplication.h> 96#include <kuniqueapplication.h>
101#include <kwin.h> 97#include <kwin.h>
102 98
103#include "kaddressbookmain.h" 99#include "kaddressbookmain.h"
104#include "kabcore.h" 100#include "kabcore.h"
105 101
106extern "C" { 102extern "C" {
107 103
108void crashHandler( int ) 104void crashHandler( int )