about summary refs log tree commit diff stats
path: root/scripts
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-08-05 08:11:33 +0200
committerhut <hut@lavabit.com>2012-08-05 14:36:33 +0200
commit7f9df493dd6b0fd13abe93ddfea2755ee24c3d72 (patch)
treeeb3a6001afccb9822049aa8c5b5dbbba3d3e3fea /scripts
parente38d42ca55285b61ed70722da92d9871c8686f88 (diff)
downloadranger-7f9df493dd6b0fd13abe93ddfea2755ee24c3d72.tar.gz
Replaced core.environment with core.tab
The Environment class was weird to begin with.  It had attributes and
methods that belonged to other classes. For example, keybinding
management (the attributes keybuffer and keymaps) should go to gui.ui,
directory management (garbage_collect, get_directory) should be in
core.fm whereas entering directories (enter_dir) and managing history
(history_go) should be the task of a separate Tab class.

This commit fixes it, all references to env should be only for backwards
compatibility now.  I still need to rewrite the tabbing API in
core.actions to work with the new system.  Every tab that is opened will
have its own Tab instance with its own history and pointer.  Tab, unlike
Environment, is no SignalDispatcher - Environment's signals were moved
to fm.

BEFORE: fm.env.cf
AFTER : fm.thisfile

BEFORE: fm.env.cwd
AFTER : fm.thisdir

BEFORE: fm.env.signal_bind("move", ...)   # same for the "cd" signal
AFTER : fm.signal_bind("move", ...)

BEFORE: fm.env.keybuffer                  # same for fm.env.keymaps
AFTER : fm.ui.keybuffer

BEFORE: fm.env.get_directory("/usr/lib")  # same for half of the env methods
AFTER : fm.get_directory("/usr/lib")

BEFORE: fm.env.get_selection()  # same for the other half of the env methods
AFTER : fm.thistab.get_selection()

Old configurations and hacks should still work because I added a
compatibility layer for the Environment class which translates all
getters and setters to the respective call of the new class.

What will NOT work are the Environment signals, please bind them to fm
instead.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions