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