This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clipboardData.setData("text", (FV.FocusedItem || FV.FolderItem).Name); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const iItem = FV.HitTest(pt, LVHT_ONITEM); | |
if (iItem >= 0) { | |
FV.SelectItem(iItem, SVSI_SELECT | SVSI_FOCUSED | SVSI_DESELECTOTHERS); | |
} | |
return S_FALSE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (te.Data.LayoutPath) { | |
SaveXml(te.Data.LayoutPath); | |
} else { | |
SaveLayout(); | |
} | |
return S_OK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const commdlg = api.CreateObject("CommonDialog"); | |
commdlg.InitDir = BuildPath(te.Data.DataFolder, "layout"); | |
commdlg.Filter = MakeCommDlgFilter("*.xml"); | |
commdlg.Flags = OFN_FILEMUSTEXIST; | |
if (commdlg.ShowOpen()) { | |
te.Data.LayoutPath = commdlg.FileName; | |
LoadXml(commdlg.FileName); | |
} | |
return S_OK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener("keydown", function (ev) { | |
if (ev.keyCode == VK_TAB) { | |
const res = /inneraddressbar_(\d+)/i.exec((ev.target || ev.srcElement).id); | |
if (res) { | |
setTimeout(async function () { | |
const FV = te.Ctrl(CTRL_TC, res[1]).Selected; | |
FV.Focus(); | |
FV.TreeView.Focus(); | |
}, 99); | |
if (ev.preventDefault) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const FV = GetFolderView(Ctrl, pt); | |
const Selected = FV.Items(SVGIO_SELECTION | SVGIO_FLAG_VIEWORDER); | |
const Progress = api.CreateObject("ProgressDialog"); | |
Progress.StartProgressDialog(te.hwnd, null, 2); | |
const Name = GetText("Selected items"); | |
try { | |
FV.SelectItem(null, SVSI_DESELECTOTHERS); | |
const IconSize = FV.IconSize; | |
const ViewMode = api.SendMessage(FV.hwndList, LVM_GETVIEW, 0, 0); | |
if (ViewMode == 1 || ViewMode == 3) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const FV = GetFolderView(Ctrl, pt); | |
NavigateFV(Sync.SwitchPane.NextFV(FV), FV, SBSP_SAMEBROWSER); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AddEvent("SystemMessage", function (Ctrl, hwnd, msg, wParam, lParam) { | |
if (msg == WM_ACTIVATE) { | |
document.body.style.backgroundColor = wParam ? "#F0F0F0" : "#757575"; | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AddEvent("ChangeNotify", function (Ctrl, pidls, wParam, lParam) { | |
if (pidls.lEvent & (SHCNE_RENAMEITEM | SHCNE_RENAMEFOLDER)) { | |
var pid = api.ILGetParent(pidls[1]); | |
api.SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_IDLIST, pid, null); | |
var FV = GetFolderView(); | |
if (FV && api.ILIsEqual(FV, pid)) { | |
if (FV.ItemCount(SVGIO_SELECTION) == 1) { | |
setTimeout(function() { | |
var Selected = FV.SelectedItems(); | |
if (api.ILIsEqual(Selected.Item(0), pidls[1])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Selected = GetSelectedArray(Ctrl, pt, true).shift(); | |
if (Selected && Selected.Count) { | |
for (let i = Selected.Count; i-- > 0;) { | |
const path = Selected.Item(i).Path; | |
const s = GetNum(Sync.Badge.DB.Get(path)) - 1; | |
if (s >= 0) { | |
Sync.Badge.Set(path, s); | |
} | |
} | |
} |