# 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 _progress_timer_cb(self):
        # queue empty, nothing to do
        if self.progress_queue.empty():
            return ecore.ECORE_CALLBACK_RENEW

        # get only the LAST item in the queue
        item = None
        while not self.progress_queue.empty():
            item = self.progress_queue.get_nowait()

        # operation finished ?
        if isinstance(item, str) and item == 'done':
            self.dia.delete()
            self.dia = None
            if self.op == 'move':
                # TODO must be sure the copy ended successfully
                self.op = 'delete'
                self._start_operation_in_thread(self._delete_thread)
            else:
                self.op = self.src = self.dst = None
            return ecore.ECORE_CALLBACK_CANCEL

        # update progress dialog
        cur_name, cur_file, tot_files, done_bytes, tot_bytes = item
        self._dialog_update(cur_name, cur_file, tot_files,
                            float(done_bytes) / float(tot_bytes))

        return ecore.ECORE_CALLBACK_RENEW

    def _delete_thread(self):

# 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 _progress_timer_cb(self):
        # queue empty, nothing to do
        if self.progress_queue.empty():
            return ecore.ECORE_CALLBACK_RENEW

        # get only the LAST item in the queue
        item = None
        while not self.progress_queue.empty():
            item = self.progress_queue.get_nowait()

        # operation finished ?
        if isinstance(item, str) and item == 'done':
            self.dia.delete()
            self.dia = None
            if self.op == 'move':
                # TODO must be sure the copy ended successfully
                self.op = 'delete'
                self._start_operation_in_thread(self._delete_thread)
            else:
                self.op = self.src = self.dst = None
            return ecore.ECORE_CALLBACK_CANCEL

        # update progress dialog
        cur_name, cur_file, tot_files, done_bytes, tot_bytes = item
        self._dialog_update(cur_name, cur_file, tot_files,
                            float(done_bytes) / float(tot_bytes))

        return ecore.ECORE_CALLBACK_RENEW

    def _delete_thread(self):

        tobedone = []