Summary: | auto search and replace function | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | rgpublic |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED INTENTIONAL | ||
Severity: | wishlist | CC: | bluedzins |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
rgpublic
2004-01-12 17:31:46 UTC
I like the idea and look to be innovative, but I think this belongs to the text editor itself, thus to Kate. You know, we don't maintain our own editor, but reusing what KDE provides. ;-) Subject: quanta_be: quanta/quanta CVS commit by amantia: Close file when it's removed from project. Avoids a warning dialog on next startup in some cases. CCMAIL: 72489-done@bugs.kde.org M +8 -0 quanta.cpp 1.387.2.43 M +2 -0 quanta.h 1.179.2.10 M +2 -0 quanta_init.cpp 1.380.2.23 M +1 -0 project/project.cpp 1.125.2.13 M +1 -0 project/project.h 1.48.2.2 --- quanta/quanta/quanta.cpp #1.387.2.42:1.387.2.43 @@ -501,4 +501,12 @@ void QuantaApp::slotFileClose() } +void QuantaApp::slotFileClose(const KURL &url) +{ + Document *w = m_doc->isOpened(url); + if (w) + slotClosePage(w); +} + + void QuantaApp::slotFileCloseAll() { --- quanta/quanta/quanta.h #1.179.2.9:1.179.2.10 @@ -220,4 +220,6 @@ public slots: void slotFileReloadAll(); void slotFileClose(); + /** Close the document specified in the parameter if it's opened */ + void slotFileClose(const KURL &url); void slotFileCloseAll(); void slotFilePrint(); --- quanta/quanta/quanta_init.cpp #1.380.2.22:1.380.2.23 @@ -315,4 +315,6 @@ void QuantaApp::initProject() connect(m_project, SIGNAL(openFile (const KURL &, const QString&)), this, SLOT (slotFileOpen(const KURL &, const QString&))); + connect(m_project, SIGNAL(closeFile (const KURL &)), + this, SLOT (slotFileClose(const KURL &))); connect(m_project, SIGNAL(reloadTree(const KURL::List & ,bool)), pTab, SLOT (slotReloadTree(const KURL::List &,bool))); --- quanta/quanta/project/project.cpp #1.125.2.12:1.125.2.13 @@ -1034,4 +1034,5 @@ void Project::slotRemove(const KURL& url } } + emit closeFile(urlToRemove); emit reloadTree( m_projectFiles, false ); emit newStatus(); --- quanta/quanta/project/project.h #1.48.2.1:1.48.2.2 @@ -125,4 +125,5 @@ signals: void openFile( const KURL&, const QString& ); + void closeFile( const KURL&); void closeFiles(); Oops, closed by mistaked Did I understand the wish correctly -- replace based on user manual replace, replace by pattern? Really nice! I often fall in this trap. Diff on undo buffer could serve as the source of (initial) values for the replace. It may sound nice, but - to face the facts - it's a bit too fuzzy to always have a well-defined behaviour. KDevelop can do very clever search & replace, because it understands/parses the code. Hence, this very specific feature is very unlikely to be implemented. Given this, I close the report as wont-fix... Sorry. PS: You can do a lot with KatePart's scripting API. You cannot access the clipboard or the undo/redo history, though, right now. http://docs.kde.org/stable/en/kdesdk/kate/advanced-editing-tools-scripting.html |