SVN_SILENT made messages (.desktop file)
[kdegraphics.git] / kolourpaint / kolourpaint.cpp
blob3e0036e833f8b837cacf8a61bf6e8a754233a3c4
2 /*
3 Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
4 All rights reserved.
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions
8 are met:
10 1. Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
16 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #include <kaboutdata.h>
30 #include <kapplication.h>
31 #include <kcmdlineargs.h>
32 #include <kdebug.h>
33 #include <kimageio.h>
34 #include <klocale.h>
35 #include <KMessageBox>
37 #include <kpDefs.h>
38 #include <kpMainWindow.h>
40 #include <kolourpaintlicense.h>
41 #include <kolourpaintversion.h>
44 int main (int argc, char *argv [])
46 KAboutData aboutData
48 "kolourpaint", 0,
49 ki18n ("KolourPaint"),
50 kpVersionText,
51 ki18n ("Paint Program for KDE"),
52 KAboutData::License_Custom,
53 ki18n (0/*copyright statement - see license instead*/),
54 ki18n ("To obtain support, please visit the website."),
55 "http://www.kolourpaint.org/"
58 // (this is _not_ the same as KAboutData::License_BSD)
59 aboutData.setLicenseText (ki18n (kpLicenseText));
62 // Please add yourself here if you feel you're missing.
63 // SYNC: with AUTHORS
65 aboutData.addAuthor (ki18n ("Clarence Dang"), ki18n ("Project Founder"), "dang@kde.org");
66 aboutData.addAuthor (ki18n ("Thurston Dang"), ki18n ("Chief Investigator"),
67 "thurston_dang@users.sourceforge.net");
68 aboutData.addAuthor (ki18n ("Kristof Borrey"), ki18n ("Icons"), "borrey@kde.org");
69 aboutData.addAuthor (ki18n ("Kazuki Ohta"), ki18n ("InputMethod Support"), "mover@hct.zaq.ne.jp");
70 aboutData.addAuthor (ki18n ("Nuno Pinheiro"), ki18n ("Icons"), "nf.pinheiro@gmail.com");
71 aboutData.addAuthor (ki18n ("Danny Allen"), ki18n ("Icons"), "dannya40uk@yahoo.co.uk");
72 aboutData.addAuthor (ki18n ("Mike Gashler"), ki18n ("Image Effects"), "gashlerm@yahoo.com");
74 aboutData.addAuthor (ki18n ("Laurent Montel"), ki18n ("KDE 4 Porting"), "montel@kde.org");
76 // TODO: missing a lot of people who helped with the KDE 4 port.
77 aboutData.addAuthor (ki18n ("Martin Koller"), ki18n ("Scanning Support"), "m.koller@surfeu.at");
80 aboutData.addCredit (ki18n ("Thanks to the many others who have helped to make this program possible."));
83 KCmdLineArgs::init (argc, argv, &aboutData);
85 KCmdLineOptions cmdLineOptions;
86 cmdLineOptions.add ("+[file]", ki18n ("Image file to open"));
87 KCmdLineArgs::addCmdLineOptions (cmdLineOptions);
89 kpPixmapFX::initPre ();
91 KApplication app;
93 kpPixmapFX::initPost ();
96 if (app.isSessionRestored ())
98 // Creates a kpMainWindow using the default constructor and then
99 // calls kpMainWindow::readProperties().
100 RESTORE (kpMainWindow)
102 else
104 kpMainWindow *mainWindow;
105 KCmdLineArgs *args = KCmdLineArgs::parsedArgs ();
107 if (args->count () >= 1)
109 for (int i = 0; i < args->count (); i++)
111 mainWindow = new kpMainWindow (args->url (i));
112 mainWindow->show ();
115 else
117 mainWindow = new kpMainWindow ();
118 mainWindow->show ();
121 args->clear ();
125 return app.exec ();