summaryrefslogtreecommitdiffstats
path: root/kodo/main.cpp
blob: 518cd9c82d7c584a25d72a175a1a82c4c345e2f3 (plain)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
 * Mouspedometa
 *      Based on the original Xodometer VMS/Motif sources.
 *
 * Written by Armen Nakashian
 *            Compaq Computer Corporation
 *            Houston TX
 *            22 May 1998
 *
 * If you make improvements or enhancements to Mouspedometa, please send
 * them back to the author at any of the following addresses:
 *
 *              [email protected]
 *
 * Thanks to Mark Granoff for writing the original Xodometer, and
 * the whole KDE team for making such a nice environment to write
 * programs in.
 *
 *
 * This software is provided as is with no warranty of any kind,
 * expressed or implied. Neither Digital Equipment Corporation nor
 * Armen Nakashian will be held accountable for your use of this
 * software.
 */

/*
**  Xodometer
**  Written by Mark H. Granoff/mhg
**             Digital Equipment Corporation
**             Littleton, MA, USA
**             17 March 1993
**
**  If you make improvements or enhancements to Xodometer, please send them
**  back to the author at any of the following addresses:
**
**		[email protected]
**		[email protected]
**		[email protected]
**
**  Thanks to my friend and colleague Bob Harris for his suggestions and help.
**
**  This software is provided as is with no warranty of any kind, expressed or
**  implied. Neither Digital Equipment Corporation nor Mark Granoff will be
**  held accountable for your use of this software.
**
**  This software is released into the public domain and may be redistributed
**  freely provided that all source module headers remain intact in their
**  entirety, and that all components of this kit are redistributed together.
**
**  Modification History
**  --------------------
**  See ChangeLog
*/

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "kodometer.h"
#include <stdlib.h>

int main(int argc, char *argv[])
{
	/* Top level details */

	TDEAboutData *aboutData = new TDEAboutData("kodo",
		I18N_NOOP("KOdometer"), "3.2",
		I18N_NOOP("KOdometer measures your desktop mileage"),
		TDEAboutData::License_GPL,
		"(c) 1998, Armen Nakashian",
		I18N_NOOP("A mouse odometer"), 0,
		"[email protected]");
	aboutData->addAuthor("Armen Nakashian", 0,
		"[email protected]",
		"http://yawara.anime.net/kodo/");
	aboutData->addCredit("Gioele Barabucci",
		I18N_NOOP("KDE 2 porting and some code cleanups"),
		"[email protected]", "http://www.gioelebarabucci.com");
	TDECmdLineArgs::init( argc, argv, aboutData );

	if (!KUniqueApplication::start())
		exit(0);

	KUniqueApplication a;

	Kodometer *o = new Kodometer();

	// Get rid of the title bar.
	KWin::setType(o->winId(), NET::Override );
	KWin::setState(o->winId(), NET::Sticky);
	// FIXME is this a hack?
//	o->setGeometry(0, 0, 0, 0);
	a.setMainWidget(o);
	// is the following this needed?
	// a.setTopWidget(o);

	o->show();

	return a.exec();
}