Skip to content

Commit

Permalink
17.6.20 Some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tablacus committed Jun 20, 2017
1 parent 92848c4 commit 97e3e50
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
44 changes: 27 additions & 17 deletions Debug/script/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,20 +141,24 @@ FolderMenu =
api.InsertMenuItem(hMenu, MAXINT, false, mii);
},

Invoke: function (FolderItem)
Invoke: function (FolderItem, wFlags)
{
if (FolderItem) {
switch (window.g_menu_button - 0) {
case 2:
PopupContextMenu(FolderItem);
break;
case 3:
Navigate(FolderItem, SBSP_NEWBROWSER);
break;
default:
Navigate(FolderItem, OpenMode);
break;
if (window.g_menu_button == 2) {
PopupContextMenu(FolderItem);
retrn;
}
if (FolderItem.IsFolder) {
if (FolderItem.Unavailable) {
var arg = api.CommandLineToArgv(FolderItem.Path);
if (arg.length > 1 && fso.FileExists(arg[0])) {
ShellExecute(FolderItem.Path, null, SW_SHOWNORMAL);
}
}
Navigate(FolderItem, isFinite(wFlags) ? wFlags : GetOpenMode());
return;
}
ShellExecute(FolderItem.Path, null, SW_SHOWNORMAL);
}
}
};
Expand Down Expand Up @@ -704,8 +708,9 @@ GetKeyKey = function (strKey)
strKey = strKey.toUpperCase();
for (var j in MainWindow.g_.KeyState) {
var s = MainWindow.g_.KeyState[j][0].toUpperCase() + "+";
if (strKey.match(s)) {
strKey = strKey.replace(s, "");
var i = strKey.indexOf(s);
if (i >= 0) {
strKey = strKey.substr(0, i) + strKey.substr(i + s.length);
nShift |= MainWindow.g_.KeyState[j][1];
}
}
Expand Down Expand Up @@ -1831,7 +1836,12 @@ AddMenuIconFolderItem = function (mii, FolderItem, nHeight)
{
var image = te.WICBitmap();
var sfi = api.Memory("SHFILEINFO");
var path = /string/i.test(typeof FolderItem) ? FolderItem : api.GetDisplayNameOf(FolderItem, SHGDN_FORPARSING);
var dwFlags = SHGFI_SYSICONINDEX;
var path = FolderItem;
if (!/string/i.test(typeof FolderItem)) {
path = api.GetDisplayNameOf(FolderItem, SHGDN_FORPARSING);
dwFlags |= SHGFI_PIDL;
}
if (api.PathIsNetworkPath(path)) {
if (fso.GetDriveName(path) != path.replace(/\\$/, "")) {
MenusIcon(mii, WINVER >= 0x600 ? "icon:shell32.dll,275,16" : "icon:shell32.dll,85,16");
Expand All @@ -1840,7 +1850,7 @@ AddMenuIconFolderItem = function (mii, FolderItem, nHeight)
MenusIcon(mii, WINVER >= 0x600 ? "icon:shell32.dll,273,16" : "icon:shell32.dll,9,16");
return;
}
api.SHGetFileInfo(FolderItem, 0, sfi, sfi.Size, SHGFI_SYSICONINDEX | SHGFI_PIDL);
api.SHGetFileInfo(FolderItem, 0, sfi, sfi.Size, dwFlags);
var id = sfi.iIcon;
mii.hbmpItem = MainWindow.g_arBM[[id, nHeight].join("\t")];
if (mii.hbmpItem) {
Expand Down Expand Up @@ -2620,7 +2630,7 @@ function SetKeyShift()
var s = MainWindow.g_.KeyState[i][0];
var o = document.getElementById("_Key" + s);
if (o) {
o.checked = key.match(s + "+");
o.checked = key.indexOf(s + "+") >= 0;
}
key = key.replace(s + "+", "");
}
Expand Down Expand Up @@ -2889,7 +2899,7 @@ function MouseOver(o)
function MouseOut(s)
{
if (objHover) {
if (!s || objHover.id.match(s)) {
if (!s || objHover.id.indexOf(s) >= 0) {
if (objHover.className == 'hoverbutton') {
objHover.className = 'button';
} else if (objHover.className == 'hovermenu') {
Expand Down
7 changes: 3 additions & 4 deletions Debug/script/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -1031,9 +1031,8 @@ function SetData(sel, a, t)

function PackData(a)
{
var i = a.length;
while (--i >= 0) {
a[i] = (a[i] ? String(a[i]) : "").replace(g_sep, "` ~");
for (var i = a.length; i-- > 0;) {
a[i] = String(a[i] || "").replace(g_sep, "` ~");
}
return a.join(g_sep);
}
Expand Down Expand Up @@ -1442,7 +1441,7 @@ InitDialog = function ()
}
if (Query == "key") {
returnValue = false;
document.getElementById("Content").innerHTML = '<div style="padding: 8px;" style="display: block;"><label>Key</label><br /><input type="text" name="q" autocomplete="off" style="width: 100%; ime-mode: disabled" /></div>';
document.getElementById("Content").innerHTML = '<div style="padding: 8px;" style="display: block;"><label>Key</label><br /><input type="text" name="q" autocomplete="off" style="width: 100%; ime-mode: disabled" onfocus="this.blur()" /></div>';
AddEventEx(document.body, "keydown", function (e)
{
var key = (e || event).keyCode;
Expand Down
2 changes: 1 addition & 1 deletion TE/Resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
#define STRING2(str) #str
#define VER_Y 17
#define VER_M 6
#define VER_D 15
#define VER_D 20

0 comments on commit 97e3e50

Please sign in to comment.