예제 #1
0
def load_icons(widget, path=BUILT_IN):
    """
	Loads iconset from provided path.
	
	widget - any Tk widget for tk interpreter call
	path - full path to iconset	
	"""
    if path == BUILT_IN:
        load_builtin_icons(widget)
        return
    icons = fs.get_files_tree(os.path.join(path, 'application'))
    _load_icons(widget, icons)
    icons = fs.get_files_tree(os.path.join(path, 'mimetypes'))
    _load_icons(widget, icons)
    sk1sdk.tkstyle.MIME_MAP = _load_mime_map(path)
예제 #2
0
파일: icons.py 프로젝트: kindlychung/sk1
def load_icons(widget,path=BUILT_IN):
	"""
	Loads iconset from provided path.
	
	widget - any Tk widget for tk interpreter call
	path - full path to iconset	
	"""
	if path==BUILT_IN:		
		load_builtin_icons(widget)
		return 
	icons=fs.get_files_tree(os.path.join(path,'application'))
	_load_icons(widget,icons)	
	icons=fs.get_files_tree(os.path.join(path,'mimetypes'))
	_load_icons(widget,icons)
	sk1sdk.tkstyle.MIME_MAP=_load_mime_map(path)
예제 #3
0
파일: themes.py 프로젝트: kindlychung/sk1
def _load_widget_templates(widget,path):
	"""
	Recursively loads PNG templates.
	
	widget - any tk widget for tcl interpreter call
	path - full path to templates	
	"""
	icons=fs.get_files_tree(path,'png')
	for icon in icons:
		item=os.path.basename(icon)[:-4]
		tkpng.load_icon(widget, icon, item)
예제 #4
0
def _load_widget_templates(widget, path):
    """
	Recursively loads PNG templates.
	
	widget - any tk widget for tcl interpreter call
	path - full path to templates	
	"""
    icons = fs.get_files_tree(path, 'png')
    for icon in icons:
        item = os.path.basename(icon)[:-4]
        tkpng.load_icon(widget, icon, item)