author | zautrix <zautrix> | 2005-07-05 10:58:25 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-05 10:58:25 (UTC) |
commit | ea75d46072630883fae6ededd4af1d3c427ff59f (patch) (side-by-side diff) | |
tree | 60c96620f59441cf0ff998e7e4edd5b2bc8007d9 /korganizer | |
parent | 7e49703511de87f624cc8813b18ebbfcc01752cd (diff) | |
download | kdepimpi-ea75d46072630883fae6ededd4af1d3c427ff59f.zip kdepimpi-ea75d46072630883fae6ededd4af1d3c427ff59f.tar.gz kdepimpi-ea75d46072630883fae6ededd4af1d3c427ff59f.tar.bz2 |
fixx
-rw-r--r-- | korganizer/koagenda.cpp | 23 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 15 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 23 | ||||
-rw-r--r-- | korganizer/kofilterview.h | 1 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 6 | ||||
-rw-r--r-- | korganizer/koprefs.h | 4 |
6 files changed, 49 insertions, 23 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 662576f..92c1cd6 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -87,3 +87,3 @@ MarcusBains::~MarcusBains() { - delete minutes; + //delete minutes; } @@ -153,6 +153,7 @@ void MarcusBains::updateLocation(bool recalculate) y-mTimeBox->height()); - mTimeBox->raise(); //mTimeBox->setAutoMask(true); - minutes->start(5000,true); + int secs = QTime::currentTime().second(); + qDebug("second %d ", secs ); + minutes->start( (60 - secs +1)*1000 ,true); } @@ -444,3 +445,3 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) mInvalidPixmap = false; - qDebug("InvalidPixmap "); + qDebug("KO: Upsizing Pixmaps "); computeSizes(); @@ -1278,3 +1279,3 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) mInvalidPixmap = false; - qDebug("InvalidPixmap "); + qDebug("KO: Upsizing Pixmaps "); computeSizes(); @@ -1419,3 +1420,3 @@ void KOAgenda::finishUpdate() } - + marcus_bains(); } @@ -1802,3 +1803,2 @@ KOAgendaItem *KOAgenda::insertItem (Incidence *event,QDate qd,int X,int YTop,int - marcus_bains(); @@ -1875,4 +1875,2 @@ void KOAgenda::insertMultiItem (Event *event,QDate qd,int XBegin,int XEnd, } - - marcus_bains(); } @@ -1961,3 +1959,3 @@ void KOAgenda::computeSizes() if ( (paintPixAll->width() < cw || paintPixAll->height() < ch) && cw > 0 && ch > 0 ) { - qDebug("paintPixAll->resize "); + //qDebug("paintPixAll->resize "); paintPixAll->resize( cw, ch ); @@ -1967,3 +1965,3 @@ void KOAgenda::computeSizes() if ( paintPix->width() < cw || paintPix->height() < ch ) { - qDebug("paintPix->resize "); + //qDebug("paintPix->resize "); paintPix->resize( cw , ch ); @@ -1973,3 +1971,2 @@ void KOAgenda::computeSizes() checkScrollBoundaries(); - marcus_bains(); drawContentsToPainter(); @@ -2033,3 +2030,2 @@ void KOAgenda::updateConfig() calculateWorkingHours(); - marcus_bains(); } @@ -2126,3 +2122,2 @@ void KOAgenda::setDateList(const DateList &selectedDates) mSelectedDates = selectedDates; - marcus_bains(); } diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 1b21a71..ef5c4dd 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -78,3 +78,3 @@ using namespace KOrg; -#define IDLETIMEOUT 15 +#define IDLETIMEOUT 45 @@ -575,11 +575,10 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : connect( mAgenda, SIGNAL( signalClearSelection() ),mAllDayAgenda, SLOT( slotClearSelection()) ); +#ifndef DESKTOP_VERSION connect( mAllDayAgenda, SIGNAL( updateViewSignal() ),this, SLOT( fillAgenda()) ); connect( mAgenda, SIGNAL( updateViewSignal() ), this, SLOT( fillAgenda()) ); - connect( mAllDayAgenda, SIGNAL( sendPing() ),this, SLOT( startIdleTimeout()) ); connect( mAgenda, SIGNAL( sendPing() ), this, SLOT( startIdleTimeout()) ); - - mIdleTimer = new QTimer ( this );; connect(mIdleTimer,SIGNAL(timeout()),SLOT(slotIdleTimeout())); +#endif } @@ -587,4 +586,6 @@ void KOAgendaView::startIdleTimeout() { +#ifndef DESKTOP_VERSION mIdleStart = QDateTime::currentDateTime(); mIdleTimer->start( IDLETIMEOUT * 1000 ); +#endif } @@ -592,3 +593,4 @@ void KOAgendaView::slotIdleTimeout() { - qDebug("SECS TO %d ",mIdleStart.secsTo( QDateTime::currentDateTime() ) ); +#ifndef DESKTOP_VERSION + //qDebug("SECS TO %d ",mIdleStart.secsTo( QDateTime::currentDateTime() ) ); int secsfromstart = mIdleStart.secsTo( QDateTime::currentDateTime() ); @@ -596,3 +598,3 @@ void KOAgendaView::slotIdleTimeout() bool isActice = topLevelWidget()->isActiveWindow(); - qDebug("KO: Active Window %d %d", isActice, isVisible()); + //qDebug("KO: Active Window %d %d", isActice, isVisible()); // we do nothing if we wake up from a suspend @@ -608,2 +610,3 @@ void KOAgendaView::slotIdleTimeout() KOAgendaItem::paintPixAllday()->resize( 20,20); +#endif diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index ff80afc..7ce3f1f 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -39,2 +39,3 @@ #include <kglobal.h> +#include <kglobalsettings.h> #include <kcolorbutton.h> @@ -400,7 +401,21 @@ int KOCalEditView::addCalendar( QString name, QString file, bool ask ) QFileInfo fi ( file ); + QString absFile = file; + bool isRelative = false; + if ( fi.isRelative() ) { + isRelative = true; + absFile = KGlobalSettings::calendarDir()+file; + fi.setFile( absFile ); + } else { + QString cd = KGlobalSettings::calendarDir(); + if ( file.left( cd.length() ) == cd ) { + isRelative = true; + file = fi.fileName (); + fi.setFile( absFile ); + } + } if (!fi.exists() ) { if ( ask ) - if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( file ) )== KMessageBox::No ) + if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( KGlobal::formatMessage (absFile,0) ) )== KMessageBox::No ) return 0; - QFile fileIn( file ); + QFile fileIn( absFile ); if (!fileIn.open( IO_WriteOnly ) ) { @@ -416,3 +431,5 @@ int KOCalEditView::addCalendar( QString name, QString file, bool ask ) kkf->mName = name; - kkf->mFileName = file; + kkf->mFileName = absFile; + kkf->mSavedFileName = file; + kkf->isRelative = isRelative; emit calendarAdded( kkf->mCalNumber ); diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index 4322299..be7b5b6 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h @@ -91,2 +91,3 @@ void checkValid() { KMessageBox::information( this, i18n("Sorry, the file name is empty!") ); + url->setURL( nameE->text() + ".ics" ); return; diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index a886735..f1f1442 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -456,2 +456,3 @@ void KOPrefs::usrReadConfig() kkf->isEnabled = fc.readBoolEntry( prefix+"_isEnabled", true); + kkf->isRelative = fc.readBoolEntry( prefix+"_isRelative", false ); kkf->isAlarmEnabled = fc.readBoolEntry( prefix+"_isAlarmEnabled", true); @@ -460,2 +461,3 @@ void KOPrefs::usrReadConfig() kkf->mFileName = fc.readEntry( prefix+"_FileName", kkf->mFileName); + kkf->mSavedFileName = fc.readEntry( prefix+"_SavedFileName", kkf->mFileName); kkf->mDefaultColor = fc.readColorEntry( prefix+"_Color",&mEventColor); @@ -468,2 +470,4 @@ void KOPrefs::usrReadConfig() } + if ( kkf->isRelative ) + kkf->mFileName = KGlobalSettings::calendarDir() + kkf->mSavedFileName; } @@ -554,4 +558,6 @@ void KOPrefs::usrWriteConfig() fc.writeEntry( prefix+"_isReadOnly", kkf->isReadOnly ); + fc.writeEntry( prefix+"_isRelative", kkf->isRelative ); fc.writeEntry( prefix+"_Name", kkf->mName); fc.writeEntry( prefix+"_FileName", kkf->mFileName); + fc.writeEntry( prefix+"_SavedFileName", kkf->mSavedFileName); fc.writeEntry( prefix+"_Color",kkf->mDefaultColor); diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 7ec5327..0779e27 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -56,2 +56,3 @@ class KopiCalendarFile : public QObject mFileName = QDir::homeDirPath() + "/icalfile.ics"; + mSavedFileName = "icalfile.ics"; mCalNumber = 0; @@ -59,2 +60,3 @@ class KopiCalendarFile : public QObject mErrorOnLoad = false; + isRelative = false; } @@ -67,2 +69,4 @@ class KopiCalendarFile : public QObject QString mFileName; + QString mSavedFileName; + bool isRelative; int mCalNumber; |