Beispiel #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)
Beispiel #2
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)
Beispiel #3
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)
Beispiel #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)