katemain.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include <kstandarddirs.h>
00021 #include <klocale.h>
00022 #include <kcmdlineargs.h>
00023 #include <kaboutdata.h>
00024 #include <kglobal.h>
00025 #include <kconfig.h>
00026 #include <kinstance.h>
00027
00028 #include "kateapp.h"
00029
00030 static KCmdLineOptions options[] =
00031 {
00032 { "n", I18N_NOOP("Start a new Kate process (off by default)"), 0 },
00033 { "w", I18N_NOOP("Open a new Kate window"), 0 },
00034 { "initplugin <argument>", I18N_NOOP("Allow Kate to be initialized by a plugin. You most probably have to specify a file too."),0},
00035 { "line <argument>", I18N_NOOP("Navigate to this line"), 0 },
00036 { "column <argument>", I18N_NOOP("Navigate to this column"), 0 },
00037 { "+file(s)", I18N_NOOP("Files to load"), 0 },
00038 KCmdLineLastOption
00039 };
00040
00041 extern "C" int kdemain( int argc, char **argv )
00042 {
00043 Kate::Document::setFileChangedDialogsActivated (true);
00044
00045 KAboutData aboutData ("kate", I18N_NOOP("Kate"), KATE_VERSION,
00046 I18N_NOOP( "Kate - Advanced Text Editor" ), KAboutData::License_LGPL_V2,
00047 I18N_NOOP( "(c) 2000-2003 The Kate Authors" ), 0, "http://kate.kde.org");
00048
00049 aboutData.addAuthor ("Christoph Cullmann", I18N_NOOP("Maintainer"), "cullmann@kde.org", "http://www.babylon2k.de");
00050 aboutData.addAuthor ("Anders Lund", I18N_NOOP("Core Developer"), "anders@alweb.dk", "http://www.alweb.dk");
00051 aboutData.addAuthor ("Joseph Wenninger", I18N_NOOP("Core Developer"), "jowenn@kde.org","http://stud3.tuwien.ac.at/~e9925371");
00052 aboutData.addAuthor ("Hamish Rodda",I18N_NOOP("Core Developer"), "meddie@yoyo.its.monash.edu.au");
00053 aboutData.addAuthor ("Waldo Bastian", I18N_NOOP( "The cool buffersystem" ), "bastian@kde.org" );
00054 aboutData.addAuthor ("Charles Samuels", I18N_NOOP("The Editing Commands"), "charles@kde.org");
00055 aboutData.addAuthor ("Matt Newell", I18N_NOOP("Testing, ..."), "newellm@proaxis.com");
00056 aboutData.addAuthor ("Michael Bartl", I18N_NOOP("Former Core Developer"), "michael.bartl1@chello.at");
00057 aboutData.addAuthor ("Michael McCallum", I18N_NOOP("Core Developer"), "gholam@xtra.co.nz");
00058 aboutData.addAuthor ("Jochen Wilhemly", I18N_NOOP( "KWrite Author" ), "digisnap@cs.tu-berlin.de" );
00059 aboutData.addAuthor ("Michael Koch",I18N_NOOP("KWrite port to KParts"), "koch@kde.org");
00060 aboutData.addAuthor ("Christian Gebauer", 0, "gebauer@kde.org" );
00061 aboutData.addAuthor ("Simon Hausmann", 0, "hausmann@kde.org" );
00062 aboutData.addAuthor ("Glen Parker",I18N_NOOP("KWrite Undo History, Kspell integration"), "glenebob@nwlink.com");
00063 aboutData.addAuthor ("Scott Manson",I18N_NOOP("KWrite XML Syntax highlighting support"), "sdmanson@alltel.net");
00064 aboutData.addAuthor ("John Firebaugh",I18N_NOOP("Patches and more"), "jfirebaugh@kde.org");
00065
00066 aboutData.addCredit ("Matteo Merli",I18N_NOOP("Highlighting for RPM Spec-Files, Perl, Diff and more"), "merlim@libero.it");
00067 aboutData.addCredit ("Rocky Scaletta",I18N_NOOP("Highlighting for VHDL"), "rocky@purdue.edu");
00068 aboutData.addCredit ("Yury Lebedev",I18N_NOOP("Highlighting for SQL"),"");
00069 aboutData.addCredit ("Chris Ross",I18N_NOOP("Highlighting for Ferite"),"");
00070 aboutData.addCredit ("Nick Roux",I18N_NOOP("Highlighting for ILERPG"),"");
00071 aboutData.addCredit ("Carsten Niehaus", I18N_NOOP("Highlighting for LaTeX"),"");
00072 aboutData.addCredit ("Per Wigren", I18N_NOOP("Highlighting for Makefiles, Python"),"");
00073 aboutData.addCredit ("Jan Fritz", I18N_NOOP("Highlighting for Python"),"");
00074 aboutData.addCredit ("Daniel Naber","","");
00075 aboutData.addCredit ("Roland Pabel",I18N_NOOP("Highlighting for Scheme"),"");
00076 aboutData.addCredit ("Cristi Dumitrescu",I18N_NOOP("PHP Keyword/Datatype list"),"");
00077 aboutData.addCredit ("Carsten Presser", I18N_NOOP("Betatest"), "mord-slime@gmx.de");
00078 aboutData.addCredit ("Jens Haupert", I18N_NOOP("Betatest"), "haupert@babylon2k.de");
00079 aboutData.addCredit ("Carsten Pfeiffer", I18N_NOOP("Very nice help"), "");
00080 aboutData.addCredit (I18N_NOOP("All people who have contributed and I have forgotten to mention"),"","");
00081
00082 aboutData.setTranslator(I18N_NOOP("_: NAME OF TRANSLATORS\nYour names"), I18N_NOOP("_: EMAIL OF TRANSLATORS\nYour emails"));
00083
00084 KCmdLineArgs::init (argc, argv, &aboutData);
00085 KCmdLineArgs::addCmdLineOptions (options);
00086 KateApp::addCmdLineOptions ();
00087 KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
00088
00089 bool newProcess = false;
00090 bool oldState = false;
00091
00092 if (args->isSet ("n"))
00093 newProcess = true;
00094
00095 if (newProcess)
00096 {
00097 KInstance instance (&aboutData);
00098
00099 KConfig *config = instance.config();
00100 config->setGroup("KDE");
00101 oldState = config->readBoolEntry("MultipleInstances",false);
00102 config->writeEntry("MultipleInstances",true);
00103 config->sync();
00104 }
00105
00106 KateApp app (newProcess, oldState);
00107 return app.exec();
00108 }
This file is part of the documentation for kate Library Version 3.2.3.