summaryrefslogtreecommitdiff
path: root/core/pim/todo/tableview.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/tableview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/tableview.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp
index ded2dbd..0f683c9 100644
--- a/core/pim/todo/tableview.cpp
+++ b/core/pim/todo/tableview.cpp
@@ -37,2 +37,4 @@
37 37
38#include <opie/orecur.h>
39
38#include "mainwindow.h" 40#include "mainwindow.h"
@@ -122,3 +124,3 @@ TableView::~TableView() {
122void TableView::slotShowMenu() { 124void TableView::slotShowMenu() {
123 QPopupMenu *menu = todoWindow()->contextMenu( current() ); 125 QPopupMenu *menu = todoWindow()->contextMenu( current(), sorted()[currentRow()].recurrence().doesRecur() );
124 menu->exec(QCursor::pos() ); 126 menu->exec(QCursor::pos() );
@@ -131,3 +133,3 @@ int TableView::current() {
131 int uid = sorted().uidAt(currentRow() ); 133 int uid = sorted().uidAt(currentRow() );
132 qWarning("uid %d", uid ); 134
133 return uid; 135 return uid;
@@ -135,3 +137,4 @@ int TableView::current() {
135QString TableView::currentRepresentation() { 137QString TableView::currentRepresentation() {
136 return text( currentRow(), 2); 138 OTodo to = sorted()[currentRow()];
139 return to.summary().isEmpty() ? to.description().left(20) : to.summary() ;
137} 140}
@@ -147,3 +150,3 @@ void TableView::updateView( ) {
147 static int id; 150 static int id;
148 id = startTimer(2000 ); 151 id = startTimer(4000 );
149 /* FIXME we want one page to be read! 152 /* FIXME we want one page to be read!
@@ -244,6 +247,3 @@ void TableView::slotClicked(int row, int col, int,
244 y <= ( h - BoxSize ) / 2 + BoxSize ) { 247 y <= ( h - BoxSize ) / 2 + BoxSize ) {
245 OTodo todo = sorted()[row]; 248 TodoView::complete(sorted()[row] );
246 todo.setCompleted( !todo.isCompleted() );
247 TodoView::update( todo.uid(), todo );
248 updateView();
249 } 249 }
@@ -371,3 +371,3 @@ void TableView::paintCell(QPainter* p, int row, int col, const QRect& cr, bool
371 QString text = task.summary().isEmpty() ? 371 QString text = task.summary().isEmpty() ?
372 task.description() : 372 task.description().left(20) :
373 task.summary(); 373 task.summary();
@@ -464,3 +464,3 @@ void TableView::slotPriority() {
464void TableView::timerEvent( QTimerEvent* ev ) { 464void TableView::timerEvent( QTimerEvent* ev ) {
465 qWarning("sorted %d", sorted().count() ); 465// qWarning("sorted %d", sorted().count() );
466 if (sorted().count() == 0 ) 466 if (sorted().count() == 0 )
@@ -515,7 +515,4 @@ void TableView::contentsMouseReleaseEvent( QMouseEvent* e) {
515 colOld != colNew ) { 515 colOld != colNew ) {
516 OTodo todo = sorted()[row]; 516 TodoView::complete( sorted()[row] );
517 todo.setCompleted( !todo.isCompleted() ); 517 return;
518 TodoView::update( todo.uid(), todo );
519 updateView();
520 return;
521 } 518 }