summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
authorzautrix <zautrix>2005-04-17 14:27:55 (UTC)
committer zautrix <zautrix>2005-04-17 14:27:55 (UTC)
commitb411ec2d8961d07c3e2e9aefc9e04322b7851859 (patch) (unidiff)
tree79e2a70f1ad32562456b0bfa03aa2b916095fbb0 /korganizer/mainwindow.cpp
parent2d81c75c4ffb8f144ae58e90e68496500d07a19e (diff)
downloadkdepimpi-b411ec2d8961d07c3e2e9aefc9e04322b7851859.zip
kdepimpi-b411ec2d8961d07c3e2e9aefc9e04322b7851859.tar.gz
kdepimpi-b411ec2d8961d07c3e2e9aefc9e04322b7851859.tar.bz2
qdebugcleanup
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 8e5d108..95bef66 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -51,25 +51,24 @@
51#include "kodialogmanager.h" 51#include "kodialogmanager.h"
52#include "kdialogbase.h" 52#include "kdialogbase.h"
53#include "kapplication.h" 53#include "kapplication.h"
54#include "kofilterview.h" 54#include "kofilterview.h"
55#include "kstandarddirs.h" 55#include "kstandarddirs.h"
56#include "koprefs.h" 56#include "koprefs.h"
57#include "kfiledialog.h" 57#include "kfiledialog.h"
58#include "koglobals.h" 58#include "koglobals.h"
59#include "kglobal.h" 59#include "kglobal.h"
60#include "ktoolbar.h" 60#include "ktoolbar.h"
61#include "klocale.h" 61#include "klocale.h"
62#include "kconfig.h" 62#include "kconfig.h"
63#include "simplealarmclient.h"
64#include "externalapphandler.h" 63#include "externalapphandler.h"
65 64
66using namespace KCal; 65using namespace KCal;
67#ifndef _WIN32_ 66#ifndef _WIN32_
68#include <unistd.h> 67#include <unistd.h>
69#else 68#else
70#ifdef _OL_IMPORT_ 69#ifdef _OL_IMPORT_
71#include "koimportoldialog.h" 70#include "koimportoldialog.h"
72#endif 71#endif
73#endif 72#endif
74#include "mainwindow.h" 73#include "mainwindow.h"
75 74
@@ -276,25 +275,24 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
276 vh -= iconToolBar->height(); 275 vh -= iconToolBar->height();
277 } else { 276 } else {
278 vw -= iconToolBar->height(); 277 vw -= iconToolBar->height();
279 } 278 }
280 //mView->setMaximumSize( splash->size() ); 279 //mView->setMaximumSize( splash->size() );
281 //mView->resize( splash->size() ); 280 //mView->resize( splash->size() );
282 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); 281 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
283 mView->readSettings(); 282 mView->readSettings();
284 bool newFile = false; 283 bool newFile = false;
285 if( !QFile::exists( defaultFileName() ) ) { 284 if( !QFile::exists( defaultFileName() ) ) {
286 QFileInfo finfo ( defaultFileName() ); 285 QFileInfo finfo ( defaultFileName() );
287 QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); 286 QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics");
288 qDebug("oldfile %s ", oldFile.latin1());
289 QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; 287 QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n";
290 finfo.setFile( oldFile ); 288 finfo.setFile( oldFile );
291 if (finfo.exists() ) { 289 if (finfo.exists() ) {
292 KMessageBox::information( this, message); 290 KMessageBox::information( this, message);
293 mView->openCalendar( oldFile ); 291 mView->openCalendar( oldFile );
294 qApp->processEvents(); 292 qApp->processEvents();
295 } else { 293 } else {
296 oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); 294 oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics");
297 finfo.setFile( oldFile ); 295 finfo.setFile( oldFile );
298 if (finfo.exists() ) { 296 if (finfo.exists() ) {
299 KMessageBox::information( this, message); 297 KMessageBox::information( this, message);
300 mView->openCalendar( oldFile ); 298 mView->openCalendar( oldFile );
@@ -409,31 +407,31 @@ bool MainWindow::beamReceiveEnabled()
409#ifndef DESKTOP_VERSION 407#ifndef DESKTOP_VERSION
410 return ( infrared != 0 ); 408 return ( infrared != 0 );
411#endif 409#endif
412 return false; 410 return false;
413} 411}
414 412
415void MainWindow::toggleBeamReceive() 413void MainWindow::toggleBeamReceive()
416{ 414{
417 if ( mBRdisabled ) 415 if ( mBRdisabled )
418 return; 416 return;
419#ifndef DESKTOP_VERSION 417#ifndef DESKTOP_VERSION
420 if ( infrared ) { 418 if ( infrared ) {
421 qDebug("disable BeamReceive "); 419 qDebug("KO: Disable BeamReceive ");
422 delete infrared; 420 delete infrared;
423 infrared = 0; 421 infrared = 0;
424 brAction->setOn(false); 422 brAction->setOn(false);
425 return; 423 return;
426 } 424 }
427 qDebug("enable BeamReceive "); 425 qDebug("KO: Enable BeamReceive ");
428 brAction->setOn(true); 426 brAction->setOn(true);
429 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; 427 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ;
430 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); 428 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& )));
431#endif 429#endif
432} 430}
433void MainWindow::showMaximized () 431void MainWindow::showMaximized ()
434{ 432{
435#ifndef DESKTOP_VERSION 433#ifndef DESKTOP_VERSION
436 if ( ! globalFlagBlockStartup ) 434 if ( ! globalFlagBlockStartup )
437 if ( mClosed ) 435 if ( mClosed )
438 mView->goToday(); 436 mView->goToday();
439#endif 437#endif