From e2de64d6f1beb9e492daf5b886e19933c1fa41dd Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- juk/main.cpp | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 juk/main.cpp (limited to 'juk/main.cpp') diff --git a/juk/main.cpp b/juk/main.cpp new file mode 100644 index 00000000..7a0c53e3 --- /dev/null +++ b/juk/main.cpp @@ -0,0 +1,98 @@ +/*************************************************************************** + begin : Mon Feb 4 23:40:41 EST 2002 + copyright : (C) 2002 - 2004 by Scott Wheeler + : (C) 2006 - 2007 by Michael Pyne + email : wheeler@kde.org + : michael.pyne@kdemail.net +***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include + +#include "juk.h" + +static const char description[] = I18N_NOOP("Jukebox and music manager for KDE"); +static const char scott[] = I18N_NOOP("Author, chief dork and keeper of the funk"); +static const char michael[] = I18N_NOOP("Assistant super-hero, fixer of many things"); +static const char daniel[] = I18N_NOOP("System tray docking, \"inline\" tag editing,\nbug fixes, evangelism, moral support"); +static const char tim[] = I18N_NOOP("GStreamer port"); +static const char stefan[] = I18N_NOOP("Global keybindings support"); +static const char stephen[] = I18N_NOOP("Track announcement popups"); +static const char frerich[] = I18N_NOOP("Automagic track data guessing, bugfixes"); +static const char zack[] = I18N_NOOP("More automagical things, now using MusicBrainz"); +static const char adam[] = I18N_NOOP("Co-conspirator in MusicBrainz wizardry"); +static const char matthias[] = I18N_NOOP("Friendly, neighborhood aRts guru"); +static const char maks[] = I18N_NOOP("Making JuK friendlier to people with\nterabytes of music"); +static const char antonio[] = I18N_NOOP("DCOP interface"); +static const char allan[] = I18N_NOOP("FLAC and MPC support"); +static const char nathan[] = I18N_NOOP("Album cover manager"); +static const char pascal[] = I18N_NOOP("Gimper of splash screen"); + +static KCmdLineOptions options[] = +{ + { "+[file(s)]", I18N_NOOP("File(s) to open"), 0 }, + KCmdLineLastOption +}; + +int main(int argc, char *argv[]) +{ + KAboutData aboutData("juk", I18N_NOOP("JuK"), + "2.3.5", description, KAboutData::License_GPL, + "© 2002 - 2007, Scott Wheeler", 0, + "http://developer.kde.org/~wheeler/juk.html"); + + aboutData.addAuthor("Scott Wheeler", scott, "wheeler@kde.org"); + aboutData.addAuthor("Michael Pyne", michael, "michael.pyne@kdemail.net"); + aboutData.addCredit("Daniel Molkentin", daniel, "molkentin@kde.org"); + aboutData.addCredit("Tim Jansen", tim, "tim@tjansen.de"); + aboutData.addCredit("Stefan Asserhäll", stefan, "stefan.asserhall@telia.com"); + aboutData.addCredit("Stephen Douglas", stephen, "stephen_douglas@yahoo.com"); + aboutData.addCredit("Frerich Raabe", frerich, "raabe@kde.org"); + aboutData.addCredit("Zack Rusin", zack, "zack@kde.org"); + aboutData.addCredit("Adam Treat", adam, "manyoso@yahoo.com"); + aboutData.addCredit("Matthias Kretz", matthias, "kretz@kde.org"); + aboutData.addCredit("Maks Orlovich", maks, "maksim@kde.org"); + aboutData.addCredit("Antonio Larrosa Jimenez", antonio, "larrosa@kde.org"); + aboutData.addCredit("Allan Sandfeld Jensen", allan, "kde@carewolf.com"); + aboutData.addCredit("Nathan Toone", nathan, "nathan@toonetown.com"); + aboutData.addCredit("Pascal Klein", pascal, "4pascal@tpg.com.au"); + + KCmdLineArgs::init(argc, argv, &aboutData); + KCmdLineArgs::addCmdLineOptions(options); + + KUniqueApplication::addCmdLineOptions(); + + KUniqueApplication a; + + // Here we do some DCOP locking of sorts to prevent incoming DCOP calls + // before JuK has finished its initialization. + + a.dcopClient()->suspend(); + JuK *juk = new JuK; + a.dcopClient()->resume(); + + a.setMainWidget(juk); + + bool startDocked; + + KConfigGroup config(KGlobal::config(), "Settings"); + startDocked = config.readBoolEntry("StartDocked", false); + + if(!startDocked) + juk->show(); + + return a.exec(); +} -- cgit v1.2.1