# 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
        self.go()

    def _folder_insert_sorted(self, path):
        s = self.first_item

        # search ordered position only between folders
        while s and s.data.get('isfolder', False) is True and \
                utils.natural_cmp(s.data['path'], path) < 0:
            s = s.next

        # insert the new folder before search or before the first file
        name = os.path.basename(path)
        icon = gui.load_icon('icon/folder')
        it = self.item_insert_before(s, name, icon) if s else \
            self.item_append(name, icon)
        it.data['path'] = path
        it.data['isfolder'] = True
        self.go()

    def _path_remove(self, path):
        item = self.first_item
        while item and item.data.get('path') != path:
            item = item.next
        if item and item.selected:
            to_sel = item.prev or item.next
            to_sel.selected = True
        if item:
            item.delete()



# 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

        self.go()

    def _folder_insert_sorted(self, path):
        s = self.first_item

        # search ordered position only between folders
        while s and s.data.get('isfolder', False) is True and \
                utils.natural_cmp(s.data['path'], path) < 0:
            s = s.next

        # insert the new folder before search or before the first file
        name = os.path.basename(path)
        icon = gui.load_icon('icon/folder')
        it = self.item_insert_before(s, name, icon) if s else \
            self.item_append(name, icon)
        it.data['path'] = path
        it.data['isfolder'] = True
        self.go()

    def _path_remove(self, path):
        item = self.first_item
        while item and item.data.get('path') != path:
            item = item.next
        if item and item.selected:
            to_sel = item.prev or item.next
            to_sel.selected = True
        if item:
            item.delete()



class FileManagerModule(EmcModule):