File: TestSeparatorIcon.py

package info (click to toggle)
cairo-dock 3.5.1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,936 kB
  • sloc: ansic: 55,359; sh: 2,037; python: 522; xml: 34; makefile: 10
file content (24 lines) | stat: -rw-r--r-- 843 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import os  # path
from Test import Test, key, set_param
from CairoDock import CairoDock

# Test separator
class TestSeparatorIcon(Test):
	def __init__(self, dock):
		Test.__init__(self, "Test separator icon", dock)
	
	def run(self):
		# add a new separator-icon
		conf_file = self.d.Add({'type':'Separator', 'order':'3'})
		if conf_file == None or conf_file == "" or not os.path.exists(conf_file):
			self.print_error ("Failed to add the separator")
		
		# remove the separator
		self.d.Remove('config-file='+conf_file)
		if len (self.d.GetProperties('config-file='+conf_file)) != 0:  # check that it has been deleted
			self.print_error ("Failed to remove the separator")
		
		if os.path.exists(conf_file):  # check that it has been removed from the theme
			self.print_error ("Failed to remove the separator from the theme")
		
		self.end()