summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-06 11:17:00 (UTC)
committer zautrix <zautrix>2005-07-06 11:17:00 (UTC)
commit7e22293b1ec1ee190ca8db6c8ecd079bafdae520 (patch) (unidiff)
treeaed67fbbd844480e3dc0a7b5587edca766b51a5f
parent3b77a857e17e04e47d22ba6017dd723ed922e3fc (diff)
downloadkdepimpi-7e22293b1ec1ee190ca8db6c8ecd079bafdae520.zip
kdepimpi-7e22293b1ec1ee190ca8db6c8ecd079bafdae520.tar.gz
kdepimpi-7e22293b1ec1ee190ca8db6c8ecd079bafdae520.tar.bz2
fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
-rw-r--r--korganizer/koagenda.cpp1
-rw-r--r--korganizer/kotodoview.cpp3
-rw-r--r--korganizer/mainwindow.cpp4
-rw-r--r--microkde/ofileselector_p.cpp4
5 files changed, 10 insertions, 6 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 7566c6f..4b3f806 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3988,30 +3988,28 @@ void CalendarView::processMainViewSelection( Incidence *incidence )
3988} 3988}
3989 3989
3990void CalendarView::processTodoListSelection( Incidence *incidence ) 3990void CalendarView::processTodoListSelection( Incidence *incidence )
3991{ 3991{
3992 if ( incidence && mViewManager->currentView() ) { 3992 if ( incidence && mViewManager->currentView() ) {
3993 mViewManager->currentView()->clearSelection(); 3993 mViewManager->currentView()->clearSelection();
3994 } 3994 }
3995 processIncidenceSelection( incidence ); 3995 processIncidenceSelection( incidence );
3996} 3996}
3997 3997
3998void CalendarView::processIncidenceSelection( Incidence *incidence ) 3998void CalendarView::processIncidenceSelection( Incidence *incidence )
3999{ 3999{
4000 emit incidenceSelected( incidence );
4000 if ( incidence == mSelectedIncidence ) return; 4001 if ( incidence == mSelectedIncidence ) return;
4001
4002 mSelectedIncidence = incidence; 4002 mSelectedIncidence = incidence;
4003 4003
4004 emit incidenceSelected( mSelectedIncidence );
4005
4006 if ( incidence && incidence->typeID() == eventID ) { 4004 if ( incidence && incidence->typeID() == eventID ) {
4007 Event *event = static_cast<Event *>( incidence ); 4005 Event *event = static_cast<Event *>( incidence );
4008 if ( event->organizer() == KOPrefs::instance()->email() ) { 4006 if ( event->organizer() == KOPrefs::instance()->email() ) {
4009 emit organizerEventsSelected( true ); 4007 emit organizerEventsSelected( true );
4010 } else { 4008 } else {
4011 emit organizerEventsSelected(false); 4009 emit organizerEventsSelected(false);
4012 } 4010 }
4013 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, 4011 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails,
4014 KOPrefs::instance()->email() ) ) { 4012 KOPrefs::instance()->email() ) ) {
4015 emit groupEventsSelected( true ); 4013 emit groupEventsSelected( true );
4016 } else { 4014 } else {
4017 emit groupEventsSelected(false); 4015 emit groupEventsSelected(false);
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 92c1cd6..acdf5a0 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -145,25 +145,24 @@ void MarcusBains::updateLocation(bool recalculate)
145 mTimeBox->setText(KGlobal::locale()->formatTime(tim, KOPrefs::instance()->mMarcusBainsShowSeconds)); 145 mTimeBox->setText(KGlobal::locale()->formatTime(tim, KOPrefs::instance()->mMarcusBainsShowSeconds));
146 mTimeBox->adjustSize(); 146 mTimeBox->adjustSize();
147 // the -2 below is there because there is a bug in this program 147 // the -2 below is there because there is a bug in this program
148 // somewhere, where the last column of this widget is a few pixels 148 // somewhere, where the last column of this widget is a few pixels
149 // narrower than the other columns. 149 // narrower than the other columns.
150 int offs = (today==agenda->columns()-1) ? -4 : 0; 150 int offs = (today==agenda->columns()-1) ? -4 : 0;
151 agenda->moveChild(mTimeBox, 151 agenda->moveChild(mTimeBox,
152 x+agenda->gridSpacingX()-mTimeBox->width()+offs-1, 152 x+agenda->gridSpacingX()-mTimeBox->width()+offs-1,
153 y-mTimeBox->height()); 153 y-mTimeBox->height());
154 mTimeBox->raise(); 154 mTimeBox->raise();
155 //mTimeBox->setAutoMask(true); 155 //mTimeBox->setAutoMask(true);
156 int secs = QTime::currentTime().second(); 156 int secs = QTime::currentTime().second();
157 qDebug("second %d ", secs );
158 minutes->start( (60 - secs +1)*1000 ,true); 157 minutes->start( (60 - secs +1)*1000 ,true);
159} 158}
160 159
161 160
162//////////////////////////////////////////////////////////////////////////// 161////////////////////////////////////////////////////////////////////////////
163 162
164 163
165/* 164/*
166 Create an agenda widget with rows rows and columns columns. 165 Create an agenda widget with rows rows and columns columns.
167*/ 166*/
168KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, 167KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent,
169 const char *name,WFlags f) : 168 const char *name,WFlags f) :
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 86e1bd9..a87e6fc 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -1145,48 +1145,51 @@ void KOTodoView::deleteTodo()
1145 emit deleteTodoSignal(mActiveItem->todo()); 1145 emit deleteTodoSignal(mActiveItem->todo());
1146 } 1146 }
1147} 1147}
1148 1148
1149void KOTodoView::setNewPriority(int index) 1149void KOTodoView::setNewPriority(int index)
1150{ 1150{
1151 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1151 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1152 mActiveItem->todo()->setPriority(mPriority[index]); 1152 mActiveItem->todo()->setPriority(mPriority[index]);
1153 mActiveItem->construct(); 1153 mActiveItem->construct();
1154 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); 1154 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED);
1155 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1155 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1156 } 1156 }
1157 processSelectionChange();
1157} 1158}
1158 1159
1159void KOTodoView::setNewPercentage(int index) 1160void KOTodoView::setNewPercentage(int index)
1160{ 1161{
1161 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1162 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1162 1163
1163 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { 1164 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) {
1164 mActiveItem->setOn( true ); 1165 mActiveItem->setOn( true );
1166 processSelectionChange();
1165 return; 1167 return;
1166 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { 1168 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) {
1167 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); 1169 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent()));
1168 if ( par && par->isOn() ) 1170 if ( par && par->isOn() )
1169 par->setOn( false ); 1171 par->setOn( false );
1170 } 1172 }
1171 if (mPercentage[index] == 100) { 1173 if (mPercentage[index] == 100) {
1172 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); 1174 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime());
1173 } else { 1175 } else {
1174 mActiveItem->todo()->setCompleted(false); 1176 mActiveItem->todo()->setCompleted(false);
1175 } 1177 }
1176 mActiveItem->todo()->setPercentComplete(mPercentage[index]); 1178 mActiveItem->todo()->setPercentComplete(mPercentage[index]);
1177 mActiveItem->construct(); 1179 mActiveItem->construct();
1178 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); 1180 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED);
1179 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1181 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1180 } 1182 }
1183 processSelectionChange();
1181} 1184}
1182 1185
1183void KOTodoView::fillCategories () 1186void KOTodoView::fillCategories ()
1184{ 1187{
1185 mCategoryPopupMenu->clear(); 1188 mCategoryPopupMenu->clear();
1186 if ( ! mActiveItem ) return; 1189 if ( ! mActiveItem ) return;
1187 QStringList checkedCategories = mActiveItem->todo()->categories (); 1190 QStringList checkedCategories = mActiveItem->todo()->categories ();
1188 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); 1191 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin ();
1189 it != KOPrefs::instance()->mCustomCategories.end (); 1192 it != KOPrefs::instance()->mCustomCategories.end ();
1190 ++it) { 1193 ++it) {
1191 int index = mCategoryPopupMenu->insertItem (*it); 1194 int index = mCategoryPopupMenu->insertItem (*it);
1192 mCategory[index] = *it; 1195 mCategory[index] = *it;
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 88dbd4f..cbf6096 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1673,26 +1673,30 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
1673 if ( incidence->isBirthday() || incidence->isAnniversary() ) { 1673 if ( incidence->isBirthday() || incidence->isAnniversary() ) {
1674 bool ok; 1674 bool ok;
1675 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); 1675 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok );
1676 if ( ok ) { 1676 if ( ok ) {
1677 int years = noc.date().year() - incidence->dtStart().date().year(); 1677 int years = noc.date().year() - incidence->dtStart().date().year();
1678 startString += i18n(" (%1 y.)"). arg( years ); 1678 startString += i18n(" (%1 y.)"). arg( years );
1679 } 1679 }
1680 } 1680 }
1681 else 1681 else
1682 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); 1682 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
1683 } 1683 }
1684 } 1684 }
1685 else {
1686 if ( (( KCal::Todo*)incidence)->percentComplete() == 100 )
1687 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+i18n("completed on %1").arg( (( KCal::Todo*)incidence)->completedStr(true) );
1685 else 1688 else
1686 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); 1689 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed");
1690 }
1687 if ( !incidence->location().isEmpty() ) 1691 if ( !incidence->location().isEmpty() )
1688 startString += " (" +incidence->location()+")"; 1692 startString += " (" +incidence->location()+")";
1689 setCaption( incidence->summary()+startString); 1693 setCaption( incidence->summary()+startString);
1690 enableIncidenceActions( true ); 1694 enableIncidenceActions( true );
1691 if ( incidence->typeID() == eventID ) { 1695 if ( incidence->typeID() == eventID ) {
1692 mShowAction->setMenuText( i18n("Show Event") ); 1696 mShowAction->setMenuText( i18n("Show Event") );
1693 mNewSubTodoAction->setEnabled( false ); 1697 mNewSubTodoAction->setEnabled( false );
1694 } else if ( incidence->typeID() == todoID ) { 1698 } else if ( incidence->typeID() == todoID ) {
1695 mShowAction->setMenuText( i18n("Show Todo") ); 1699 mShowAction->setMenuText( i18n("Show Todo") );
1696 mNewSubTodoAction->setEnabled( true ); 1700 mNewSubTodoAction->setEnabled( true );
1697 } else { 1701 } else {
1698 mShowAction->setMenuText( i18n("Show") ); 1702 mShowAction->setMenuText( i18n("Show") );
diff --git a/microkde/ofileselector_p.cpp b/microkde/ofileselector_p.cpp
index 488dee2..f4f112e 100644
--- a/microkde/ofileselector_p.cpp
+++ b/microkde/ofileselector_p.cpp
@@ -355,29 +355,29 @@ void OFileViewFileListView::reread( bool all ) {
355 QFileInfo *fi; 355 QFileInfo *fi;
356 while( (fi=it.current() ) ){ 356 while( (fi=it.current() ) ){
357 if( fi->fileName() == QString::fromLatin1("..") || fi->fileName() == QString::fromLatin1(".") ){ 357 if( fi->fileName() == QString::fromLatin1("..") || fi->fileName() == QString::fromLatin1(".") ){
358 ++it; 358 ++it;
359 continue; 359 continue;
360 } 360 }
361 361
362 /* 362 /*
363 * It is a symlink we try to resolve it now but don't let us attack by DOS 363 * It is a symlink we try to resolve it now but don't let us attack by DOS
364 * 364 *
365 */ 365 */
366 if( fi->isSymLink() ){ 366 if( fi->isSymLink() ){
367 qDebug("SYMLINK "); 367 //qDebug("SYMLINK ");
368 QString file = fi->readLink(); 368 QString file = fi->readLink();
369 for( int i = 0; i<=5; i++) { // 5 tries to prevent dos 369 for( int i = 0; i<=5; i++) { // 5 tries to prevent dos
370 QFileInfo info( file ); 370 QFileInfo info( file );
371 qDebug("FILE %s ", file.latin1()); 371 //qDebug("FILE %s ", file.latin1());
372 if( !info.exists() ){ 372 if( !info.exists() ){
373 addSymlink( fi, TRUE ); 373 addSymlink( fi, TRUE );
374 break; 374 break;
375 }else if( info.isDir() ){ 375 }else if( info.isDir() ){
376 addDir( fi, TRUE ); 376 addDir( fi, TRUE );
377 break; 377 break;
378 }else if( info.isFile() ){ 378 }else if( info.isFile() ){
379 addFile( fi, TRUE ); 379 addFile( fi, TRUE );
380 break; 380 break;
381 }else if( info.isSymLink() ){ 381 }else if( info.isSymLink() ){
382 file = info.readLink() ; 382 file = info.readLink() ;
383 break; 383 break;