# Path: sunflower/plugins/file_list/file_list.py
# class Column:
# 	NAME = 0
# 	FORMATED_NAME = 1
# 	EXTENSION = 2
# 	SIZE = 3
# 	FORMATED_SIZE = 4
# 	MODE = 5
# 	FORMATED_MODE = 6
# 	TIME = 7
# 	FORMATED_TIME = 8
# 	IS_DIR = 9
# 	IS_PARENT_DIR = 10
# 	IS_LINK = 11
# 	COLOR = 12
# 	ICON = 13
# 	SELECTED = 14
# 	USER_ID = 15
# 	GROUP_ID = 16
# 	EMBLEMS = 17
# 	SORT_DATA = 18
# 
# Path: sunflower/plugins/file_list/plugin.py
# def register_plugin(application):
# 
# Path: sunflower/plugin_base/column_extension.py
# class ColumnExtension:
# 	"""Class used for extending item lists.
# 
# 	Object of this class is created for every tab individually
# 	and for this reason class parameters are higly discouraged
# 	unless you know what you are doing.
# 
# 	"""
# 
# 	def __init__(self, parent, store):
# 		self._parent = parent
# 		self._store = store
# 		self._column = None
# 
# 	def _create_column(self):
# 		"""Create column
# 
# 		For each column you create, you need to add property 'name': column.name = 'Column name'.
# 		This information will be used to store sorting and column order in
# 		configuration files.
# 
# 		"""
# 		pass
# 
# 	def get_column(self):
# 		"""Get column object to be added to the list"""
# 		return self._column
# 
# 	def get_sort_column(self):
# 		"""Get column sort number"""
# 		return None


from gi.repository import Gtk
from sunflower.plugins.file_list.file_list import Column
from sunflower.plugins.file_list.plugin import FileList
from sunflower.plugin_base.column_extension import ColumnExtension
		is_parent = store.get_value(selected_iter, Column.IS_PARENT_DIR)

		value = (store.get_value(selected_iter, Column.USER_ID), '')[is_parent]
		cell.set_property('text', str(value))

	def _create_column(self):
		"""Configure column"""
		BaseColumn._create_column(self)
		self._column.set_cell_data_func(self._cell_renderer, self.__set_cell_data)

	def _get_column_name(self):
		"""Returns column name"""
		return 'owner'

	def _get_column_title(self):
		"""Returns column title"""
		return _('Owner')

	def get_sort_column(self):
		"""Return sort column"""
		return Column.USER_ID


class GroupColumn(BaseColumn):
	"""Adds support for displaying group in item list"""

	def __set_cell_data(self, column, cell, store, selected_iter, data=None):
		"""Set column value"""
		is_parent = store.get_value(selected_iter, Column.IS_PARENT_DIR)


# Path: sunflower/plugins/file_list/file_list.py
# class Column:
# 	NAME = 0
# 	FORMATED_NAME = 1
# 	EXTENSION = 2
# 	SIZE = 3
# 	FORMATED_SIZE = 4
# 	MODE = 5
# 	FORMATED_MODE = 6
# 	TIME = 7
# 	FORMATED_TIME = 8
# 	IS_DIR = 9
# 	IS_PARENT_DIR = 10
# 	IS_LINK = 11
# 	COLOR = 12
# 	ICON = 13
# 	SELECTED = 14
# 	USER_ID = 15
# 	GROUP_ID = 16
# 	EMBLEMS = 17
# 	SORT_DATA = 18
# 
# Path: sunflower/plugins/file_list/plugin.py
# def register_plugin(application):
# 
# Path: sunflower/plugin_base/column_extension.py
# class ColumnExtension:
# 	"""Class used for extending item lists.
# 
# 	Object of this class is created for every tab individually
# 	and for this reason class parameters are higly discouraged
# 	unless you know what you are doing.
# 
# 	"""
# 
# 	def __init__(self, parent, store):
# 		self._parent = parent
# 		self._store = store
# 		self._column = None
# 
# 	def _create_column(self):
# 		"""Create column
# 
# 		For each column you create, you need to add property 'name': column.name = 'Column name'.
# 		This information will be used to store sorting and column order in
# 		configuration files.
# 
# 		"""
# 		pass
# 
# 	def get_column(self):
# 		"""Get column object to be added to the list"""
# 		return self._column
# 
# 	def get_sort_column(self):
# 		"""Get column sort number"""
# 		return None


# Path: sunflower/plugins/owner_column/plugin.py
from gi.repository import Gtk
from sunflower.plugins.file_list.file_list import Column
from sunflower.plugins.file_list.plugin import FileList
from sunflower.plugin_base.column_extension import ColumnExtension

		is_parent = store.get_value(selected_iter, Column.IS_PARENT_DIR)

		value = (store.get_value(selected_iter, Column.USER_ID), '')[is_parent]
		cell.set_property('text', str(value))

	def _create_column(self):
		"""Configure column"""
		BaseColumn._create_column(self)
		self._column.set_cell_data_func(self._cell_renderer, self.__set_cell_data)

	def _get_column_name(self):
		"""Returns column name"""
		return 'owner'

	def _get_column_title(self):
		"""Returns column title"""
		return _('Owner')

	def get_sort_column(self):
		"""Return sort column"""
		return Column.USER_ID


class GroupColumn(BaseColumn):
	"""Adds support for displaying group in item list"""

	def __set_cell_data(self, column, cell, store, selected_iter, data=None):
		"""Set column value"""
		is_parent = store.get_value(selected_iter, Column.IS_PARENT_DIR)


		value = (store.get_value(selected_iter, Column.GROUP_ID), '')[is_parent]