summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-04-17 14:27:55 (UTC)
committer zautrix <zautrix>2005-04-17 14:27:55 (UTC)
commitb411ec2d8961d07c3e2e9aefc9e04322b7851859 (patch) (unidiff)
tree79e2a70f1ad32562456b0bfa03aa2b916095fbb0 /korganizer
parent2d81c75c4ffb8f144ae58e90e68496500d07a19e (diff)
downloadkdepimpi-b411ec2d8961d07c3e2e9aefc9e04322b7851859.zip
kdepimpi-b411ec2d8961d07c3e2e9aefc9e04322b7851859.tar.gz
kdepimpi-b411ec2d8961d07c3e2e9aefc9e04322b7851859.tar.bz2
qdebugcleanup
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kdatenavigator.cpp4
-rw-r--r--korganizer/koagendaview.cpp6
-rw-r--r--korganizer/kodaymatrix.cpp1
-rw-r--r--korganizer/koeditorgeneral.cpp2
-rw-r--r--korganizer/koeditorrecurrence.cpp10
-rw-r--r--korganizer/koeventviewer.cpp4
-rw-r--r--korganizer/koglobals.cpp31
-rw-r--r--korganizer/koglobals.h3
-rw-r--r--korganizer/koincidenceeditor.cpp1
-rw-r--r--korganizer/kolistview.cpp7
-rw-r--r--korganizer/kolistview.h2
-rw-r--r--korganizer/komonthview.cpp14
-rw-r--r--korganizer/korganizer.pro2
-rw-r--r--korganizer/korganizerE.pro2
-rw-r--r--korganizer/kotodoview.cpp29
-rw-r--r--korganizer/koviewmanager.cpp8
-rw-r--r--korganizer/kowhatsnextview.cpp2
-rw-r--r--korganizer/ktimeedit.cpp2
-rw-r--r--korganizer/mainwindow.cpp6
-rw-r--r--korganizer/mainwindow.h9
-rw-r--r--korganizer/searchdialog.cpp3
21 files changed, 25 insertions, 123 deletions
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index 5aa1c9b..6697602 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -144,13 +144,11 @@ QFont KDateNavigator::yourFontHint( QSize si , bool *b)
144 if ( si.width() < sizeHintTwoButtons( 4 ).width()) 144 if ( si.width() < sizeHintTwoButtons( 4 ).width())
145 continue; 145 continue;
146 } 146 }
147 *b = true; 147 *b = true;
148 //qDebug("fooooooooooooooooooooooouuuuund ");
149 break; 148 break;
150 } 149 }
151 } 150 }
152 //qDebug("returnnnnnnnnnnnnnnnnnnn %d", fo.pointSize() );
153 return fo; 151 return fo;
154} 152}
155QSize KDateNavigator::sizeHint() const 153QSize KDateNavigator::sizeHint() const
156{ 154{
@@ -367,9 +365,9 @@ void KDateNavigator::updateConfig()
367} 365}
368 366
369void KDateNavigator::setShowWeekNums(bool enabled) 367void KDateNavigator::setShowWeekNums(bool enabled)
370{ 368{
371 qDebug("KDateNavigator::setShowWeekNums***************************** "); 369
372 m_bShowWeekNums = enabled; 370 m_bShowWeekNums = enabled;
373 for(int i=0; i<6; i++) { 371 for(int i=0; i<6; i++) {
374 if(enabled) 372 if(enabled)
375 weeknos[i]->show(); 373 weeknos[i]->show();
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index b43c40e..b5a4199 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -915,9 +915,9 @@ void KOAgendaView::updateConfig()
915 return; 915 return;
916 if ( mAgenda->height() > 96 * KOPrefs::instance()->mHourSize ) { 916 if ( mAgenda->height() > 96 * KOPrefs::instance()->mHourSize ) {
917 int old = KOPrefs::instance()->mHourSize; 917 int old = KOPrefs::instance()->mHourSize;
918 KOPrefs::instance()->mHourSize = mAgenda->height()/96 +1; 918 KOPrefs::instance()->mHourSize = mAgenda->height()/96 +1;
919 qDebug("KOPrefs::instance()->mHourSize adjusted %d to %d ", old,KOPrefs::instance()->mHourSize ); 919 //qDebug("KOPrefs::instance()->mHourSize adjusted %d to %d ", old,KOPrefs::instance()->mHourSize );
920 } 920 }
921 921
922 922
923 // update config for children 923 // update config for children
@@ -1163,12 +1163,12 @@ void KOAgendaView::fillAgenda()
1163 endX += curCol; 1163 endX += curCol;
1164 beginX = curCol; 1164 beginX = curCol;
1165 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); 1165 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
1166 } else { 1166 } else {
1167 qDebug("days %d %s",endX , currentDate.toString().latin1()); 1167 //qDebug("days %d %s",endX , currentDate.toString().latin1());
1168 QDate dateit = currentDate.addDays( -endX ); 1168 QDate dateit = currentDate.addDays( -endX );
1169 if ( event->recursOn( dateit ) ) { 1169 if ( event->recursOn( dateit ) ) {
1170 qDebug("found %d %d %d %s", endX,curCol, curCol-endX ,dateit.toString().latin1() ); 1170 //qDebug("found %d %d %d %s", endX,curCol, curCol-endX ,dateit.toString().latin1() );
1171 if ( curCol-endX < 0 ) { 1171 if ( curCol-endX < 0 ) {
1172 mAllDayAgenda->insertAllDayItem(event,currentDate,0,curCol); 1172 mAllDayAgenda->insertAllDayItem(event,currentDate,0,curCol);
1173 } 1173 }
1174 } 1174 }
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index ecca374..17a1d13 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -496,9 +496,8 @@ void KODayMatrix::updateViewTimed()
496 bDays.clearBit(i); 496 bDays.clearBit(i);
497 hDays.clearBit(i); 497 hDays.clearBit(i);
498 eDays.clearBit(i); 498 eDays.clearBit(i);
499 for(event=eventlist.first();event != 0;event=eventlist.next()) { 499 for(event=eventlist.first();event != 0;event=eventlist.next()) {
500 qDebug("FFFFFFFFFFFFFFFFFFFFFFFFF ");
501 ushort recurType = event->recurrence()->doesRecur(); 500 ushort recurType = event->recurrence()->doesRecur();
502 if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) || 501 if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) ||
503 (recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) { 502 (recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) {
504 numEvents--; 503 numEvents--;
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 9df76e7..0045b7f 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -231,9 +231,9 @@ void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout)
231 231
232void KOEditorGeneral::pickAlarmSound() 232void KOEditorGeneral::pickAlarmSound()
233{ 233{
234 234
235 qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() ); 235 //qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() );
236 236
237 bool oldState = mAlarmSoundButton->isOn(); 237 bool oldState = mAlarmSoundButton->isOn();
238 238
239 QString fileName(KFileDialog::getOpenFileName(mAlarmSound, 239 QString fileName(KFileDialog::getOpenFileName(mAlarmSound,
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index 01c5773..47e73dd 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -938,18 +938,18 @@ void KOEditorRecurrence::readEvent(Incidence *event)
938 break; 938 break;
939 case Recurrence::rYearlyMonth: 939 case Recurrence::rYearlyMonth:
940 { 940 {
941 recurrenceType = RecurrenceChooser::Yearly; 941 recurrenceType = RecurrenceChooser::Yearly;
942 qDebug("Recurrence::rYearlyMonth: "); 942 //qDebug("Recurrence::rYearlyMonth: ");
943 day = event->dtStart().date().day(); 943 day = event->dtStart().date().day();
944 rmd = r->yearNums(); 944 rmd = r->yearNums();
945 if ( rmd.count() > 0 ) 945 if ( rmd.count() > 0 )
946 month = *rmd.first(); 946 month = *rmd.first();
947 else 947 else
948 month = event->dtStart().date().month() ; 948 month = event->dtStart().date().month() ;
949 mYearly->setByMonth( month, day ); 949 mYearly->setByMonth( month, day );
950#if 0 950#if 0
951 qDebug("2day = %d ",day ); 951 //qDebug("2day = %d ",day );
952 QPtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions(); 952 QPtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions();
953 int month; 953 int month;
954 if ( !monthlist.isEmpty() ) { 954 if ( !monthlist.isEmpty() ) {
955 month = monthlist.first()->rPos ; 955 month = monthlist.first()->rPos ;
@@ -962,9 +962,9 @@ void KOEditorRecurrence::readEvent(Incidence *event)
962 } 962 }
963 963
964 break; 964 break;
965 case Recurrence::rYearlyDay: 965 case Recurrence::rYearlyDay:
966 qDebug("Recurrence::rYearlyDay: "); 966 //qDebug("Recurrence::rYearlyDay: ");
967 recurrenceType = RecurrenceChooser::Yearly; 967 recurrenceType = RecurrenceChooser::Yearly;
968 mYearly->setByDay( event->dtStart().date().dayOfYear() ); 968 mYearly->setByDay( event->dtStart().date().dayOfYear() );
969 mYearly->setFrequency( f ); 969 mYearly->setFrequency( f );
970 break; 970 break;
@@ -1020,9 +1020,9 @@ void KOEditorRecurrence::writeEvent( Incidence *event )
1020 found |=days.at(j); 1020 found |=days.at(j);
1021 } 1021 }
1022 if ( !found ) { 1022 if ( !found ) {
1023 days.setBit( event->dtStart().date().dayOfWeek()-1); 1023 days.setBit( event->dtStart().date().dayOfWeek()-1);
1024 qDebug("bit set %d ", event->dtStart().date().dayOfWeek()-1); 1024 //qDebug("bit set %d ", event->dtStart().date().dayOfWeek()-1);
1025 } 1025 }
1026 if ( duration != 0 ) r->setWeekly( freq, days, duration ); 1026 if ( duration != 0 ) r->setWeekly( freq, days, duration );
1027 else r->setWeekly( freq, days, endDate ); 1027 else r->setWeekly( freq, days, endDate );
1028 } else if ( recurrenceType == RecurrenceChooser::Monthly ) { 1028 } else if ( recurrenceType == RecurrenceChooser::Monthly ) {
@@ -1050,9 +1050,9 @@ void KOEditorRecurrence::writeEvent( Incidence *event )
1050 } 1050 }
1051 r->addMonthlyDay( day ); 1051 r->addMonthlyDay( day );
1052 } 1052 }
1053 } else if ( recurrenceType == RecurrenceChooser::Yearly ) { 1053 } else if ( recurrenceType == RecurrenceChooser::Yearly ) {
1054 qDebug("RecurrenceChooser::Yearly "); 1054 //qDebug("RecurrenceChooser::Yearly ");
1055 int freq = mYearly->frequency(); 1055 int freq = mYearly->frequency();
1056 if ( mYearly->byDay() ) { 1056 if ( mYearly->byDay() ) {
1057 if ( duration != 0 ) { 1057 if ( duration != 0 ) {
1058 r->setYearly( Recurrence::rYearlyDay, freq, duration ); 1058 r->setYearly( Recurrence::rYearlyDay, freq, duration );
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index fefc778..f39b5e1 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -98,11 +98,9 @@ void KOEventViewer::printMe()
98 else 98 else
99 scale = dy; 99 scale = dy;
100 100
101 p.translate( m.width()/10,0 ); 101 p.translate( m.width()/10,0 );
102 qDebug("Scale: %f ", scale );
103 if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) { 102 if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) {
104 qDebug("SCALE ");
105 p.scale( scale, scale ); 103 p.scale( scale, scale );
106 } 104 }
107 drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); 105 drawContents ( &p, 0,0, contentsWidth (), contentsHeight () );
108 p.end(); 106 p.end();
@@ -166,13 +164,11 @@ void KOEventViewer::setSource(const QString& n)
166 if ( n.left(6) == "mailto" ) { 164 if ( n.left(6) == "mailto" ) {
167 // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); 165 // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1());
168#ifndef DESKTOP_VERSION 166#ifndef DESKTOP_VERSION
169 if ( n.mid(7,3) == "ALL" ) { 167 if ( n.mid(7,3) == "ALL" ) {
170 qDebug("all ");
171 mailToAttendees( true ); 168 mailToAttendees( true );
172 } else if ( n.mid(7,4) == "RSVP" ) { 169 } else if ( n.mid(7,4) == "RSVP" ) {
173 mailToAttendees( false ); 170 mailToAttendees( false );
174 qDebug("rsvp ");
175 } else { 171 } else {
176 QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); 172 QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" );
177 e << n.mid(7); 173 e << n.mid(7);
178 } 174 }
diff --git a/korganizer/koglobals.cpp b/korganizer/koglobals.cpp
index 8016034..9ece77f 100644
--- a/korganizer/koglobals.cpp
+++ b/korganizer/koglobals.cpp
@@ -31,25 +31,12 @@
31#include <klocale.h> 31#include <klocale.h>
32 32
33#include <kcalendarsystem.h> 33#include <kcalendarsystem.h>
34 34
35#ifndef KORG_NOKALARMD
36#include "kalarmdclient.h"
37#endif
38#include "simplealarmclient.h"
39 35
40#include "koglobals.h" 36#include "koglobals.h"
41#include "koprefs.h" 37#include "koprefs.h"
42 38
43class NopAlarmClient : public AlarmClient
44{
45 public:
46 void startDaemon() {}
47 bool setCalendars( const QStringList & ) { return false; }
48 bool addCalendar( const QString & ) { return false; }
49 bool removeCalendar( const QString & ) { return false; }
50 bool reloadCalendar( const QString & ) { return false; }
51};
52 39
53KOGlobals *KOGlobals::mSelf = 0; 40KOGlobals *KOGlobals::mSelf = 0;
54 41
55KOGlobals *KOGlobals::self() 42KOGlobals *KOGlobals::self()
@@ -67,19 +54,8 @@ KOGlobals::KOGlobals()
67 54
68 cfg->setGroup("General"); 55 cfg->setGroup("General");
69 mCalendarSystem = KGlobal::locale()->calendar(); 56 mCalendarSystem = KGlobal::locale()->calendar();
70 57
71 cfg->setGroup("AlarmDaemon");
72 QString alarmClient = cfg->readEntry( "Daemon", "kalarmd" );
73 if ( alarmClient == "simple" ) {
74 mAlarmClient = new SimpleAlarmClient;
75#ifndef KORG_NOKALARMD
76 } else if ( alarmClient == "kalarmd" ) {
77 mAlarmClient = new KalarmdClient;
78#endif
79 } else {
80 mAlarmClient = new NopAlarmClient;
81 }
82} 58}
83 59
84KConfig* KOGlobals::config() 60KConfig* KOGlobals::config()
85{ 61{
@@ -93,21 +69,16 @@ KConfig* KOGlobals::config()
93} 69}
94 70
95KOGlobals::~KOGlobals() 71KOGlobals::~KOGlobals()
96{ 72{
97 delete mAlarmClient; 73
98} 74}
99 75
100const KCalendarSystem *KOGlobals::calendarSystem() const 76const KCalendarSystem *KOGlobals::calendarSystem() const
101{ 77{
102 return mCalendarSystem; 78 return mCalendarSystem;
103} 79}
104 80
105AlarmClient *KOGlobals::alarmClient() const
106{
107 return mAlarmClient;
108}
109
110void KOGlobals::fitDialogToScreen( QWidget *wid, bool force ) 81void KOGlobals::fitDialogToScreen( QWidget *wid, bool force )
111{ 82{
112 bool resized = false; 83 bool resized = false;
113 84
diff --git a/korganizer/koglobals.h b/korganizer/koglobals.h
index 357ff5f..b3ff67b 100644
--- a/korganizer/koglobals.h
+++ b/korganizer/koglobals.h
@@ -42,18 +42,15 @@ class KOGlobals
42 static bool reverseLayout(); 42 static bool reverseLayout();
43 43
44 const KCalendarSystem *calendarSystem() const; 44 const KCalendarSystem *calendarSystem() const;
45 45
46 AlarmClient *alarmClient() const;
47
48 protected: 46 protected:
49 KOGlobals(); 47 KOGlobals();
50 ~KOGlobals(); 48 ~KOGlobals();
51 49
52 private: 50 private:
53 static KOGlobals *mSelf; 51 static KOGlobals *mSelf;
54 52
55 const KCalendarSystem *mCalendarSystem; 53 const KCalendarSystem *mCalendarSystem;
56 AlarmClient *mAlarmClient;
57}; 54};
58 55
59#endif 56#endif
diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp
index 51df123..9813a80 100644
--- a/korganizer/koincidenceeditor.cpp
+++ b/korganizer/koincidenceeditor.cpp
@@ -41,9 +41,8 @@
41#include <libkcal/calendarlocal.h> 41#include <libkcal/calendarlocal.h>
42#include <libkcal/icalformat.h> 42#include <libkcal/icalformat.h>
43 43
44#include "koprefs.h" 44#include "koprefs.h"
45#include "koglobals.h"
46 45
47#include "koincidenceeditor.h" 46#include "koincidenceeditor.h"
48 47
49KOIncidenceEditor::KOIncidenceEditor( const QString &caption, 48KOIncidenceEditor::KOIncidenceEditor( const QString &caption,
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 341f473..e1b393d 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -330,8 +330,9 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
330KOListView::~KOListView() 330KOListView::~KOListView()
331{ 331{
332 delete mPopupMenu; 332 delete mPopupMenu;
333} 333}
334
334QString KOListView::getWhatsThisText(QPoint p) 335QString KOListView::getWhatsThisText(QPoint p)
335{ 336{
336 KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); 337 KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p );
337 if ( item ) 338 if ( item )
@@ -427,8 +428,9 @@ void KOListView::setAlarm()
427 } 428 }
428 topLevelWidget()->setCaption( i18n("Canged alarm for %1 items").arg( count ) ); 429 topLevelWidget()->setCaption( i18n("Canged alarm for %1 items").arg( count ) );
429 qDebug("KO: Set alarm for %d items", count); 430 qDebug("KO: Set alarm for %d items", count);
430 calendar()->reInitAlarmSettings(); 431 calendar()->reInitAlarmSettings();
432 QTimer::singleShot( 1, this, SLOT ( resetFocus() ) );
431} 433}
432void KOListView::setCategories( bool removeOld ) 434void KOListView::setCategories( bool removeOld )
433{ 435{
434 436
@@ -474,8 +476,9 @@ void KOListView::setCategories( bool removeOld )
474 mUidDict.remove( inc->uid() ); 476 mUidDict.remove( inc->uid() );
475 delete temp;; 477 delete temp;;
476 addIncidence( inc ); 478 addIncidence( inc );
477 } 479 }
480 QTimer::singleShot( 1, this, SLOT ( resetFocus() ) );
478} 481}
479 482
480void KOListView::beamSelected() 483void KOListView::beamSelected()
481{ 484{
@@ -698,8 +701,9 @@ void KOListView::writeToFile( bool iCal )
698 KOPrefs::instance()->mLastSaveFile = fn; 701 KOPrefs::instance()->mLastSaveFile = fn;
699 topLevelWidget()->setCaption(mes); 702 topLevelWidget()->setCaption(mes);
700 } 703 }
701 } 704 }
705 QTimer::singleShot( 1, this, SLOT ( resetFocus() ) );
702} 706}
703void KOListView::deleteAll() 707void KOListView::deleteAll()
704{ 708{
705 int icount = 0; 709 int icount = 0;
@@ -828,10 +832,13 @@ void KOListView::showDates()
828void KOListView::hideDates() 832void KOListView::hideDates()
829{ 833{
830 showDates(false); 834 showDates(false);
831} 835}
836
832void KOListView::resetFocus() 837void KOListView::resetFocus()
833{ 838{
839 topLevelWidget()->setActiveWindow();
840 topLevelWidget()->raise();
834 mListView->setFocus(); 841 mListView->setFocus();
835} 842}
836void KOListView::updateView() 843void KOListView::updateView()
837{ 844{
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index bb0e23e..eb5bb6e 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -258,14 +258,14 @@ class KOListView : public KOEventView
258 void updateList(); 258 void updateList();
259 void setStartDate(const QDate &start); 259 void setStartDate(const QDate &start);
260 int count(); 260 int count();
261 QString getWhatsThisText(QPoint p); 261 QString getWhatsThisText(QPoint p);
262 void resetFocus();
263 signals: 262 signals:
264 void signalNewEvent(); 263 void signalNewEvent();
265 void beamIncidenceList(QPtrList<Incidence>); 264 void beamIncidenceList(QPtrList<Incidence>);
266 265
267 public slots: 266 public slots:
267 void resetFocus();
268 virtual void updateView(); 268 virtual void updateView();
269 virtual void showDates(const QDate &start, const QDate &end); 269 virtual void showDates(const QDate &start, const QDate &end);
270 virtual void showEvents(QPtrList<Event> eventList); 270 virtual void showEvents(QPtrList<Event> eventList);
271 void clearSelection(); 271 void clearSelection();
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 2b7e41f..843526d 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -286,9 +286,8 @@ MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s)
286 mReply = false; 286 mReply = false;
287 mInfo = false; 287 mInfo = false;
288 mdayPos = 0; 288 mdayPos = 0;
289 isWeekItem = KOPrefs::instance()->mMonthViewWeek; 289 isWeekItem = KOPrefs::instance()->mMonthViewWeek;
290 //qDebug("NEWWWWWWWWWWWWW ");
291} 290}
292void MonthViewItem::recycle( Incidence *incidence, QDate qd, const QString & s) 291void MonthViewItem::recycle( Incidence *incidence, QDate qd, const QString & s)
293{ 292{
294 setText( s ); 293 setText( s );
@@ -299,18 +298,15 @@ void MonthViewItem::recycle( Incidence *incidence, QDate qd, const QString & s)
299 mAlarm = false; 298 mAlarm = false;
300 mReply = false; 299 mReply = false;
301 mInfo = false; 300 mInfo = false;
302 mdayPos = 0; 301 mdayPos = 0;
303 //qDebug("recucleeeeeeeeeeeeeeeee ");
304} 302}
305 303
306void MonthViewItem::paint(QPainter *p) 304void MonthViewItem::paint(QPainter *p)
307{ 305{
308 if ( mblockRepaint ) { 306 if ( mblockRepaint ) {
309 //qDebug("block ");
310 return; 307 return;
311 } 308 }
312 //qDebug("NON block ");
313#if QT_VERSION >= 0x030000 309#if QT_VERSION >= 0x030000
314 bool sel = isSelected(); 310 bool sel = isSelected();
315#else 311#else
316 bool sel = selected(); 312 bool sel = selected();
@@ -459,9 +455,8 @@ int MonthViewItem::width(const QListBox *lb) const
459 return( x + lb->fontMetrics().width( text() ) + 1 ); 455 return( x + lb->fontMetrics().width( text() ) + 1 );
460 } 456 }
461 if ( ! lb ) 457 if ( ! lb )
462 return 10; 458 return 10;
463 //qDebug("ret wid %d ", lb->width());
464 return lb->width(); 459 return lb->width();
465} 460}
466 461
467 462
@@ -611,14 +606,9 @@ void MonthViewCell::startUpdateCell()
611 mAvailItemList.setAutoDelete( true ); 606 mAvailItemList.setAutoDelete( true );
612 mAvailItemList.clear(); 607 mAvailItemList.clear();
613 mAvailItemList.setAutoDelete( false ); 608 mAvailItemList.setAutoDelete( false );
614 } 609 }
615 /* 610
616 if ( !isVisible() ){
617 return;
618 }
619 */
620 // qDebug("MonthViewCell::updateCell() ");
621 setPrimary( mDate.month()%2 ); 611 setPrimary( mDate.month()%2 );
622 setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays); 612 setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays);
623 if ( mDate == QDate::currentDate() ) { 613 if ( mDate == QDate::currentDate() ) {
624 setLineWidth( 3 ); 614 setLineWidth( 3 );
@@ -870,9 +860,8 @@ void MonthViewCell::finishUpdateCell()
870 860
871} 861}
872void MonthViewCell::updateCell() 862void MonthViewCell::updateCell()
873{ 863{
874 //qDebug("MonthViewCell::updateCell() ");
875 if ( !mMonthView->isUpdatePossible() ) 864 if ( !mMonthView->isUpdatePossible() )
876 return; 865 return;
877 startUpdateCell(); 866 startUpdateCell();
878 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); 867 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
@@ -1052,9 +1041,8 @@ void MonthViewCell::newEvent()
1052} 1041}
1053void MonthViewCell::cellClicked( QListBoxItem *item ) 1042void MonthViewCell::cellClicked( QListBoxItem *item )
1054{ 1043{
1055 mMonthView->setSelectedCell( this ); 1044 mMonthView->setSelectedCell( this );
1056 qDebug("CELL ");
1057 if ( item == 0 ) { 1045 if ( item == 0 ) {
1058 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); 1046 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
1059 emit newEventSignal( dt ); 1047 emit newEventSignal( dt );
1060 return; 1048 return;
diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro
index 1a81c7d..d88c300 100644
--- a/korganizer/korganizer.pro
+++ b/korganizer/korganizer.pro
@@ -134,9 +134,8 @@ HEADERS += datenavigatorcontainer.h \
134 publishdialog.h \ 134 publishdialog.h \
135 publishdialog_base.h \ 135 publishdialog_base.h \
136 savetemplatedialog.h \ 136 savetemplatedialog.h \
137 searchdialog.h \ 137 searchdialog.h \
138 simplealarmclient.h \
139 statusdialog.h \ 138 statusdialog.h \
140 timeline.h \ 139 timeline.h \
141 timespanview.h \ 140 timespanview.h \
142 version.h \ 141 version.h \
@@ -194,9 +193,8 @@ filteredit_base.cpp \
194 publishdialog.cpp \ 193 publishdialog.cpp \
195 publishdialog_base.cpp \ 194 publishdialog_base.cpp \
196 savetemplatedialog.cpp \ 195 savetemplatedialog.cpp \
197 searchdialog.cpp \ 196 searchdialog.cpp \
198 simplealarmclient.cpp \
199 statusdialog.cpp \ 197 statusdialog.cpp \
200 timeline.cpp \ 198 timeline.cpp \
201 timespanview.cpp \ 199 timespanview.cpp \
202 ../kalarmd/alarmdialog.cpp 200 ../kalarmd/alarmdialog.cpp
diff --git a/korganizer/korganizerE.pro b/korganizer/korganizerE.pro
index 91b5a01..553c265 100644
--- a/korganizer/korganizerE.pro
+++ b/korganizer/korganizerE.pro
@@ -84,9 +84,8 @@ HEADERS = datenavigatorcontainer.h \
84 publishdialog.h \ 84 publishdialog.h \
85 publishdialog_base.h \ 85 publishdialog_base.h \
86 savetemplatedialog.h \ 86 savetemplatedialog.h \
87 searchdialog.h \ 87 searchdialog.h \
88 simplealarmclient.h \
89 statusdialog.h \ 88 statusdialog.h \
90 timeline.h \ 89 timeline.h \
91 timespanview.h \ 90 timespanview.h \
92 version.h \ 91 version.h \
@@ -143,9 +142,8 @@ SOURCES = datenavigatorcontainer.cpp \
143 publishdialog.cpp \ 142 publishdialog.cpp \
144 publishdialog_base.cpp \ 143 publishdialog_base.cpp \
145 savetemplatedialog.cpp \ 144 savetemplatedialog.cpp \
146 searchdialog.cpp \ 145 searchdialog.cpp \
147 simplealarmclient.cpp \
148 statusdialog.cpp \ 146 statusdialog.cpp \
149 timeline.cpp \ 147 timeline.cpp \
150 timespanview.cpp \ 148 timespanview.cpp \
151 ../kalarmd/alarmdialog.cpp 149 ../kalarmd/alarmdialog.cpp
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index dd2c081..0a608dc 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -707,21 +707,15 @@ void KOTodoView::updateView()
707 } 707 }
708 if ( next ) 708 if ( next )
709 todo = todoList.next(); 709 todo = todoList.next();
710 } 710 }
711// qDebug("again .... ");
712// for(todo = todoList.first(); todo; todo = todoList.next()) {
713 711
714// qDebug("yytodo %s ", todo->summary().latin1());
715// }
716 //qDebug("for ");
717 for(todo = todoList.first(); todo; todo = todoList.next()) { 712 for(todo = todoList.first(); todo; todo = todoList.next()) {
718 if (!mTodoMap.contains(todo) && checkTodo( todo ) ) 713 if (!mTodoMap.contains(todo) && checkTodo( todo ) )
719 { 714 {
720 insertTodoItem(todo); 715 insertTodoItem(todo);
721 } 716 }
722 } 717 }
723 //qDebug("for end ");
724 // Restore opened/closed state 718 // Restore opened/closed state
725 mTodoListView->blockSignals( true ); 719 mTodoListView->blockSignals( true );
726 if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); 720 if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() );
727 mTodoListView->blockSignals( false ); 721 mTodoListView->blockSignals( false );
@@ -911,9 +905,8 @@ void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd,
911} 905}
912 906
913void KOTodoView::editItem(QListViewItem *item ) 907void KOTodoView::editItem(QListViewItem *item )
914{ 908{
915 // qDebug("editItem(QListViewItem *item ) ");
916 emit editTodoSignal(((KOTodoViewItem *)item)->todo()); 909 emit editTodoSignal(((KOTodoViewItem *)item)->todo());
917} 910}
918 911
919void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) 912void KOTodoView::showItem(QListViewItem *item,const QPoint &,int)
@@ -1095,9 +1088,9 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item)
1095 } 1088 }
1096 pendingSubtodo = 0; 1089 pendingSubtodo = 0;
1097 //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); 1090 //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
1098 int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() ); 1091 int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() );
1099 qDebug("ROW %d ", row); 1092 //qDebug("ROW %d ", row);
1100 if (!item) { 1093 if (!item) {
1101 newTodo(); 1094 newTodo();
1102 return; 1095 return;
1103 } else { 1096 } else {
@@ -1169,27 +1162,9 @@ void KOTodoView::itemClicked(QListViewItem *item)
1169 emit reparentTodoSignal( newParent,newSub ); 1162 emit reparentTodoSignal( newParent,newSub );
1170 return; 1163 return;
1171 } 1164 }
1172 } 1165 }
1173#if 0 1166
1174 // handled by the item itself
1175 bool completed = todoItem->todo()->isCompleted(); // Completed or not?
1176 qDebug("com %d ",completed );
1177 qDebug("itemclicked ");
1178 if (todoItem->isOn()) {
1179 qDebug("on ");
1180 if (!completed) {
1181 qDebug("set true ");
1182 todoItem->todo()->setCompleted(QDateTime::currentDateTime());
1183 }
1184 } else {
1185 qDebug("not on ");
1186 if (completed) {
1187 qDebug("set false ");
1188 todoItem->todo()->setCompleted(false);
1189 }
1190 }
1191#endif
1192} 1167}
1193 1168
1194void KOTodoView::setDocumentId( const QString &id ) 1169void KOTodoView::setDocumentId( const QString &id )
1195{ 1170{
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index f1f2dd2..3aa9b6c 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -549,16 +549,8 @@ void KOViewManager::showWorkWeekView()
549} 549}
550 550
551void KOViewManager::showWeekView() 551void KOViewManager::showWeekView()
552{ 552{
553 /*
554 globalFlagBlockAgenda = 2;
555 qDebug("4globalFlagBlockAgenda = 2; ");
556 //globalFlagBlockPainting = true;
557 mMainView->dateNavigator()->selectWeek();
558 showAgendaView();
559 */
560
561 553
562 mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); 554 mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count();
563 mFlagShowNextxDays = false; 555 mFlagShowNextxDays = false;
564 globalFlagBlockAgenda = 1; 556 globalFlagBlockAgenda = 1;
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 8473db9..65d8ac3 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -83,11 +83,9 @@ void WhatsNextTextBrowser::printMe()
83 scale = dx; 83 scale = dx;
84 else 84 else
85 scale = dy; 85 scale = dy;
86 p.translate( m.width()/10,0 ); 86 p.translate( m.width()/10,0 );
87 qDebug("Scale: %f ", scale );
88 if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) { 87 if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) {
89 qDebug("SCALE ");
90 p.scale( scale, scale ); 88 p.scale( scale, scale );
91 } 89 }
92 drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); 90 drawContents ( &p, 0,0, contentsWidth (), contentsHeight () );
93 p.end(); 91 p.end();
diff --git a/korganizer/ktimeedit.cpp b/korganizer/ktimeedit.cpp
index 61a0931..df9b2fc 100644
--- a/korganizer/ktimeedit.cpp
+++ b/korganizer/ktimeedit.cpp
@@ -336,9 +336,8 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
336 case Key_Next: 336 case Key_Next:
337 addTime(QTime(1,0,0)); 337 addTime(QTime(1,0,0));
338 break; 338 break;
339 case Key_Backspace: 339 case Key_Backspace:
340 qDebug("+++++++++++back ");
341 if ( cpos > 0) { 340 if ( cpos > 0) {
342 if ( cpos == 3 ) 341 if ( cpos == 3 )
343 --cpos; 342 --cpos;
344 if ( cpos > 5) 343 if ( cpos > 5)
@@ -347,9 +346,8 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
347 lineEdit()->setText( text ); 346 lineEdit()->setText( text );
348 lineEdit()->setCursorPosition(--cpos); 347 lineEdit()->setCursorPosition(--cpos);
349 setSelect ( cpos , 1 ); 348 setSelect ( cpos , 1 );
350 changedText(); 349 changedText();
351 qDebug("---------back ");
352 } 350 }
353 break; 351 break;
354 } // switch arrows 352 } // switch arrows
355 353
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 8e5d108..95bef66 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -59,9 +59,8 @@
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_
@@ -284,9 +283,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
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);
@@ -417,15 +415,15 @@ void MainWindow::toggleBeamReceive()
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
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index f2a6c60..45ed04d 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -9,9 +9,8 @@
9#include <qtextstream.h> 9#include <qtextstream.h>
10#include <qregexp.h> 10#include <qregexp.h>
11 11
12#include <libkcal/incidence.h> 12#include <libkcal/incidence.h>
13#include "simplealarmclient.h"
14#include <ksyncmanager.h> 13#include <ksyncmanager.h>
15#ifndef DESKTOP_VERSION 14#ifndef DESKTOP_VERSION
16#include <qcopchannel_qws.h> 15#include <qcopchannel_qws.h>
17#endif 16#endif
@@ -30,15 +29,8 @@ class QPEMenuBar;
30namespace KCal { 29namespace KCal {
31class CalendarLocal; 30class CalendarLocal;
32} 31}
33 32
34class KOMenuBar : public QMenuBar
35{
36 public:
37 KOMenuBar( QWidget *parent=0 ): QMenuBar (parent ) {;}
38 QSize sizeHint () const{ qDebug("sizejint ");return QSize ( 40,25 );}
39};
40
41using namespace KCal; 33using namespace KCal;
42 34
43class MainWindow : public QMainWindow 35class MainWindow : public QMainWindow
44{ 36{
@@ -163,9 +155,8 @@ class MainWindow : public QMainWindow
163 QAction *mToggleAllday; 155 QAction *mToggleAllday;
164 QAction *actionFilterMenuTB; 156 QAction *actionFilterMenuTB;
165 157
166 void closeEvent( QCloseEvent* ce ); 158 void closeEvent( QCloseEvent* ce );
167 SimpleAlarmClient mAlarmClient;
168 QTimer mSaveTimer; 159 QTimer mSaveTimer;
169 //bool mBlockSaveFlag; 160 //bool mBlockSaveFlag;
170 bool mCalendarModifiedFlag; 161 bool mCalendarModifiedFlag;
171 QPixmap loadPixmap( QString ); 162 QPixmap loadPixmap( QString );
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 7a945e3..de65b53 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -444,13 +444,12 @@ void SearchDialog::search(const QRegExp &re)
444void SearchDialog::keyPressEvent ( QKeyEvent *e) 444void SearchDialog::keyPressEvent ( QKeyEvent *e)
445{ 445{
446 switch ( e->key() ) { 446 switch ( e->key() ) {
447 case Qt::Key_Escape: 447 case Qt::Key_Escape:
448 hide(); 448 close();
449 break; 449 break;
450 case Qt::Key_F: 450 case Qt::Key_F:
451 if ( e->state() == Qt::ControlButton ) { 451 if ( e->state() == Qt::ControlButton ) {
452 qDebug("full ");
453 452
454 } 453 }
455 break; 454 break;
456 case Qt::Key_Return: 455 case Qt::Key_Return: