# Path: classes/conf.py
# class Conf:
# 	def __init__(self):
# 		self.home = os.path.expanduser('~')
# 		if 'root' in self.home:
# 			self.home = '/home/'+os.path.expanduser(os.environ["SUDO_USER"])
# 		self.conf_folder = self.home+'/.openplotter'
# 		self.data_conf = ConfigParser.SafeConfigParser()
# 		self.read()
# 
# 	def read(self):
# 		self.data_conf.read(self.conf_folder+'/openplotter.conf')
# 
# 	def write(self):
# 		with open(self.conf_folder+'/openplotter.conf', 'wb') as configfile:
# 			self.data_conf.write(configfile)
# 
# 	def get(self, section, item):
# 		result = ''
# 		try:
# 			result = self.data_conf.get(section, item)
# 		except ConfigParser.NoSectionError:
# 			self.read()
# 			try:
# 				self.data_conf.add_section(section)
# 			except ConfigParser.DuplicateSectionError: pass
# 			self.data_conf.set(section, item, '')
# 			self.write()
# 		except ConfigParser.NoOptionError:
# 			self.set(section, item, '')
# 		return result
# 
# 	def set(self, section, item, value):
# 		self.read()
# 		try:
# 			self.data_conf.set(section, item, value)
# 		except ConfigParser.NoSectionError:
# 			self.data_conf.add_section(section)
# 			self.data_conf.set(section, item, value)
# 		self.write()
# 
# 	def has_option(self, section, item):
# 		return self.data_conf.has_option(section, item)
# 
# 	def has_section(self, section):
# 		return self.data_conf.has_section(section)
# 
# 	def add_section(self, section):
# 		return self.data_conf.add_section(section)
# 
# Path: classes/language.py
# class Language:
# 
# 	def __init__(self, conf):
# 
# 		home = conf.home
# 		op_folder = conf.get('GENERAL', 'op_folder')+'/openplotter'
# 		locale_folder = home+op_folder+'/locale'
# 		language = conf.get('GENERAL', 'lang')
# 
# 		gettext.install('openplotter', locale_folder, unicode=False)
# 		presLan_en = gettext.translation('openplotter', locale_folder, languages=['en'])
# 		presLan_ca = gettext.translation('openplotter', locale_folder, languages=['ca'])
# 		presLan_es = gettext.translation('openplotter', locale_folder, languages=['es'])
# 		presLan_fr = gettext.translation('openplotter', locale_folder, languages=['fr'])
# 		presLan_nl = gettext.translation('openplotter', locale_folder, languages=['nl'])
# 		presLan_de = gettext.translation('openplotter', locale_folder, languages=['de'])
# 		presLan_it = gettext.translation('openplotter', locale_folder, languages=['it'])
# 		presLan_eu = gettext.translation('openplotter', locale_folder, languages=['eu'])
# 		presLan_gl = gettext.translation('openplotter', locale_folder, languages=['gl'])
# 
# 		if language=='en':presLan_en.install()
# 		if language=='ca':presLan_ca.install()
# 		if language=='es':presLan_es.install()
# 		if language=='fr':presLan_fr.install()
# 		if language=='nl':presLan_nl.install()
# 		if language=='de':presLan_de.install()
# 		if language=='it':presLan_it.install()
# 		if language=='eu':presLan_eu.install()
# 		if language=='gl':presLan_gl.install()


import json
import logging
import wx
import subprocess
import os
from classes.conf import Conf
from classes.language import Language
			print 'no unit for ', st

	def on_sort_Unit(self, e):
		self.sortCol = 2
		self.sorting()

	def on_sort_UnitSK(self, e):
		self.sortCol = 1
		self.sorting()

	def on_sort_SK(self, e):
		self.sortCol = 0
		self.sorting()

	def on_change_selected(self, e):
		orig_unit = self.select_Unit.GetValue().split(' ')
		if len(orig_unit) == 1:
			orig_unit = [orig_unit[0], '']
		if orig_unit[0] != '':
			list_select = []
			item = self.list.GetFirstSelected()
			while item != -1:
				# do something with the item
				self.list_SK[item][2] = orig_unit[1]

				list_select.append(self.get_by_index(item))
				item = self.list.GetNextSelected(item)

			self.data_SK_unit_private = []
			for i in self.list_SK:

# Path: classes/conf.py
# class Conf:
# 	def __init__(self):
# 		self.home = os.path.expanduser('~')
# 		if 'root' in self.home:
# 			self.home = '/home/'+os.path.expanduser(os.environ["SUDO_USER"])
# 		self.conf_folder = self.home+'/.openplotter'
# 		self.data_conf = ConfigParser.SafeConfigParser()
# 		self.read()
# 
# 	def read(self):
# 		self.data_conf.read(self.conf_folder+'/openplotter.conf')
# 
# 	def write(self):
# 		with open(self.conf_folder+'/openplotter.conf', 'wb') as configfile:
# 			self.data_conf.write(configfile)
# 
# 	def get(self, section, item):
# 		result = ''
# 		try:
# 			result = self.data_conf.get(section, item)
# 		except ConfigParser.NoSectionError:
# 			self.read()
# 			try:
# 				self.data_conf.add_section(section)
# 			except ConfigParser.DuplicateSectionError: pass
# 			self.data_conf.set(section, item, '')
# 			self.write()
# 		except ConfigParser.NoOptionError:
# 			self.set(section, item, '')
# 		return result
# 
# 	def set(self, section, item, value):
# 		self.read()
# 		try:
# 			self.data_conf.set(section, item, value)
# 		except ConfigParser.NoSectionError:
# 			self.data_conf.add_section(section)
# 			self.data_conf.set(section, item, value)
# 		self.write()
# 
# 	def has_option(self, section, item):
# 		return self.data_conf.has_option(section, item)
# 
# 	def has_section(self, section):
# 		return self.data_conf.has_section(section)
# 
# 	def add_section(self, section):
# 		return self.data_conf.add_section(section)
# 
# Path: classes/language.py
# class Language:
# 
# 	def __init__(self, conf):
# 
# 		home = conf.home
# 		op_folder = conf.get('GENERAL', 'op_folder')+'/openplotter'
# 		locale_folder = home+op_folder+'/locale'
# 		language = conf.get('GENERAL', 'lang')
# 
# 		gettext.install('openplotter', locale_folder, unicode=False)
# 		presLan_en = gettext.translation('openplotter', locale_folder, languages=['en'])
# 		presLan_ca = gettext.translation('openplotter', locale_folder, languages=['ca'])
# 		presLan_es = gettext.translation('openplotter', locale_folder, languages=['es'])
# 		presLan_fr = gettext.translation('openplotter', locale_folder, languages=['fr'])
# 		presLan_nl = gettext.translation('openplotter', locale_folder, languages=['nl'])
# 		presLan_de = gettext.translation('openplotter', locale_folder, languages=['de'])
# 		presLan_it = gettext.translation('openplotter', locale_folder, languages=['it'])
# 		presLan_eu = gettext.translation('openplotter', locale_folder, languages=['eu'])
# 		presLan_gl = gettext.translation('openplotter', locale_folder, languages=['gl'])
# 
# 		if language=='en':presLan_en.install()
# 		if language=='ca':presLan_ca.install()
# 		if language=='es':presLan_es.install()
# 		if language=='fr':presLan_fr.install()
# 		if language=='nl':presLan_nl.install()
# 		if language=='de':presLan_de.install()
# 		if language=='it':presLan_it.install()
# 		if language=='eu':presLan_eu.install()
# 		if language=='gl':presLan_gl.install()


# Path: unit-private.py
import json
import logging
import wx
import subprocess
import os
from classes.conf import Conf
from classes.language import Language

			print 'no unit for ', st

	def on_sort_Unit(self, e):
		self.sortCol = 2
		self.sorting()

	def on_sort_UnitSK(self, e):
		self.sortCol = 1
		self.sorting()

	def on_sort_SK(self, e):
		self.sortCol = 0
		self.sorting()

	def on_change_selected(self, e):
		orig_unit = self.select_Unit.GetValue().split(' ')
		if len(orig_unit) == 1:
			orig_unit = [orig_unit[0], '']
		if orig_unit[0] != '':
			list_select = []
			item = self.list.GetFirstSelected()
			while item != -1:
				# do something with the item
				self.list_SK[item][2] = orig_unit[1]

				list_select.append(self.get_by_index(item))
				item = self.list.GetNextSelected(item)

			self.data_SK_unit_private = []
			for i in self.list_SK:

				if i[2] != '':