Skip to content

Commit

Permalink
Correctly handle window title in MDI mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Infocatcher committed Apr 17, 2014
1 parent 9a1d6de commit 4e2a0d5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cryptExt.js
Expand Up @@ -3908,8 +3908,13 @@ function encryptOrDecrypt(pass) {
}

function cryptTest() {
//~ todo: detect "base" title, see http://akelpad.sourceforge.net/forum/viewtopic.php?p=24677#24677
var origTitle = AkelPad.IsMDI() == 1 /*WMD_MDI*/ ? "AkelPad" : windowText(hMainWnd);
var isMDI = AkelPad.IsMDI() == 1 /*WMD_MDI*/;
if(isMDI) {
var hWndFrame = AkelPad.SendMessage(hMainWnd, 1223 /*AKD_GETFRAMEINFO*/, 1 /*FI_WNDEDITPARENT*/, 0 /*current frame*/);
var origFrameTitle = windowText(hWndFrame);
windowText(hWndFrame, "");
}
var origTitle = windowText(hMainWnd);
function feedback(s) {
windowText(hMainWnd, WScript.ScriptName + ": test " + s);
}
Expand Down Expand Up @@ -3984,6 +3989,7 @@ function cryptTest() {
pbkdf2IterationsMin = piMin;
pbkdf2IterationsMax = piMax;
windowText(hMainWnd, origTitle);
isMDI && windowText(hWndFrame, origFrameTitle);
var elapsedTime = "\nElapsed time: " + (new Date().getTime() - t) + " ms";
AkelPad.MessageBox(
hMainWnd,
Expand Down

0 comments on commit 4e2a0d5

Please sign in to comment.