Code: Select all
diff --git a/lib/python/Plugins/Extensions/FileCommander/plugin.py b/lib/python/Plugins/Extensions/FileCommander/plugin.py
index 7d27a11..4beeccc 100644
--- a/lib/python/Plugins/Extensions/FileCommander/plugin.py
+++ b/lib/python/Plugins/Extensions/FileCommander/plugin.py
@@ -116,8 +116,7 @@ class FileCommanderConfigScreen(Screen, ConfigListScreen):
self["help"] = Label(_("Keys:\n"
"0: Refresh screen.\n"
"1: New folder.\n"
- "2: New symlink with file name.\n"
- "3: New symlink with folder name.\n"
+ "2: New symlink.\n"
"4: Change permissions: chmod 644/755.\n"
"5: Change to default folder.\n"
"BACK: Change to parent folder.\n"
@@ -235,7 +234,6 @@ class FileCommanderScreen(Screen, key_actions):
"prevBouquet": self.listLeft,
"1": self.gomakeDir,
"2": self.gomakeSym,
- "3": self.gomakeSymlink,
"4": self.call_change_mode,
"5": self.goDefaultfolder,
# "8": self.test,
@@ -505,7 +503,7 @@ class FileCommanderScreen(Screen, key_actions):
sourceDir = self.SOURCELIST.getCurrentDirectory()
if (filename is None) or (sourceDir is None):
return
- self.session.openWithCallback(self.doMakesym, InputBox, text="", title=_("Please enter name of the new symlink"), windowTitle=_("New symlink"))
+ self.session.openWithCallback(self.doMakesym, InputBox, text=os.path.basename(os.path.normpath(filename)), title=_("Please enter name of the new symlink"), windowTitle=_("New symlink"))
def doMakesym(self, newname):
if newname:
The source changes change the function of "2" so that its popup box is pre-filled with the name of the file/folder in the source list and marked. To create a link with the same name as the original file, just press OK in the popup. To give the link a completely different name, just start entering text SMS-style. To modify the pre-fill text, press LEFT or RIGHT to clear the "all marked" setting, and then edit as normal.
Button "3"'s action is removed. Buttons "4" and "5" retain their current actions.
And don't worry too much about the old-style help. The code for proper help screens is already written and tested.