OSDN Git Service

kcolorchooser: drop it
[kde/kde-extraapps.git] / kmix / apps / main.cpp
1 /*
2  * KMix -- KDE's full featured mini mixer
3  *
4  *
5  * Copyright (C) 2000 Stefan Schimanski <schimmi@kde.org>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this program; if not, write to the Free
19  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20  */
21
22 #include <kcmdlineargs.h>
23 #include <kaboutdata.h>
24 #include <kdebug.h>
25 #include <klocale.h>
26 #include <kglobal.h>
27 #include <kstandarddirs.h>
28
29 #include "KMixApp.h"
30 #include "core/version.h"
31
32 static const char description[] =
33 I18N_NOOP("KMix - KDE's full featured mini mixer");
34
35 int main(int argc, char *argv[])
36 {
37    KAboutData aboutData( "kmix", 0, ki18n("KMix"),
38                          APP_VERSION, ki18n(description), KAboutData::License_GPL,
39                          ki18n("(c) 1996-2013 The KMix Authors"));
40
41    // Author Policy: Long-term maintainers and backend writers/maintainers go in the Authors list.
42    aboutData.addAuthor(ki18n("Christian Esken")   , ki18n("Original author and current maintainer"), "esken@kde.org");
43    aboutData.addAuthor(ki18n("Helio Chissini de Castro"), ki18n("ALSA 0.9x port"), "helio@kde.org" );
44    aboutData.addAuthor(ki18n("Brian Hanson")      , ki18n("Solaris support"), "bhanson@hotmail.com");
45 // The initial support was for ALSA 0.5. The new code is not based on it IIRC.
46 // aboutData.addAuthor(ki18n("Nick Lopez")        , ki18n("Initial ALSA port"), "kimo_sabe@usa.net");
47
48    // Credit Policy: Authors who did a discrete part, like the Dataengine, OSD, help on specific platforms or soundcards.
49    aboutData.addCredit(ki18n("Igor Poboiko")      , ki18n("Plasma Dataengine"), "igor.poboiko@gmail.com");
50    aboutData.addCredit(ki18n("Stefan Schimanski") , ki18n("Temporary maintainer"), "schimmi@kde.org");
51    aboutData.addCredit(ki18n("Sebestyen Zoltan")  , ki18n("*BSD fixes"), "szoli@digo.inf.elte.hu");
52    aboutData.addCredit(ki18n("Lennart Augustsson"), ki18n("*BSD fixes"), "augustss@cs.chalmers.se");
53    aboutData.addCredit(ki18n("Nadeem Hasan")      , ki18n("Mute and volume preview, other fixes"), "nhasan@kde.org");
54    aboutData.addCredit(ki18n("Erwin Mascher")     , ki18n("Improving support for emu10k1 based soundcards"));
55    aboutData.addCredit(ki18n("Valentin Rusu")     , ki18n("TerraTec DMX6Fire support"), "kde@rusu.info");
56
57    KCmdLineArgs::init( argc, argv, &aboutData );
58
59    KCmdLineOptions options;
60    options.add("keepvisibility", ki18n("Inhibits the unhiding of the KMix main window, if KMix is already running."));
61    KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
62
63    KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
64    bool hasArgKeepvisibility = args->isSet("keepvisibility");
65    //kDebug(67100) <<  "hasArgKeepvisibility=" << hasArgKeepvisibility;
66    KMixApp::keepVisibility(hasArgKeepvisibility);
67
68    if (!KMixApp::start())
69        return 0;
70
71    KMixApp *app = new KMixApp();
72    int ret = app->exec();
73    delete app;
74    return ret;
75 }