Skip to content

Commit

Permalink
24.12.9 Some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tablacus committed Dec 9, 2024
1 parent 1c397ad commit 11be95f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 32 deletions.
4 changes: 2 additions & 2 deletions Debug/addons/addressbar/config.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<TablacusExplorer>
<General>
<Version>1.74</Version>
<Version>1.75</Version>
<MinVersion>2024.8.6</MinVersion>
<pubDate>Fri, 09 Aug 2024 00:00:00 GMT</pubDate>
<pubDate>Mon, 09 Dec 2024 00:00:00 GMT</pubDate>
<Options>Common:0,6,7,8,9:0</Options>
<Level>2</Level>
<Creator>Gaku</Creator>
Expand Down
2 changes: 1 addition & 1 deletion Debug/addons/addressbar/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (window.Addon == 1) {

if (await fso.FileExists(uri)) {
let pos = uri.lastIndexOf("\\");
uri = uri.substr(0, pos)
uri = uri.slice(0, pos)
}

if (await fso.FolderExists(uri)) {
Expand Down
6 changes: 3 additions & 3 deletions Debug/addons/treeview/config.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<TablacusExplorer>
<General>
<Version>1.47</Version>
<MinVersion>2024.2.27</MinVersion>
<pubDate>Thu, 29 Feb 2024 00:00:00 GMT</pubDate>
<Version>1.48</Version>
<MinVersion>2024.10.11</MinVersion>
<pubDate>Fri, 22 Nov 2024 00:00:00 GMT</pubDate>
<Options>Common:0,5,6,7,8,9:0</Options>
<Level>2</Level>
<Creator>Gaku</Creator>
Expand Down
51 changes: 25 additions & 26 deletions Debug/addons/treeview/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Sync.TreeView = {
strName: "Tree",
List: item.getAttribute("List"),
nPos: 0,
WM: TWM_APP++,
Depth: GetNum(item.getAttribute("Depth")),
Collapse: GetNum(item.getAttribute("Collapse")),

Expand Down Expand Up @@ -70,6 +69,31 @@ Sync.TreeView = {

if (GetNum(item.getAttribute("Refresh"))) {
AddEvent("Refresh", Sync.TreeView.Refresh);
if (WINVER >= 0x600) {
Sync.TreeView.WM = TWM_APP++;
AddEvent("AppMessage", function (Ctrl, hwnd, msg, wParam, lParam) {
if (msg == Sync.TreeView.WM) {
const pidls = {};
const hLock = api.SHChangeNotification_Lock(wParam, lParam, pidls);
if (hLock) {
api.SHChangeNotification_Unlock(hLock);
if (pidls[0] && /^[A-Z]:\\|^\\\\\w/i.test(pidls[0].Path) && IsWitness(pidls[0])) {
const cFV = te.Ctrls(CTRL_FV);
for (let i in cFV) {
cFV[i].TreeView.Notify(pidls.lEvent, pidls[0], pidls[1], wParam, lParam);
}
}
}
return S_OK;
}
});

AddEvent("Finalize", function () {
api.SHChangeNotifyDeregister(Sync.TreeView.uRegisterId);
});

Sync.TreeView.uRegisterId = api.SHChangeNotifyRegister(te.hwnd, SHCNRF_InterruptLevel | SHCNRF_NewDelivery, SHCNE_MKDIR | SHCNE_MEDIAINSERTED | SHCNE_DRIVEADD | SHCNE_NETSHARE | SHCNE_DRIVEREMOVED | SHCNE_MEDIAREMOVED | SHCNE_NETUNSHARE | SHCNE_RENAMEFOLDER | SHCNE_RMDIR | SHCNE_SERVERDISCONNECT | SHCNE_UPDATEDIR, Sync.TreeView.WM, ssfDESKTOP, true);
}
} else {
SetKeyExec("Tree", "$3f,Ctrl+R", function (Ctrl, pt) {
Sync.TreeView.Refresh(Ctrl, pt);
Expand Down Expand Up @@ -153,28 +177,3 @@ SetKeyExec("Tree", "$1c", function (Ctrl, pt) {
}, "Func", true);

AddTypeEx("Add-ons", "Tree", Sync.TreeView.Exec);

if (WINVER >= 0x600) {
AddEvent("AppMessage", function (Ctrl, hwnd, msg, wParam, lParam) {
if (msg == Sync.TreeView.WM) {
const pidls = {};
const hLock = api.SHChangeNotification_Lock(wParam, lParam, pidls);
if (hLock) {
api.SHChangeNotification_Unlock(hLock);
if (pidls[0] && /^[A-Z]:\\|^\\\\\w/i.test(pidls[0].Path) && IsWitness(pidls[0])) {
const cFV = te.Ctrls(CTRL_FV);
for (let i in cFV) {
cFV[i].TreeView.Notify(pidls.lEvent, pidls[0], pidls[1], wParam, lParam);
}
}
}
return S_OK;
}
});

AddEvent("Finalize", function () {
api.SHChangeNotifyDeregister(Sync.TreeView.uRegisterId);
});

Sync.TreeView.uRegisterId = api.SHChangeNotifyRegister(te.hwnd, SHCNRF_InterruptLevel | SHCNRF_NewDelivery, SHCNE_MKDIR | SHCNE_MEDIAINSERTED | SHCNE_DRIVEADD | SHCNE_NETSHARE | SHCNE_DRIVEREMOVED | SHCNE_MEDIAREMOVED | SHCNE_NETUNSHARE | SHCNE_RENAMEFOLDER | SHCNE_RMDIR | SHCNE_SERVERDISCONNECT | SHCNE_UPDATEDIR, Sync.TreeView.WM, ssfDESKTOP, true);
}

0 comments on commit 11be95f

Please sign in to comment.