Finish renaming KFileReplace->TDEFileReplace and fix related Quanta Plus internal references.

pull/1/head
Darrell Anderson 11 years ago
parent b23d738404
commit 80f849ebbb

@ -24,7 +24,7 @@ Kommander (kommander):
KXSLDbg (kxsldbg): KXSLDbg (kxsldbg):
Author: Keith Isdale <k_isdale@tpg.com.au> Author: Keith Isdale <k_isdale@tpg.com.au>
KFileReplace: TDEFileReplace:
Maintainer: Maintainer:
Emiliano Gulmini <emi_barbarossa@yahoo.it> Emiliano Gulmini <emi_barbarossa@yahoo.it>
Andras Mantia <amantia@kde.org> Andras Mantia <amantia@kde.org>

@ -24,7 +24,7 @@ Severity levels mean:
Severity: Highly recommended Severity: Highly recommended
Location: tdewebdev module Location: tdewebdev module
- KFileReplace: - TDEFileReplace:
Description: Used to search and replace in external files Description: Used to search and replace in external files
Severity: Highly recommended Severity: Highly recommended
Location: tdewebdev module Location: tdewebdev module

@ -8,7 +8,7 @@ highly recommended that you install them.
The extra applications are: The extra applications are:
Kommander: a GUI script builder and executor tool. Needed for some Quanta functionality. Kommander: a GUI script builder and executor tool. Needed for some Quanta functionality.
KFileReplace: powerful search and replace in multiple files TDEFileReplace: powerful search and replace in multiple files
KXSLDbg: XSL debugger KXSLDbg: XSL debugger
KImageMapEditor: image map editor KImageMapEditor: image map editor
KLinkStatus: link checker KLinkStatus: link checker

@ -211,35 +211,35 @@ This application lacks flexibility. Sorry, we will do better next time.
</sect1> </sect1>
<!-- <sect1 id="tdefilereplace-3-2"> <!-- <sect1 id="tdefilereplace-3-2">
<title>KFileReplace</title> <title>TDEFileReplace</title>
<para> <para>
KFileReplace is a terrific new addition to &quantaplus;. It allows one to TDEFileReplace is a terrific new addition to &quantaplus;. It allows one to
quickly replace strings over multiple files in only a few clicks of the quickly replace strings over multiple files in only a few clicks of the
mouse. Imagine you have converted all your GIF images to PNG images mouse. Imagine you have converted all your GIF images to PNG images
(hasn't everyone done this already?), only the extension has changed, and (hasn't everyone done this already?), only the extension has changed, and
you have the &lt;img /> tag scattered throughout 50 XHTML files. Are you you have the &lt;img /> tag scattered throughout 50 XHTML files. Are you
going to do a Find &amp; Replace on every file? Surely not when you can do going to do a Find &amp; Replace on every file? Surely not when you can do
them all at the same time! This is only one of the many situations where them all at the same time! This is only one of the many situations where
you will find KFileReplace a seriously helpful tool. This section will show you will find TDEFileReplace a seriously helpful tool. This section will show
you how to use this wonderful feature. you how to use this wonderful feature.
</para> </para>
<sect2 id="using-kfr-3-2"> <sect2 id="using-kfr-3-2">
<title>Using KFileReplace</title> <title>Using TDEFileReplace</title>
<para> <para>
With all these wonderful features KFileReplace has, surely you are With all these wonderful features TDEFileReplace has, surely you are
incredibly interested in how to use it! Well, make sure your swim suit incredibly interested in how to use it! Well, make sure your swim suit
is on tight, because we are about to dive in! is on tight, because we are about to dive in!
</para> </para>
<sect3 id="start-kfr-3-2"> <sect3 id="start-kfr-3-2">
<title>Starting KFileReplace</title> <title>Starting TDEFileReplace</title>
<para> <para>
You will find KFileReplace in two places: &quantaplus;' main toolbar and the You will find TDEFileReplace in two places: &quantaplus;' main toolbar and the
menubar (Plugins -> KFileReplace). It is represented by this icon: menubar (Plugins -> TDEFileReplace). It is represented by this icon:
<inlinemediaobject> <inlinemediaobject>
<imageobject> <imageobject>
<imagedata fileref="kfr-icon.png" format="PNG" /> <imagedata fileref="kfr-icon.png" format="PNG" />
@ -253,7 +253,7 @@ Search &amp; Replace Project dialog.
<imageobject> <imageobject>
<imagedata fileref="kfr-new-dialog.png" format="PNG" /> <imagedata fileref="kfr-new-dialog.png" format="PNG" />
</imageobject> </imageobject>
<caption><para>KFileReplace's New Search &amp; Replace Project dialog.</para></caption> <caption><para>TDEFileReplace's New Search &amp; Replace Project dialog.</para></caption>
</mediaobject> </mediaobject>
</sect3> </sect3>
@ -279,7 +279,7 @@ Your boss just gave word that:
<quote>One hour!?!?</quote> you think to yourself. <quote>It'll take at <quote>One hour!?!?</quote> you think to yourself. <quote>It'll take at
least 45 minutes to convert the images!</quote> Calm down. Convert least 45 minutes to convert the images!</quote> Calm down. Convert
the images, load up your project, and fire up KFileReplace. Filter for the images, load up your project, and fire up TDEFileReplace. Filter for
only the file types you want to change. Press the <inlinemediaobject> only the file types you want to change. Press the <inlinemediaobject>
<imageobject><imagedata format="PNG" fileref="" /></imageobject> <imageobject><imagedata format="PNG" fileref="" /></imageobject>
</inlinemediaobject> and for, say GIF images, .gif for the string to </inlinemediaobject> and for, say GIF images, .gif for the string to

@ -383,7 +383,7 @@
<sect1 id="tdefilereplace-the-options-dialog"> <sect1 id="tdefilereplace-the-options-dialog">
<title>The <guilabel>Options</guilabel> Dialog</title> <title>The <guilabel>Options</guilabel> Dialog</title>
<para>This dialog contains options that are in the toolbar and extra options that may come in handy in some situations. You can invoke it selecting <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure KFileReplace...</guimenuitem></menuchoice> in the main menu. <para>This dialog contains options that are in the toolbar and extra options that may come in handy in some situations. You can invoke it selecting <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure TDEFileReplace...</guimenuitem></menuchoice> in the main menu.
</para> </para>
<sect2 id="tdefilereplace-the-options-dialog-general-page"> <sect2 id="tdefilereplace-the-options-dialog-general-page">
<title>General options</title> <title>General options</title>

@ -34,7 +34,7 @@ Version 3.5.7 (Release date: xx-xx-2006; Started 06-02-2006)
Version 3.5.6 (Release date: 26-01-2006; Started 12-10-2006): Version 3.5.6 (Release date: 26-01-2006; Started 12-10-2006):
- bugfixes: - bugfixes:
- show Find in Files menu if KFileReplace is installed [related to #132530] - show Find in Files menu if TDEFileReplace is installed [related to #132530]
- fix various crashes in the debugger [#137483] - fix various crashes in the debugger [#137483]
- fix crash when editing a <style> CSS area - fix crash when editing a <style> CSS area
- use the correct encoding in the file dialogs [#138343] - use the correct encoding in the file dialogs [#138343]
@ -55,7 +55,7 @@ Version 3.5.5 (Release date: 11-10-2006; Started 01-09-2006):
- fix crash when copying to clipboard inside VPL [#130212] - fix crash when copying to clipboard inside VPL [#130212]
- show the correct column number if tabs are used in the document [#133313] - show the correct column number if tabs are used in the document [#133313]
- only one upload dialog can be shown at any time [#132535] - only one upload dialog can be shown at any time [#132535]
- do not show Find in Files menu if KFileReplace is not installed [#132530] - do not show Find in Files menu if TDEFileReplace is not installed [#132530]
- allow logging to files outside of project directory [#131782] - allow logging to files outside of project directory [#131782]
- don't send closing events for untitled, unmodified documents [#131782] - don't send closing events for untitled, unmodified documents [#131782]
- respect the order of items in the .docrc [#133704] - respect the order of items in the .docrc [#133704]
@ -480,7 +480,7 @@ bugfixes might not be listed here.
- behavioral/user interface changes: - behavioral/user interface changes:
- enable the configure toolbars item in the toolbar context menu [#80643] - enable the configure toolbars item in the toolbar context menu [#80643]
- rename Edit Toolbar to Configure Toolbars... - rename Edit Toolbar to Configure Toolbars...
- KFileReplace is used for "Find in Files" - TDEFileReplace is used for "Find in Files"
- Remove From Disc (and Project) renamed to Delete in the Project Tree - Remove From Disc (and Project) renamed to Delete in the Project Tree
- you cannot open the same project file in two different Quanta instances anymore - you cannot open the same project file in two different Quanta instances anymore
@ -750,7 +750,7 @@ correctly, or to work at all.
- script management facility: a new scrip treeview - script management facility: a new scrip treeview
- a lot of script helping XML development - a lot of script helping XML development
- XSLT debugger: kxsldbg by Keith Isdale - XSLT debugger: kxsldbg by Keith Isdale
- KFileReplace: search & replace in files - TDEFileReplace: search & replace in files
- new DTD menu with the following new items: - new DTD menu with the following new items:
- DTD->DTEP converter - DTD->DTEP converter
- Load DTEP - Load DTEP

@ -1,5 +1,5 @@
[General] [General]
Plugins=KFileReplace, CVS Management (Cervisia),XSLT Debugger, KImageMapEditor, Link Checker, Konsole Plugins=TDEFileReplace, CVS Management (Cervisia),XSLT Debugger, KImageMapEditor, Link Checker, Konsole
SearchPaths= SearchPaths=
[CVS Management (Cervisia)] [CVS Management (Cervisia)]
@ -13,7 +13,7 @@ Standard Name=cervisia_kpart
Type=KPart Type=KPart
Input=3 Input=3
[KFileReplace] [TDEFileReplace]
Arguments= Arguments=
FileName=trinity/libtdefilereplacepart.la FileName=trinity/libtdefilereplacepart.la
Icon=tdefilereplace Icon=tdefilereplace

@ -196,7 +196,7 @@
<ToolBar noMerge="1" name="mainPluginsToolBar" > <ToolBar noMerge="1" name="mainPluginsToolBar" >
<text>Plugins Toolbar</text> <text>Plugins Toolbar</text>
<Action name="tidy_check" /> <Action name="tidy_check" />
<Action name="KFileReplace" /> <Action name="TDEFileReplace" />
<Action name="CVS Management (Cervisia)" /> <Action name="CVS Management (Cervisia)" />
<Action name="XSLT Debugger" /> <Action name="XSLT Debugger" />
</ToolBar> </ToolBar>

@ -102,7 +102,7 @@
<li>Legacy projects get default templating abilities, so nothing is lost. </li> <li>Legacy projects get default templating abilities, so nothing is lost. </li>
<li>You can choose where to locate your template files, so they can be in your server root and easy to upload or you can make them secure to link to below server root which is a very cool trick. </li> <li>You can choose where to locate your template files, so they can be in your server root and easy to upload or you can make them secure to link to below server root which is a very cool trick. </li>
<li>When linking to a file not in the project templates, you will be prompted to copy the file to the project templates prior to linking. This will prevent broken links on upload. </li> <li>When linking to a file not in the project templates, you will be prompted to copy the file to the project templates prior to linking. This will prevent broken links on upload. </li>
<li>You always have control where you place your templates so you can choose to move them. However, Quanta Plus does not track this, so you will need to change links. This is a good task for KFileReplace, which is now a plug-in as a KPart!</li> <li>You always have control where you place your templates so you can choose to move them. However, Quanta Plus does not track this, so you will need to change links. This is a good task for TDEFileReplace, which is now a plug-in as a KPart!</li>
</ul> </ul>
<p class="minihdr">Templates conclusion</p> <p class="minihdr">Templates conclusion</p>
<p>Our goal with templates is to extend them to include multi-file "concept" templates, useful for certain things, like placing an order or creating an about section. Ideally this will be a tool for making your work more productive and dynamic. An eventual goal is to have a structural template design mode to deal with site layout and structure which you could use to design and interactively update your sites. If you would like to be involved, then contact us. </p> <p>Our goal with templates is to extend them to include multi-file "concept" templates, useful for certain things, like placing an order or creating an about section. Ideally this will be a tool for making your work more productive and dynamic. An eventual goal is to have a structural template design mode to deal with site layout and structure which you could use to design and interactively update your sites. If you would like to be involved, then contact us. </p>

@ -257,7 +257,7 @@ Just go to <b>Settings > Configure Shortcuts</b>.
<tip category="Application"> <tip category="Application">
<html> <html>
<p>...that you can use KFileReplace to find and replace across your entire project? <b>Click on the KFileReplace button</b> and you can set extensive configurations, use multi line values and wild cards, and even go to the files found in Quanta. <p>...that you can use TDEFileReplace to find and replace across your entire project? <b>Click on the TDEFileReplace button</b> and you can set extensive configurations, use multi line values and wild cards, and even go to the files found in Quanta.
</p> </p>
</html> </html>
</tip> </tip>

@ -695,7 +695,7 @@ void QuantaApp::slotFileQuit()
void QuantaApp::slotEditFindInFiles() void QuantaApp::slotEditFindInFiles()
{ {
QuantaPlugin *fileReplacePlugin = m_pluginInterface->plugin("KFileReplace"); QuantaPlugin *fileReplacePlugin = m_pluginInterface->plugin("TDEFileReplace");
if (fileReplacePlugin) if (fileReplacePlugin)
fileReplacePlugin->run(); fileReplacePlugin->run();
} }

@ -1091,7 +1091,7 @@ void QuantaInit::initPlugins()
TQT_TQOBJECT(m_quanta), TQT_SLOT(slotStatusMsg(const TQString & ))); TQT_TQOBJECT(m_quanta), TQT_SLOT(slotStatusMsg(const TQString & )));
m_quanta->m_pluginInterface->readConfig(); m_quanta->m_pluginInterface->readConfig();
if (!m_quanta->m_pluginInterface->pluginAvailable("KFileReplace")) if (!m_quanta->m_pluginInterface->pluginAvailable("TDEFileReplace"))
{ {
delete m_quanta->actionCollection()->action("find_in_files"); delete m_quanta->actionCollection()->action("find_in_files");
} }
@ -1420,8 +1420,8 @@ void QuantaInit::checkRuntimeDependencies()
dependency.type = Dependency::Executable; dependency.type = Dependency::Executable;
dependencies.append(dependency); dependencies.append(dependency);
dependency.name = "KFileReplace"; dependency.name = "TDEFileReplace";
dependency.execName = "KFileReplace"; dependency.execName = "TDEFileReplace";
dependency.description = i18n("search and replace in files"); dependency.description = i18n("search and replace in files");
dependency.type = Dependency::Plugin; dependency.type = Dependency::Plugin;
dependencies.append(dependency); dependencies.append(dependency);

@ -77,7 +77,7 @@
code that do commands feature from KFileREplaceLib to these two classes. code that do commands feature from KFileREplaceLib to these two classes.
2004-08-09 Emiliano Gulmini <emi_barbarossa@yahoo.it> 2004-08-09 Emiliano Gulmini <emi_barbarossa@yahoo.it>
* I fixed a bug that affected the method "void KFileReplaceView::slotStringsClear()" in tdefilereplaceview.cpp file. * I fixed a bug that affected the method "void TDEFileReplaceView::slotStringsClear()" in tdefilereplaceview.cpp file.
This bug caused the list of strings not to be correctly erased. This bug caused the list of strings not to be correctly erased.
2004-08-07 Emiliano Gulmini <emi_barbarossa@yahoo.it> 2004-08-07 Emiliano Gulmini <emi_barbarossa@yahoo.it>
@ -172,7 +172,7 @@
* Fixed a bug in the new kfr (XML-based) file format. * Fixed a bug in the new kfr (XML-based) file format.
2004-03-12 Emiliano Gulmini <emi_barbarossa@yahoo.it> 2004-03-12 Emiliano Gulmini <emi_barbarossa@yahoo.it>
* Removed KresultView(.h,.cpp). Now KFileReplaceView is a QWidget that contains results and * Removed KresultView(.h,.cpp). Now TDEFileReplaceView is a QWidget that contains results and
strings view. strings view.
* Added whatthis.h that contains the "what's this" strings. * Added whatthis.h that contains the "what's this" strings.
* Fixed a bug that generate a wrong XHTML result file. * Fixed a bug that generate a wrong XHTML result file.

@ -1,5 +1,5 @@
/*************************************************************************** /***************************************************************************
main.cpp - Main file for the KFileReplace shell main.cpp - Main file for the TDEFileReplace shell
------------------- -------------------
begin : Thu Sep 16 14:14:09 2004 begin : Thu Sep 16 14:14:09 2004
copyright : (C) 2004 by Andras Mantia <amantia@kde.org> copyright : (C) 2004 by Andras Mantia <amantia@kde.org>
@ -34,14 +34,14 @@ static TDECmdLineOptions options[] =
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
TDEAboutData about("tdefilereplace", I18N_NOOP("KFileReplace"), version, description, TDEAboutData about("tdefilereplace", I18N_NOOP("TDEFileReplace"), version, description,
TDEAboutData::License_GPL_V2, "(C) 2004-2005 Andras Mantia\n(C) 2004-2005 Emiliano Gulmini\n(C) 1999-2002 Francois Dupoux", I18N_NOOP("Part of the KDEWebDev module."), TDEAboutData::License_GPL_V2, "(C) 2004-2005 Andras Mantia\n(C) 2004-2005 Emiliano Gulmini\n(C) 1999-2002 Francois Dupoux", I18N_NOOP("Part of the KDEWebDev module."),
"http://www.kdewebdev.org"); "http://www.kdewebdev.org");
about.addAuthor("Andras Mantia", I18N_NOOP("Shell author, KPart creator, co-maintainer"), "amantia@kde.org"); about.addAuthor("Andras Mantia", I18N_NOOP("Shell author, KPart creator, co-maintainer"), "amantia@kde.org");
about.addAuthor("Emiliano Gulmini", I18N_NOOP("Current maintainer, code cleaner and rewriter"),"emi_barbarossa@yahoo.it"); about.addAuthor("Emiliano Gulmini", I18N_NOOP("Current maintainer, code cleaner and rewriter"),"emi_barbarossa@yahoo.it");
about.addAuthor("Francois Dupou", about.addAuthor("Francois Dupou",
I18N_NOOP("Original author of the KFileReplace tool"), I18N_NOOP("Original author of the TDEFileReplace tool"),
"dupoux@dupoux.com"); "dupoux@dupoux.com");
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
@ -52,14 +52,14 @@ int main(int argc, char *argv[])
// see if we are starting with session management // see if we are starting with session management
if (app.isRestored()) if (app.isRestored())
{ {
RESTORE(KFileReplace); RESTORE(TDEFileReplace);
} }
else else
{ {
// no session.. just start up normally // no session.. just start up normally
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KFileReplace *kfr = new KFileReplace; TDEFileReplace *kfr = new TDEFileReplace;
kfr->show(); kfr->show();
if (args->count() == 0) if (args->count() == 0)

@ -65,7 +65,7 @@ void Report::createReportFile()
oTStream << "<?xml version=\"1.0\"?>\n" oTStream << "<?xml version=\"1.0\"?>\n"
"<?xml-stylesheet href=\""+css+"\" type=\"text/css\"?>" "<?xml-stylesheet href=\""+css+"\" type=\"text/css\"?>"
"<report>\n" "<report>\n"
" <title> "+i18n("KFileReplace Report")+" </title>\n" " <title> "+i18n("TDEFileReplace Report")+" </title>\n"
" <createdby>"+user.fullName()+"("+user.loginName()+")"+"</createdby>\n" " <createdby>"+user.fullName()+"("+user.loginName()+")"+"</createdby>\n"
" <date>"+dateString+"</date>\n" " <date>"+dateString+"</date>\n"
"<hr/>\n" "<hr/>\n"

@ -1,5 +1,5 @@
/*************************************************************************** /***************************************************************************
tdefilereplace.cpp - KFileReplace shell implementation tdefilereplace.cpp - TDEFileReplace shell implementation
------------------- -------------------
begin : Thu Sep 16 14:14:09 2004 begin : Thu Sep 16 14:14:09 2004
copyright : (C) 2004 by Andras Mantia <amantia@kde.org> copyright : (C) 2004 by Andras Mantia <amantia@kde.org>
@ -24,8 +24,8 @@
//app includes //app includes
#include "tdefilereplace.h" #include "tdefilereplace.h"
KFileReplace::KFileReplace() TDEFileReplace::TDEFileReplace()
: KParts::MainWindow(0L, "KFileReplace") : KParts::MainWindow(0L, "TDEFileReplace")
{ {
KLibFactory *factory = KLibLoader::self()->factory("libtdefilereplacepart"); KLibFactory *factory = KLibLoader::self()->factory("libtdefilereplacepart");
if (factory) if (factory)
@ -46,23 +46,23 @@ KFileReplace::KFileReplace()
} }
else else
{ {
KMessageBox::error(this, i18n("Could not find the KFileReplace part.")); KMessageBox::error(this, i18n("Could not find the TDEFileReplace part."));
close(); close();
return; return;
} }
} }
KFileReplace::~KFileReplace() TDEFileReplace::~TDEFileReplace()
{ {
} }
void KFileReplace::openURL(const KURL &url) void TDEFileReplace::openURL(const KURL &url)
{ {
m_part->openURL(url); m_part->openURL(url);
} }
void KFileReplace::slotConfigureKeys() void TDEFileReplace::slotConfigureKeys()
{ {
KKeyDialog dlg( false, this ); KKeyDialog dlg( false, this );
TQPtrList<KXMLGUIClient> clients = guiFactory()->clients(); TQPtrList<KXMLGUIClient> clients = guiFactory()->clients();
@ -74,7 +74,7 @@ void KFileReplace::slotConfigureKeys()
dlg.configure(); dlg.configure();
} }
void KFileReplace::slotConfigureToolbars() void TDEFileReplace::slotConfigureToolbars()
{ {
saveMainWindowSettings(TDEGlobal::config(), autoSaveGroup()); saveMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
KEditToolbar dlg(factory()); KEditToolbar dlg(factory());
@ -83,13 +83,13 @@ void KFileReplace::slotConfigureToolbars()
dlg.exec(); dlg.exec();
} }
void KFileReplace::applyNewToolbarConfig() void TDEFileReplace::applyNewToolbarConfig()
{ {
applyMainWindowSettings(TDEGlobal::config(), autoSaveGroup()); applyMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
} }
void KFileReplace::removeDuplicatedActions() void TDEFileReplace::removeDuplicatedActions()
{ {
TDEActionCollection* part_action_collection = m_part->actionCollection(); TDEActionCollection* part_action_collection = m_part->actionCollection();
TDEAction* part_about_action = part_action_collection->action("help_about_tdefilereplace"); TDEAction* part_about_action = part_action_collection->action("help_about_tdefilereplace");

@ -1,5 +1,5 @@
/*************************************************************************** /***************************************************************************
tdefilereplace.h - KFileReplace header tdefilereplace.h - TDEFileReplace header
------------------- -------------------
begin : Thu Sep 16 14:14:09 2004 begin : Thu Sep 16 14:14:09 2004
copyright : (C) 2004 by Andras Mantia <amantia@kde.org> copyright : (C) 2004 by Andras Mantia <amantia@kde.org>
@ -19,17 +19,17 @@
#include <tdeparts/mainwindow.h> #include <tdeparts/mainwindow.h>
/** /**
Shell application for the KFileReplace part. Shell application for the TDEFileReplace part.
@author Andras Mantia @author Andras Mantia
*/ */
class KFileReplace : public KParts::MainWindow class TDEFileReplace : public KParts::MainWindow
{ {
Q_OBJECT Q_OBJECT
public: public:
KFileReplace(); TDEFileReplace();
~KFileReplace(); ~TDEFileReplace();
void openURL(const KURL &url); void openURL(const KURL &url);
private slots: private slots:

@ -19,7 +19,7 @@
#include <dcopobject.h> #include <dcopobject.h>
class KFileReplaceIface : virtual public DCOPObject class TDEFileReplaceIface : virtual public DCOPObject
{ {
K_DCOP K_DCOP

@ -48,7 +48,7 @@ const double tera = 1099511627776.0;//1024^4
.................* fileName: second path (can be "/doc/html/", or "doc/html/" or "doc/html/index.html" for example) .................* fileName: second path (can be "/doc/html/", or "doc/html/" or "doc/html/index.html" for example)
Return values:...* Full valid path (without double "/") Return values:...* Full valid path (without double "/")
*/ */
TQString KFileReplaceLib::formatFullPath(const TQString& basePath, const TQString &fileName) TQString TDEFileReplaceLib::formatFullPath(const TQString& basePath, const TQString &fileName)
{ {
TQString fullPath = basePath; TQString fullPath = basePath;
TQString fname = fileName; TQString fname = fileName;
@ -70,7 +70,7 @@ TQString KFileReplaceLib::formatFullPath(const TQString& basePath, const TQStrin
.................* extension: extension to add without "." (ex: "html", "kfr") .................* extension: extension to add without "." (ex: "html", "kfr")
Return values:...* Filename / Filepath with the extension Return values:...* Filename / Filepath with the extension
*/ */
TQString KFileReplaceLib::addExtension(const TQString& fileName, const TQString& extension) TQString TDEFileReplaceLib::addExtension(const TQString& fileName, const TQString& extension)
{ {
TQString fullExtension = "."; TQString fullExtension = ".";
TQString fname = fileName; TQString fname = fileName;
@ -89,7 +89,7 @@ TQString KFileReplaceLib::addExtension(const TQString& fileName, const TQString&
return fname; return fname;
} }
TQString KFileReplaceLib::formatFileSize(double size) TQString TDEFileReplaceLib::formatFileSize(double size)
{ {
TQString stringSize; TQString stringSize;
@ -119,12 +119,12 @@ TQString KFileReplaceLib::formatFileSize(double size)
return stringSize; return stringSize;
} }
void KFileReplaceLib::convertOldToNewKFRFormat(const TQString& fileName, TDEListView* stringView) void TDEFileReplaceLib::convertOldToNewKFRFormat(const TQString& fileName, TDEListView* stringView)
{ {
//this method convert old format in new XML-based format //this method convert old format in new XML-based format
typedef struct typedef struct
{ {
char pgm[13]; // Must be "KFileReplace" : like MZ for EXE files char pgm[13]; // Must be "TDEFileReplace" : like MZ for EXE files
int stringNumber; // Number of strings in file int stringNumber; // Number of strings in file
char reserved[64]; // Reserved for future use char reserved[64]; // Reserved for future use
} KFRHeader; } KFRHeader;
@ -135,7 +135,7 @@ void KFileReplaceLib::convertOldToNewKFRFormat(const TQString& fileName, TDEList
int err = fread(&head, sizeof(KFRHeader), 1, f); int err = fread(&head, sizeof(KFRHeader), 1, f);
TQString pgm(head.pgm); TQString pgm(head.pgm);
if(!f || (err != 1) || (pgm != "KFileReplace")) if(!f || (err != 1) || (pgm != "TDEFileReplace"))
{ {
KMessageBox::error(0, i18n("<qt>Cannot open the file <b>%1</b> and load the string list. This file seems not to be a valid old kfr file or it is broken.</qt>").arg(fileName)); KMessageBox::error(0, i18n("<qt>Cannot open the file <b>%1</b> and load the string list. This file seems not to be a valid old kfr file or it is broken.</qt>").arg(fileName));
return ; return ;
@ -195,7 +195,7 @@ void KFileReplaceLib::convertOldToNewKFRFormat(const TQString& fileName, TDEList
return ; return ;
} }
bool KFileReplaceLib::isAnAccessibleFile(const TQString& filePath, const TQString& fileName, RCOptions* info) bool TDEFileReplaceLib::isAnAccessibleFile(const TQString& filePath, const TQString& fileName, RCOptions* info)
{ {
TQString bkExt = info->m_backupExtension; TQString bkExt = info->m_backupExtension;
if(fileName == ".." || fileName == "." || (!bkExt.isEmpty() && fileName.right(bkExt.length()) == bkExt)) if(fileName == ".." || fileName == "." || (!bkExt.isEmpty() && fileName.right(bkExt.length()) == bkExt))
@ -296,7 +296,7 @@ bool KFileReplaceLib::isAnAccessibleFile(const TQString& filePath, const TQStrin
return true; return true;
} }
void KFileReplaceLib::setIconForFileEntry(TQListViewItem* item, TQString path) void TDEFileReplaceLib::setIconForFileEntry(TQListViewItem* item, TQString path)
{ {
TQFileInfo fi(path); TQFileInfo fi(path);
TQString extension = fi.extension(), TQString extension = fi.extension(),

@ -28,7 +28,7 @@ class KlistView;
// local // local
#include "configurationclasses.h" #include "configurationclasses.h"
class KFileReplaceLib class TDEFileReplaceLib
{ {
public: public:

@ -56,11 +56,11 @@ using namespace whatthisNameSpace;
//PUBLIC CONSTRUCTORS //PUBLIC CONSTRUCTORS
// Factory code for KDE 3 // Factory code for KDE 3
typedef KParts::GenericFactory<KFileReplacePart> FileReplaceFactory; typedef KParts::GenericFactory<TDEFileReplacePart> FileReplaceFactory;
K_EXPORT_COMPONENT_FACTORY( libtdefilereplacepart, FileReplaceFactory ) K_EXPORT_COMPONENT_FACTORY( libtdefilereplacepart, FileReplaceFactory )
KFileReplacePart::KFileReplacePart(TQWidget* parentWidget, const char* , TQObject* parent, const char* name, const TQStringList & ) : KParts::ReadOnlyPart(parent,name) TDEFileReplacePart::TDEFileReplacePart(TQWidget* parentWidget, const char* , TQObject* parent, const char* name, const TQStringList & ) : KParts::ReadOnlyPart(parent,name)
{ {
setInstance(FileReplaceFactory::instance()); setInstance(FileReplaceFactory::instance());
TDEGlobal::locale()->insertCatalogue("tdefilereplace"); TDEGlobal::locale()->insertCatalogue("tdefilereplace");
@ -79,7 +79,7 @@ KFileReplacePart::KFileReplacePart(TQWidget* parentWidget, const char* , TQObjec
whatsThis(); whatsThis();
} }
KFileReplacePart::~KFileReplacePart() TDEFileReplacePart::~TDEFileReplacePart()
{ {
m_view = 0; //it's already deleted, so set it to NULL m_view = 0; //it's already deleted, so set it to NULL
@ -95,14 +95,14 @@ KFileReplacePart::~KFileReplacePart()
} }
//PRIVATE SLOTS //PRIVATE SLOTS
void KFileReplacePart::slotSetNewParameters() void TDEFileReplacePart::slotSetNewParameters()
{ {
launchNewProjectDialog(KURL()); launchNewProjectDialog(KURL());
m_view->changeView(m_option->m_searchingOnlyMode); m_view->changeView(m_option->m_searchingOnlyMode);
emit setStatusBarText(i18n("Ready.")); emit setStatusBarText(i18n("Ready."));
} }
void KFileReplacePart::slotSearchingOperation() void TDEFileReplacePart::slotSearchingOperation()
{ {
if(!checkBeforeOperation()) if(!checkBeforeOperation())
return; return;
@ -159,7 +159,7 @@ void KFileReplacePart::slotSearchingOperation()
m_view->showSemaphore("green"); m_view->showSemaphore("green");
} }
void KFileReplacePart::slotReplacingOperation() void TDEFileReplacePart::slotReplacingOperation()
{ {
if (KMessageBox::warningContinueCancel(m_w, i18n("<qt>You have selected <b>%1</b> as the encoding of the files.<br>Selecting the correct encoding is very important as if you have files that have some other encoding than the selected one, after a replace you may damage those files.<br><br>In case you do not know the encoding of your files, select <i>utf8</i> and <b>enable</b> the creation of backup files. This setting will autodetect <i>utf8</i> and <i>utf16</i> files, but the changed files will be converted to <i>utf8</i>.</qt>").arg(m_option->m_encoding), i18n("File Encoding Warning"), KStdGuiItem::cont(), "ShowEncodingWarning") == KMessageBox::Cancel) if (KMessageBox::warningContinueCancel(m_w, i18n("<qt>You have selected <b>%1</b> as the encoding of the files.<br>Selecting the correct encoding is very important as if you have files that have some other encoding than the selected one, after a replace you may damage those files.<br><br>In case you do not know the encoding of your files, select <i>utf8</i> and <b>enable</b> the creation of backup files. This setting will autodetect <i>utf8</i> and <i>utf16</i> files, but the changed files will be converted to <i>utf8</i>.</qt>").arg(m_option->m_encoding), i18n("File Encoding Warning"), KStdGuiItem::cont(), "ShowEncodingWarning") == KMessageBox::Cancel)
return; return;
@ -221,14 +221,14 @@ void KFileReplacePart::slotReplacingOperation()
m_view->showSemaphore("green"); m_view->showSemaphore("green");
} }
void KFileReplacePart::slotSimulatingOperation() void TDEFileReplacePart::slotSimulatingOperation()
{ {
m_option->m_simulation = true; m_option->m_simulation = true;
slotReplacingOperation(); slotReplacingOperation();
m_option->m_simulation = false; m_option->m_simulation = false;
} }
void KFileReplacePart::slotStop() void TDEFileReplacePart::slotStop()
{ {
emit setStatusBarText(i18n("Stopping...")); emit setStatusBarText(i18n("Stopping..."));
m_stop = true; m_stop = true;
@ -236,7 +236,7 @@ void KFileReplacePart::slotStop()
resetActions(); resetActions();
} }
void KFileReplacePart::slotCreateReport() void TDEFileReplacePart::slotCreateReport()
{ {
// Check there are results // Check there are results
TDEListView* rv = m_view->getResultsView(), TDEListView* rv = m_view->getResultsView(),
@ -280,13 +280,13 @@ void KFileReplacePart::slotCreateReport()
//resetActions(); //resetActions();
} }
void KFileReplacePart::slotStringsAdd() void TDEFileReplacePart::slotStringsAdd()
{ {
m_view->slotStringsAdd(); m_view->slotStringsAdd();
resetActions(); resetActions();
} }
void KFileReplacePart::slotQuickStringsAdd() void TDEFileReplacePart::slotQuickStringsAdd()
{ {
//this slot handles a pair of strings that come from project dialog, //this slot handles a pair of strings that come from project dialog,
//if the control character 'N' is found at the position 0 of the two strings, //if the control character 'N' is found at the position 0 of the two strings,
@ -318,33 +318,33 @@ void KFileReplacePart::slotQuickStringsAdd()
slotReplacingOperation(); slotReplacingOperation();
} }
void KFileReplacePart::slotStringsDeleteItem() void TDEFileReplacePart::slotStringsDeleteItem()
{ {
m_view->slotStringsDeleteItem(); m_view->slotStringsDeleteItem();
resetActions(); resetActions();
} }
void KFileReplacePart::slotStringsEmpty() void TDEFileReplacePart::slotStringsEmpty()
{ {
m_view->slotStringsEmpty(); m_view->slotStringsEmpty();
resetActions(); resetActions();
} }
void KFileReplacePart::slotStringsEdit() void TDEFileReplacePart::slotStringsEdit()
{ {
m_view->slotStringsEdit(); m_view->slotStringsEdit();
resetActions(); resetActions();
} }
void KFileReplacePart::slotStringsSave() void TDEFileReplacePart::slotStringsSave()
{ {
m_view->slotStringsSave(); m_view->slotStringsSave();
} }
void KFileReplacePart::slotStringsLoad() void TDEFileReplacePart::slotStringsLoad()
{ {
// Selects the file to load from // Selects the file to load from
TQString menu = "*.kfr|" + i18n("KFileReplace strings") + " (*.kfr)\n*|"+i18n("All Files") + " (*)"; TQString menu = "*.kfr|" + i18n("TDEFileReplace strings") + " (*.kfr)\n*|"+i18n("All Files") + " (*)";
TQString fileName = KFileDialog::getOpenFileName(TQString(), menu, m_w, i18n("Load Strings From File")); TQString fileName = KFileDialog::getOpenFileName(TQString(), menu, m_w, i18n("Load Strings From File"));
if(!fileName.isEmpty()) if(!fileName.isEmpty())
@ -353,19 +353,19 @@ void KFileReplacePart::slotStringsLoad()
resetActions(); resetActions();
} }
void KFileReplacePart::slotStringsInvertCur() void TDEFileReplacePart::slotStringsInvertCur()
{ {
m_view->stringsInvert(false); m_view->stringsInvert(false);
resetActions(); resetActions();
} }
void KFileReplacePart::slotStringsInvertAll() void TDEFileReplacePart::slotStringsInvertAll()
{ {
m_view->stringsInvert(true); m_view->stringsInvert(true);
resetActions(); resetActions();
} }
void KFileReplacePart::slotOpenRecentStringFile(const KURL& urlFile) void TDEFileReplacePart::slotOpenRecentStringFile(const KURL& urlFile)
{ {
TQString fileName; TQString fileName;
@ -386,37 +386,37 @@ void KFileReplacePart::slotOpenRecentStringFile(const KURL& urlFile)
resetActions(); resetActions();
} }
void KFileReplacePart::slotOptionRecursive() void TDEFileReplacePart::slotOptionRecursive()
{ {
m_option->m_recursive = !m_option->m_recursive; m_option->m_recursive = !m_option->m_recursive;
resetActions(); resetActions();
} }
void KFileReplacePart::slotOptionBackup() void TDEFileReplacePart::slotOptionBackup()
{ {
m_option->m_backup = !m_option->m_backup; m_option->m_backup = !m_option->m_backup;
resetActions(); resetActions();
} }
void KFileReplacePart::slotOptionCaseSensitive() void TDEFileReplacePart::slotOptionCaseSensitive()
{ {
m_option->m_caseSensitive = !m_option->m_caseSensitive; m_option->m_caseSensitive = !m_option->m_caseSensitive;
resetActions(); resetActions();
} }
void KFileReplacePart::slotOptionVariables() void TDEFileReplacePart::slotOptionVariables()
{ {
m_option->m_variables = !m_option->m_variables; m_option->m_variables = !m_option->m_variables;
resetActions(); resetActions();
} }
void KFileReplacePart::slotOptionRegularExpressions() void TDEFileReplacePart::slotOptionRegularExpressions()
{ {
m_option->m_regularExpressions = !m_option->m_regularExpressions; m_option->m_regularExpressions = !m_option->m_regularExpressions;
resetActions(); resetActions();
} }
void KFileReplacePart::slotOptionPreferences() void TDEFileReplacePart::slotOptionPreferences()
{ {
KOptionsDlg dlg(m_option, m_w, 0); KOptionsDlg dlg(m_option, m_w, 0);
@ -429,7 +429,7 @@ void KFileReplacePart::slotOptionPreferences()
resetActions(); resetActions();
} }
void KFileReplacePart::showAboutApplication() void TDEFileReplacePart::showAboutApplication()
{ {
m_aboutDlg = new TDEAboutApplication(createAboutData(), (TQWidget *)0, (const char *)0, false); m_aboutDlg = new TDEAboutApplication(createAboutData(), (TQWidget *)0, (const char *)0, false);
if(m_aboutDlg == 0) if(m_aboutDlg == 0)
@ -441,18 +441,18 @@ void KFileReplacePart::showAboutApplication()
m_aboutDlg->raise(); m_aboutDlg->raise();
} }
void KFileReplacePart::appHelpActivated() void TDEFileReplacePart::appHelpActivated()
{ {
kapp->invokeHelp(TQString(), "tdefilereplace"); kapp->invokeHelp(TQString(), "tdefilereplace");
} }
void KFileReplacePart::reportBug() void TDEFileReplacePart::reportBug()
{ {
KBugReport dlg(m_w, true, createAboutData()); KBugReport dlg(m_w, true, createAboutData());
dlg.exec(); dlg.exec();
} }
void KFileReplacePart::resetActions() void TDEFileReplacePart::resetActions()
{ {
TDEListView* rv = m_view->getResultsView(), TDEListView* rv = m_view->getResultsView(),
* sv = m_view->getStringsView(); * sv = m_view->getStringsView();
@ -507,16 +507,16 @@ void KFileReplacePart::resetActions()
} }
//PUBLIC METHODS //PUBLIC METHODS
TDEAboutData* KFileReplacePart::createAboutData() TDEAboutData* TDEFileReplacePart::createAboutData()
{ {
TDEAboutData * aboutData = new TDEAboutData("tdefilereplacepart", TDEAboutData * aboutData = new TDEAboutData("tdefilereplacepart",
I18N_NOOP("KFileReplacePart"), I18N_NOOP("TDEFileReplacePart"),
KFR_VERSION, KFR_VERSION,
I18N_NOOP( "Batch search and replace tool."), I18N_NOOP( "Batch search and replace tool."),
TDEAboutData::License_GPL_V2, TDEAboutData::License_GPL_V2,
"(C) 1999-2002 Fran<61>is Dupoux\n(C) 2003-2004 Andras Mantia\n(C) 2004 Emiliano Gulmini", I18N_NOOP("Part of the KDEWebDev module."), "http://www.kdewebdev.org"); "(C) 1999-2002 Fran<61>is Dupoux\n(C) 2003-2004 Andras Mantia\n(C) 2004 Emiliano Gulmini", I18N_NOOP("Part of the KDEWebDev module."), "http://www.kdewebdev.org");
aboutData->addAuthor("Fran<EFBFBD>is Dupoux", aboutData->addAuthor("Fran<EFBFBD>is Dupoux",
I18N_NOOP("Original author of the KFileReplace tool"), I18N_NOOP("Original author of the TDEFileReplace tool"),
"dupoux@dupoux.com"); "dupoux@dupoux.com");
aboutData->addAuthor("Emiliano Gulmini", aboutData->addAuthor("Emiliano Gulmini",
I18N_NOOP("Current maintainer, code cleaner and rewriter"), I18N_NOOP("Current maintainer, code cleaner and rewriter"),
@ -531,11 +531,11 @@ TDEAboutData* KFileReplacePart::createAboutData()
} }
//PROTECTED METHODS //PROTECTED METHODS
bool KFileReplacePart::openURL(const KURL &url) bool TDEFileReplacePart::openURL(const KURL &url)
{ {
if(!url.isEmpty() && (url.protocol() != "file")) if(!url.isEmpty() && (url.protocol() != "file"))
{ {
KMessageBox::sorry(m_w, i18n("Sorry, currently the KFileReplace part works only for local files."), i18n("Non Local File")); KMessageBox::sorry(m_w, i18n("Sorry, currently the TDEFileReplace part works only for local files."), i18n("Non Local File"));
emit canceled(""); emit canceled("");
return false; return false;
} }
@ -549,7 +549,7 @@ bool KFileReplacePart::openURL(const KURL &url)
} }
//PRIVATE METHODS //PRIVATE METHODS
void KFileReplacePart::initGUI() void TDEFileReplacePart::initGUI()
{ {
setXMLFile("tdefilereplacepartui.rc"); setXMLFile("tdefilereplacepartui.rc");
@ -592,7 +592,7 @@ void KFileReplacePart::initGUI()
(void)new TDEToggleAction(i18n("Case &Sensitive"), "casesensitive_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionCaseSensitive()), actionCollection(), "options_case"); (void)new TDEToggleAction(i18n("Case &Sensitive"), "casesensitive_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionCaseSensitive()), actionCollection(), "options_case");
(void)new TDEToggleAction(i18n("Enable Commands &in Replace String: [$command:option$]"), "command_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionVariables()), actionCollection(), "options_var"); (void)new TDEToggleAction(i18n("Enable Commands &in Replace String: [$command:option$]"), "command_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionVariables()), actionCollection(), "options_var");
(void)new TDEToggleAction(i18n("Enable &Regular Expressions"), "regularexpression_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionRegularExpressions()), actionCollection(), "options_regularexpressions"); (void)new TDEToggleAction(i18n("Enable &Regular Expressions"), "regularexpression_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionRegularExpressions()), actionCollection(), "options_regularexpressions");
(void)new TDEAction(i18n("Configure &KFileReplace..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionPreferences()), actionCollection(), "configure_tdefilereplace"); (void)new TDEAction(i18n("Configure &TDEFileReplace..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionPreferences()), actionCollection(), "configure_tdefilereplace");
// Results // Results
(void)new TDEAction(i18n("&Properties"), "informations", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultProperties()), actionCollection(), "results_infos"); (void)new TDEAction(i18n("&Properties"), "informations", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultProperties()), actionCollection(), "results_infos");
@ -606,15 +606,15 @@ void KFileReplacePart::initGUI()
(void)new TDEAction(i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultDelete()), actionCollection(), "results_delete"); (void)new TDEAction(i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultDelete()), actionCollection(), "results_delete");
(void)new TDEAction(i18n("E&xpand Tree"), 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultTreeExpand()), actionCollection(), "results_treeexpand"); (void)new TDEAction(i18n("E&xpand Tree"), 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultTreeExpand()), actionCollection(), "results_treeexpand");
(void)new TDEAction(i18n("&Reduce Tree"), 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultTreeReduce()), actionCollection(), "results_treereduce"); (void)new TDEAction(i18n("&Reduce Tree"), 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultTreeReduce()), actionCollection(), "results_treereduce");
(void)new TDEAction(i18n("&About KFileReplace"), "tdefilereplace", 0, TQT_TQOBJECT(this), TQT_SLOT(showAboutApplication()), actionCollection(), "help_about_tdefilereplace"); (void)new TDEAction(i18n("&About TDEFileReplace"), "tdefilereplace", 0, TQT_TQOBJECT(this), TQT_SLOT(showAboutApplication()), actionCollection(), "help_about_tdefilereplace");
(void)new TDEAction(i18n("KFileReplace &Handbook"), "help", 0, TQT_TQOBJECT(this), TQT_SLOT(appHelpActivated()), actionCollection(), "help_tdefilereplace"); (void)new TDEAction(i18n("TDEFileReplace &Handbook"), "help", 0, TQT_TQOBJECT(this), TQT_SLOT(appHelpActivated()), actionCollection(), "help_tdefilereplace");
(void)new TDEAction(i18n("&Report Bug"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(reportBug()), actionCollection(), "report_bug"); (void)new TDEAction(i18n("&Report Bug"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(reportBug()), actionCollection(), "report_bug");
} }
void KFileReplacePart::initView() void TDEFileReplacePart::initView()
{ {
m_view = new KFileReplaceView(m_option, m_parentWidget, "view"); m_view = new TDEFileReplaceView(m_option, m_parentWidget, "view");
setWidget(m_view); setWidget(m_view);
@ -623,7 +623,7 @@ void KFileReplacePart::initView()
m_view->showSemaphore("green"); m_view->showSemaphore("green");
} }
void KFileReplacePart::freezeActions() void TDEFileReplacePart::freezeActions()
{ {
//Disables actions during search/replace operation //Disables actions during search/replace operation
actionCollection()->action("new_project")->setEnabled(false); actionCollection()->action("new_project")->setEnabled(false);
@ -661,7 +661,7 @@ void KFileReplacePart::freezeActions()
((TDEToggleAction* ) actionCollection()->action("options_regularexpressions"))->setChecked(false); ((TDEToggleAction* ) actionCollection()->action("options_regularexpressions"))->setChecked(false);
} }
void KFileReplacePart::loadOptionsFromRC() void TDEFileReplacePart::loadOptionsFromRC()
{ {
m_option = new RCOptions(); m_option = new RCOptions();
@ -674,7 +674,7 @@ void KFileReplacePart::loadOptionsFromRC()
loadBackupExtensionOptions(); loadBackupExtensionOptions();
} }
void KFileReplacePart::loadOptions() void TDEFileReplacePart::loadOptions()
{ {
m_config->setGroup("General Options"); m_config->setGroup("General Options");
@ -709,7 +709,7 @@ void KFileReplacePart::loadOptions()
m_option->m_askConfirmReplace = false; m_option->m_askConfirmReplace = false;
} }
void KFileReplacePart::loadFileSizeOptions() void TDEFileReplacePart::loadFileSizeOptions()
{ {
m_config->setGroup("Size options"); m_config->setGroup("Size options");
@ -717,7 +717,7 @@ void KFileReplacePart::loadFileSizeOptions()
m_option->m_maxSize = m_config->readNumEntry(rcMaxFileSize, FileSizeOption); m_option->m_maxSize = m_config->readNumEntry(rcMaxFileSize, FileSizeOption);
} }
void KFileReplacePart::loadDateAccessOptions() void TDEFileReplacePart::loadDateAccessOptions()
{ {
m_config->setGroup("Access options"); m_config->setGroup("Access options");
@ -726,7 +726,7 @@ void KFileReplacePart::loadDateAccessOptions()
m_option->m_maxDate = m_config->readEntry(rcMaxDate, AccessDateOption); m_option->m_maxDate = m_config->readEntry(rcMaxDate, AccessDateOption);
} }
void KFileReplacePart::loadOwnerOptions() void TDEFileReplacePart::loadOwnerOptions()
{ {
m_config->setGroup("Owner options"); m_config->setGroup("Owner options");
@ -752,7 +752,7 @@ void KFileReplacePart::loadOwnerOptions()
m_option->m_ownerGroupValue = ownerList[3]; m_option->m_ownerGroupValue = ownerList[3];
} }
void KFileReplacePart::loadLocationsList() void TDEFileReplacePart::loadLocationsList()
{ {
m_config->setGroup("Directories"); m_config->setGroup("Directories");
TQStringList locationsEntryList; TQStringList locationsEntryList;
@ -768,7 +768,7 @@ void KFileReplacePart::loadLocationsList()
m_option->m_directories = locationsEntryList; m_option->m_directories = locationsEntryList;
} }
void KFileReplacePart::loadFiltersList() void TDEFileReplacePart::loadFiltersList()
{ {
TQStringList filtersEntryList; TQStringList filtersEntryList;
@ -785,7 +785,7 @@ void KFileReplacePart::loadFiltersList()
m_option->m_filters = filtersEntryList; m_option->m_filters = filtersEntryList;
} }
void KFileReplacePart::loadBackupExtensionOptions() void TDEFileReplacePart::loadBackupExtensionOptions()
{ {
m_config->setGroup("Options"); m_config->setGroup("Options");
TQStringList bkList = TQStringList::split(',', TQStringList bkList = TQStringList::split(',',
@ -799,7 +799,7 @@ void KFileReplacePart::loadBackupExtensionOptions()
m_option->m_backupExtension = bkList[1]; m_option->m_backupExtension = bkList[1];
} }
void KFileReplacePart::saveOptionsToRC() void TDEFileReplacePart::saveOptionsToRC()
{ {
saveOptions(); saveOptions();
saveFileSizeOptions(); saveFileSizeOptions();
@ -810,7 +810,7 @@ void KFileReplacePart::saveOptionsToRC()
saveBackupExtensionOptions(); saveBackupExtensionOptions();
} }
void KFileReplacePart::saveOptions() void TDEFileReplacePart::saveOptions()
{ {
m_config->setGroup("General Options"); m_config->setGroup("General Options");
@ -841,7 +841,7 @@ void KFileReplacePart::saveOptions()
m_config->sync(); m_config->sync();
} }
void KFileReplacePart::saveFileSizeOptions() void TDEFileReplacePart::saveFileSizeOptions()
{ {
m_config->setGroup("Size options"); m_config->setGroup("Size options");
@ -851,7 +851,7 @@ void KFileReplacePart::saveFileSizeOptions()
m_config->sync(); m_config->sync();
} }
void KFileReplacePart::saveDateAccessOptions() void TDEFileReplacePart::saveDateAccessOptions()
{ {
m_config->setGroup("Access options"); m_config->setGroup("Access options");
@ -862,7 +862,7 @@ void KFileReplacePart::saveDateAccessOptions()
m_config->sync(); m_config->sync();
} }
void KFileReplacePart::saveOwnerOptions() void TDEFileReplacePart::saveOwnerOptions()
{ {
m_config->setGroup("Owner options"); m_config->setGroup("Owner options");
@ -895,7 +895,7 @@ void KFileReplacePart::saveOwnerOptions()
m_config->sync(); m_config->sync();
} }
void KFileReplacePart::saveLocationsList() void TDEFileReplacePart::saveLocationsList()
{ {
m_config->setGroup("Directories"); m_config->setGroup("Directories");
#if KDE_IS_VERSION(3,1,3) #if KDE_IS_VERSION(3,1,3)
@ -906,14 +906,14 @@ void KFileReplacePart::saveLocationsList()
m_config->sync(); m_config->sync();
} }
void KFileReplacePart::saveFiltersList() void TDEFileReplacePart::saveFiltersList()
{ {
m_config->setGroup("Filters"); m_config->setGroup("Filters");
m_config->writeEntry(rcFiltersList, m_option->m_filters); m_config->writeEntry(rcFiltersList, m_option->m_filters);
m_config->sync(); m_config->sync();
} }
void KFileReplacePart::saveBackupExtensionOptions() void TDEFileReplacePart::saveBackupExtensionOptions()
{ {
m_config->setGroup("Options"); m_config->setGroup("Options");
TQString bkOptions; TQString bkOptions;
@ -926,7 +926,7 @@ void KFileReplacePart::saveBackupExtensionOptions()
m_config->sync(); m_config->sync();
} }
void KFileReplacePart::fileReplace() void TDEFileReplacePart::fileReplace()
{ {
TQString directoryName = m_option->m_directories[0]; TQString directoryName = m_option->m_directories[0];
TQDir d(directoryName); TQDir d(directoryName);
@ -949,7 +949,7 @@ void KFileReplacePart::fileReplace()
break; break;
// Avoids files that not match requirements // Avoids files that not match requirements
if(!KFileReplaceLib::isAnAccessibleFile(d.canonicalPath(), fileName, m_option)) if(!TDEFileReplaceLib::isAnAccessibleFile(d.canonicalPath(), fileName, m_option))
continue; continue;
kapp->processEvents(); kapp->processEvents();
if(m_option->m_backup) if(m_option->m_backup)
@ -962,7 +962,7 @@ void KFileReplacePart::fileReplace()
} }
} }
void KFileReplacePart::recursiveFileReplace(const TQString& directoryName, int& filesNumber) void TDEFileReplacePart::recursiveFileReplace(const TQString& directoryName, int& filesNumber)
{ {
//if m_stop == true then interrupts recursion //if m_stop == true then interrupts recursion
if(m_stop) if(m_stop)
@ -987,7 +987,7 @@ void KFileReplacePart::recursiveFileReplace(const TQString& directoryName, int&
TQString fileName = (*filesIt); TQString fileName = (*filesIt);
// Avoids files that not match requirements // Avoids files that not match requirements
if(!KFileReplaceLib::isAnAccessibleFile(d.canonicalPath(),fileName, m_option)) if(!TDEFileReplaceLib::isAnAccessibleFile(d.canonicalPath(),fileName, m_option))
continue; continue;
TQString filePath = d.canonicalPath()+"/"+fileName; TQString filePath = d.canonicalPath()+"/"+fileName;
@ -1014,7 +1014,7 @@ void KFileReplacePart::recursiveFileReplace(const TQString& directoryName, int&
} }
} }
void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQString& oldFileName) void TDEFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQString& oldFileName)
{ {
//Creates a path string //Creates a path string
TQString oldPathString = currentDir+"/"+oldFileName; TQString oldPathString = currentDir+"/"+oldFileName;
@ -1033,7 +1033,7 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri
TQString line = currentStream.read(), TQString line = currentStream.read(),
backupLine = line; backupLine = line;
TQString backupSize = KFileReplaceLib::formatFileSize(currentFile.size()); TQString backupSize = TDEFileReplaceLib::formatFileSize(currentFile.size());
currentFile.close(); currentFile.close();
@ -1081,10 +1081,10 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri
if(atLeastOneStringFound && item/* && atLeastOneStringConfirmed*/) if(atLeastOneStringFound && item/* && atLeastOneStringConfirmed*/)
{ {
KFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+oldFileName); TDEFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+oldFileName);
item->setText(0,oldFileName); item->setText(0,oldFileName);
item->setText(1,currentDir); item->setText(1,currentDir);
TQString newSize = KFileReplaceLib::formatFileSize(oldFileInfo.size()); TQString newSize = TDEFileReplaceLib::formatFileSize(oldFileInfo.size());
if(!m_option->m_simulation) if(!m_option->m_simulation)
{ {
item->setText(2, backupSize); item->setText(2, backupSize);
@ -1102,7 +1102,7 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri
} }
} }
void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQString& oldFileName) void TDEFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQString& oldFileName)
{ {
TQString oldPathString = currentDir+"/"+oldFileName; TQString oldPathString = currentDir+"/"+oldFileName;
TQFile oldFile(oldPathString); TQFile oldFile(oldPathString);
@ -1114,7 +1114,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS
return ; return ;
} }
TQString fileSizeBeforeReplacing = KFileReplaceLib::formatFileSize(oldFileInfo.size()); TQString fileSizeBeforeReplacing = TDEFileReplaceLib::formatFileSize(oldFileInfo.size());
TDEListViewItem *item = 0; TDEListViewItem *item = 0;
TQTextStream oldStream( &oldFile ); TQTextStream oldStream( &oldFile );
@ -1153,7 +1153,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS
} }
TQFileInfo nf(oldPathString); TQFileInfo nf(oldPathString);
TQString fileSizeAfterReplacing = KFileReplaceLib::formatFileSize(nf.size()); TQString fileSizeAfterReplacing = TDEFileReplaceLib::formatFileSize(nf.size());
//if ignoreFiles == false then every files must be show //if ignoreFiles == false then every files must be show
if(!m_option->m_ignoreFiles) if(!m_option->m_ignoreFiles)
@ -1161,7 +1161,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS
if(atLeastOneStringFound && item/*&& atLeastOneStringConfirmed*/) if(atLeastOneStringFound && item/*&& atLeastOneStringConfirmed*/)
{ {
KFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+oldFileName); TDEFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+oldFileName);
item->setText(0,oldFileName); item->setText(0,oldFileName);
item->setText(1,currentDir); item->setText(1,currentDir);
item->setText(2,fileSizeBeforeReplacing); item->setText(2,fileSizeBeforeReplacing);
@ -1176,7 +1176,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS
} }
} }
void KFileReplacePart::replacingLoop(TQString& line, TDEListViewItem** item, bool& atLeastOneStringFound, int& occur, bool regularExpression, bool& askConfirmReplace) void TDEFileReplacePart::replacingLoop(TQString& line, TDEListViewItem** item, bool& atLeastOneStringFound, int& occur, bool regularExpression, bool& askConfirmReplace)
{ {
KeyValueMap tempMap = m_replacementMap; KeyValueMap tempMap = m_replacementMap;
KeyValueMap::Iterator it; KeyValueMap::Iterator it;
@ -1244,7 +1244,7 @@ void KFileReplacePart::replacingLoop(TQString& line, TDEListViewItem** item, boo
} }
} }
void KFileReplacePart::fileSearch(const TQString& directoryName, const TQString& filters) void TDEFileReplacePart::fileSearch(const TQString& directoryName, const TQString& filters)
{ {
TQDir d(directoryName); TQDir d(directoryName);
@ -1267,7 +1267,7 @@ void KFileReplacePart::fileSearch(const TQString& directoryName, const TQString&
TQString fileName = (*filesIt); TQString fileName = (*filesIt);
// Avoids files that not match // Avoids files that not match
if(!KFileReplaceLib::isAnAccessibleFile(filePath, fileName, m_option)) if(!TDEFileReplaceLib::isAnAccessibleFile(filePath, fileName, m_option))
continue; continue;
TQFileInfo fileInfo(filePath+"/"+fileName); TQFileInfo fileInfo(filePath+"/"+fileName);
@ -1280,7 +1280,7 @@ void KFileReplacePart::fileSearch(const TQString& directoryName, const TQString&
} }
} }
void KFileReplacePart::recursiveFileSearch(const TQString& directoryName, const TQString& filters, uint& filesNumber) void TDEFileReplacePart::recursiveFileSearch(const TQString& directoryName, const TQString& filters, uint& filesNumber)
{ {
// if m_stop == true then interrupt recursion // if m_stop == true then interrupt recursion
if(m_stop) if(m_stop)
@ -1304,7 +1304,7 @@ void KFileReplacePart::recursiveFileSearch(const TQString& directoryName, const
TQString fileName = (*filesIt); TQString fileName = (*filesIt);
// Avoids files that not match // Avoids files that not match
if(!KFileReplaceLib::isAnAccessibleFile(filePath, fileName, m_option)) if(!TDEFileReplaceLib::isAnAccessibleFile(filePath, fileName, m_option))
continue; continue;
// Composes file path string // Composes file path string
@ -1326,7 +1326,7 @@ void KFileReplacePart::recursiveFileSearch(const TQString& directoryName, const
} }
} }
void KFileReplacePart::search(const TQString& currentDir, const TQString& fileName) void TDEFileReplacePart::search(const TQString& currentDir, const TQString& fileName)
{ {
TQFile file(currentDir+"/"+fileName); TQFile file(currentDir+"/"+fileName);
@ -1470,17 +1470,17 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa
if(atLeastOneStringFound && item) if(atLeastOneStringFound && item)
{ {
KFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+fileName); TDEFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+fileName);
item->setText(0,fileName); item->setText(0,fileName);
item->setText(1,currentDir); item->setText(1,currentDir);
item->setText(2,KFileReplaceLib::formatFileSize(fileInfo.size())); item->setText(2,TDEFileReplaceLib::formatFileSize(fileInfo.size()));
item->setText(3,TQString::number(occurrence,10)); item->setText(3,TQString::number(occurrence,10));
item->setText(4,TQString("%1[%2]").arg(fileInfo.owner()).arg(fileInfo.ownerId())); item->setText(4,TQString("%1[%2]").arg(fileInfo.owner()).arg(fileInfo.ownerId()));
item->setText(5,TQString("%1[%2]").arg(fileInfo.group()).arg(fileInfo.groupId())); item->setText(5,TQString("%1[%2]").arg(fileInfo.group()).arg(fileInfo.groupId()));
} }
} }
void KFileReplacePart::loadViewContent() void TDEFileReplacePart::loadViewContent()
{ {
/* Maps the content of the strings view to a TQMap */ /* Maps the content of the strings view to a TQMap */
KeyValueMap tempMap; KeyValueMap tempMap;
@ -1499,7 +1499,7 @@ void KFileReplacePart::loadViewContent()
m_replacementMap = tempMap; m_replacementMap = tempMap;
} }
void KFileReplacePart::loadRulesFile(const TQString& fileName) void TDEFileReplacePart::loadRulesFile(const TQString& fileName)
{ {
/* Loads a file with kfr extension. /* Loads a file with kfr extension.
* creates a xml document and browses it*/ * creates a xml document and browses it*/
@ -1519,7 +1519,7 @@ void KFileReplacePart::loadRulesFile(const TQString& fileName)
KMessageBox::information(m_w, i18n("<qt>File <b>%1</b> seems not to be written in new kfr format. Remember that the old kfr format will be soon abandoned. You can convert your old rules files by simply saving them with tdefilereplace.</qt>").arg(fileName),i18n("Warning")); KMessageBox::information(m_w, i18n("<qt>File <b>%1</b> seems not to be written in new kfr format. Remember that the old kfr format will be soon abandoned. You can convert your old rules files by simply saving them with tdefilereplace.</qt>").arg(fileName),i18n("Warning"));
KFileReplaceLib::convertOldToNewKFRFormat(fileName, sv); TDEFileReplaceLib::convertOldToNewKFRFormat(fileName, sv);
return; return;
} }
@ -1583,7 +1583,7 @@ void KFileReplacePart::loadRulesFile(const TQString& fileName)
//resetActions(); //resetActions();
} }
bool KFileReplacePart::launchNewProjectDialog(const KURL & startURL) bool TDEFileReplacePart::launchNewProjectDialog(const KURL & startURL)
{ {
if(!startURL.isEmpty()) if(!startURL.isEmpty())
m_option->m_directories.prepend(startURL.path()); m_option->m_directories.prepend(startURL.path());
@ -1607,7 +1607,7 @@ bool KFileReplacePart::launchNewProjectDialog(const KURL & startURL)
return true; return true;
} }
void KFileReplacePart::setOptionMask() void TDEFileReplacePart::setOptionMask()
{ {
m_optionMask |= TQDir::Dirs; m_optionMask |= TQDir::Dirs;
@ -1618,7 +1618,7 @@ void KFileReplacePart::setOptionMask()
m_optionMask |= TQDir::NoSymLinks; m_optionMask |= TQDir::NoSymLinks;
} }
bool KFileReplacePart::checkBeforeOperation() bool TDEFileReplacePart::checkBeforeOperation()
{ {
loadViewContent(); loadViewContent();
TDEListView* sv = m_view->getStringsView(); TDEListView* sv = m_view->getStringsView();
@ -1657,7 +1657,7 @@ bool KFileReplacePart::checkBeforeOperation()
return true; return true;
} }
bool KFileReplacePart::dontAskAgain() bool TDEFileReplacePart::dontAskAgain()
{ {
m_config->setGroup("Notification Messages"); m_config->setGroup("Notification Messages");
TQString dontAskAgain = m_config->readEntry(rcDontAskAgain, "no"); TQString dontAskAgain = m_config->readEntry(rcDontAskAgain, "no");
@ -1667,7 +1667,7 @@ bool KFileReplacePart::dontAskAgain()
return false; return false;
} }
void KFileReplacePart::whatsThis() void TDEFileReplacePart::whatsThis()
{ {
actionCollection()->action("options_backup")->setWhatsThis(optionsBackupWhatthis); actionCollection()->action("options_backup")->setWhatsThis(optionsBackupWhatthis);
actionCollection()->action("options_case")->setWhatsThis(optionsCaseWhatthis); actionCollection()->action("options_case")->setWhatsThis(optionsCaseWhatthis);

@ -45,7 +45,7 @@ Comment[uk]=Засіб пакетного пошуку та заміни
Comment[zh_CN]=批量搜索替换工具 Comment[zh_CN]=批量搜索替换工具
Comment[zh_HK]=批次搜尋及取代工具 Comment[zh_HK]=批次搜尋及取代工具
Comment[zh_TW]=批次搜尋及取代工具 Comment[zh_TW]=批次搜尋及取代工具
Name=KFileReplace Name=TDEFileReplace
Name[hi]=के-फ़ाइल-रिप्लेस Name[hi]=के-फ़ाइल-रिप्लेस
Name[ne]=बदल्ने केडीई फाइल Name[ne]=बदल्ने केडीई फाइल
Name[pa]=ਕੇ-ਫਾਇਲ-ਬਦਲੋ Name[pa]=ਕੇ-ਫਾਇਲ-ਬਦਲੋ
@ -59,7 +59,7 @@ GenericName[bg]=Преглед на файловете за замяна
GenericName[ca]=Vista per a substituir fitxers GenericName[ca]=Vista per a substituir fitxers
GenericName[cs]=Nahrazení souborů GenericName[cs]=Nahrazení souborů
GenericName[da]=Filerstatningsvisning GenericName[da]=Filerstatningsvisning
GenericName[de]=KFileReplace GenericName[de]=TDEFileReplace
GenericName[el]=Προβολή αντικατάστασης αρχείου GenericName[el]=Προβολή αντικατάστασης αρχείου
GenericName[es]=Vista de reemplazo de archivo GenericName[es]=Vista de reemplazo de archivo
GenericName[et]=Failide asendamise vaade GenericName[et]=Failide asendamise vaade

@ -25,17 +25,17 @@ class TDEConfig;
// local // local
#include "configurationclasses.h" #include "configurationclasses.h"
class KFileReplaceView; class TDEFileReplaceView;
#define KFR_VERSION "0.8.1" #define KFR_VERSION "0.8.1"
class KFileReplacePart: public KParts::ReadOnlyPart class TDEFileReplacePart: public KParts::ReadOnlyPart
{ {
Q_OBJECT Q_OBJECT
private: //MEMBERS private: //MEMBERS
KFileReplaceView* m_view; TDEFileReplaceView* m_view;
TQWidget* m_parentWidget, TQWidget* m_parentWidget,
* m_w; * m_w;
TDEConfig* m_config; TDEConfig* m_config;
@ -47,12 +47,12 @@ class KFileReplacePart: public KParts::ReadOnlyPart
int m_optionMask; int m_optionMask;
public://Constructors public://Constructors
KFileReplacePart(TQWidget *parentWidget, TDEFileReplacePart(TQWidget *parentWidget,
const char *widgetName, const char *widgetName,
TQObject *parent, TQObject *parent,
const char *name, const char *name,
const TQStringList &args); const TQStringList &args);
~KFileReplacePart(); ~TDEFileReplacePart();
//SLOTS //SLOTS
private slots: private slots:
@ -157,4 +157,4 @@ class KFileReplacePart: public KParts::ReadOnlyPart
void whatsThis(); void whatsThis();
}; };
#endif// KFileReplacePart #endif// TDEFileReplacePart

@ -52,7 +52,7 @@
</Menu> </Menu>
</MenuBar> </MenuBar>
<ToolBar noMerge="1" name="mainToolBar"> <ToolBar noMerge="1" name="mainToolBar">
<text>KFileReplace Main Toolbar</text> <text>TDEFileReplace Main Toolbar</text>
<Action name="new_project" /> <Action name="new_project" />
<Action name="search"/> <Action name="search"/>
<Action name="file_simulate"/> <Action name="file_simulate"/>

@ -43,7 +43,7 @@
using namespace whatthisNameSpace; using namespace whatthisNameSpace;
KFileReplaceView::KFileReplaceView(RCOptions* info, TQWidget *parent,const char *name):KFileReplaceViewWdg(parent,name) TDEFileReplaceView::TDEFileReplaceView(RCOptions* info, TQWidget *parent,const char *name):TDEFileReplaceViewWdg(parent,name)
{ {
m_option = info; m_option = info;
@ -58,7 +58,7 @@ KFileReplaceView::KFileReplaceView(RCOptions* info, TQWidget *parent,const char
whatsThis(); whatsThis();
} }
TQString KFileReplaceView::currentPath() TQString TDEFileReplaceView::currentPath()
{ {
TQListViewItem *lvi; TQListViewItem *lvi;
@ -71,7 +71,7 @@ TQString KFileReplaceView::currentPath()
return TQString(lvi->text(1)+"/"+lvi->text(0)); return TQString(lvi->text(1)+"/"+lvi->text(0));
} }
void KFileReplaceView::showSemaphore(TQString s) void TDEFileReplaceView::showSemaphore(TQString s)
{ {
if(s == "green") if(s == "green")
{ {
@ -95,7 +95,7 @@ void KFileReplaceView::showSemaphore(TQString s)
} }
} }
void KFileReplaceView::stringsInvert(bool invertAll) void TDEFileReplaceView::stringsInvert(bool invertAll)
{ {
TQListViewItem* lviCurItem, TQListViewItem* lviCurItem,
* lviFirst; * lviFirst;
@ -131,7 +131,7 @@ void KFileReplaceView::stringsInvert(bool invertAll)
setCurrentStringsViewMap(); setCurrentStringsViewMap();
} }
void KFileReplaceView::changeView(bool searchingOnlyMode) void TDEFileReplaceView::changeView(bool searchingOnlyMode)
{ {
if(searchingOnlyMode) if(searchingOnlyMode)
{ {
@ -149,7 +149,7 @@ void KFileReplaceView::changeView(bool searchingOnlyMode)
} }
} }
TDEListView* KFileReplaceView::getResultsView() TDEListView* TDEFileReplaceView::getResultsView()
{ {
if(m_option->m_searchingOnlyMode) if(m_option->m_searchingOnlyMode)
m_rv = m_lvResults_2; m_rv = m_lvResults_2;
@ -159,7 +159,7 @@ TDEListView* KFileReplaceView::getResultsView()
return m_rv; return m_rv;
} }
TDEListView* KFileReplaceView::getStringsView() TDEListView* TDEFileReplaceView::getStringsView()
{ {
if(m_option->m_searchingOnlyMode) if(m_option->m_searchingOnlyMode)
m_sv = m_lvStrings_2; m_sv = m_lvStrings_2;
@ -169,7 +169,7 @@ TDEListView* KFileReplaceView::getStringsView()
} }
//PUBLIC SLOTS //PUBLIC SLOTS
void KFileReplaceView::slotMouseButtonClicked (int button, TQListViewItem *lvi, const TQPoint &pos) void TDEFileReplaceView::slotMouseButtonClicked (int button, TQListViewItem *lvi, const TQPoint &pos)
{ {
if (lvi == 0) // No item selected if (lvi == 0) // No item selected
return; return;
@ -182,7 +182,7 @@ void KFileReplaceView::slotMouseButtonClicked (int button, TQListViewItem *lvi,
} }
} }
void KFileReplaceView::slotResultProperties() void TDEFileReplaceView::slotResultProperties()
{ {
TQString currItem = currentPath(); TQString currItem = currentPath();
if(! currItem.isEmpty()) if(! currItem.isEmpty())
@ -193,7 +193,7 @@ void KFileReplaceView::slotResultProperties()
} }
} }
void KFileReplaceView::slotResultOpen() void TDEFileReplaceView::slotResultOpen()
{ {
TQString currItem = currentPath(); TQString currItem = currentPath();
if(!currItem.isEmpty()) if(!currItem.isEmpty())
@ -203,7 +203,7 @@ void KFileReplaceView::slotResultOpen()
} }
} }
void KFileReplaceView::slotResultOpenWith() void TDEFileReplaceView::slotResultOpenWith()
{ {
TQString currItem = currentPath(); TQString currItem = currentPath();
if(!currItem.isEmpty()) if(!currItem.isEmpty())
@ -215,7 +215,7 @@ void KFileReplaceView::slotResultOpenWith()
} }
} }
void KFileReplaceView::slotResultDirOpen() void TDEFileReplaceView::slotResultDirOpen()
{ {
TQString currItem = currentPath(); TQString currItem = currentPath();
if(!currItem.isEmpty()) if(!currItem.isEmpty())
@ -227,7 +227,7 @@ void KFileReplaceView::slotResultDirOpen()
} }
} }
void KFileReplaceView::slotResultEdit() void TDEFileReplaceView::slotResultEdit()
{ {
TQListViewItem *lvi = m_rv->firstChild(); TQListViewItem *lvi = m_rv->firstChild();
@ -272,7 +272,7 @@ void KFileReplaceView::slotResultEdit()
m_lviCurrent = 0; m_lviCurrent = 0;
} }
void KFileReplaceView::slotResultDelete() void TDEFileReplaceView::slotResultDelete()
{ {
TQString currItem = currentPath(); TQString currItem = currentPath();
if (!currItem.isEmpty()) if (!currItem.isEmpty())
@ -292,7 +292,7 @@ void KFileReplaceView::slotResultDelete()
} }
} }
void KFileReplaceView::slotResultTreeExpand() void TDEFileReplaceView::slotResultTreeExpand()
{ {
TQListViewItem *lviRoot = getResultsView()->firstChild(); TQListViewItem *lviRoot = getResultsView()->firstChild();
@ -300,7 +300,7 @@ void KFileReplaceView::slotResultTreeExpand()
expand(lviRoot, true); expand(lviRoot, true);
} }
void KFileReplaceView::slotResultTreeReduce() void TDEFileReplaceView::slotResultTreeReduce()
{ {
TQListViewItem *lviRoot = getResultsView()->firstChild(); TQListViewItem *lviRoot = getResultsView()->firstChild();
@ -308,7 +308,7 @@ void KFileReplaceView::slotResultTreeReduce()
expand(lviRoot, false); expand(lviRoot, false);
} }
void KFileReplaceView::slotStringsAdd() void TDEFileReplaceView::slotStringsAdd()
{ {
KeyValueMap oldMap(m_option->m_mapStringsView); KeyValueMap oldMap(m_option->m_mapStringsView);
@ -331,7 +331,7 @@ void KFileReplaceView::slotStringsAdd()
loadMapIntoView(addedStringsMap); loadMapIntoView(addedStringsMap);
} }
void KFileReplaceView::slotQuickStringsAdd(const TQString& quickSearch, const TQString& quickReplace) void TDEFileReplaceView::slotQuickStringsAdd(const TQString& quickSearch, const TQString& quickReplace)
{ {
if(!quickSearch.isEmpty()) if(!quickSearch.isEmpty())
{ {
@ -356,7 +356,7 @@ void KFileReplaceView::slotQuickStringsAdd(const TQString& quickSearch, const TQ
} }
} }
void KFileReplaceView::slotStringsEdit() void TDEFileReplaceView::slotStringsEdit()
{ {
KeyValueMap oldMap(m_option->m_mapStringsView); KeyValueMap oldMap(m_option->m_mapStringsView);
if(oldMap.isEmpty()) return; if(oldMap.isEmpty()) return;
@ -391,7 +391,7 @@ void KFileReplaceView::slotStringsEdit()
loadMapIntoView(newMap); loadMapIntoView(newMap);
} }
void KFileReplaceView::slotStringsSave() void TDEFileReplaceView::slotStringsSave()
{ {
// Check there are strings in the list // Check there are strings in the list
TDEListView* sv = getStringsView(); TDEListView* sv = getStringsView();
@ -422,14 +422,14 @@ void KFileReplaceView::slotStringsSave()
} }
// Selects the file where strings will be saved // Selects the file where strings will be saved
TQString menu = "*.kfr|" + i18n("KFileReplace Strings") + " (*.kfr)\n*|" + i18n("All Files") + " (*)"; TQString menu = "*.kfr|" + i18n("TDEFileReplace Strings") + " (*.kfr)\n*|" + i18n("All Files") + " (*)";
TQString fileName = KFileDialog::getSaveFileName(TQString(), menu, 0, i18n("Save Strings to File")); TQString fileName = KFileDialog::getSaveFileName(TQString(), menu, 0, i18n("Save Strings to File"));
if (fileName.isEmpty()) if (fileName.isEmpty())
return; return;
// Forces the extension to be "kfr" == KFileReplace extension // Forces the extension to be "kfr" == TDEFileReplace extension
fileName = KFileReplaceLib::addExtension(fileName, "kfr"); fileName = TDEFileReplaceLib::addExtension(fileName, "kfr");
TQFile file( fileName ); TQFile file( fileName );
if(!file.open( IO_WriteOnly )) if(!file.open( IO_WriteOnly ))
@ -445,7 +445,7 @@ void KFileReplaceView::slotStringsSave()
file.close(); file.close();
} }
void KFileReplaceView::slotStringsDeleteItem() void TDEFileReplaceView::slotStringsDeleteItem()
{ {
TQListViewItem* item = m_sv->currentItem(); TQListViewItem* item = m_sv->currentItem();
if(item != 0) if(item != 0)
@ -457,7 +457,7 @@ void KFileReplaceView::slotStringsDeleteItem()
} }
} }
void KFileReplaceView::slotStringsEmpty() void TDEFileReplaceView::slotStringsEmpty()
{ {
TQListViewItem * myChild = m_sv->firstChild(); TQListViewItem * myChild = m_sv->firstChild();
while( myChild ) while( myChild )
@ -471,7 +471,7 @@ void KFileReplaceView::slotStringsEmpty()
} }
//PRIVATE //PRIVATE
void KFileReplaceView::initGUI() void TDEFileReplaceView::initGUI()
{ {
m_option->m_searchingOnlyMode = true; m_option->m_searchingOnlyMode = true;
@ -534,7 +534,7 @@ void KFileReplaceView::initGUI()
raiseStringsView(); raiseStringsView();
} }
void KFileReplaceView::raiseStringsView() void TDEFileReplaceView::raiseStringsView()
{ {
if(m_option->m_searchingOnlyMode) if(m_option->m_searchingOnlyMode)
m_sv = m_lvStrings_2; m_sv = m_lvStrings_2;
@ -544,7 +544,7 @@ void KFileReplaceView::raiseStringsView()
m_stackStrings->raiseWidget(m_sv); m_stackStrings->raiseWidget(m_sv);
} }
void KFileReplaceView::raiseResultsView() void TDEFileReplaceView::raiseResultsView()
{ {
if(m_option->m_searchingOnlyMode) if(m_option->m_searchingOnlyMode)
m_rv = m_lvResults_2; m_rv = m_lvResults_2;
@ -554,7 +554,7 @@ void KFileReplaceView::raiseResultsView()
m_stackResults->raiseWidget(m_rv); m_stackResults->raiseWidget(m_rv);
} }
coord KFileReplaceView::extractWordCoordinates(TQListViewItem* lvi) coord TDEFileReplaceView::extractWordCoordinates(TQListViewItem* lvi)
{ {
//get coordinates of the first string of the current selected file //get coordinates of the first string of the current selected file
coord c; coord c;
@ -618,7 +618,7 @@ coord KFileReplaceView::extractWordCoordinates(TQListViewItem* lvi)
return c; return c;
} }
void KFileReplaceView::expand(TQListViewItem *lviCurrent, bool b) void TDEFileReplaceView::expand(TQListViewItem *lviCurrent, bool b)
{ {
// current item // current item
lviCurrent->setOpen(b); lviCurrent->setOpen(b);
@ -633,7 +633,7 @@ void KFileReplaceView::expand(TQListViewItem *lviCurrent, bool b)
} }
} }
void KFileReplaceView::setMap() void TDEFileReplaceView::setMap()
{ {
KeyValueMap map; KeyValueMap map;
TQListViewItem* i = m_sv->firstChild(); TQListViewItem* i = m_sv->firstChild();
@ -648,7 +648,7 @@ void KFileReplaceView::setMap()
m_option->m_mapStringsView = map; m_option->m_mapStringsView = map;
} }
void KFileReplaceView::loadMapIntoView(KeyValueMap map) void TDEFileReplaceView::loadMapIntoView(KeyValueMap map)
{ {
m_sv->clear(); m_sv->clear();
KeyValueMap::Iterator itMap; KeyValueMap::Iterator itMap;
@ -664,7 +664,7 @@ void KFileReplaceView::loadMapIntoView(KeyValueMap map)
} }
void KFileReplaceView::whatsThis() void TDEFileReplaceView::whatsThis()
{ {
TQWhatsThis::add(getResultsView(), lvResultWhatthis); TQWhatsThis::add(getResultsView(), lvResultWhatthis);
TQWhatsThis::add(getStringsView(), lvStringsWhatthis); TQWhatsThis::add(getStringsView(), lvStringsWhatthis);

@ -54,7 +54,7 @@ class coord
/** /**
* The view of KFilereplace. * The view of KFilereplace.
*/ */
class KFileReplaceView : public KFileReplaceViewWdg class TDEFileReplaceView : public TDEFileReplaceViewWdg
{ {
Q_OBJECT Q_OBJECT
@ -66,7 +66,7 @@ class KFileReplaceView : public KFileReplaceViewWdg
* m_sv; * m_sv;
public://Constructors public://Constructors
KFileReplaceView(RCOptions* info, TQWidget *parent,const char *name); TDEFileReplaceView(RCOptions* info, TQWidget *parent,const char *name);
public: public:
TQString currentPath(); TQString currentPath();

@ -1,8 +1,8 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>KFileReplaceViewWdg</class> <class>TDEFileReplaceViewWdg</class>
<widget class="TQWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>KFileReplaceViewWdg</cstring> <cstring>TDEFileReplaceViewWdg</cstring>
</property> </property>
<property name="geometry"> <property name="geometry">
<rect> <rect>

@ -25,7 +25,7 @@
namespace whatthisNameSpace namespace whatthisNameSpace
{ {
//KFileReplaceView messages //TDEFileReplaceView messages
const TQString lvResultWhatthis = i18n("Shows the statistics of your operations. Note that the columns content changes depending on what kind of operation you are performing."); const TQString lvResultWhatthis = i18n("Shows the statistics of your operations. Note that the columns content changes depending on what kind of operation you are performing.");
const TQString lvStringsWhatthis = i18n("Shows a list of strings to search for (and if you specified it, a list of strings to replace with). Use the \"add strings\" dialog to edit your string list or double click on a string."); const TQString lvStringsWhatthis = i18n("Shows a list of strings to search for (and if you specified it, a list of strings to replace with). Use the \"add strings\" dialog to edit your string list or double click on a string.");
@ -76,7 +76,7 @@ namespace whatthisNameSpace
const TQString chbConfirmStringsWhatthis = i18n("Enable this option if you want to be asked for single string replacement confirmation."); const TQString chbConfirmStringsWhatthis = i18n("Enable this option if you want to be asked for single string replacement confirmation.");
//KFileReplacePart //TDEFileReplacePart
const TQString fileSimulateWhatthis = i18n("Enable this option to perform replacing as a simulation, i.e. without make any changes in files."); const TQString fileSimulateWhatthis = i18n("Enable this option to perform replacing as a simulation, i.e. without make any changes in files.");
const TQString optionsRegularExpressionsWhatthis = chbRegularExpressionsWhatthis; const TQString optionsRegularExpressionsWhatthis = chbRegularExpressionsWhatthis;

Loading…
Cancel
Save