summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-06-19 08:51:41 (UTC)
committer zautrix <zautrix>2005-06-19 08:51:41 (UTC)
commitf10c6021dd23565df986c9631d12f42b64172a52 (patch) (unidiff)
tree91c1fb15618132694f866021335cf081f4c166a6 /korganizer
parent862c536aec16f9ae02ae81b8487ec13edd014ccc (diff)
downloadkdepimpi-f10c6021dd23565df986c9631d12f42b64172a52.zip
kdepimpi-f10c6021dd23565df986c9631d12f42b64172a52.tar.gz
kdepimpi-f10c6021dd23565df986c9631d12f42b64172a52.tar.bz2
fixx
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 8d957eb..7349d20 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -1171,56 +1171,58 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item)
1171{ 1171{
1172 if ( pendingSubtodo != 0 ) { 1172 if ( pendingSubtodo != 0 ) {
1173 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1173 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
1174 } 1174 }
1175 pendingSubtodo = 0; 1175 pendingSubtodo = 0;
1176 //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); 1176 //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
1177 int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() ); 1177 int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() );
1178 //qDebug("ROW %d ", row); 1178 //qDebug("ROW %d ", row);
1179 if (!item) { 1179 if (!item) {
1180 newTodo(); 1180 newTodo();
1181 return; 1181 return;
1182 } else { 1182 } else {
1183 if ( row == 1 ) { 1183 if ( row == 1 ) {
1184 mActiveItem = (KOTodoViewItem *) item; 1184 mActiveItem = (KOTodoViewItem *) item;
1185 newSubTodo(); 1185 newSubTodo();
1186 return; 1186 return;
1187 } 1187 }
1188 if ( row == 5 || row == 6 || row == 2) { 1188 if ( row == 5 || row == 6 || row == 2) {
1189 mActiveItem = (KOTodoViewItem *) item; 1189 mActiveItem = (KOTodoViewItem *) item;
1190 Todo * t = mActiveItem->todo(); 1190 Todo * t = mActiveItem->todo();
1191 if ( t->isRunning() ) { 1191 if ( t->isRunning() ) {
1192 if ( t->runTime() < 15) { 1192 if ( t->runTime() < 15) {
1193 t->stopRunning(); 1193 t->stopRunning();
1194 mActiveItem->construct(); 1194 mActiveItem->construct();
1195 topLevelWidget()->setCaption(i18n("Todo stopped - no data saved because runtime was < 15 sec!"));
1195 return; 1196 return;
1196 } 1197 }
1197 else 1198 else
1198 toggleRunningItem(); 1199 toggleRunningItem();
1199 return; 1200 return;
1200 } else { 1201 } else {
1201 t->setRunning( true ); 1202 t->setRunning( true );
1202 mActiveItem->construct(); 1203 mActiveItem->construct();
1204 topLevelWidget()->setCaption(i18n("Todo started! Double click again to stop!"));
1203 return; 1205 return;
1204 } 1206 }
1205 } 1207 }
1206 } 1208 }
1207 if ( KOPrefs::instance()->mEditOnDoubleClick ) 1209 if ( KOPrefs::instance()->mEditOnDoubleClick )
1208 editItem( item ); 1210 editItem( item );
1209 else 1211 else
1210 showItem( item , QPoint(), 0 ); 1212 showItem( item , QPoint(), 0 );
1211} 1213}
1212void KOTodoView::toggleRunningItem() 1214void KOTodoView::toggleRunningItem()
1213{ 1215{
1214 // qDebug("KOTodoView::toggleRunning() "); 1216 // qDebug("KOTodoView::toggleRunning() ");
1215 if ( ! mActiveItem ) 1217 if ( ! mActiveItem )
1216 return; 1218 return;
1217 Todo * t = mActiveItem->todo(); 1219 Todo * t = mActiveItem->todo();
1218 if ( t->isRunning() ) { 1220 if ( t->isRunning() ) {
1219 KOStopTodoPrefs tp ( t, this ); 1221 KOStopTodoPrefs tp ( t, this );
1220 if (QApplication::desktop()->width() < 800 ){ 1222 if (QApplication::desktop()->width() < 800 ){
1221 int wid = tp.width(); 1223 int wid = tp.width();
1222 int hei = tp.height(); 1224 int hei = tp.height();
1223 int xx = (QApplication::desktop()->width()-wid)/2; 1225 int xx = (QApplication::desktop()->width()-wid)/2;
1224 int yy = (QApplication::desktop()->height()-hei)/2; 1226 int yy = (QApplication::desktop()->height()-hei)/2;
1225 tp.setGeometry( xx,yy,wid,hei ); 1227 tp.setGeometry( xx,yy,wid,hei );
1226 } 1228 }