From 2a431b2b6cf32a824105dc86dbd8aa36f044f519 Mon Sep 17 00:00:00 2001 From: Procybit Date: Wed, 24 Aug 2022 01:02:12 +0300 Subject: [PATCH 1/3] Add shortcut "decryption" for Dock attachments Signed-off-by: Procybit --- Libraries/System.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Libraries/System.lua b/Libraries/System.lua index a6c4a4f3..f845fa7b 100755 --- a/Libraries/System.lua +++ b/Libraries/System.lua @@ -2418,6 +2418,11 @@ function system.updateDesktop() userSettings.dockShortcuts = {} for i = 1, #dockContainer.children do if dockContainer.children[i].keepInDock then + -- RU чекаем новое прикрепление к dock, если ярлык, то ищем оригинальный файл и прикрепляем его + -- EN check the new attachment to the dock, if it's a shortcut, then look for the original file and attach it + while dockContainer.children[i].path:sub(-#ending) == ".lnk" do + dockContainer.children[i].path = system.readShortcut(dockContainer.children[i].path) + end table.insert(userSettings.dockShortcuts, dockContainer.children[i].path) end end From 21ffa4acc4aef2d1305ef7c4426641812f9b7bf9 Mon Sep 17 00:00:00 2001 From: Procybit Date: Wed, 24 Aug 2022 01:12:37 +0300 Subject: [PATCH 2/3] oops Signed-off-by: Procybit --- Libraries/System.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/System.lua b/Libraries/System.lua index f845fa7b..634d2193 100755 --- a/Libraries/System.lua +++ b/Libraries/System.lua @@ -2420,7 +2420,7 @@ function system.updateDesktop() if dockContainer.children[i].keepInDock then -- RU чекаем новое прикрепление к dock, если ярлык, то ищем оригинальный файл и прикрепляем его -- EN check the new attachment to the dock, if it's a shortcut, then look for the original file and attach it - while dockContainer.children[i].path:sub(-#ending) == ".lnk" do + while dockContainer.children[i].path:sub(-4) == ".lnk" do dockContainer.children[i].path = system.readShortcut(dockContainer.children[i].path) end table.insert(userSettings.dockShortcuts, dockContainer.children[i].path) From 8ab0ea34ae154adfcbf1782d811facf587b6afb6 Mon Sep 17 00:00:00 2001 From: Procybit Date: Wed, 24 Aug 2022 01:34:46 +0300 Subject: [PATCH 3/3] Another movements Signed-off-by: Procybit --- Libraries/System.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Libraries/System.lua b/Libraries/System.lua index 634d2193..254fc4f7 100755 --- a/Libraries/System.lua +++ b/Libraries/System.lua @@ -2418,11 +2418,6 @@ function system.updateDesktop() userSettings.dockShortcuts = {} for i = 1, #dockContainer.children do if dockContainer.children[i].keepInDock then - -- RU чекаем новое прикрепление к dock, если ярлык, то ищем оригинальный файл и прикрепляем его - -- EN check the new attachment to the dock, if it's a shortcut, then look for the original file and attach it - while dockContainer.children[i].path:sub(-4) == ".lnk" do - dockContainer.children[i].path = system.readShortcut(dockContainer.children[i].path) - end table.insert(userSettings.dockShortcuts, dockContainer.children[i].path) end end @@ -2455,6 +2450,11 @@ function system.updateDesktop() } dockContainer.addIcon = function(path) + -- RU чекаем новое прикрепление к dock, если ярлык, то ищем оригинальный файл и прикрепляем его + -- EN check the new attachment to the dock, if it's a shortcut, then look for the original file and attach it + while path:sub(-4) == ".lnk" do + path = system.readShortcut(path) + end local icon = dockContainer:addChild(system.icon(1, 2, path, dockColors)) icon:analyseExtension(iconLaunchers) icon:moveBackward()