# Path: sunflower/common.py
# class UserDirectory:
# class AccessModeFormat:
# class SizeFormat:
# 	DESKTOP = 'XDG_DESKTOP_DIR'
# 	DOWNLOADS = 'XDG_DOWNLOAD_DIR'
# 	TEMPLATES = 'XDG_TEMPLATES_DIR'
# 	PUBLIC = 'XDG_PUBLICSHARE_DIR'
# 	DOCUMENTS = 'XDG_DOCUMENTS_DIR'
# 	MUSIC = 'XDG_MUSIC_DIR'
# 	PICTURES = 'XDG_PICTURES_DIR'
# 	VIDEOS = 'XDG_VIDEOS_DIR'
# 	OCTAL = 0
# 	TEXTUAL = 1
# 	LOCAL = 0
# 	SI = 1
# 	IEC = 2
# MONOSPACE_FONT_STRING = None
# 			MONOSPACE_FONT_STRING = 'monospace'
# 			MONOSPACE_FONT_STRING = settings.get_string('monospace-font-name')
# def format_size(size, format_type, include_unit=True):
# def format_mode(mode, format):
# def get_base_directory():
# def get_static_assets_directory():
# def get_cache_directory():
# def get_config_directory():
# def get_config_path():
# def get_data_directory():
# def get_user_directory(directory):
# def is_gui_app(command):
# def executable_exists(command):
# def load_translation():
# def decode_file_name(file_name):
# def encode_file_name(file_name):
# def get_monospace_font_string():


from gi.repository import Gtk, Gdk, GObject, Pango
from sunflower import common
			self._set_operation_image('media-playback-pause-symbolic')
			image.set_from_icon_name('media-playback-start-symbolic', Gtk.IconSize.BUTTON)
			self._button_pause.set_tooltip_text(_('Resume'))
			self._thread.pause()

		else:
			# thread is paused, resume it
			self._set_operation_image()
			image.set_from_icon_name('media-playback-pause-symbolic', Gtk.IconSize.BUTTON)
			self._button_pause.set_tooltip_text(_('Pause'))
			self._thread.resume()

	def _cancel_click(self, widget, data=None):
		"""Handle cancel button click event"""
		if self._confirm_cancel(_('Are you sure about canceling current operation?')):
			self._thread.cancel()

		# TODO: Add 5-10 seconds timeout before forced cancel occurs.

		return True  # handle delete-event properly

	def _update_total_count(self):
		"""Update progress bar and labels for total count"""
		self._value_total_count.set_label(self._count_format.format(self._current_count, self._total_count))
		self.set_total_count_fraction(float(self._current_count) / self._total_count)

	def _update_total_size(self):
		"""Update progress bar and labels for total size"""
		# update label
		formated_size = self._size_format.format(

# Path: sunflower/common.py
# class UserDirectory:
# class AccessModeFormat:
# class SizeFormat:
# 	DESKTOP = 'XDG_DESKTOP_DIR'
# 	DOWNLOADS = 'XDG_DOWNLOAD_DIR'
# 	TEMPLATES = 'XDG_TEMPLATES_DIR'
# 	PUBLIC = 'XDG_PUBLICSHARE_DIR'
# 	DOCUMENTS = 'XDG_DOCUMENTS_DIR'
# 	MUSIC = 'XDG_MUSIC_DIR'
# 	PICTURES = 'XDG_PICTURES_DIR'
# 	VIDEOS = 'XDG_VIDEOS_DIR'
# 	OCTAL = 0
# 	TEXTUAL = 1
# 	LOCAL = 0
# 	SI = 1
# 	IEC = 2
# MONOSPACE_FONT_STRING = None
# 			MONOSPACE_FONT_STRING = 'monospace'
# 			MONOSPACE_FONT_STRING = settings.get_string('monospace-font-name')
# def format_size(size, format_type, include_unit=True):
# def format_mode(mode, format):
# def get_base_directory():
# def get_static_assets_directory():
# def get_cache_directory():
# def get_config_directory():
# def get_config_path():
# def get_data_directory():
# def get_user_directory(directory):
# def is_gui_app(command):
# def executable_exists(command):
# def load_translation():
# def decode_file_name(file_name):
# def encode_file_name(file_name):
# def get_monospace_font_string():


# Path: sunflower/gui/operation_dialog.py
from gi.repository import Gtk, Gdk, GObject, Pango
from sunflower import common

			self._set_operation_image('media-playback-pause-symbolic')
			image.set_from_icon_name('media-playback-start-symbolic', Gtk.IconSize.BUTTON)
			self._button_pause.set_tooltip_text(_('Resume'))
			self._thread.pause()

		else:
			# thread is paused, resume it
			self._set_operation_image()
			image.set_from_icon_name('media-playback-pause-symbolic', Gtk.IconSize.BUTTON)
			self._button_pause.set_tooltip_text(_('Pause'))
			self._thread.resume()

	def _cancel_click(self, widget, data=None):
		"""Handle cancel button click event"""
		if self._confirm_cancel(_('Are you sure about canceling current operation?')):
			self._thread.cancel()

		# TODO: Add 5-10 seconds timeout before forced cancel occurs.

		return True  # handle delete-event properly

	def _update_total_count(self):
		"""Update progress bar and labels for total count"""
		self._value_total_count.set_label(self._count_format.format(self._current_count, self._total_count))
		self.set_total_count_fraction(float(self._current_count) / self._total_count)

	def _update_total_size(self):
		"""Update progress bar and labels for total size"""
		# update label
		formated_size = self._size_format.format(

				common.format_size(self._current_size, self._size_format_type),