~ubuntu-branches/ubuntu/natty/kdemultimedia/natty-proposed

« back to all changes in this revision

Viewing changes to kmix/main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Debian Qt/KDE Maintainers
  • Date: 2011-05-26 02:41:36 UTC
  • mfrom: (0.2.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 108.
  • Revision ID: james.westby@ubuntu.com-20110526024136-jjwsigfy402jhupm
Tags: upstream-4.6.3
ImportĀ upstreamĀ versionĀ 4.6.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 "version.h"
31
 
 
32
 
static const char description[] =
33
 
I18N_NOOP("KMix - KDE's full featured mini mixer");
34
 
 
35
 
extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
36
 
{
37
 
   KAboutData aboutData( "kmix", 0, ki18n("KMix"),
38
 
                         APP_VERSION, ki18n(description), KAboutData::License_GPL,
39
 
                         ki18n("(c) 1996-2007 Christian Esken\n(c) 2000-2003 Stefan Schimanski\n(c) 2002-2005 Helio Chissini de Castro"));
40
 
 
41
 
   aboutData.addAuthor(ki18n("Christian Esken"), ki18n("Current maintainer"), "esken@kde.org");
42
 
   aboutData.addAuthor(ki18n("Helio Chissini de Castro"), ki18n("Co-maintainer, Alsa 0.9x port"), "helio@kde.org" );
43
 
   aboutData.addAuthor(ki18n("Brian Hanson")      , ki18n("Solaris port"), "bhanson@hotmail.com");
44
 
/* The SGI and HP/UX ports are not maintained anymore, and no official part of KMix anymore
45
 
   aboutData.addAuthor(ki18n("Paul Kendall")      , ki18n("SGI Port"), "paul@orion.co.nz");
46
 
   aboutData.addAuthor(ki18n("Helge Deller")      , ki18n("HP/UX port"), "deller@gmx.de");
47
 
*/
48
 
   aboutData.addCredit(ki18n("Stefan Schimanski") , ki18n("Temporary maintainer"), "schimmi@kde.org");
49
 
   aboutData.addCredit(ki18n("Erwin Mascher")     , ki18n("Improving support for emu10k1 based soundcards"));
50
 
   aboutData.addCredit(ki18n("Sebestyen Zoltan")  , ki18n("*BSD fixes"), "szoli@digo.inf.elte.hu");
51
 
   aboutData.addCredit(ki18n("Lennart Augustsson"), ki18n("*BSD fixes"), "augustss@cs.chalmers.se");
52
 
   aboutData.addCredit(ki18n("Nick Lopez")        , ki18n("ALSA port"), "kimo_sabe@usa.net");
53
 
   aboutData.addCredit(ki18n("Nadeem Hasan")      , ki18n("Mute and volume preview, other fixes"), "nhasan@kde.org");
54
 
 
55
 
   KCmdLineArgs::init( argc, argv, &aboutData );
56
 
 
57
 
   KCmdLineOptions options;
58
 
   options.add("keepvisibility", ki18n("Inhibits the unhiding of the KMix main window, if KMix is already running."));
59
 
   KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
60
 
   KUniqueApplication::addCmdLineOptions();
61
 
 
62
 
   KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
63
 
   bool hasArgKeepvisibility = args->isSet("keepvisibility");
64
 
   //kDebug(67100) <<  "hasArgKeepvisibility=" << hasArgKeepvisibility;
65
 
   KMixApp::keepVisibility(hasArgKeepvisibility);
66
 
 
67
 
   if (!KMixApp::start())
68
 
       return 0;
69
 
 
70
 
   KMixApp *app = new KMixApp();
71
 
   int ret = app->exec();
72
 
   delete app;
73
 
   return ret;
74
 
}