Version: v0.5 (using KDE 3.2.2, (testing/unstable)) Compiler: gcc version 3.3.3 (Debian 20040401) OS: Linux (i686) release 2.6.6-rc1 I would like kjots to remember the cursor's position when you open a note. And also I would like to be able to view a book's content when the book is closed and I select it. It would also be nice if you could export a html version of your book/s with threads & stuff. That's all I think.
SVN commit 427241 by jlee: FEATURE: 80719 The cursor position will be remembered while the program is running. It is not saved between sessions, however. I'm not sure that is necessary. M +0 -1 KJotsMain.cpp M +10 -3 kjotsentry.cpp M +2 -0 kjotsentry.h --- trunk/KDE/kdeutils/kjots/KJotsMain.cpp #427240:427241 @@ -214,7 +214,6 @@ this, SLOT(slotExpandBook(QListViewItem*))); connect(subjectList, SIGNAL(collapsed(QListViewItem*)), this, SLOT(slotCollapseBook(QListViewItem*))); -// this, SLOT(jumpToEntry(QListViewItem*))); connect(subjectList, SIGNAL(contextMenu(KListView*,QListViewItem*,const QPoint&)), this, SLOT(showListviewContextMenu(KListView*,QListViewItem*,const QPoint&))); connect(subjectList, SIGNAL(itemRenamed(QListViewItem*,const QString&,int)), --- trunk/KDE/kdeutils/kjots/kjotsentry.cpp #427240:427241 @@ -844,6 +844,7 @@ m_editor(0) { m_isBook = false; + m_paraPos = m_indexPos = 0; setPixmap(0, kapp->iconLoader()->loadIcon(QString("edit"), KIcon::Small)); } @@ -1057,10 +1058,15 @@ void KJotsPage::setEditor( KJotsEdit *editor ) { //out with the old... - if ( m_editor && m_editor->edited() ) + if ( m_editor ) { - m_text = m_editor->text(); - setDirty(true); + m_editor->getCursorPosition(&m_paraPos, &m_indexPos); + + if ( m_editor->edited() ) + { + m_text = m_editor->text(); + setDirty(true); + } } m_editor = editor; @@ -1069,6 +1075,7 @@ if ( m_editor ) { m_editor->setEdited(false); + m_editor->setCursorPosition(m_paraPos, m_indexPos); } return; --- trunk/KDE/kdeutils/kjots/kjotsentry.h #427240:427241 @@ -170,6 +170,8 @@ QTextCodec* m_saveEncoding; bool m_saveToPlainText; KJotsEdit *m_editor; //!< ptr to editor if this is the active subject + int m_paraPos; //< used to remrmber the cursor position + int m_indexPos; //< used to remrmber the cursor position }; #endif // __KJOTSENTRY_H