-rw-r--r-- | core/pim/todo/mainwindow.cpp | 1 | ||||
-rw-r--r-- | core/pim/todo/tableview.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index 7810285..58981ca 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp | |||
@@ -621,24 +621,25 @@ void MainWindow::raiseCurrentView() { | |||
621 | } | 621 | } |
622 | void MainWindow::slotShowDue(bool ov) { | 622 | void MainWindow::slotShowDue(bool ov) { |
623 | m_overdue = ov; | 623 | m_overdue = ov; |
624 | currentView()->showOverDue( ov ); | 624 | currentView()->showOverDue( ov ); |
625 | raiseCurrentView(); | 625 | raiseCurrentView(); |
626 | } | 626 | } |
627 | void MainWindow::slotShow( int uid ) { | 627 | void MainWindow::slotShow( int uid ) { |
628 | qWarning("slotShow"); | 628 | qWarning("slotShow"); |
629 | currentShow()->slotShow( event( uid ) ); | 629 | currentShow()->slotShow( event( uid ) ); |
630 | m_stack->raiseWidget( currentShow()->widget() ); | 630 | m_stack->raiseWidget( currentShow()->widget() ); |
631 | } | 631 | } |
632 | void MainWindow::slotEdit( int uid ) { | 632 | void MainWindow::slotEdit( int uid ) { |
633 | if (uid == 1 ) return; | ||
633 | if(m_syncing) { | 634 | if(m_syncing) { |
634 | QMessageBox::warning(this, QWidget::tr("Todo"), | 635 | QMessageBox::warning(this, QWidget::tr("Todo"), |
635 | QWidget::tr("Can not edit data, currently syncing")); | 636 | QWidget::tr("Can not edit data, currently syncing")); |
636 | return; | 637 | return; |
637 | } | 638 | } |
638 | 639 | ||
639 | OTodo todo = m_todoMgr.event( uid ); | 640 | OTodo todo = m_todoMgr.event( uid ); |
640 | 641 | ||
641 | todo = currentEditor()->edit(this, todo ); | 642 | todo = currentEditor()->edit(this, todo ); |
642 | 643 | ||
643 | /* if completed */ | 644 | /* if completed */ |
644 | if ( currentEditor()->accepted() ) { | 645 | if ( currentEditor()->accepted() ) { |
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index ae27fab..d9cda09 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp | |||
@@ -134,24 +134,25 @@ TableView::~TableView() { | |||
134 | for (int i = 0; i < numCols(); i++ ) | 134 | for (int i = 0; i < numCols(); i++ ) |
135 | config.writeEntry("Width"+QString::number(i), columnWidth(i) ); | 135 | config.writeEntry("Width"+QString::number(i), columnWidth(i) ); |
136 | } | 136 | } |
137 | void TableView::slotShowMenu() { | 137 | void TableView::slotShowMenu() { |
138 | QPopupMenu *menu = todoWindow()->contextMenu( current(), sorted()[currentRow()].recurrence().doesRecur() ); | 138 | QPopupMenu *menu = todoWindow()->contextMenu( current(), sorted()[currentRow()].recurrence().doesRecur() ); |
139 | menu->exec(QCursor::pos() ); | 139 | menu->exec(QCursor::pos() ); |
140 | delete menu; | 140 | delete menu; |
141 | } | 141 | } |
142 | QString TableView::type() const { | 142 | QString TableView::type() const { |
143 | return QString::fromLatin1( tr("Table View") ); | 143 | return QString::fromLatin1( tr("Table View") ); |
144 | } | 144 | } |
145 | int TableView::current() { | 145 | int TableView::current() { |
146 | if (numRows() == 0 ) return 1; | ||
146 | int uid = sorted().uidAt(currentRow() ); | 147 | int uid = sorted().uidAt(currentRow() ); |
147 | 148 | ||
148 | return uid; | 149 | return uid; |
149 | } | 150 | } |
150 | QString TableView::currentRepresentation() { | 151 | QString TableView::currentRepresentation() { |
151 | OTodo to = sorted()[currentRow()]; | 152 | OTodo to = sorted()[currentRow()]; |
152 | return to.summary().isEmpty() ? to.description().left(20) : to.summary() ; | 153 | return to.summary().isEmpty() ? to.description().left(20) : to.summary() ; |
153 | } | 154 | } |
154 | /* show overdue */ | 155 | /* show overdue */ |
155 | void TableView::showOverDue( bool ) { | 156 | void TableView::showOverDue( bool ) { |
156 | clear(); | 157 | clear(); |
157 | updateView(); | 158 | updateView(); |