# Path: sunflower/common.py
# def get_cache_directory():
# 	"""Get full path to cache files for curring user."""
# 	if 'XDG_CACHE_HOME' in os.environ:
# 		result = os.path.abspath(os.environ['XDG_CACHE_HOME'])
# 	else:
# 		result = os.path.expanduser('~/.cache')
# 
# 	return result
# 
# def encode_file_name(file_name):
# 	"""Encode filename to bytes so it can be passed to GI APIs that expect a file name
# 	(and specify `filename` as their argument type in the GIR bindings)."""
# 	return str(file_name).encode('utf-8', 'surrogateescape')


import os
import sqlite3 as sql
from gi.repository import Gtk
from sunflower.common import get_cache_directory, encode_file_name
			'emblem-favorite',
			'emblem-generic',
			'emblem-important',
			'emblem-mail',
			'emblem-new',
			'emblem-package',
			'emblem-photos',
			'emblem-readonly',
			'emblem-shared',
			'emblem-symbolic-link',
			'emblem-synchronizing',
			'emblem-system',
			'emblem-unreadable',
			'emblem-urgent',
			'emblem-web'
		)

	def __init__(self, parent):
		self._parent = parent
		self._icon_manager = self._parent.icon_manager

		# connect to database
		self._connection = self._connect_to_database()

		# make sure we have tables to work with
		if not self._check_database():
			self._create_database()

	def _connect_to_database(self):
		"""Create a connection to database."""

# Path: sunflower/common.py
# def get_cache_directory():
# 	"""Get full path to cache files for curring user."""
# 	if 'XDG_CACHE_HOME' in os.environ:
# 		result = os.path.abspath(os.environ['XDG_CACHE_HOME'])
# 	else:
# 		result = os.path.expanduser('~/.cache')
# 
# 	return result
# 
# def encode_file_name(file_name):
# 	"""Encode filename to bytes so it can be passed to GI APIs that expect a file name
# 	(and specify `filename` as their argument type in the GIR bindings)."""
# 	return str(file_name).encode('utf-8', 'surrogateescape')


# Path: sunflower/emblems.py
import os
import sqlite3 as sql
from gi.repository import Gtk
from sunflower.common import get_cache_directory, encode_file_name

			'emblem-favorite',
			'emblem-generic',
			'emblem-important',
			'emblem-mail',
			'emblem-new',
			'emblem-package',
			'emblem-photos',
			'emblem-readonly',
			'emblem-shared',
			'emblem-symbolic-link',
			'emblem-synchronizing',
			'emblem-system',
			'emblem-unreadable',
			'emblem-urgent',
			'emblem-web'
		)

	def __init__(self, parent):
		self._parent = parent
		self._icon_manager = self._parent.icon_manager

		# connect to database
		self._connection = self._connect_to_database()

		# make sure we have tables to work with
		if not self._check_database():
			self._create_database()

	def _connect_to_database(self):
		"""Create a connection to database."""

		cache_directory = get_cache_directory()