You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
2.6 KiB
90 lines
2.6 KiB
15 years ago
|
/*
|
||
|
KDE Draw - a small graphics drawing program for the KDE.
|
||
|
Copyright (C) 1998 Thomas Tanghus (tanghus@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.
|
||
|
|
||
|
This program is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
GNU General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU General Public License
|
||
|
along with this program; if not, write to the Free Software
|
||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
|
// A lot of this code is lifted from KMail. Thanks, guys!
|
||
|
|
||
|
#include <stdlib.h>
|
||
|
|
||
12 years ago
|
#include <tdelocale.h>
|
||
12 years ago
|
#include <tdeconfig.h>
|
||
12 years ago
|
#include <tdeaboutdata.h>
|
||
|
#include <tdecmdlineargs.h>
|
||
15 years ago
|
#include <kdebug.h>
|
||
|
|
||
11 years ago
|
#include "tdeiconedit.h"
|
||
15 years ago
|
#include "config.h"
|
||
|
#include "properties.h"
|
||
|
|
||
|
static const char description[] =
|
||
13 years ago
|
I18N_NOOP("TDE Icon Editor");
|
||
15 years ago
|
|
||
12 years ago
|
static TDECmdLineOptions options[] =
|
||
15 years ago
|
{
|
||
|
{ "+[file(s)]" , I18N_NOOP("Icon file(s) to open"), 0 },
|
||
12 years ago
|
TDECmdLineLastOption
|
||
15 years ago
|
};
|
||
|
|
||
|
int main(int argc, char **argv)
|
||
|
{
|
||
11 years ago
|
TDEAboutData aboutData( "tdeiconedit", I18N_NOOP("TDEIconEdit"),
|
||
12 years ago
|
VERSION, description, TDEAboutData::License_GPL,
|
||
15 years ago
|
"(c) 1998, Thomas Tanghus");
|
||
|
|
||
|
aboutData.addAuthor("Thomas Tanghus",0, "tanghus@kde.org");
|
||
|
aboutData.addAuthor("John Califf",0, "jcaliff@compuzone.net");
|
||
|
aboutData.addAuthor("Laurent Montel",0, "lmontel@mandrakesoft.com");
|
||
|
aboutData.addAuthor("Aaron J. Seigo",0, "aseigo@olympusproject.org");
|
||
|
aboutData.addCredit( "Nadeem Hasan", "Rewrote UI to use XMLGUI\n"
|
||
|
"Lots of fixes and cleanup", "nhasan@nadmm.com" );
|
||
|
aboutData.addCredit( "Adrian Page", I18N_NOOP("Bug fixes and GUI tidy up"),
|
||
|
"Adrian.Page@tesco.net" );
|
||
12 years ago
|
TDECmdLineArgs::init( argc, argv, &aboutData );
|
||
|
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
|
||
15 years ago
|
|
||
12 years ago
|
TDEApplication a;
|
||
15 years ago
|
|
||
|
// setSignalHandler(signalHandler);
|
||
|
|
||
|
if (a.isRestored())
|
||
|
{
|
||
12 years ago
|
RESTORE(TDEIconEdit);
|
||
15 years ago
|
}
|
||
|
else
|
||
|
{
|
||
12 years ago
|
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
|
||
15 years ago
|
for(int i = 0; i < args->count(); i++)
|
||
|
{
|
||
11 years ago
|
TDEIconEdit *ki = new TDEIconEdit(args->url(i), "tdeiconedit");
|
||
13 years ago
|
TQ_CHECK_PTR(ki);
|
||
15 years ago
|
}
|
||
|
|
||
|
if (args->count() == 0)
|
||
|
{
|
||
12 years ago
|
TDEIconEdit *ki = new TDEIconEdit;
|
||
13 years ago
|
TQ_CHECK_PTR(ki);
|
||
15 years ago
|
}
|
||
|
args->clear();
|
||
|
}
|
||
|
|
||
|
int rc = a.exec();
|
||
12 years ago
|
delete TDEIconEditProperties::self();
|
||
15 years ago
|
return rc;
|
||
|
}
|
||
|
|