# Path: sunflower/common.py
# class SizeFormat:
# 	LOCAL = 0
# 	SI = 1
# 	IEC = 2
# 
# 	multiplier = {
# 			SI: 1000.0,
# 			IEC: 1024.0
# 		}
# 	unit_names = {
# 			SI: ['B','kB','MB','GB','TB'],
# 			IEC: ['B','KiB','MiB','GiB','TiB']
# 		}
# 
# Path: sunflower/widgets/settings_page.py
# class SettingsPage(Gtk.ScrolledWindow):
# 	"""Abstract class used to build pages in preferences window."""
# 
# 	def __init__(self, parent, application, name, title):
# 		Gtk.ScrolledWindow.__init__(self)
# 
# 		self._parent = parent
# 		self._application = application
# 		self._page_name = name
# 		self._page_title = title
# 
# 		# configure main container
# 		self._box = Gtk.VBox.new(False, 0)
# 		self._box.set_spacing(15)
# 		self._box.set_border_width(15)
# 
# 		# add page to preferences window
# 		self.add(self._box)
# 		self._parent.add_tab(self._page_name, self._page_title, self)
# 
# 	def _create_section(self, title, container):
# 		"""Create widget section with title."""
# 		box = Gtk.VBox.new(False, 0)
# 
# 		# create section title
# 		label_title = Gtk.Label.new('<big>{}</big>'.format(title))
# 		label_title.set_alignment(0, 0.5)
# 		label_title.set_use_markup(True)
# 		box.pack_start(label_title, True, False, 0)
# 		box.pack_start(Gtk.Separator.new(Gtk.Orientation.HORIZONTAL), True, False, 0)
# 
# 		# pack container
# 		box.pack_start(container, True, False, 0)
# 		container.set_border_width(10)
# 		self._box.pack_start(box, False, False, 0)
# 
# 	def _create_radio_section(self, title, container, group=None):
# 		"""Create section which contains radio button and return radio button."""
# 		box = Gtk.VBox.new(False, 0)
# 
# 		# create section title
# 		label_title = Gtk.Label.new('<big>{}</big>'.format(title))
# 		label_title.set_alignment(0, 0.5)
# 		label_title.set_use_markup(True)
# 		radio_title = Gtk.RadioButton.new_from_widget(group)
# 		radio_title.add(label_title)
# 		box.pack_start(radio_title, True, False, 0)
# 		box.pack_start(Gtk.Separator.new(Gtk.Orientation.HORIZONTAL), True, False, 0)
# 
# 		# pack container
# 		box.pack_start(container, True, False, 0)
# 		container.set_border_width(10)
# 		self._box.pack_start(box, False, False, 0)
# 
# 		return radio_title
# 
# 	def _load_options(self):
# 		"""Load options and update interface"""
# 		pass
# 
# 	def _save_options(self):
# 		"""Method called when save button is clicked"""
# 		pass
# 
# 	def pack_start(self, *args, **kwargs):
# 		"""Pack things in container."""
# 		self._box.pack_start(*args, **kwargs)
# 
# 	def pack_end(self, *args, **kwargs):
# 		"""Pack things in container."""
# 		self._box.pack_end(*args, **kwargs)


from gi.repository import Gtk
from sunflower.common import SizeFormat
from sunflower.widgets.settings_page import SettingsPage
		list_expand_tab.append((_('All'), TabExpand.ALL))

		cell_expand_tab = Gtk.CellRendererText()

		self._combobox_expand_tabs = Gtk.ComboBox(model=list_expand_tab)
		self._combobox_expand_tabs.connect('changed', self._parent.enable_save)
		self._combobox_expand_tabs.pack_start(cell_expand_tab, True)
		self._combobox_expand_tabs.add_attribute(cell_expand_tab, 'text', 0)

		# other options
		vbox_other = Gtk.VBox(False, 0)
		self._create_section(_('Other'), vbox_other)

		self._checkbox_hide_window_on_minimize = Gtk.CheckButton(_('Hide operation window on minimize'))
		self._checkbox_show_notifications = Gtk.CheckButton(_('Show notifications'))
		self._checkbox_show_notifications.set_sensitive(self._application.notification_manager.available)
		self._checkbox_network_path_completion = Gtk.CheckButton(_('Use path completion on non-local paths'))

		self._checkbox_hide_window_on_minimize.connect('toggled', self._parent.enable_save)
		self._checkbox_show_notifications.connect('toggled', self._parent.enable_save)
		self._checkbox_network_path_completion.connect('toggled', self._parent.enable_save)

		# size format
		hbox_size_format = Gtk.HBox(False, 5)
		label_size_format = Gtk.Label(label=_('Size format:'))
		label_size_format.set_alignment(0, 0.5)

		list_size_format = Gtk.ListStore(str, int)
		list_size_format.append((_('Localized'), SizeFormat.LOCAL))
		list_size_format.append((_('SI <small>(1 kB = 1000 B)</small>'), SizeFormat.SI))

# Path: sunflower/common.py
# class SizeFormat:
# 	LOCAL = 0
# 	SI = 1
# 	IEC = 2
# 
# 	multiplier = {
# 			SI: 1000.0,
# 			IEC: 1024.0
# 		}
# 	unit_names = {
# 			SI: ['B','kB','MB','GB','TB'],
# 			IEC: ['B','KiB','MiB','GiB','TiB']
# 		}
# 
# Path: sunflower/widgets/settings_page.py
# class SettingsPage(Gtk.ScrolledWindow):
# 	"""Abstract class used to build pages in preferences window."""
# 
# 	def __init__(self, parent, application, name, title):
# 		Gtk.ScrolledWindow.__init__(self)
# 
# 		self._parent = parent
# 		self._application = application
# 		self._page_name = name
# 		self._page_title = title
# 
# 		# configure main container
# 		self._box = Gtk.VBox.new(False, 0)
# 		self._box.set_spacing(15)
# 		self._box.set_border_width(15)
# 
# 		# add page to preferences window
# 		self.add(self._box)
# 		self._parent.add_tab(self._page_name, self._page_title, self)
# 
# 	def _create_section(self, title, container):
# 		"""Create widget section with title."""
# 		box = Gtk.VBox.new(False, 0)
# 
# 		# create section title
# 		label_title = Gtk.Label.new('<big>{}</big>'.format(title))
# 		label_title.set_alignment(0, 0.5)
# 		label_title.set_use_markup(True)
# 		box.pack_start(label_title, True, False, 0)
# 		box.pack_start(Gtk.Separator.new(Gtk.Orientation.HORIZONTAL), True, False, 0)
# 
# 		# pack container
# 		box.pack_start(container, True, False, 0)
# 		container.set_border_width(10)
# 		self._box.pack_start(box, False, False, 0)
# 
# 	def _create_radio_section(self, title, container, group=None):
# 		"""Create section which contains radio button and return radio button."""
# 		box = Gtk.VBox.new(False, 0)
# 
# 		# create section title
# 		label_title = Gtk.Label.new('<big>{}</big>'.format(title))
# 		label_title.set_alignment(0, 0.5)
# 		label_title.set_use_markup(True)
# 		radio_title = Gtk.RadioButton.new_from_widget(group)
# 		radio_title.add(label_title)
# 		box.pack_start(radio_title, True, False, 0)
# 		box.pack_start(Gtk.Separator.new(Gtk.Orientation.HORIZONTAL), True, False, 0)
# 
# 		# pack container
# 		box.pack_start(container, True, False, 0)
# 		container.set_border_width(10)
# 		self._box.pack_start(box, False, False, 0)
# 
# 		return radio_title
# 
# 	def _load_options(self):
# 		"""Load options and update interface"""
# 		pass
# 
# 	def _save_options(self):
# 		"""Method called when save button is clicked"""
# 		pass
# 
# 	def pack_start(self, *args, **kwargs):
# 		"""Pack things in container."""
# 		self._box.pack_start(*args, **kwargs)
# 
# 	def pack_end(self, *args, **kwargs):
# 		"""Pack things in container."""
# 		self._box.pack_end(*args, **kwargs)


# Path: sunflower/gui/preferences/display.py
from gi.repository import Gtk
from sunflower.common import SizeFormat
from sunflower.widgets.settings_page import SettingsPage

		list_expand_tab.append((_('All'), TabExpand.ALL))

		cell_expand_tab = Gtk.CellRendererText()

		self._combobox_expand_tabs = Gtk.ComboBox(model=list_expand_tab)
		self._combobox_expand_tabs.connect('changed', self._parent.enable_save)
		self._combobox_expand_tabs.pack_start(cell_expand_tab, True)
		self._combobox_expand_tabs.add_attribute(cell_expand_tab, 'text', 0)

		# other options
		vbox_other = Gtk.VBox(False, 0)
		self._create_section(_('Other'), vbox_other)

		self._checkbox_hide_window_on_minimize = Gtk.CheckButton(_('Hide operation window on minimize'))
		self._checkbox_show_notifications = Gtk.CheckButton(_('Show notifications'))
		self._checkbox_show_notifications.set_sensitive(self._application.notification_manager.available)
		self._checkbox_network_path_completion = Gtk.CheckButton(_('Use path completion on non-local paths'))

		self._checkbox_hide_window_on_minimize.connect('toggled', self._parent.enable_save)
		self._checkbox_show_notifications.connect('toggled', self._parent.enable_save)
		self._checkbox_network_path_completion.connect('toggled', self._parent.enable_save)

		# size format
		hbox_size_format = Gtk.HBox(False, 5)
		label_size_format = Gtk.Label(label=_('Size format:'))
		label_size_format.set_alignment(0, 0.5)

		list_size_format = Gtk.ListStore(str, int)
		list_size_format.append((_('Localized'), SizeFormat.LOCAL))
		list_size_format.append((_('SI <small>(1 kB = 1000 B)</small>'), SizeFormat.SI))

		list_size_format.append((_('IEC <small>(1 KiB = 1024 B)</small>'), SizeFormat.IEC))