| Summary: | knotes: dcop killNote force argument does not work | ||
|---|---|---|---|
| Product: | [Unmaintained] knotes | Reporter: | Pierre Habouzit <madcoder> |
| Component: | general | Assignee: | Michael Brade <brade> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Debian testing | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Pierre Habouzit
2006-05-10 08:14:03 UTC
SVN commit 539305 by brade:
Fix the implementation of killNote(), it did nothing when force == true.
Thanks for the report!
BUG:127063
This also fixes the embarrasingly wrong implementation of KNotesPart::notes(),
it returned the body of the notes, not the title. This is a behavior change
for the DCOP interface but the previous implementation was just plain wrong
and contradictory to the documentation and to the implementation of the
KNotes app itself.
M +12 -9 knotes_part.cpp
--- branches/KDE/3.5/kdepim/kontact/plugins/knotes/knotes_part.cpp #539304:539305
@@ -176,14 +176,17 @@
{
KNotesIconViewItem *note = mNoteList[ id ];
- if ( note && !force && KMessageBox::warningContinueCancelList( mNotesView,
- i18n( "Do you really want to delete this note?" ),
- mNoteList[ id ]->text(), i18n( "Confirm Delete" ),
- KStdGuiItem::del() ) == KMessageBox::Continue )
- {
- mManager->deleteNote( mNoteList[id]->journal() );
- mManager->save();
- }
+ if ( note &&
+ ( (!force && KMessageBox::warningContinueCancelList( mNotesView,
+ i18n( "Do you really want to delete this note?" ),
+ mNoteList[ id ]->text(), i18n( "Confirm Delete" ),
+ KStdGuiItem::del() ) == KMessageBox::Continue)
+ || force )
+ )
+ {
+ mManager->deleteNote( mNoteList[id]->journal() );
+ mManager->save();
+ }
}
QString KNotesPart::name( const QString& id ) const
@@ -228,7 +231,7 @@
QDictIterator<KNotesIconViewItem> it( mNoteList );
for ( ; it.current(); ++it )
- notes.insert( (*it)->journal()->uid(), (*it)->journal()->description() );
+ notes.insert( (*it)->journal()->uid(), (*it)->journal()->summary() );
return notes;
}
|