summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/main.cpp2
-rw-r--r--korganizer/mainwindow.cpp6
2 files changed, 3 insertions, 5 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 4b207d9..ee9589c 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -60,48 +60,50 @@ int main( int argc, char **argv )
60 printf(" -showDay: Day view\n"); 60 printf(" -showDay: Day view\n");
61 printf(" -showWWeek: Work Week view\n"); 61 printf(" -showWWeek: Work Week view\n");
62 printf(" -showWeek: Week view\n"); 62 printf(" -showWeek: Week view\n");
63 printf(" -showTodo: Todo view\n"); 63 printf(" -showTodo: Todo view\n");
64 printf(" -showJournal: Journal view\n"); 64 printf(" -showJournal: Journal view\n");
65 printf(" -showKO: Next Days view\n"); 65 printf(" -showKO: Next Days view\n");
66 printf(" -showWNext: What's Next view\n"); 66 printf(" -showWNext: What's Next view\n");
67 printf(" -showNextXView: Next X View\n"); 67 printf(" -showNextXView: Next X View\n");
68 printf(" -new[Y] and -show[X] may be used togehther\n"); 68 printf(" -new[Y] and -show[X] may be used togehther\n");
69 printf(" KO/Pi is exiting now. Bye!\n"); 69 printf(" KO/Pi is exiting now. Bye!\n");
70 exitHelp = true; 70 exitHelp = true;
71 } 71 }
72 } 72 }
73 if ( ! exitHelp ) { 73 if ( ! exitHelp ) {
74 KGlobal::setAppName( "korganizer" ); 74 KGlobal::setAppName( "korganizer" );
75 QString fileName ; 75 QString fileName ;
76#ifndef DESKTOP_VERSION 76#ifndef DESKTOP_VERSION
77 fileName = getenv("QPEDIR"); 77 fileName = getenv("QPEDIR");
78 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/"); 78 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/");
79#else 79#else
80 fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; 80 fileName = qApp->applicationDirPath () + "/kdepim/korganizer/";
81 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 81 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
82#endif 82#endif
83 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); 83 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer")));
84
85 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
84 MainWindow m; 86 MainWindow m;
85#ifndef DESKTOP_VERSION 87#ifndef DESKTOP_VERSION
86 88
87 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); 89 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& )));
88 a.showMainWidget(&m ); 90 a.showMainWidget(&m );
89#else 91#else
90 a.setMainWidget(&m ); 92 a.setMainWidget(&m );
91 m.show(); 93 m.show();
92 //m.resize( 800, 600 ); 94 //m.resize( 800, 600 );
93 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); 95 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
94#endif 96#endif
95 if ( argc > 1 ) { 97 if ( argc > 1 ) {
96 QCString command = argv[1]; 98 QCString command = argv[1];
97 if ( argc > 2 ) 99 if ( argc > 2 )
98 command += argv[2]; 100 command += argv[2];
99 qApp->processEvents(); 101 qApp->processEvents();
100 m.recieve(command, QByteArray() ); 102 m.recieve(command, QByteArray() );
101 103
102 } 104 }
103 105
104 a.exec(); 106 a.exec();
105 dumpMissing(); 107 dumpMissing();
106 108
107 KPimGlobalPrefs::instance()->writeConfig(); 109 KPimGlobalPrefs::instance()->writeConfig();
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 18a4b12..ab0e4d6 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -111,53 +111,49 @@ class KOex2phonePrefs : public QDialog
111 lab->setAlignment (AlignHCenter ); 111 lab->setAlignment (AlignHCenter );
112 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 112 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
113 lay->addWidget( ok ); 113 lay->addWidget( ok );
114 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 114 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
115 lay->addWidget( cancel ); 115 lay->addWidget( cancel );
116 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 116 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
117 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 117 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
118 resize( 220, 240 ); 118 resize( 220, 240 );
119 qApp->processEvents(); 119 qApp->processEvents();
120 int dw = QApplication::desktop()->width(); 120 int dw = QApplication::desktop()->width();
121 int dh = QApplication::desktop()->height(); 121 int dh = QApplication::desktop()->height();
122 move( (dw-width())/2, (dh - height() )/2 ); 122 move( (dw-width())/2, (dh - height() )/2 );
123 } 123 }
124 124
125public: 125public:
126 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; 126 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
127 QCheckBox* mWriteBackFuture; 127 QCheckBox* mWriteBackFuture;
128 QSpinBox* mWriteBackFutureWeeks; 128 QSpinBox* mWriteBackFutureWeeks;
129}; 129};
130 130
131int globalFlagBlockStartup; 131int globalFlagBlockStartup;
132MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : 132MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
133 QMainWindow( parent, name ) 133 QMainWindow( parent, name )
134{ 134{
135 135
136
137#ifdef DESKTOP_VERSION
138 setFont( QFont("Arial"), 14 );
139#endif
140 mClosed = false; 136 mClosed = false;
141 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; 137 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc";
142 QString confFile = locateLocal("config","korganizerrc"); 138 QString confFile = locateLocal("config","korganizerrc");
143 QFileInfo finf ( confFile ); 139 QFileInfo finf ( confFile );
144 bool showWarning = !finf.exists(); 140 bool showWarning = !finf.exists();
145 setIcon(SmallIcon( "ko24" ) ); 141 setIcon(SmallIcon( "ko24" ) );
146 mBlockAtStartup = true; 142 mBlockAtStartup = true;
147 mFlagKeyPressed = false; 143 mFlagKeyPressed = false;
148 setCaption("KOrganizer/Pi"); 144 setCaption("KOrganizer/Pi");
149 KOPrefs *p = KOPrefs::instance(); 145 KOPrefs *p = KOPrefs::instance();
150 KPimGlobalPrefs::instance()->setGlobalConfig(); 146 KPimGlobalPrefs::instance()->setGlobalConfig();
151 if ( p->mHourSize > 22 ) 147 if ( p->mHourSize > 22 )
152 p->mHourSize = 22; 148 p->mHourSize = 22;
153 QMainWindow::ToolBarDock tbd; 149 QMainWindow::ToolBarDock tbd;
154 if ( p->mToolBarHor ) { 150 if ( p->mToolBarHor ) {
155 if ( p->mToolBarUp ) 151 if ( p->mToolBarUp )
156 tbd = Bottom; 152 tbd = Bottom;
157 else 153 else
158 tbd = Top; 154 tbd = Top;
159 } 155 }
160 else { 156 else {
161 if ( p->mToolBarUp ) 157 if ( p->mToolBarUp )
162 tbd = Right; 158 tbd = Right;
163 else 159 else