By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 2691
Collapse All | Expand All

(-)a/../tmp/tdepim/knotes/KNotesAppIface.h (+7 lines)
Lines 33-38 Link Here
33
#define __KNotesAppIface_h__
33
#define __KNotesAppIface_h__
34
34
35
#include <tqstring.h>
35
#include <tqstring.h>
36
#include <tqdatetime.h>
36
#include <tqmap.h>
37
#include <tqmap.h>
37
38
38
#include <dcopobject.h>
39
#include <dcopobject.h>
Lines 82-87 k_dcop: Link Here
82
    virtual TQMap<TQString,TQString> notes() const = 0;
83
    virtual TQMap<TQString,TQString> notes() const = 0;
83
84
84
    /**
85
    /**
86
     * Get the last modified time of a note
87
     * @return the last modified as a TQDateTime 
88
     */
89
    virtual TQDateTime getLastModified( const TQString& noteId ) const = 0;
90
91
    /**
85
     * Changes the title/name of a note.
92
     * Changes the title/name of a note.
86
     * @param noteId the id of the note to be modified
93
     * @param noteId the id of the note to be modified
87
     * @param newName the new title
94
     * @param newName the new title
(-)a/../tmp/tdepim/knotes/KNotesIface.h (+8 lines)
Lines 23-28 Link Here
23
#define __KNotesIface_h__
23
#define __KNotesIface_h__
24
24
25
#include <tqstring.h>
25
#include <tqstring.h>
26
#include <tqdatetime.h>
26
#include <tqmap.h>
27
#include <tqmap.h>
27
28
28
#include <dcopobject.h>
29
#include <dcopobject.h>
Lines 98-103 k_dcop: Link Here
98
     * @return the body as a TQString
99
     * @return the body as a TQString
99
     */
100
     */
100
    virtual TQString text( const TQString& noteId ) const = 0;
101
    virtual TQString text( const TQString& noteId ) const = 0;
102
103
    /**
104
     * Get the last modified time of a note
105
     * @return the last modified as a TQDateTime 
106
     */
107
    virtual TQDateTime getLastModified( const TQString& noteId ) const = 0;
108
101
};
109
};
102
110
103
#endif
111
#endif
(-)a/../tmp/tdepim/knotes/knote.cpp (-2 / +23 lines)
Lines 153-158 KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *parent, const char * Link Here
153
    m_label->setLineWidth( 0 );
153
    m_label->setLineWidth( 0 );
154
    m_label->installEventFilter( this );  // receive events (for dragging & action menu)
154
    m_label->installEventFilter( this );  // receive events (for dragging & action menu)
155
    setName( m_journal->summary() );      // don't worry, no signals are connected at this stage yet
155
    setName( m_journal->summary() );      // don't worry, no signals are connected at this stage yet
156
    m_lastmodified = m_journal->lastModified();
156
157
157
    m_button = new KNoteButton( "knotes_close", this );
158
    m_button = new KNoteButton( "knotes_close", this );
158
    connect( m_button, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotClose()) );
159
    connect( m_button, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotClose()) );
Lines 383-388 void KNote::changeJournal(KCal::Journal *journal) Link Here
383
   m_journal = journal;
384
   m_journal = journal;
384
   m_editor->setText( m_journal->description() );
385
   m_editor->setText( m_journal->description() );
385
   m_label->setText( m_journal->summary() );
386
   m_label->setText( m_journal->summary() );
387
   m_lastmodified = m_journal->lastModified();
386
   updateLabelAlignment();
388
   updateLabelAlignment();
387
}
389
}
388
390
Lines 425-436 void KNote::saveData(bool update) Link Here
425
{
427
{
426
    m_journal->setSummary( m_label->text() );
428
    m_journal->setSummary( m_label->text() );
427
    m_journal->setDescription( m_editor->text() );
429
    m_journal->setDescription( m_editor->text() );
430
431
    m_lastmodified = TQDateTime::currentDateTime();
432
// this will be set when saving the journal
433
//    m_journal->setLastModified(m_lastmodified);
434
428
    m_journal->setCustomProperty( "KNotes", "FgColor", m_config->fgColor().name() );
435
    m_journal->setCustomProperty( "KNotes", "FgColor", m_config->fgColor().name() );
429
    m_journal->setCustomProperty( "KNotes", "BgColor", m_config->bgColor().name() );
436
    m_journal->setCustomProperty( "KNotes", "BgColor", m_config->bgColor().name() );
430
    m_journal->setCustomProperty( "KNotes", "RichText", m_config->richText() ? "true" : "false" );
437
    m_journal->setCustomProperty( "KNotes", "RichText", m_config->richText() ? "true" : "false" );
438
439
//    kdDebug(5500) << "KNote::saveData(lastModified) : " << m_journal->lastModified() << endl;
440
431
    if(update) {
441
    if(update) {
432
    emit sigDataChanged( noteId() );
442
     emit sigDataChanged( noteId() );
433
    m_editor->setModified( false );
443
     m_editor->setModified( false );
434
    }
444
    }
435
}
445
}
436
446
Lines 453-458 TQString KNote::noteId() const Link Here
453
    return m_journal->uid();
463
    return m_journal->uid();
454
}
464
}
455
465
466
TQDateTime KNote::getLastModified() const
467
{
468
    return m_lastmodified;
469
}
470
471
void KNote::setJournalLastModified(const TQDateTime &dt)
472
{
473
    m_journal->setLastModified(dt);
474
}
475
456
TQString KNote::name() const
476
TQString KNote::name() const
457
{
477
{
458
    return m_label->text();
478
    return m_label->text();
Lines 1363-1368 bool KNote::eventFilter( TQObject *o, TQEvent *ev ) Link Here
1363
                 fe->reason() != TQFocusEvent::Mouse ) {
1383
                 fe->reason() != TQFocusEvent::Mouse ) {
1364
                updateFocus();
1384
                updateFocus();
1365
                if ( isModified() ) {
1385
                if ( isModified() ) {
1386
//        		kdDebug(5500) << "KNote::eventFilter() modified true" << endl;
1366
			saveConfig();
1387
			saveConfig();
1367
                        if ( !m_blockEmitDataChanged )
1388
                        if ( !m_blockEmitDataChanged )
1368
                            saveData();
1389
                            saveData();
(-)a/../tmp/tdepim/knotes/knote.h (+12 lines)
Lines 63-68 public: Link Here
63
63
64
    TQString noteId() const;
64
    TQString noteId() const;
65
65
66
    /**
67
     * Get the last modification date of a note
68
     * @return the last modification date as a TQDateTime 
69
     */
70
    TQDateTime getLastModified() const;
71
72
    /**
73
     * Set the last modified field in the journal
74
     */
75
    void setJournalLastModified( const TQDateTime& dt );
76
66
    TQString name() const;
77
    TQString name() const;
67
    TQString text() const;
78
    TQString text() const;
68
    TQString plainText() const;
79
    TQString plainText() const;
Lines 164-169 private: Link Here
164
175
165
    KNoteConfig   *m_config;
176
    KNoteConfig   *m_config;
166
    KCal::Journal *m_journal;
177
    KCal::Journal *m_journal;
178
    TQDateTime m_lastmodified;
167
179
168
    KFind         *m_find;
180
    KFind         *m_find;
169
181
(-)a/../tmp/tdepim/knotes/knotesapp.cpp (-1 / +18 lines)
Lines 342-347 TQMap<TQString,TQString> KNotesApp::notes() const Link Here
342
    return notes;
342
    return notes;
343
}
343
}
344
344
345
TQDateTime KNotesApp::getLastModified( const TQString& id ) const
346
{
347
    KNote* note = m_noteList[id];
348
    TQDateTime d;
349
    if ( note )
350
        d = note->getLastModified();
351
    if (!d.isValid())
352
        d.setTime_t(0);
353
    return d;
354
}
355
345
TQString KNotesApp::name( const TQString& id ) const
356
TQString KNotesApp::name( const TQString& id ) const
346
{
357
{
347
    KNote* note = m_noteList[id];
358
    KNote* note = m_noteList[id];
Lines 644-650 void KNotesApp::createNote( KCal::Journal *journal ) Link Here
644
655
645
         return;
656
         return;
646
  }
657
  }
647
  m_noteUidModify = journal->uid();
658
    m_noteUidModify = journal->uid();
648
    KNote *newNote = new KNote( m_noteGUI, journal, 0, journal->uid().utf8() );
659
    KNote *newNote = new KNote( m_noteGUI, journal, 0, journal->uid().utf8() );
649
    m_noteList.insert( newNote->noteId(), newNote );
660
    m_noteList.insert( newNote->noteId(), newNote );
650
661
Lines 698-703 void KNotesApp::saveNotes( const TQString & uid ) Link Here
698
void KNotesApp::saveNotes()
709
void KNotesApp::saveNotes()
699
{
710
{
700
    KNotesGlobalConfig::writeConfig();
711
    KNotesGlobalConfig::writeConfig();
712
// set the LAST-MODIFIED field before saving
713
// if the note was changed, it was updated
714
// else set the old value
715
    TQDictIterator<KNote> it( m_noteList );
716
    for ( ; *it; ++it )
717
      (*it)->setJournalLastModified((*it)->getLastModified());
701
    m_manager->save();
718
    m_manager->save();
702
}
719
}
703
720
(-)a/../tmp/tdepim/knotes/knotesapp.h (-1 / +8 lines)
Lines 81-86 public: Link Here
81
81
82
    TQMap<TQString,TQString> notes() const;
82
    TQMap<TQString,TQString> notes() const;
83
83
84
    /**
85
     * Get the last modified time of a note
86
     * @return the last modified as a TQDateTime 
87
     */
88
    TQDateTime getLastModified( const TQString& noteId ) const;
89
84
    int width( const TQString& noteId ) const;
90
    int width( const TQString& noteId ) const;
85
    int height( const TQString& noteId ) const;
91
    int height( const TQString& noteId ) const;
86
92
Lines 149-155 private: Link Here
149
    KNotesAlarm     *m_alarm;
155
    KNotesAlarm     *m_alarm;
150
    KNetwork::TDEServerSocket   *m_listener;
156
    KNetwork::TDEServerSocket   *m_listener;
151
157
152
    TQDict<KNote>    m_noteList;
158
    TQDict<KNote>    
159
;
153
    KNoteActionList m_noteActions;
160
    KNoteActionList m_noteActions;
154
161
155
    KFind           *m_find;
162
    KFind           *m_find;

Return to bug 2691