~ubuntu-branches/ubuntu/breezy/kdemultimedia/breezy

« back to all changes in this revision

Viewing changes to juk/main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-03-24 04:48:58 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050324044858-8ff88o9jxej6ii3d
Tags: 4:3.4.0-0ubuntu3
Add kubuntu_02_hide_arts_menu_entries.diff to hide artsbuilder and artscontrol k-menu entries

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
    begin                : Mon Feb  4 23:40:41 EST 2002
 
3
    copyright            : (C) 2002 - 2004 by Scott Wheeler
 
4
    email                : wheeler@kde.org
 
5
***************************************************************************/
 
6
 
 
7
/***************************************************************************
 
8
 *                                                                         *
 
9
 *   This program is free software; you can redistribute it and/or modify  *
 
10
 *   it under the terms of the GNU General Public License as published by  *
 
11
 *   the Free Software Foundation; either version 2 of the License, or     *
 
12
 *   (at your option) any later version.                                   *
 
13
 *                                                                         *
 
14
 ***************************************************************************/
 
15
 
 
16
#include <kuniqueapplication.h>
 
17
#include <kcmdlineargs.h>
 
18
#include <kaboutdata.h>
 
19
#include <dcopclient.h>
 
20
#include <kconfigbase.h>
 
21
#include <kconfig.h>
 
22
 
 
23
#include "juk.h"
 
24
 
 
25
static const char description[] = I18N_NOOP("Jukebox and music manager for KDE");
 
26
static const char scott[]       = I18N_NOOP("Author, chief dork and keeper of the funk");
 
27
static const char michael[]     = I18N_NOOP("Assistant super-hero, fixer of many things");
 
28
static const char daniel[]      = I18N_NOOP("System tray docking, \"inline\" tag editing,\nbug fixes, evangelism, moral support");
 
29
static const char tim[]         = I18N_NOOP("GStreamer port");
 
30
static const char stefan[]      = I18N_NOOP("Global keybindings support");
 
31
static const char stephen[]     = I18N_NOOP("Track announcement popups");
 
32
static const char frerich[]     = I18N_NOOP("Automagic track data guessing, bugfixes");
 
33
static const char zack[]        = I18N_NOOP("More automagical things, now using MusicBrainz");
 
34
static const char adam[]        = I18N_NOOP("Co-conspirator in MusicBrainz wizardry");
 
35
static const char matthias[]    = I18N_NOOP("Friendly, neighborhood aRts guru");
 
36
static const char maks[]        = I18N_NOOP("Making JuK friendlier to people with\nterabytes of music");
 
37
static const char antonio[]     = I18N_NOOP("DCOP interface");
 
38
static const char allan[]       = I18N_NOOP("FLAC and MPC support");
 
39
static const char nathan[]      = I18N_NOOP("Album cover manager");
 
40
 
 
41
static KCmdLineOptions options[] =
 
42
{
 
43
    { "+[file(s)]", I18N_NOOP("File(s) to open"), 0 },
 
44
    KCmdLineLastOption
 
45
};
 
46
 
 
47
int main(int argc, char *argv[])
 
48
{
 
49
    KAboutData aboutData("juk", I18N_NOOP("JuK"),
 
50
                         "2.2", description, KAboutData::License_GPL,
 
51
                         "(c) 2002 - 2005, Scott Wheeler", 0,
 
52
                         "http://developer.kde.org/~wheeler/juk.html");
 
53
 
 
54
    aboutData.addAuthor("Scott Wheeler", scott, "wheeler@kde.org");
 
55
    aboutData.addAuthor("Michael Pyne", michael, "michael.pyne@kdemail.net");
 
56
    aboutData.addCredit("Daniel Molkentin", daniel, "molkentin@kde.org");
 
57
    aboutData.addCredit("Tim Jansen", tim, "tim@tjansen.de");
 
58
    aboutData.addCredit("Stefan Asserhäll", stefan, "stefan.asserhall@telia.com");
 
59
    aboutData.addCredit("Stephen Douglas", stephen, "stephen_douglas@yahoo.com");
 
60
    aboutData.addCredit("Frerich Raabe", frerich, "raabe@kde.org");
 
61
    aboutData.addCredit("Zack Rusin", zack, "zack@kde.org");
 
62
    aboutData.addCredit("Adam Treat", adam, "manyoso@yahoo.com");
 
63
    aboutData.addCredit("Matthias Kretz", matthias, "kretz@kde.org");
 
64
    aboutData.addCredit("Maks Orlovich", maks, "maksim@kde.org");
 
65
    aboutData.addCredit("Antonio Larrosa Jimenez", antonio, "larrosa@kde.org");
 
66
    aboutData.addCredit("Allan Sandfeld Jensen", allan, "kde@carewolf.com");
 
67
    aboutData.addCredit("Nathan Toone", nathan, "nathan@toonetown.com");
 
68
 
 
69
    KCmdLineArgs::init(argc, argv, &aboutData);
 
70
    KCmdLineArgs::addCmdLineOptions(options);
 
71
 
 
72
    KUniqueApplication::addCmdLineOptions();
 
73
 
 
74
    KUniqueApplication a;
 
75
 
 
76
    // Here we do some DCOP locking of sorts to prevent incoming DCOP calls
 
77
    // before JuK has finished its initialization.
 
78
 
 
79
    a.dcopClient()->suspend();
 
80
    JuK *juk = new JuK;
 
81
    a.dcopClient()->resume();
 
82
 
 
83
    a.setMainWidget(juk);
 
84
 
 
85
    bool startDocked;
 
86
 
 
87
    KConfigGroup config(KGlobal::config(), "Settings");
 
88
    startDocked = config.readBoolEntry("StartDocked", false);
 
89
 
 
90
    if(!startDocked)
 
91
        juk->show();
 
92
 
 
93
    return a.exec();
 
94
}