diff options
author | mio <stigma@disroot.org> | 2024-10-27 21:57:29 +1000 |
---|---|---|
committer | mio <stigma@disroot.org> | 2024-12-17 09:37:43 +1000 |
commit | 7304b1a1e7ee4c175abb21e4d810c1f4d45ef7f1 (patch) | |
tree | cecf044282f342b5e8cf76cdc37be3e71ba75234 /kjots/KJotsMain.cpp | |
parent | f5130739bb3d0e8aac2c4864cf8ab0b870a09143 (diff) | |
download | tdeutils-7304b1a1e7ee4c175abb21e4d810c1f4d45ef7f1.tar.gz tdeutils-7304b1a1e7ee4c175abb21e4d810c1f4d45ef7f1.zip |
Update KJots to use KTextEdit
KEdit is deprecated and KTextEdit is one of the replacements. KTextEdit
doesn't provide the find & replace functionality, so we have to
re-implement that in KJotsEdit.
Signed-off-by: mio <stigma@disroot.org>
(cherry picked from commit 72796561928a42dbffd9dbb422523bb599896ca9)
Diffstat (limited to 'kjots/KJotsMain.cpp')
-rw-r--r-- | kjots/KJotsMain.cpp | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/kjots/KJotsMain.cpp b/kjots/KJotsMain.cpp index 5510f23..1e58f8f 100644 --- a/kjots/KJotsMain.cpp +++ b/kjots/KJotsMain.cpp @@ -93,7 +93,6 @@ KJotsMain::KJotsMain(const char* name) me_text->setFocusPolicy(TQWidget::StrongFocus); me_text->setEnabled(false); textStack->addWidget(me_text); - connect(me_text, TQ_SIGNAL(findSuccessful()), this, TQ_SLOT(slotFindSuccessful())); roTextView = new KTextBrowser(textStack, "roTextView", true); textStack->addWidget(roTextView); @@ -156,10 +155,10 @@ KJotsMain::KJotsMain(const char* name) actions[ACTION_PASTE2TITLE]->setEnabled(false); actions[ACTION_PASTE] = KStdAction::pasteText(me_text, TQ_SLOT(paste()), actionCollection()); - actions[ACTION_FIND] = KStdAction::find( this, TQ_SLOT( slotSearch() ), actionCollection() ); - actions[ACTION_FIND_NEXT] = KStdAction::findNext( this, TQ_SLOT( slotRepeatSearch() ), actionCollection() ); - actions[ACTION_FIND_NEXT]->setEnabled(false); - actions[ACTION_REPLACE] = KStdAction::replace( this, TQ_SLOT( slotReplace() ), actionCollection() ); + actions[ACTION_FIND] = KStdAction::find(me_text, TQ_SLOT(find()), actionCollection()); + actions[ACTION_FIND_NEXT] = KStdAction::findNext(me_text, TQ_SLOT(findNext()), actionCollection()); + actions[ACTION_FIND_PREV] = KStdAction::findPrev(me_text, TQ_SLOT(findPrev()), actionCollection()); + actions[ACTION_REPLACE] = KStdAction::replace(me_text, TQ_SLOT(replace()), actionCollection()); actions[ACTION_RENAME] = new TDEAction(i18n("Rename..."), TQString(), CTRL + Key_M, this, TQ_SLOT(slotRenameEntry()), actionCollection(), "rename_entry"); @@ -404,21 +403,6 @@ void KJotsMain::configure() dialog->show(); } -void KJotsMain::slotSearch() -{ - me_text->search(); -} - -void KJotsMain::slotRepeatSearch() -{ - me_text->repeatSearch(); -} - -void KJotsMain::slotReplace() -{ - me_text->replace(); -} - void KJotsMain::updateConfiguration() { static int encoding = -1; @@ -649,11 +633,6 @@ void KJotsMain::updateMenu() } } -void KJotsMain::slotFindSuccessful() -{ - actions[ACTION_FIND_NEXT]->setEnabled(true); -} - void KJotsMain::showListviewContextMenu(TDEListView*, TQListViewItem* i, const TQPoint& p) { if ( invalidMoveFlag ) return; //Prevent race condition |