-rw-r--r-- | libkcal/phoneformat.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp index e43a507..11c68c5 100644 --- a/libkcal/phoneformat.cpp +++ b/libkcal/phoneformat.cpp | |||
@@ -772,2 +772,13 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) | |||
772 | s.ConfigNum = 0; | 772 | s.ConfigNum = 0; |
773 | QLabel status ( i18n("Reading data. Opening device ..."), 0 ); | ||
774 | int w = status.sizeHint().width()+20 ; | ||
775 | if ( w < 200 ) w = 200; | ||
776 | int h = status.sizeHint().height()+20 ; | ||
777 | int dw = QApplication::desktop()->width(); | ||
778 | int dh = QApplication::desktop()->height(); | ||
779 | status.setCaption(i18n("Reading Phone Data") ); | ||
780 | status.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | ||
781 | status.show(); | ||
782 | status.raise(); | ||
783 | qApp->processEvents(); | ||
773 | #if 0 | 784 | #if 0 |
@@ -826,5 +837,8 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) | |||
826 | int ccc = 0; | 837 | int ccc = 0; |
838 | QString message = i18n("Processing event # "); | ||
839 | int procCount = 0; | ||
827 | qDebug("Debug: only 10 calender items are downloaded "); | 840 | qDebug("Debug: only 10 calender items are downloaded "); |
828 | while (!gshutdown && ccc++ < 10) { | 841 | while (!gshutdown && ccc++ < 10) { |
829 | 842 | status.setText ( message + QString::number ( ++procCount ) ); | |
843 | qApp->processEvents(); | ||
830 | qDebug("readEvent %d ", ccc); | 844 | qDebug("readEvent %d ", ccc); |
@@ -839,3 +853,7 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) | |||
839 | ccc = 0; | 853 | ccc = 0; |
854 | message = i18n("Processing todo # "); | ||
855 | procCount = 0; | ||
840 | while (!gshutdown) { | 856 | while (!gshutdown) { |
857 | status.setText ( message + QString::number ( ++procCount ) ); | ||
858 | qApp->processEvents(); | ||
841 | error = Phone->GetNextToDo(&s, &ToDo, start); | 859 | error = Phone->GetNextToDo(&s, &ToDo, start); |
@@ -932,3 +950,3 @@ bool PhoneFormat::save( Calendar *calendar) | |||
932 | int dh = QApplication::desktop()->height(); | 950 | int dh = QApplication::desktop()->height(); |
933 | status.setCaption(i18n("Writing DTM Data") ); | 951 | status.setCaption(i18n("Writing Phone Data") ); |
934 | status.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 952 | status.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
@@ -984,2 +1002,3 @@ bool PhoneFormat::save( Calendar *calendar) | |||
984 | ev->setID( mProfileName, QString::number( Note.Location ) ); | 1002 | ev->setID( mProfileName, QString::number( Note.Location ) ); |
1003 | qDebug("New Calendar. Location %d ",Note.Location ); | ||
985 | afterSave( ev ); | 1004 | afterSave( ev ); |
@@ -1009,3 +1028,3 @@ bool PhoneFormat::save( Calendar *calendar) | |||
1009 | else { // change existing | 1028 | else { // change existing |
1010 | error=Phone->AddToDo(&s,&ToDoEntry); | 1029 | error=Phone->SetToDo(&s,&ToDoEntry); |
1011 | } | 1030 | } |