KKBSwitch – keyboard layout indicator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.cpp 2.7KB

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