# Path: epymc/modules.py
# class EmcModule(object):
#     name = ''
#     label = ''
#     icon = ''
#     info = ''
# 
#     def __init__(self):
#         pass
# 
#     def __shutdown__(self):
#         pass
# 
#     def __restart__(self):
#         self.__shutdown__()
#         self.__init__()
# 
# Path: epymc/gui.py
# EXPAND_BOTH = evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND
# 
# EXPAND_HORIZ = evas.EVAS_HINT_EXPAND, 0.0
# 
# FILL_BOTH = evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL
# 
# FILL_HORIZ = evas.EVAS_HINT_FILL, 0.5


import os
import threading
import queue
import epymc.mainmenu as mainmenu
import epymc.input_events as input_events
import epymc.storage as storage
import epymc.utils as utils
import epymc.gui as gui
import epymc.ini as ini
from efl import ecore
from efl.elementary.list import List
from epymc.modules import EmcModule
from epymc.gui import EXPAND_BOTH, EXPAND_HORIZ, FILL_BOTH, FILL_HORIZ
    def bt_move_cb(self, bt):
        it = self.list1.selected_item or self.list2.selected_item
        src = it.data['path']
        if self.list1.selected_item:
            dst = self.list2.current_folder
        else:
            dst = self.list1.current_folder
        if src and dst:
            self.worker.move(src, dst)

    def bt_delete_cb(self, bt):
        it = self.list1.selected_item or self.list2.selected_item
        self.worker.delete(it.data['path'])

    def bt_newfolder_cb(self, bt):
        li = self.list1 if self.list1.selected_item else self.list2
        if li and li.current_folder:
            gui.EmcVKeyboard(title=_('New folder'),
                             accept_cb=self.newfolder_vkeyb_cb,
                             user_data=li.current_folder)

    @staticmethod
    def newfolder_vkeyb_cb(vkeyb, new_name, path):
        full_path = os.path.join(path, new_name)
        os.mkdir(full_path)

    def bt_favorites_cb(self, bt):
        li = self.list1 if self.list1.selected_item else self.list2
        li.populate_root(ini.get_string_list('filemanager', 'folders', ';'))


# Path: epymc/modules.py
# class EmcModule(object):
#     name = ''
#     label = ''
#     icon = ''
#     info = ''
# 
#     def __init__(self):
#         pass
# 
#     def __shutdown__(self):
#         pass
# 
#     def __restart__(self):
#         self.__shutdown__()
#         self.__init__()
# 
# Path: epymc/gui.py
# EXPAND_BOTH = evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND
# 
# EXPAND_HORIZ = evas.EVAS_HINT_EXPAND, 0.0
# 
# FILL_BOTH = evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL
# 
# FILL_HORIZ = evas.EVAS_HINT_FILL, 0.5


# Path: epymc/plugins/filemanager/filemanager.py
import os
import threading
import queue
import epymc.mainmenu as mainmenu
import epymc.input_events as input_events
import epymc.storage as storage
import epymc.utils as utils
import epymc.gui as gui
import epymc.ini as ini
from efl import ecore
from efl.elementary.list import List
from epymc.modules import EmcModule
from epymc.gui import EXPAND_BOTH, EXPAND_HORIZ, FILL_BOTH, FILL_HORIZ

    def bt_move_cb(self, bt):
        it = self.list1.selected_item or self.list2.selected_item
        src = it.data['path']
        if self.list1.selected_item:
            dst = self.list2.current_folder
        else:
            dst = self.list1.current_folder
        if src and dst:
            self.worker.move(src, dst)

    def bt_delete_cb(self, bt):
        it = self.list1.selected_item or self.list2.selected_item
        self.worker.delete(it.data['path'])

    def bt_newfolder_cb(self, bt):
        li = self.list1 if self.list1.selected_item else self.list2
        if li and li.current_folder:
            gui.EmcVKeyboard(title=_('New folder'),
                             accept_cb=self.newfolder_vkeyb_cb,
                             user_data=li.current_folder)

    @staticmethod
    def newfolder_vkeyb_cb(vkeyb, new_name, path):
        full_path = os.path.join(path, new_name)
        os.mkdir(full_path)

    def bt_favorites_cb(self, bt):
        li = self.list1 if self.list1.selected_item else self.list2
        li.populate_root(ini.get_string_list('filemanager', 'folders', ';'))


    def bt_close_cb(self, bt):