Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

main.cpp 3.22 KB
Newer Older
1 2 3 4 5
/***************************************************************************
                          main.cpp  -  description
                             -------------------
    begin                : Mon Feb  4 23:40:41 EST 2002
    copyright            : (C) 2002 by Scott Wheeler
6
    email                : wheeler@kde.org
7
***************************************************************************/
8 9 10 11 12 13 14 15 16 17

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

Scott Wheeler's avatar
Scott Wheeler committed
18
#include <kuniqueapplication.h>
19 20
#include <kcmdlineargs.h>
#include <kaboutdata.h>
21
#include <dcopclient.h>
22 23 24

#include "juk.h"

25 26 27 28 29 30 31 32
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 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 stephan[]     = 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");
33

34 35
static KCmdLineOptions options[] =
{
36
#ifndef NO_DEBUG
37
    { "norestore", I18N_NOOP("Restore playlists.  Use --norestore for debugging."), 0 },
38
#endif
39
    { "+[file(s)]", I18N_NOOP("File(s) to open"), 0 },
40
    { 0, 0, 0 }
41 42 43 44
};

int main(int argc, char *argv[])
{
45
    KAboutData aboutData("juk", I18N_NOOP("JuK"),
46
                         "1.90 (2.0 Pre-Alpha)", description, KAboutData::License_GPL,
47
                         "(c) 2002, 2003, Scott Wheeler", 0, "http://www.slackorama.net/oss/juk/");
Scott Wheeler's avatar
Scott Wheeler committed
48 49 50

    aboutData.addAuthor("Scott Wheeler", scott, "wheeler@kde.org");
    aboutData.addCredit("Daniel Molkentin", daniel, "molkentin@kde.org");
51
    aboutData.addCredit("Tim Jansen", tim, "tim@tjansen.de");
Scott Wheeler's avatar
Scott Wheeler committed
52
    aboutData.addCredit("Stefan Asserhäll", stefan, "stefan.asserhall@telia.com");
53
    aboutData.addCredit("Stephan Douglas", stephan, "stephen_douglas@yahoo.com");
54
    aboutData.addCredit("Frerich Raabe", frerich, "raabe@kde.org");
Scott Wheeler's avatar
Scott Wheeler committed
55
    aboutData.addCredit("Zack Rusin", zack, "zack@kde.org");
56 57 58

    KCmdLineArgs::init(argc, argv, &aboutData);
    KCmdLineArgs::addCmdLineOptions(options);
59

60
    KUniqueApplication::addCmdLineOptions();
61

62
    KUniqueApplication a;
63 64 65 66 67

    // Here we do some DCOP locking of sorts to prevent incoming DCOP calls
    // before JuK has finished its initialization.
    
    a.dcopClient()->suspend();
68
    JuK *juk = new JuK();
69 70
    a.dcopClient()->resume();

71 72
    a.setMainWidget(juk);
    juk->show();
73

74
    return a.exec();
75
}