author | zautrix <zautrix> | 2005-07-01 17:57:30 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-01 17:57:30 (UTC) |
commit | 98d29d15275c4b8e9a3348742925f6e6d03f7a07 (patch) (side-by-side diff) | |
tree | ea0af6d2100287c696bb00e1197d6c99f29f41e8 | |
parent | f330b9d0a7f755660ddd59739e3ab9b98d60bc18 (diff) | |
download | kdepimpi-98d29d15275c4b8e9a3348742925f6e6d03f7a07.zip kdepimpi-98d29d15275c4b8e9a3348742925f6e6d03f7a07.tar.gz kdepimpi-98d29d15275c4b8e9a3348742925f6e6d03f7a07.tar.bz2 |
fixx
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 4 | ||||
-rw-r--r-- | kalarmd/alarmdialog.cpp | 5 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 45 | ||||
-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 |
8 files changed, 42 insertions, 40 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 44e6bdf..593806b 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1469,13 +1469,13 @@ { "Select Date...","Wähle Datum..." }, { "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, { "Change category list now!","Ändere Kategorieliste jetzt!" }, { "Edit category list...","Ändere Kategorieliste..." }, { "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, { "Filepath: ","Dateipfad: " }, { "The loading of one or more calendar failed:","Das Laden eines oder mehrerer Kalender schlug fehl:" }, { "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, -{ "","" }, -{ "","" }, +{ "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, +{ "Pending Suspend Alarm","Laufender Suspend Alarm" }, { "","" }, { "","" }, { "","" },
\ No newline at end of file diff --git a/kalarmd/alarmdialog.cpp b/kalarmd/alarmdialog.cpp index 17d4afa..ddb125a 100644 --- a/kalarmd/alarmdialog.cpp +++ b/kalarmd/alarmdialog.cpp @@ -93,16 +93,21 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) playSoundTimer->stop(); layout->addWidget ( mMissedAlarms ); mMissedAlarmsCombo = new QComboBox ( this ); layout->addWidget ( mMissedAlarmsCombo ); QLabel* labb = new QLabel("Suspend\nduration\n(minutes):",this); +#ifdef DESKTOP_VERSION + fo = font(); + fo.setPointSize( 12 ); + labb->setFont ( fo ); +#endif labb->setAlignment(AlignCenter); //layout->addWidget ( labb ); fo = font(); int pointSize = 36; if ( QApplication::desktop()->width() <= 320 ) pointSize = 18; fo.setPointSize( pointSize ); mSuspendSpin = new QSpinBox(1,1440,1,this); diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index fd026fa..70a1d2d 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -778,17 +778,17 @@ void CalendarView::suspendAlarm() void CalendarView::startAlarm( QString mess , QString filename) { topLevelWidget()->showNormal(); topLevelWidget()->setActiveWindow(); topLevelWidget()->raise(); 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() ) ); } void CalendarView::checkNextTimerAlarm() { mCalendar->checkAlarmForIncidence( 0, true ); } @@ -921,22 +921,26 @@ void CalendarView::addAlarm(const QDateTime &qdt, const QString ¬i ) // called by mRecheckAlarmTimer to get next alarm // we need this, because a QTimer has only a max range of 25 days void CalendarView::recheckTimerAlarm() { mAlarmTimer->stop(); mRecheckAlarmTimer->stop(); mCalendar->checkAlarmForIncidence( 0, true ); } +#ifndef DESKTOP_VERSION void CalendarView::removeAlarm(const QDateTime &qdt, const QString ¬i ) +#else +void CalendarView::removeAlarm(const QDateTime &, const QString & ) +#endif { //qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { #ifndef DESKTOP_VERSION - AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.latin1() ); + AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.utf8() ); #endif return; } mAlarmTimer->stop(); } void CalendarView::selectWeekNum ( int num ) { dateNavigator()->blockSignals( true ); @@ -1205,17 +1209,16 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int int changedLocal = 0; int changedRemote = 0; int filteredIN = 0; int filteredOUT = 0; //QPtrList<Event> el = local->rawEvents(); Event* eventR; QString uid; int take; - Event* eventL; Event* eventRSync; Event* eventLSync; clearAllViews(); QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); bool fullDateRange = false; local->resetTempSyncStat(); mLastCalendarSync = QDateTime::currentDateTime(); @@ -2305,17 +2308,22 @@ void CalendarView::readSettings() else mNavigator->selectDates( dateCount ); // mViewManager->readSettings( config ); updateConfig(); globalFlagBlockAgenda = 2; mViewManager->readSettings( config ); QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) ); } - +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() { // kdDebug() << "CalendarView::writeSettings" << endl; KConfig *config = KOGlobals::config(); mViewManager->writeSettings( config ); mTodoList->saveLayout(config,QString("Todo Layout")); @@ -2789,18 +2797,17 @@ void CalendarView::slotSelectPickerDate( QDate d) void CalendarView::removeCategories() { QPtrList<Incidence> incList = mCalendar->rawIncidences(); QStringList catList = KOPrefs::instance()->mCustomCategories; QStringList catIncList; QStringList newCatList; Incidence* inc = incList.first(); - int i; - int count = 0; + uint i; while ( inc ) { newCatList.clear(); catIncList = inc->categories() ; for( i = 0; i< catIncList.count(); ++i ) { if ( catList.contains (catIncList[i])) newCatList.append( catIncList[i] ); } newCatList.sort(); @@ -2810,17 +2817,17 @@ void CalendarView::removeCategories() } int CalendarView::addCategories() { QPtrList<Incidence> incList = mCalendar->rawIncidences(); QStringList catList = KOPrefs::instance()->mCustomCategories; QStringList catIncList; Incidence* inc = incList.first(); - int i; + uint i; int count = 0; while ( inc ) { catIncList = inc->categories() ; for( i = 0; i< catIncList.count(); ++i ) { if ( !catList.contains (catIncList[i])) { catList.append( catIncList[i] ); //qDebug("add cat %s ", catIncList[i].latin1()); ++count; @@ -2940,25 +2947,27 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) KApplication::convert2latin1( fn ); #ifndef DESKTOP_VERSION Ir *ir = new Ir( this ); connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); ir->send( fn, description, "text/x-vCalendar" ); #endif } } + +#ifndef DESKTOP_VERSION void CalendarView::beamDone( Ir *ir ) { -#ifndef DESKTOP_VERSION delete ir; -#endif topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); topLevelWidget()->raise(); } - +#else +void CalendarView::beamDone( Ir *){;} +#endif void CalendarView::moveIncidence(Incidence * inc ) { if ( !inc ) return; showDatePickerPopup(); mDatePickerMode = 2; mMoveIncidence = inc ; QDate da; if ( mMoveIncidence->typeID() == todoID ) { @@ -4302,21 +4311,16 @@ Todo *CalendarView::selectedTodo() incidence = mTodoList->selectedIncidences().first(); if ( incidence && incidence->typeID() == todoID ) { return static_cast<Todo *>( incidence ); } return 0; } -void CalendarView::dialogClosing(Incidence *in) -{ - // mDialogList.remove(in); -} - void CalendarView::showIncidence() { mViewerCallerIsSearchDialog = false; Incidence *incidence = currentSelection(); if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); if ( incidence ) { ShowIncidenceVisitor v; v.act( incidence, this ); @@ -4427,20 +4431,17 @@ void CalendarView::purgeCompleted() int result = KMessageBox::warningContinueCancel(this, i18n("Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)"),i18n("Purge Todos"),i18n("Purge")); if (result == KMessageBox::Continue) { QPtrList<Todo> todoCal; QPtrList<Todo> rootTodos; //QPtrList<Incidence> rel; - Todo *aTodo;//, *rTodo; - Incidence *rIncidence; - bool childDelete = false; - bool deletedOne = true; + Todo *aTodo; todoCal = calendar()->todos(); for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) { if ( !aTodo->relatedTo() ) rootTodos.append( aTodo ); } for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) { removeCompletedSubTodos( aTodo ); } @@ -4458,27 +4459,31 @@ void CalendarView::keyPressEvent ( QKeyEvent *e) { //qDebug(" alendarView::keyPressEvent "); e->ignore(); } 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" ) { qDebug("KO: SyncKDE request detected!"); } mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); mCurrentSyncName = mSyncManager->getCurrentSyncName(); return syncCalendar( filename, mode ); } bool CalendarView::syncExternal(KSyncManager* manager, QString resource) { //mSyncManager = manager; + if ( manager != mSyncManager) + qDebug("KO: Internal error-2. SyncManager mismatch "); mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); mCurrentSyncName = mSyncManager->getCurrentSyncName(); if ( resource == "sharp" ) syncExternal( 0 ); if ( resource == "phone" ) syncExternal( 1 ); // pending setmodified return true; diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 3323a98..c9e9870 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -132,16 +132,17 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser DateNavigator *dateNavigator(); KDateNavigator *dateNavigatorWidget(); void addView(KOrg::BaseView *); void showView(KOrg::BaseView *); KOEventViewerDialog* getEventViewerDialog(); Incidence *currentSelection(); + void checkSuspendAlarm(); signals: void save (); void saveStopTimer (); void tempDisableBR(bool); /** This todo has been modified */ void todoModified(Todo *, int); @@ -450,17 +451,16 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser void goNextMonth(); /** Move to the previous date(s) in the current view */ void goPreviousMonth(); void toggleExpand(); void toggleDateNavigatorWidget(); void toggleAllDaySize(); - void dialogClosing(Incidence *); /** Look for new messages in the inbox */ void lookForIncomingMessages(); /** Look for new messages in the outbox */ void lookForOutgoingMessages(); void processMainViewSelection( Incidence * ); void processTodoListSelection( Incidence * ); diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp index 5455098..ea30fac 100644 --- a/korganizer/kodialogmanager.cpp +++ b/korganizer/kodialogmanager.cpp @@ -293,18 +293,16 @@ KOEventEditor *KODialogManager::getEventEditor() mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); connect( eventEditor, SIGNAL( showAgendaView( bool)), mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), // eventEditor,SLOT(updateCategoryConfig())); // connect(eventEditor,SIGNAL(editCategories()), // mCategoryEditDialog,SLOT(show())); - connect(eventEditor,SIGNAL(dialogClose(Incidence*)), - mMainView,SLOT(dialogClosing(Incidence*))); //connect(mMainView,SIGNAL(closingDown()),eventEditor,SLOT(reject())); #ifndef DESKTOP_VERSION eventEditor->resize( QApplication::desktop()->width() -20, 100 ); #endif return eventEditor; } @@ -319,18 +317,16 @@ KOTodoEditor *KODialogManager::getTodoEditor() // connect(todoEditor,SIGNAL(editCategories()),mCategoryEditDialog,SLOT(show())); connect(todoEditor,SIGNAL(todoAdded(Todo *)), mMainView,SLOT(todoAdded(Todo *))); connect(todoEditor,SIGNAL(todoChanged(Todo *)), mMainView,SLOT(todoChanged(Todo *))); connect(todoEditor,SIGNAL(todoDeleted()), mMainView,SLOT(todoDeleted())); - connect(todoEditor,SIGNAL(dialogClose(Incidence*)), - mMainView,SLOT(dialogClosing(Incidence*))); connect( todoEditor, SIGNAL(jumpToTime( const QDate &)), mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); connect( todoEditor, SIGNAL( showAgendaView( bool)), mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); // connect(todoEditor,SIGNAL(deleteAttendee(Incidence *)), // mMainView,SLOT(schedule_cancel(Incidence *))); //connect(mMainView,SIGNAL(closingDown()),todoEditor,SLOT(reject())); #ifndef DESKTOP_VERSION diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 517677c..e5e3704 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -434,17 +434,18 @@ void KOListView::setCalendar( int c ) } void KOListView::populateCalPopup() { mCalPopup->clear(); KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); while ( kkf ) { 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(); } } void KOListView::updateList() { // qDebug(" KOListView::updateList() "); } diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index b6ce7d5..b797d8c 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -129,34 +129,31 @@ public: QCheckBox* mWriteBackFuture; QSpinBox* mWriteBackFutureWeeks; }; QPixmap* sgListViewCompletedPix[6]; int globalFlagBlockStartup; -MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : +MainWindow::MainWindow( QWidget *parent, const char *name ) : QMainWindow( parent, name ) { sgListViewCompletedPix[5] = &listviewPix; sgListViewCompletedPix[0] = &listviewPix0; sgListViewCompletedPix[1] = &listviewPix20; sgListViewCompletedPix[2] = &listviewPix40; sgListViewCompletedPix[3] = &listviewPix60; sgListViewCompletedPix[4] = &listviewPix80; if ( sgListViewCompletedPix[5]->height() < 5 ) { - int size = 12; + //int size = 12; sgListViewCompletedPix[5]->resize( 11, 11 ); sgListViewCompletedPix[5]->fill( Qt::white ); QPainter p ( sgListViewCompletedPix[5] ); p.drawRect( 0,0,11,11); - int half = size/2; - int heihei = size/2; - int x = 1; p.drawLine ( 2, 5, 4 , 7 ) ; p.drawLine ( 4 , 7 , 8, 3) ; int iii = 0; for ( iii = 0; iii < 5; ++iii ) { sgListViewCompletedPix[iii]->resize( 11, 11 ); sgListViewCompletedPix[iii]->fill( Qt::white ); QPainter p ( sgListViewCompletedPix[iii] ); p.drawRect( 0,0,11,11); @@ -339,17 +336,16 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : QTime neededSaveTime = QDateTime::currentDateTime().time(); mView->loadCalendars(); int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); qDebug("KO: Calendar loading time: %d ms",msNeeded ); if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { KOPrefs::instance()->setAllDefaults(); - int count = mView->addCategories(); } processIncidenceSelection( 0 ); connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), SLOT( processIncidenceSelection( Incidence * ) ) ); connect( mView, SIGNAL( modifiedChanged( bool ) ), SLOT( slotModifiedChanged( bool ) ) ); @@ -1850,21 +1846,21 @@ void MainWindow::saveOnClose() p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; if ( filterToolBar ) { if ( p->mToolBarHorF ) p->mToolBarUpF = filterToolBar->y() > height()/2; else p->mToolBarUpF = filterToolBar->x() > width()/2 ; } #endif - save(); mView->writeSettings(); + mView->checkSuspendAlarm(); } -void MainWindow::slotModifiedChanged( bool changed ) +void MainWindow::slotModifiedChanged( bool ) { if ( mBlockAtStartup ) return; int msec; // we store the changes after 1 minute, // and for safety reasons after 10 minutes again if ( !mSyncManager->blockSave() ) @@ -1898,17 +1894,17 @@ void MainWindow::backupAllFiles() } else if ( retval == 1 ){ qDebug("KO: Backup created."); // backup ok QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); cal = calendars.next(); while ( cal ) { if ( !cal->mErrorOnLoad ) { - int retval = KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); + KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); } cal = calendars.next(); } KOPrefs::instance()->mLastBackupDate = daysTo; setCaption(i18n("Backup succesfully finished" )); } else if ( retval == 2 ){ setCaption(i18n("Backup globally disabled" )); qDebug("KO: Backup globally cancelled."); @@ -2403,20 +2399,19 @@ void MainWindow::quickImportIcal() { importFile( KOPrefs::instance()->mLastImportFile, false ); } void MainWindow::importFile( QString fn, bool quick ) { QFileInfo info; info.setFile( fn ); 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 ); return; } int result = 0; if ( !quick ) { mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); result = QMessageBox::warning( this, "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 @@ -31,17 +31,17 @@ class CalendarLocal; } using namespace KCal; class MainWindow : public QMainWindow { Q_OBJECT public: - MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); + MainWindow( QWidget *parent = 0, const char *name = 0 ); ~MainWindow(); bool beamReceiveEnabled(); static QString defaultFileName(); static QString syncFileName(); static QString resourcePath(); public slots: void setUsesBigPixmaps ( bool ); void setCaption ( const QString & ); |