-rw-r--r-- | korganizer/main.cpp | 6 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 6 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp index 7f9b5c6..16186c0 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp | |||
@@ -1,10 +1,11 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #ifndef DESKTOP_VERSION | 3 | #ifndef DESKTOP_VERSION |
4 | #include <qpe/qpeapplication.h> | 4 | #include <qpe/qpeapplication.h> |
5 | #include <qcopchannel_qws.h> | ||
5 | #include <qpe/global.h> | 6 | #include <qpe/global.h> |
6 | #include <stdlib.h> | 7 | #include <stdlib.h> |
7 | #else | 8 | #else |
8 | #include <qapplication.h> | 9 | #include <qapplication.h> |
9 | #include <qstring.h> | 10 | #include <qstring.h> |
10 | #include <qwindowsstyle.h> | 11 | #include <qwindowsstyle.h> |
@@ -76,12 +77,14 @@ int main( int argc, char **argv ) | |||
76 | fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; | 77 | fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; |
77 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); | 78 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
78 | #endif | 79 | #endif |
79 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); | 80 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); |
80 | MainWindow m; | 81 | MainWindow m; |
81 | #ifndef DESKTOP_VERSION | 82 | #ifndef DESKTOP_VERSION |
83 | QCopChannel* c1 = new QCopChannel("QPE/Application/datebook",&m, "channel" ) ; | ||
84 | QObject::connect( c1, SIGNAL (received ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); | ||
82 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); | 85 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); |
83 | a.showMainWidget(&m ); | 86 | a.showMainWidget(&m ); |
84 | #else | 87 | #else |
85 | a.setMainWidget(&m ); | 88 | a.setMainWidget(&m ); |
86 | m.show(); | 89 | m.show(); |
87 | //m.resize( 800, 600 ); | 90 | //m.resize( 800, 600 ); |
@@ -93,10 +96,13 @@ int main( int argc, char **argv ) | |||
93 | command += argv[2]; | 96 | command += argv[2]; |
94 | qApp->processEvents(); | 97 | qApp->processEvents(); |
95 | m.recieve(command, QByteArray() ); | 98 | m.recieve(command, QByteArray() ); |
96 | 99 | ||
97 | } | 100 | } |
98 | a.exec(); | 101 | a.exec(); |
102 | #ifndef DESKTOP_VERSION | ||
103 | delete c1; | ||
104 | #endif | ||
99 | 105 | ||
100 | } | 106 | } |
101 | qDebug("KO: Bye! "); | 107 | qDebug("KO: Bye! "); |
102 | } | 108 | } |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 2d17986..3c16458 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -127,13 +127,12 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
127 | QMainWindow( parent, name ) | 127 | QMainWindow( parent, name ) |
128 | { | 128 | { |
129 | 129 | ||
130 | #ifdef DESKTOP_VERSION | 130 | #ifdef DESKTOP_VERSION |
131 | setFont( QFont("Arial"), 14 ); | 131 | setFont( QFont("Arial"), 14 ); |
132 | #endif | 132 | #endif |
133 | mServerSocket = 0; | ||
134 | mClosed = false; | 133 | mClosed = false; |
135 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; | 134 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; |
136 | QString confFile = locateLocal("config","korganizerrc"); | 135 | QString confFile = locateLocal("config","korganizerrc"); |
137 | QFileInfo finf ( confFile ); | 136 | QFileInfo finf ( confFile ); |
138 | bool showWarning = !finf.exists(); | 137 | bool showWarning = !finf.exists(); |
139 | setIcon(SmallIcon( "ko24" ) ); | 138 | setIcon(SmallIcon( "ko24" ) ); |
@@ -276,16 +275,14 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
276 | #endif | 275 | #endif |
277 | } | 276 | } |
278 | MainWindow::~MainWindow() | 277 | MainWindow::~MainWindow() |
279 | { | 278 | { |
280 | //qDebug("MainWindow::~MainWindow() "); | 279 | //qDebug("MainWindow::~MainWindow() "); |
281 | //save toolbar location | 280 | //save toolbar location |
282 | delete mServerSocket; | ||
283 | delete mCalendar; | 281 | delete mCalendar; |
284 | delete KOPrefs::instance(); | 282 | delete mSyncManager; |
285 | delete KIncidenceFormatter::instance(); | ||
286 | 283 | ||
287 | 284 | ||
288 | } | 285 | } |
289 | void MainWindow::showMaximized () | 286 | void MainWindow::showMaximized () |
290 | { | 287 | { |
291 | #ifndef DESKTOP_VERSION | 288 | #ifndef DESKTOP_VERSION |
@@ -479,13 +476,12 @@ void MainWindow::initActions() | |||
479 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 476 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
480 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); | 477 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); |
481 | menuBar->insertItem( i18n("Help"), helpMenu ); | 478 | menuBar->insertItem( i18n("Help"), helpMenu ); |
482 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); | 479 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); |
483 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); | 480 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); |
484 | } | 481 | } |
485 | connect ( syncMenu, SIGNAL( activated ( int ) ), this, SLOT (slotSyncMenu( int ) ) ); | ||
486 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 482 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
487 | connect ( selectFilterMenu, SIGNAL( aboutToShow () ), this, SLOT (fillFilterMenu() ) ); | 483 | connect ( selectFilterMenu, SIGNAL( aboutToShow () ), this, SLOT (fillFilterMenu() ) ); |
488 | 484 | ||
489 | // ****************** | 485 | // ****************** |
490 | QAction *action; | 486 | QAction *action; |
491 | QIconSet icon; | 487 | QIconSet icon; |
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index ee7bd87..e3383ed 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -89,14 +89,12 @@ class MainWindow : public QMainWindow | |||
89 | QString piFileString; | 89 | QString piFileString; |
90 | QTime piTime; | 90 | QTime piTime; |
91 | void getFile( bool ); | 91 | void getFile( bool ); |
92 | void syncFileRequest(); | 92 | void syncFileRequest(); |
93 | private: | 93 | private: |
94 | KSyncManager* mSyncManager; | 94 | KSyncManager* mSyncManager; |
95 | //QTimer* mTimerCommandSocket; | ||
96 | KServerSocket * mServerSocket; | ||
97 | bool mClosed; | 95 | bool mClosed; |
98 | void saveOnClose(); | 96 | void saveOnClose(); |
99 | bool mFlagKeyPressed; | 97 | bool mFlagKeyPressed; |
100 | bool mBlockAtStartup; | 98 | bool mBlockAtStartup; |
101 | QPEToolBar *iconToolBar; | 99 | QPEToolBar *iconToolBar; |
102 | void initActions(); | 100 | void initActions(); |