Ejemplo n.º 1
0
    def __init__(self, path, **kw):
        assert not os.path.isfile(path), "No directory given!"

        Loadable.__init__(self, None, None)
        Accumulator.__init__(self)
        FileSystemObject.__init__(self, path, **kw)

        self.marked_items = []

        self.filter_stack = []

        self._signal_functions = []
        func = self.signal_function_factory(self.sort)
        self._signal_functions += [func]
        for opt in ('sort_directories_first', 'sort', 'sort_reverse',
                    'sort_case_insensitive'):
            self.settings.signal_bind('setopt.' + opt,
                                      func,
                                      weak=True,
                                      autosort=False)
        func = self.signal_function_factory(self.refilter)
        self._signal_functions += [func]
        for opt in ('hidden_filter', 'show_hidden'):
            self.settings.signal_bind('setopt.' + opt,
                                      func,
                                      weak=True,
                                      autosort=False)

        self.settings = LocalSettings(path, self.settings)

        self.use()
Ejemplo n.º 2
0
    def __init__(self, path, **kw):
        assert not os.path.isfile(path), "No directory given!"

        Loadable.__init__(self, None, None)
        Accumulator.__init__(self)
        FileSystemObject.__init__(self, path, **kw)

        self.marked_items = list()

        for opt in ('sort_directories_first', 'sort', 'sort_reverse',
                    'sort_case_insensitive'):
            self.settings.signal_bind('setopt.' + opt,
                                      self.request_resort,
                                      weak=True,
                                      autosort=False)

        for opt in ('hidden_filter', 'show_hidden'):
            self.settings.signal_bind('setopt.' + opt,
                                      self.refilter,
                                      weak=True,
                                      autosort=False)

        self.settings = LocalSettings(path, self.settings)

        self.use()
Ejemplo n.º 3
0
    def __init__(self, copy_buffer, new_name, do_cut=False):
	self.copy_buffer = tuple(copy_buffer)
	self.do_cut = do_cut
	self.overwrite = False
	self.original_copy_buffer = copy_buffer
	self.original_path = os.path.join(self.fm.thistab.path, new_name)
	self.percent = 0
	if self.copy_buffer:
	    self.one_file = self.copy_buffer[0]
	Loadable.__init__(self, self.generate(), 'Calculating size...')
Ejemplo n.º 4
0
 def __init__(self, copy_buffer, new_name, do_cut=False):
     self.copy_buffer = tuple(copy_buffer)
     self.do_cut = do_cut
     self.overwrite = False
     self.original_copy_buffer = copy_buffer
     self.original_path = os.path.join(self.fm.thistab.path, new_name)
     self.percent = 0
     if self.copy_buffer:
         self.one_file = self.copy_buffer[0]
     Loadable.__init__(self, self.generate(), 'Calculating size...')
Ejemplo n.º 5
0
    def __init__(self, path, **kw):
        assert not os.path.isfile(path), "No directory given!"

        Loadable.__init__(self, None, None)
        Accumulator.__init__(self)
        FileSystemObject.__init__(self, path, **kw)

        self.marked_items = list()

        for opt in ('sort_directories_first', 'sort', 'sort_reverse', 'sort_case_insensitive'):
            self.settings.signal_bind('setopt.' + opt, self.sort, weak=True, autosort=False)

        for opt in ('hidden_filter', 'show_hidden'):
            self.settings.signal_bind('setopt.' + opt, self.refilter, weak=True, autosort=False)

        self.settings = LocalSettings(path, self.settings)

        if self.settings.vcs_aware:
            self.vcs = Vcs(self)

        self.use()
Ejemplo n.º 6
0
    def __init__(self, path, **kw):
        assert not os.path.isfile(path), "No directory given!"

        Loadable.__init__(self, None, None)
        Accumulator.__init__(self)
        FileSystemObject.__init__(self, path, **kw)

        self.marked_items = []

        self._signal_functions = []
        func = self.signal_function_factory(self.sort)
        self._signal_functions += [func]
        for opt in ('sort_directories_first', 'sort', 'sort_reverse', 'sort_case_insensitive'):
            self.settings.signal_bind('setopt.' + opt, func, weak=True, autosort=False)
        func = self.signal_function_factory(self.refilter)
        self._signal_functions += [func]
        for opt in ('hidden_filter', 'show_hidden'):
            self.settings.signal_bind('setopt.' + opt, func, weak=True, autosort=False)

        self.settings = LocalSettings(path, self.settings)

        self.use()
Ejemplo n.º 7
0
 def __init__(self, descr, event, args):
     Loadable.__init__(self, self.generate(), descr)
     ServiceRunner.__init__(self, event, args)
Ejemplo n.º 8
0
 def __init__(self, proc, path):
     self.proc = proc
     self.path = path
     Loadable.__init__(self, self.generate(),
                       'Asynchronous callback from gitignore process.')
Ejemplo n.º 9
0
 def __init__(self, path):
     SignalDispatcher.__init__(self)
     descr = "Waiting for dir '" + path + "' to be mounted"
     Loadable.__init__(self, self.generate(), descr)
     self.path = path
Ejemplo n.º 10
0
 def __init__(self, path):
     SignalDispatcher.__init__(self)
     descr = "Waiting for dir '" + path + "' to be mounted"
     Loadable.__init__(self, self.generate(), descr)
     self.path = path
Ejemplo n.º 11
0
 def __init__(self, proc, path):
     self.proc = proc
     self.path = path
     self.seconds_of_work_time = 0.01
     Loadable.__init__(self, self.generate(), 'Asynchronous callback from gitignore process.')
Ejemplo n.º 12
0
 def __init__(self, descr, event, args):
     Loadable.__init__(self, self.generate(), descr)
     self.event = event
     self.args = args