summaryrefslogtreecommitdiffstats
path: root/tdefilereplace/main.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 01:06:46 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 01:06:46 -0600
commitef2264e9790ae7e700ad3cf5fb3dbad05efd98d8 (patch)
treeac4650a642d502c458d0b654c8b731739ce601dc /tdefilereplace/main.cpp
parenta32b928478b59d4fa8b8495bbad6864476c129b1 (diff)
downloadtdewebdev-ef2264e9790ae7e700ad3cf5fb3dbad05efd98d8.tar.gz
tdewebdev-ef2264e9790ae7e700ad3cf5fb3dbad05efd98d8.zip
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'tdefilereplace/main.cpp')
-rw-r--r--tdefilereplace/main.cpp77
1 files changed, 77 insertions, 0 deletions
diff --git a/tdefilereplace/main.cpp b/tdefilereplace/main.cpp
new file mode 100644
index 00000000..4b12eba0
--- /dev/null
+++ b/tdefilereplace/main.cpp
@@ -0,0 +1,77 @@
+/***************************************************************************
+ main.cpp - Main file for the KFileReplace shell
+ -------------------
+ begin : Thu Sep 16 14:14:09 2004
+ copyright : (C) 2004 by Andras Mantia <amantia@kde.org>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "tdefilereplace.h"
+
+#include <kapplication.h>
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+#include <klocale.h>
+
+static const char description[] =
+ I18N_NOOP("Batch search and replace tool");
+
+static const char version[] = "0.1";
+
+static KCmdLineOptions options[] =
+ {
+ { "+[PATH]", I18N_NOOP( "Starting folder" ), 0 },
+ KCmdLineLastOption
+ };
+
+int main(int argc, char *argv[])
+{
+ TDEAboutData about("tdefilereplace", I18N_NOOP("KFileReplace"), 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."),
+ "http://www.tdewebdev.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("Francois Dupou",
+ I18N_NOOP("Original author of the KFileReplace tool"),
+ "dupoux@dupoux.com");
+
+ TDECmdLineArgs::init(argc, argv, &about);
+ TDECmdLineArgs::addCmdLineOptions( options );
+
+ TDEApplication app;
+
+ // see if we are starting with session management
+ if (app.isRestored())
+ {
+ RESTORE(KFileReplace);
+ }
+ else
+ {
+ // no session.. just start up normally
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
+
+ KFileReplace *kfr = new KFileReplace;
+ kfr->show();
+
+ if (args->count() == 0)
+ {
+ kfr->openURL(KURL());
+ }
+ else
+ {
+ kfr->openURL(args->url(0));
+ }
+ args->clear();
+ }
+
+ return app.exec();
+}