~ubuntu-branches/ubuntu/lucid/kkbswitch/lucid

« back to all changes in this revision

Viewing changes to kkbswitch/main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Lior Kaplan
  • Date: 2005-09-07 02:01:14 UTC
  • Revision ID: james.westby@ubuntu.com-20050907020114-2wyo9eu21uihq86n
Tags: upstream-1.4.3
ImportĀ upstreamĀ versionĀ 1.4.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                          main.cpp  -  description
 
3
                             -------------------
 
4
    begin                : Sun Jul  1 21:57:08 EEST 2001
 
5
    copyright            : (C) 2001 by Leonid Zeitlin
 
6
    email                : lz@europe.com
 
7
 ***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
11
 *   This program is free software; you can redistribute it and/or modify  *
 
12
 *   it under the terms of the GNU General Public License as published by  *
 
13
 *   the Free Software Foundation; either version 2 of the License, or     *
 
14
 *   (at your option) any later version.                                   *
 
15
 *                                                                         *
 
16
 ***************************************************************************/
 
17
 
 
18
#include <kcmdlineargs.h>
 
19
#include <kaboutdata.h>
 
20
#include <klocale.h>
 
21
#include <stdlib.h>
 
22
 
 
23
//#include "kkbswitch.h"
 
24
#include "kbswitchapp.h"
 
25
 
 
26
static const char *description =
 
27
        I18N_NOOP("Keyboard Switch");
 
28
// INSERT A DESCRIPTION FOR YOUR APPLICATION HERE
 
29
        
 
30
        
 
31
static KCmdLineOptions options[] =
 
32
{
 
33
  { 0, 0, 0 }
 
34
  // INSERT YOUR COMMANDLINE OPTIONS HERE
 
35
};
 
36
 
 
37
//extern "C" int kdemain(int argc, char *argv[])
 
38
int main(int argc, char *argv[])
 
39
{
 
40
 
 
41
  KAboutData aboutData( "kkbswitch", I18N_NOOP("Keyboard Switch"),
 
42
    VERSION, description, KAboutData::License_GPL,
 
43
    "(c) 2001-2005 Leonid Zeitlin", 0, 0, "lz@europe.com");
 
44
  aboutData.addAuthor("Leonid Zeitlin", I18N_NOOP("Creator and maintainer"), "lz@europe.com");
 
45
  aboutData.addCredit("Mikhail Senin", I18N_NOOP("Default group config and per-window groups"),
 
46
    "m_senin@mail.ru");
 
47
  aboutData.addCredit("Rashid N. Achilov", I18N_NOOP("FreeBSD port, feature suggestions"), "achilov@granch.ru");
 
48
  aboutData.addCredit("Vadim Kriklivy (K&K Analitic)", I18N_NOOP("Feature suggestions, Ukrainian translation"),
 
49
    "analitic@vinnitsa.com");
 
50
  aboutData.addCredit("Sergey V Turchin", I18N_NOOP("Autostart patch"),"zerg@altlinux.org");
 
51
  aboutData.addCredit("Stergios Dramis", I18N_NOOP("Greek translation"), "sdramis@egnatia.ee.auth.gr");
 
52
  aboutData.addCredit("Michal Sulek", I18N_NOOP("Slovak translation"), "reloadshot@atlas.sk");
 
53
  KCmdLineArgs::init( argc, argv, &aboutData );
 
54
  KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
 
55
 
 
56
  if (!KUniqueApplication::start()) // starting a second instance - just exit
 
57
    exit(0);
 
58
 
 
59
  KBSwitchApp a;
 
60
#ifdef HAVE_LIBXKLAVIER
 
61
  //XklStartListen();
 
62
#endif
 
63
  if (XKeyboard::self()->xkbAvailable())
 
64
    return a.exec();
 
65
  else return -1;  
 
66
}