author | zecke <zecke> | 2002-10-07 23:51:51 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-07 23:51:51 (UTC) |
commit | dbdc38993798a0e223437908a46846b16541f843 (patch) (unidiff) | |
tree | d15d8bf8e0d2fa00ee135ec136ff97141cbf0328 | |
parent | b96478d7fb2f916ee2ac512eb83e227d9f0b6f91 (diff) | |
download | opie-dbdc38993798a0e223437908a46846b16541f843.zip opie-dbdc38993798a0e223437908a46846b16541f843.tar.gz opie-dbdc38993798a0e223437908a46846b16541f843.tar.bz2 |
Fix bug with category ids in sorted
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index 7e7d2f7..48954ce 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp | |||
@@ -258,63 +258,63 @@ QPopupMenu* MainWindow::contextMenu( int uid ) { | |||
258 | m_deleteAction->addTo( menu ); | 258 | m_deleteAction->addTo( menu ); |
259 | m_duplicateAction->addTo( menu ); | 259 | m_duplicateAction->addTo( menu ); |
260 | menu->insertSeparator(); | 260 | menu->insertSeparator(); |
261 | 261 | ||
262 | return menu; | 262 | return menu; |
263 | } | 263 | } |
264 | QPopupMenu* MainWindow::options() { | 264 | QPopupMenu* MainWindow::options() { |
265 | qWarning("Options"); | 265 | qWarning("Options"); |
266 | return m_options; | 266 | return m_options; |
267 | } | 267 | } |
268 | QPopupMenu* MainWindow::edit() { | 268 | QPopupMenu* MainWindow::edit() { |
269 | return m_edit; | 269 | return m_edit; |
270 | } | 270 | } |
271 | QPopupMenu* MainWindow::view() { | 271 | QPopupMenu* MainWindow::view() { |
272 | return m_view; | 272 | return m_view; |
273 | } | 273 | } |
274 | QToolBar* MainWindow::toolbar() { | 274 | QToolBar* MainWindow::toolbar() { |
275 | return m_tool; | 275 | return m_tool; |
276 | } | 276 | } |
277 | OTodoAccess::List MainWindow::list()const { | 277 | OTodoAccess::List MainWindow::list()const { |
278 | return m_todoMgr.list(); | 278 | return m_todoMgr.list(); |
279 | } | 279 | } |
280 | OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder ) { | 280 | OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder ) { |
281 | int cat = 0; | 281 | int cat = 0; |
282 | if ( m_curCat == tr("All Categories") ) | 282 | if ( m_curCat != tr("All Categories") ) |
283 | cat = currentCatId(); | 283 | cat = currentCatId(); |
284 | 284 | ||
285 | int filter = 1; | 285 | int filter = 1; |
286 | 286 | ||
287 | if (!m_completed ) | 287 | if (!m_completed ) |
288 | filter |= 4; | 288 | filter |= 4; |
289 | if (m_overdue) | 289 | if (m_overdue) |
290 | filter |= 2; | 290 | filter |= 2; |
291 | 291 | ||
292 | return m_todoMgr.sorted( asc, sortOrder, filter, cat ); | 292 | return m_todoMgr.sorted( asc, sortOrder, filter, cat ); |
293 | } | 293 | } |
294 | OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder, int addFilter) { | 294 | OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder, int addFilter) { |
295 | int cat = 0; | 295 | int cat = 0; |
296 | if ( m_curCat == tr("All Categories") ) | 296 | if ( m_curCat != tr("All Categories") ) |
297 | cat = currentCatId(); | 297 | cat = currentCatId(); |
298 | 298 | ||
299 | return m_todoMgr.sorted(asc, sortOrder, addFilter, cat ); | 299 | return m_todoMgr.sorted(asc, sortOrder, addFilter, cat ); |
300 | } | 300 | } |
301 | OTodo MainWindow::event( int uid ) { | 301 | OTodo MainWindow::event( int uid ) { |
302 | return m_todoMgr.event( uid ); | 302 | return m_todoMgr.event( uid ); |
303 | } | 303 | } |
304 | bool MainWindow::isSyncing()const { | 304 | bool MainWindow::isSyncing()const { |
305 | return m_syncing; | 305 | return m_syncing; |
306 | } | 306 | } |
307 | TemplateManager* MainWindow::templateManager() { | 307 | TemplateManager* MainWindow::templateManager() { |
308 | return m_tempManager; | 308 | return m_tempManager; |
309 | } | 309 | } |
310 | Editor* MainWindow::currentEditor() { | 310 | Editor* MainWindow::currentEditor() { |
311 | return m_curEdit; | 311 | return m_curEdit; |
312 | } | 312 | } |
313 | TodoShow* MainWindow::currentShow() { | 313 | TodoShow* MainWindow::currentShow() { |
314 | return m_curShow; | 314 | return m_curShow; |
315 | } | 315 | } |
316 | void MainWindow::slotReload() { | 316 | void MainWindow::slotReload() { |
317 | m_todoMgr.reload(); | 317 | m_todoMgr.reload(); |
318 | currentView()->updateView( ); | 318 | currentView()->updateView( ); |
319 | raiseCurrentView(); | 319 | raiseCurrentView(); |
320 | } | 320 | } |