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

/***************************************************************************
 *                                                                         *
 *   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
16
#include <kuniqueapplication.h>
17 18
#include <kcmdlineargs.h>
#include <kaboutdata.h>
19 20
#include <kconfigbase.h>
#include <kconfig.h>
21 22
#include <klocale.h>
#include <kglobal.h>
23
#include <kconfiggroup.h>
24 25 26

#include "juk.h"

27 28
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");
29
static const char michael[]     = I18N_NOOP("Assistant super-hero, fixer of many things");
30
static const char georg[]       = I18N_NOOP("More KDE 4 porting efforts");
31 32 33
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");
34
static const char stephen[]     = I18N_NOOP("Track announcement popups");
35 36
static const char frerich[]     = I18N_NOOP("Automagic track data guessing, bugfixes");
static const char zack[]        = I18N_NOOP("More automagical things, now using MusicBrainz");
37
static const char adam[]        = I18N_NOOP("Co-conspirator in MusicBrainz wizardry");
38
static const char matthias[]    = I18N_NOOP("Friendly, neighborhood aRts guru");
Malcolm Hunter's avatar
Malcolm Hunter committed
39
static const char maks[]        = I18N_NOOP("Making JuK friendlier to people with\nterabytes of music");
40
static const char antonio[]     = I18N_NOOP("DCOP interface");
41
static const char allan[]       = I18N_NOOP("FLAC and MPC support");
Scott Wheeler's avatar
Scott Wheeler committed
42
static const char nathan[]      = I18N_NOOP("Album cover manager");
43
static const char pascal[]      = I18N_NOOP("Gimper of splash screen");
44
static const char laurent[]     = I18N_NOOP("Porting to KDE 4 when no one else was around");
45
static const char giorgos[]     = I18N_NOOP("Badly-needed tag editor bugfixes.");
46
static const char sandsmark[]   = I18N_NOOP("Last.fm scrobbling support.");
Michael Pyne's avatar
Michael Pyne committed
47
static const char sho[]         = I18N_NOOP("MPRIS2 Interface implementation.");
48

49 50
int main(int argc, char *argv[])
{
51
    KAboutData aboutData("juk", 0, ki18n("JuK"),
52 53
                         "3.8", ki18n(description), KAboutData::License_GPL,
                         ki18n("© 2002 - 2012, Scott Wheeler"), KLocalizedString(),
54
                         "http://developer.kde.org/~wheeler/juk.html");
Scott Wheeler's avatar
Scott Wheeler committed
55

56
    aboutData.addAuthor(ki18n("Scott Wheeler"), ki18n(scott), "wheeler@kde.org");
57
    aboutData.addAuthor(ki18n("Michael Pyne"), ki18n(michael), "mpyne@kde.org");
58
    aboutData.addCredit(ki18n("Γιώργος Κυλάφας (Giorgos Kylafas)"), ki18n(giorgos), "gekylafas@gmail.com");
59 60 61 62 63 64 65 66 67 68 69 70 71
    aboutData.addCredit(ki18n("Daniel Molkentin"), ki18n(daniel), "molkentin@kde.org");
    aboutData.addCredit(ki18n("Tim Jansen"), ki18n(tim), "tim@tjansen.de");
    aboutData.addCredit(ki18n("Stefan Asserhäll"), ki18n(stefan), "stefan.asserhall@telia.com");
    aboutData.addCredit(ki18n("Stephen Douglas"), ki18n(stephen), "stephen_douglas@yahoo.com");
    aboutData.addCredit(ki18n("Frerich Raabe"), ki18n(frerich), "raabe@kde.org");
    aboutData.addCredit(ki18n("Zack Rusin"), ki18n(zack), "zack@kde.org");
    aboutData.addCredit(ki18n("Adam Treat"), ki18n(adam), "manyoso@yahoo.com");
    aboutData.addCredit(ki18n("Matthias Kretz"), ki18n(matthias), "kretz@kde.org");
    aboutData.addCredit(ki18n("Maks Orlovich"), ki18n(maks), "maksim@kde.org");
    aboutData.addCredit(ki18n("Antonio Larrosa Jimenez"), ki18n(antonio), "larrosa@kde.org");
    aboutData.addCredit(ki18n("Allan Sandfeld Jensen"), ki18n(allan), "kde@carewolf.com");
    aboutData.addCredit(ki18n("Nathan Toone"), ki18n(nathan), "nathan@toonetown.com");
    aboutData.addCredit(ki18n("Pascal Klein"), ki18n(pascal), "4pascal@tpg.com.au");
72
    aboutData.addCredit(ki18n("Laurent Montel"), ki18n(laurent), "montel@kde.org");
73
    aboutData.addCredit(ki18n("Georg Grabler"), ki18n(georg), "georg@grabler.net");
74
    aboutData.addCredit(ki18n("Martin Sandsmark"), ki18n(sandsmark), "martin.sandsmark@kde.org");
Michael Pyne's avatar
Michael Pyne committed
75
    aboutData.addCredit(ki18n("Eike Hein"), ki18n(sho), "hein@kde.org");
76 77

    KCmdLineArgs::init(argc, argv, &aboutData);
78 79 80

    KCmdLineOptions options;
    options.add("+[file(s)]", ki18n("File(s) to open"));
81
    KCmdLineArgs::addCmdLineOptions(options);
82

83
    KUniqueApplication::addCmdLineOptions();
84

85
    KUniqueApplication a;
86

87 88 89 90 91
    // If this flag gets set then JuK will quit if you click the cover on the track
    // announcement popup when JuK is only in the system tray (the systray has no widget).

    a.setQuitOnLastWindowClosed(false);

Michael Pyne's avatar
Michael Pyne committed
92
    // Create the main window and such
93

94 95 96 97 98 99 100 101
    JuK *juk = new JuK;

    if(a.isSessionRestored() && KMainWindow::canBeRestored(1))
        juk->restore(1, false /* don't show */);

    KConfigGroup config(KGlobal::config(), "Settings");
    if(!config.readEntry("StartDocked", false))
        juk->show();
102

103
    return a.exec();
104
}
105

106
// vim: set et sw=4 tw=0 sta fileencoding=utf8: