diff options
author | Michele Calgaro <[email protected]> | 2020-06-13 22:45:28 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2020-06-13 22:45:28 +0900 |
commit | 5f44f7b187093ef290315b7f8766b540a31de35f (patch) | |
tree | 27ffb7b218199ca04f240c390c52426c65f45dce /src/app/main.cpp | |
download | codeine-5f44f7b187093ef290315b7f8766b540a31de35f.tar.gz codeine-5f44f7b187093ef290315b7f8766b540a31de35f.zip |
Initial code import from debian snapshot
https://snapshot.debian.org/package/codeine/1.0.1-3.dfsg-3.1/
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/app/main.cpp')
-rw-r--r-- | src/app/main.cpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp new file mode 100644 index 0000000..7c0f6fc --- /dev/null +++ b/src/app/main.cpp @@ -0,0 +1,52 @@ +// (c) 2004 Max Howell ([email protected]) +// See COPYING file for licensing information + +#include "codeine.h" +#include <kaboutdata.h> +#include <kapplication.h> +#include <kcmdlineargs.h> +#include "mainWindow.h" +#include <X11/Xlib.h> + + +static KAboutData aboutData( APP_NAME, + I18N_NOOP(PRETTY_NAME), APP_VERSION, + I18N_NOOP("A video player that has a usability focus"), KAboutData::License_GPL_V2, + I18N_NOOP("Copyright 2006, Max Howell"), 0, + "http://www.methylblue.com/codeine/", + "[email protected]" ); + +static const KCmdLineOptions options[] = { + { "+[URL]", I18N_NOOP( "Play 'URL'" ), 0 }, + { "play-dvd", I18N_NOOP( "Play DVD Video" ), 0 }, + { 0, 0, 0 } }; + +int +main( int argc, char **argv ) +{ + //we need to do this, says adrianS from SuSE + if( !XInitThreads() ) + return 1; + + aboutData.addCredit( "Mike Diehl", I18N_NOOP("Handbook") ); + aboutData.addCredit( "The Kaffeine Developers", I18N_NOOP("Great reference code") ); + aboutData.addCredit( "Eric Prydz", I18N_NOOP("The video for \"Call on Me\" encouraged plenty of debugging! ;)") ); + aboutData.addCredit( "David Vignoni", I18N_NOOP("The current Codeine icon") ); + aboutData.addCredit( "Ian Monroe", I18N_NOOP("Patches, advice and moral support") ); + + + KCmdLineArgs::init( argc, argv, &aboutData ); + KCmdLineArgs::addCmdLineOptions( options ); + + KApplication application; + int returnValue; + + { + Codeine::MainWindow mainWindow; + mainWindow.show(); + + returnValue = application.exec(); + } + + return returnValue; +} |