-rw-r--r-- | korganizer/calendarview.cpp | 47 | ||||
-rw-r--r-- | korganizer/calendarview.h | 2 | ||||
-rw-r--r-- | korganizer/kodialogmanager.cpp | 4 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 3 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 17 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 2 |
6 files changed, 36 insertions, 39 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index fd026fa..70a1d2d 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -785,3 +785,3 @@ void CalendarView::startAlarm( QString mess , QString filename) mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount ); - QTimer::singleShot( 3000, this, SLOT( checkNextTimerAlarm() ) ); + QTimer::singleShot( 2000, this, SLOT( checkNextTimerAlarm() ) ); @@ -928,3 +928,7 @@ void CalendarView::recheckTimerAlarm() } +#ifndef DESKTOP_VERSION void CalendarView::removeAlarm(const QDateTime &qdt, const QString ¬i ) +#else +void CalendarView::removeAlarm(const QDateTime &, const QString & ) +#endif { @@ -933,3 +937,3 @@ void CalendarView::removeAlarm(const QDateTime &qdt, const QString ¬i ) #ifndef DESKTOP_VERSION - AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.latin1() ); + AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.utf8() ); #endif @@ -1212,3 +1216,2 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int int take; - Event* eventL; Event* eventRSync; @@ -2312,3 +2315,8 @@ void CalendarView::readSettings() - +void CalendarView::checkSuspendAlarm() +{ + if ( mSuspendTimer->isActive() ) { + KMessageBox::information( this, i18n("<b>WARNING:</b> There is a pending suspended alarm!"), i18n("Pending Suspend Alarm")); + } +} void CalendarView::writeSettings() @@ -2316,3 +2324,3 @@ void CalendarView::writeSettings() // kdDebug() << "CalendarView::writeSettings" << endl; - + KConfig *config = KOGlobals::config(); @@ -2796,4 +2804,3 @@ void CalendarView::removeCategories() Incidence* inc = incList.first(); - int i; - int count = 0; + uint i; while ( inc ) { @@ -2817,3 +2824,3 @@ int CalendarView::addCategories() Incidence* inc = incList.first(); - int i; + uint i; int count = 0; @@ -2947,7 +2954,7 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) } + +#ifndef DESKTOP_VERSION void CalendarView::beamDone( Ir *ir ) { -#ifndef DESKTOP_VERSION delete ir; -#endif topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); @@ -2955,3 +2962,5 @@ void CalendarView::beamDone( Ir *ir ) } - +#else +void CalendarView::beamDone( Ir *){;} +#endif void CalendarView::moveIncidence(Incidence * inc ) @@ -4309,7 +4318,2 @@ Todo *CalendarView::selectedTodo() -void CalendarView::dialogClosing(Incidence *in) -{ - // mDialogList.remove(in); -} - void CalendarView::showIncidence() @@ -4434,6 +4438,3 @@ void CalendarView::purgeCompleted() //QPtrList<Incidence> rel; - Todo *aTodo;//, *rTodo; - Incidence *rIncidence; - bool childDelete = false; - bool deletedOne = true; + Todo *aTodo; todoCal = calendar()->todos(); @@ -4465,3 +4466,5 @@ bool CalendarView::sync(KSyncManager* manager, QString filename, int mode) { - // mSyncManager = manager; + + if ( manager != mSyncManager) + qDebug("KO: Internal error-1. SyncManager mismatch "); if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) { @@ -4476,2 +4479,4 @@ bool CalendarView::syncExternal(KSyncManager* manager, QString resource) //mSyncManager = manager; + if ( manager != mSyncManager) + qDebug("KO: Internal error-2. SyncManager mismatch "); mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 3323a98..c9e9870 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -139,2 +139,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser Incidence *currentSelection(); + void checkSuspendAlarm(); @@ -457,3 +458,2 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser void toggleAllDaySize(); - void dialogClosing(Incidence *); diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp index 5455098..ea30fac 100644 --- a/korganizer/kodialogmanager.cpp +++ b/korganizer/kodialogmanager.cpp @@ -300,4 +300,2 @@ KOEventEditor *KODialogManager::getEventEditor() // mCategoryEditDialog,SLOT(show())); - connect(eventEditor,SIGNAL(dialogClose(Incidence*)), - mMainView,SLOT(dialogClosing(Incidence*))); @@ -326,4 +324,2 @@ KOTodoEditor *KODialogManager::getTodoEditor() mMainView,SLOT(todoDeleted())); - connect(todoEditor,SIGNAL(dialogClose(Incidence*)), - mMainView,SLOT(dialogClosing(Incidence*))); connect( todoEditor, SIGNAL(jumpToTime( const QDate &)), diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 517677c..e5e3704 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -441,3 +441,4 @@ void KOListView::populateCalPopup() int index = mCalPopup->insertItem( kkf->mName, kkf->mCalNumber); - mCalPopup->setItemEnabled( index, !kkf->isReadOnly ); + if ( kkf->mErrorOnLoad || kkf->isReadOnly ) + mCalPopup->setItemEnabled( index, false ); kkf = KOPrefs::instance()->mCalendars.next(); diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index b6ce7d5..b797d8c 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -136,3 +136,3 @@ QPixmap* sgListViewCompletedPix[6]; int globalFlagBlockStartup; -MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : +MainWindow::MainWindow( QWidget *parent, const char *name ) : QMainWindow( parent, name ) @@ -146,3 +146,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : if ( sgListViewCompletedPix[5]->height() < 5 ) { - int size = 12; + //int size = 12; sgListViewCompletedPix[5]->resize( 11, 11 ); @@ -151,5 +151,2 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : p.drawRect( 0,0,11,11); - int half = size/2; - int heihei = size/2; - int x = 1; p.drawLine ( 2, 5, 4 , 7 ) ; @@ -346,3 +343,2 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : KOPrefs::instance()->setAllDefaults(); - int count = mView->addCategories(); } @@ -1857,7 +1853,7 @@ void MainWindow::saveOnClose() #endif - save(); mView->writeSettings(); + mView->checkSuspendAlarm(); } -void MainWindow::slotModifiedChanged( bool changed ) +void MainWindow::slotModifiedChanged( bool ) { @@ -1905,3 +1901,3 @@ void MainWindow::backupAllFiles() if ( !cal->mErrorOnLoad ) { - int retval = KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); + KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); } @@ -2410,6 +2406,5 @@ void MainWindow::importFile( QString fn, bool quick ) QString mess; - bool loadbup = true; if ( !info. exists() ) { mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30)); - int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), + QMessageBox::warning( this, i18n("KO/Pi: Warning!"), mess ); diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 953774f..a948a52 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -38,3 +38,3 @@ class MainWindow : public QMainWindow public: - MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); + MainWindow( QWidget *parent = 0, const char *name = 0 ); ~MainWindow(); |