Bug 132947 - find journals doesn't display journal title
Summary: find journals doesn't display journal title
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-25 00:21 UTC by j joseph benavidez
Modified: 2007-01-29 10:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description j joseph benavidez 2006-08-25 00:21:04 UTC
Version:            (using KDE KDE 3.5.4)
Installed from:    Fedora RPMs
OS:                Linux

When I search for a journal, the first line of the search results gets 
returned as the Summary. This is kind of confusing... I would have expected 
the Title of the journal to be the Summary.
Comment 1 Will Stephenson 2006-10-30 09:27:26 UTC
Confirmed, KDE 3.5.5
Comment 2 Reinhold Kainhofer 2006-11-02 19:28:41 UTC
Reassigning all KOrganizer bug reports and wishes to the newly created 
korganizer-devel mailing list.
Comment 3 Lars Pohlmann 2007-01-29 09:18:28 UTC
Here is a patch against korganizers kolistview. 

--- kolistview.cpp~     2006-10-01 19:30:39.000000000 +0200
+++ kolistview.cpp      2007-01-29 08:19:05.000000000 +0100
@@ -183,8 +183,8 @@
 {
   static const QPixmap jrnalPxmp = KOGlobals::self()->smallIcon( "journal" );
   mItem->setPixmap(0,jrnalPxmp);
-  // Just use the first line
-  mItem->setText( 0, t->description().section( "\n", 0, 0 ) );
+  // Journal entries have a summary!
+  mItem->setText( 0, t->summary() );
   mItem->setText( 3, t->dtStartDateStr() );

   mItem->setSortKey( 3, t->dtStart().toString(Qt::ISODate) );
Comment 4 Allen Winter 2007-01-29 10:47:05 UTC
SVN commit 628136 by winterz:

Fix for "find journals doesn't display journal title".
Thanks for the patch Lars.

BUGS: 132947


 M  +8 -5      kolistview.cpp  


--- branches/KDE/3.5/kdepim/korganizer/kolistview.cpp #628135:628136
@@ -179,15 +179,18 @@
   return true;
 }
 
-bool KOListView::ListItemVisitor::visit(Journal *t)
+bool KOListView::ListItemVisitor::visit( Journal *t )
 {
   static const QPixmap jrnalPxmp = KOGlobals::self()->smallIcon( "journal" );
-  mItem->setPixmap(0,jrnalPxmp);
-  // Just use the first line
-  mItem->setText( 0, t->description().section( "\n", 0, 0 ) );
+  mItem->setPixmap( 0, jrnalPxmp );
+  if ( t->summary().isEmpty() ) {
+    mItem->setText( 0, t->description().section( "\n", 0, 0 ) );
+  } else {
+    mItem->setText( 0, t->summary() );
+  }
   mItem->setText( 3, t->dtStartDateStr() );
 
-  mItem->setSortKey( 3, t->dtStart().toString(Qt::ISODate) );
+  mItem->setSortKey( 3, t->dtStart().toString( Qt::ISODate ) );
 
   return true;
 }