diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 4aed2c8219774f5d797760606b8489a92ddc5163 (patch) | |
tree | 3f8c130f7d269626bf6a9447407ef6c35954426a /kfind/main.cpp | |
download | tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfind/main.cpp')
-rw-r--r-- | kfind/main.cpp | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/kfind/main.cpp b/kfind/main.cpp new file mode 100644 index 000000000..a92f0ddcd --- /dev/null +++ b/kfind/main.cpp @@ -0,0 +1,65 @@ +#include <qdir.h> +#include <qfile.h> + +#include <kapplication.h> +#include <klocale.h> +#include <kcmdlineargs.h> +#include <kaboutdata.h> +#include <kopenwith.h> + +#include "kfinddlg.h" +#include "version.h" + +static const char description[] = + I18N_NOOP("KDE file find utility"); + +static KCmdLineOptions options[] = +{ + { "+[searchpath]", I18N_NOOP("Path(s) to search"), 0 }, + KCmdLineLastOption +}; + +int main( int argc, char ** argv ) +{ + KLocale::setMainCatalogue("kfindpart"); + KAboutData aboutData( "kfind", I18N_NOOP("KFind"), + KFIND_VERSION, description, KAboutData::License_GPL, + I18N_NOOP("(c) 1998-2003, The KDE Developers")); + + aboutData.addAuthor("Eric Coquelle", I18N_NOOP("Current Maintainer"), "[email protected]"); + aboutData.addAuthor("Mark W. Webb", I18N_NOOP("Developer"), "[email protected]"); + aboutData.addAuthor("Beppe Grimaldi", I18N_NOOP("UI Design & more search options"), "[email protected]"); + aboutData.addAuthor("Martin Hartig"); + aboutData.addAuthor("Stephan Kulow", 0, "[email protected]"); + aboutData.addAuthor("Mario Weilguni",0, "[email protected]"); + aboutData.addAuthor("Alex Zepeda",0, "[email protected]"); + aboutData.addAuthor("Miroslav Fl�r",0, "[email protected]"); + aboutData.addAuthor("Harri Porten",0, "[email protected]"); + aboutData.addAuthor("Dima Rogozin",0, "[email protected]"); + aboutData.addAuthor("Carsten Pfeiffer",0, "[email protected]"); + aboutData.addAuthor("Hans Petter Bieker", 0, "[email protected]"); + aboutData.addAuthor("Waldo Bastian", I18N_NOOP("UI Design"), "[email protected]"); + aboutData.addAuthor("Alexander Neundorf", 0, "[email protected]"); + aboutData.addAuthor("Clarence Dang", 0, "[email protected]"); + + KCmdLineArgs::init( argc, argv, &aboutData ); + KCmdLineArgs::addCmdLineOptions( options ); + + KApplication app; + + KCmdLineArgs *args= KCmdLineArgs::parsedArgs(); + + KURL url; + if (args->count() > 0) + url = args->url(0); + if (url.isEmpty()) + url = QDir::currentDirPath(); + if (url.isEmpty()) + url = QDir::homeDirPath(); + args->clear(); + + KfindDlg kfinddlg(url, 0, "dialog"); + return kfinddlg.exec(); +} + + |