~helene-verhaeghe27/cairo-dock-core/bugfix

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
#!/usr/bin/env python
#
# Note: these tests need to be run with the default theme.
# The best way to do that is:
#   rm -rf ~/test
#   unset DESKTOP_SESSION
#   cairo-dock -T -d ~/test
#
# They also require 'xdotool'
#
# Usage: ./main.y [name of a test]
# In 'config.py', you can adjust some variables to fit your environment

import sys  # argv

from TestLauncher import TestLauncher
from TestCustomLauncher import TestCustomLauncher
from TestDockManager import TestDockManager
from TestModules import TestModules
from TestRootDock import TestRootDock, TestRootDock2
from TestSeparatorIcon import TestSeparatorIcon
from TestStackIcon import TestStackIcon
from TestTaskbar import TestTaskbar, TestTaskbar2
from TestIconManager import TestIconManager
from TestDesklet import TestDesklet

from CairoDock import CairoDock
dock = CairoDock()


if __name__ == '__main__':
	if len(sys.argv) > 1:  # run the selected test
		if sys.argv[1] == "TestLauncher":
			TestLauncher(dock).run()
		elif sys.argv[1] == "TestCustomLauncher":
			TestCustomLauncher(dock).run()
		elif sys.argv[1] == "TestModules":
			TestModules(dock).run()
		elif sys.argv[1] == "TestStackIcon":
			TestStackIcon(dock).run()
		elif sys.argv[1] == "TestSeparatorIcon":
			TestSeparatorIcon(dock).run()
		elif sys.argv[1] == "TestRootDock":
			TestRootDock(dock).run()
		elif sys.argv[1] == "TestRootDock2":
			TestRootDock2(dock).run()
		elif sys.argv[1] == "TestTaskbar":
			TestTaskbar(dock).run()
		elif sys.argv[1] == "TestTaskbar2":
			TestTaskbar2(dock).run()
		elif sys.argv[1] == "TestDockManager":
			TestDockManager(dock).run()
		elif sys.argv[1] == "TestIconManager":
			TestIconManager(dock).run()
		elif sys.argv[1] == "TestDesklet":
			TestDesklet(dock).run()
		else:
			print ("Unknown test")
	else:  # run them all
		TestLauncher(dock).run()
		TestCustomLauncher(dock).run()
		TestModules(dock).run()
		TestStackIcon(dock).run()
		TestSeparatorIcon(dock).run()
		TestRootDock(dock).run()
		TestRootDock2(dock).run()
		TestTaskbar(dock).run()
		TestTaskbar2(dock).run()
		TestDockManager(dock).run()
		TestIconManager(dock).run()
		TestDesklet(dock).run()