-rw-r--r-- | kaddressbook/mainembedded.cpp | 1 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 50db377..93ba53c 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -88,32 +88,33 @@ int main( int argc, char **argv ) | |||
88 | a.showMainWidget( &m ); | 88 | a.showMainWidget( &m ); |
89 | 89 | ||
90 | #else | 90 | #else |
91 | a.setMainWidget( &m ); | 91 | a.setMainWidget( &m ); |
92 | m.show(); | 92 | m.show(); |
93 | #endif | 93 | #endif |
94 | a.exec(); | 94 | a.exec(); |
95 | #ifdef DESKTOP_VERSION | 95 | #ifdef DESKTOP_VERSION |
96 | KConfig *config = KABPrefs::instance()->getConfig(); | 96 | KConfig *config = KABPrefs::instance()->getConfig(); |
97 | config->setGroup("WidgetLayout"); | 97 | config->setGroup("WidgetLayout"); |
98 | QStringList list ;//= config->readListEntry("MainLayout"); | 98 | QStringList list ;//= config->readListEntry("MainLayout"); |
99 | int x,y,w,h; | 99 | int x,y,w,h; |
100 | QWidget* wid; | 100 | QWidget* wid; |
101 | wid = &m; | 101 | wid = &m; |
102 | x = wid->geometry().x(); | 102 | x = wid->geometry().x(); |
103 | y = wid->geometry().y(); | 103 | y = wid->geometry().y(); |
104 | w = wid->width(); | 104 | w = wid->width(); |
105 | h = wid->height(); | 105 | h = wid->height(); |
106 | list.clear(); | 106 | list.clear(); |
107 | list << QString::number( x ); | 107 | list << QString::number( x ); |
108 | list << QString::number( y ); | 108 | list << QString::number( y ); |
109 | list << QString::number( w ); | 109 | list << QString::number( w ); |
110 | list << QString::number( h ); | 110 | list << QString::number( h ); |
111 | config->writeEntry("MainLayout",list ); | 111 | config->writeEntry("MainLayout",list ); |
112 | config->sync(); | ||
112 | #endif | 113 | #endif |
113 | dumpMissing(); | 114 | dumpMissing(); |
114 | 115 | ||
115 | KPimGlobalPrefs::instance()->writeConfig(); | 116 | KPimGlobalPrefs::instance()->writeConfig(); |
116 | } | 117 | } |
117 | qDebug("KA: Bye! "); | 118 | qDebug("KA: Bye! "); |
118 | } | 119 | } |
119 | 120 | ||
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index e13d0be..720ad78 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -619,49 +619,50 @@ void CalendarView::init() | |||
619 | connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), | 619 | connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), |
620 | this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); | 620 | this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); |
621 | #endif | 621 | #endif |
622 | mDateNavigator->setCalendar( mCalendar ); | 622 | mDateNavigator->setCalendar( mCalendar ); |
623 | } | 623 | } |
624 | 624 | ||
625 | 625 | ||
626 | CalendarView::~CalendarView() | 626 | CalendarView::~CalendarView() |
627 | { | 627 | { |
628 | // kdDebug() << "~CalendarView()" << endl; | 628 | // kdDebug() << "~CalendarView()" << endl; |
629 | //qDebug("CalendarView::~CalendarView() "); | 629 | //qDebug("CalendarView::~CalendarView() "); |
630 | delete mDialogManager; | 630 | delete mDialogManager; |
631 | delete mViewManager; | 631 | delete mViewManager; |
632 | delete mStorage; | 632 | delete mStorage; |
633 | delete mDateFrame ; | 633 | delete mDateFrame ; |
634 | delete beamDialog; | 634 | delete beamDialog; |
635 | delete mEventViewerDialog; | 635 | delete mEventViewerDialog; |
636 | //kdDebug() << "~CalendarView() done" << endl; | 636 | //kdDebug() << "~CalendarView() done" << endl; |
637 | } | 637 | } |
638 | void CalendarView::checkAlarms() | 638 | void CalendarView::checkAlarms() |
639 | { | 639 | { |
640 | KConfig *config = KOGlobals::config(); | 640 | KConfig *config = KOGlobals::config(); |
641 | config->setGroup( "AppRun" ); | 641 | config->setGroup( "AppRun" ); |
642 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); | 642 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); |
643 | int secs = config->readNumEntry( "LatestProgramStop" ) - 30; | 643 | int secto = dt.secsTo( QDateTime::currentDateTime() ); |
644 | int secs = config->readNumEntry( "LatestProgramStop" , secto) - 30; | ||
644 | //secs -= ( 3600 * 24*3 ); // debug only | 645 | //secs -= ( 3600 * 24*3 ); // debug only |
645 | QDateTime latest = dt.addSecs ( secs ); | 646 | QDateTime latest = dt.addSecs ( secs ); |
646 | qDebug("KO: Last termination on %s ", latest.toString().latin1()); | 647 | qDebug("KO: Last termination on %s ", latest.toString().latin1()); |
647 | QPtrList<Incidence> el = mCalendar->rawIncidences(); | 648 | QPtrList<Incidence> el = mCalendar->rawIncidences(); |
648 | QPtrList<Incidence> al; | 649 | QPtrList<Incidence> al; |
649 | Incidence* inL = el.first(); | 650 | Incidence* inL = el.first(); |
650 | while ( inL ) { | 651 | while ( inL ) { |
651 | bool ok = false; | 652 | bool ok = false; |
652 | int offset = 0; | 653 | int offset = 0; |
653 | QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; | 654 | QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; |
654 | if ( ok ) { | 655 | if ( ok ) { |
655 | //qDebug("OK %s",next.toString().latin1()); | 656 | //qDebug("OK %s",next.toString().latin1()); |
656 | if ( next < QDateTime::currentDateTime() ) { | 657 | if ( next < QDateTime::currentDateTime() ) { |
657 | al.append( inL ); | 658 | al.append( inL ); |
658 | //qDebug("found missed alarm: %s ", inL->summary().latin1() ); | 659 | //qDebug("found missed alarm: %s ", inL->summary().latin1() ); |
659 | } | 660 | } |
660 | } | 661 | } |
661 | inL = el.next(); | 662 | inL = el.next(); |
662 | } | 663 | } |
663 | if ( al.count() ) { | 664 | if ( al.count() ) { |
664 | QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop ); | 665 | QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop ); |
665 | dia->setCaption( i18n("KO/Pi: Missing alarms!") ); | 666 | dia->setCaption( i18n("KO/Pi: Missing alarms!") ); |
666 | QVBoxLayout* lay = new QVBoxLayout( dia ); | 667 | QVBoxLayout* lay = new QVBoxLayout( dia ); |
667 | lay->setSpacing( 0 ); | 668 | lay->setSpacing( 0 ); |