Index: MainForm.frm ================================================================== --- MainForm.frm +++ MainForm.frm @@ -1,7 +1,7 @@ ; idEdit = 100 idShortcuts = 200 Index: WikiPad.exe ================================================================== --- WikiPad.exe +++ WikiPad.exe cannot compute difference between binary files Index: actions.asm ================================================================== --- actions.asm +++ actions.asm @@ -1,9 +1,11 @@ ImageChecked = 8 uglobal hLoadedFilename dd ? + + fLastModified dd ? endg iglobal @@ -69,11 +71,17 @@ proc OnIdle begin - stdcall UpdateTitle + invoke SendMessage, [hEditor], AEM_GETMODIFIED, 0, 0 + xchg eax, [fLastModified] + cmp eax, [fLastModified] + je .finish + + call UpdateTitle +.finish: return endp @@ -85,11 +93,11 @@ stdcall StrCat, eax, cDefaultShortcuts stdcall SaveShortcuts, eax stdcall StrDel ; from the stack .check: - invoke SendMessage, [hEditor], EM_GETMODIFY, 0, 0 + invoke SendMessage, [hEditor], AEM_GETMODIFIED, 0, 0 test eax, eax jnz .noexit .exit: invoke PostQuitMessage, 0 @@ -115,18 +123,19 @@ proc OnNew, .wparam, .lparam begin .check: - invoke SendMessage, [hEditor], EM_GETMODIFY, 0, 0 + invoke SendMessage, [hEditor], AEM_GETMODIFIED, 0, 0 test eax, eax jnz .nonew .new: invoke SendMessage, [hEditor], WM_SETTEXT, 0, 0 stdcall StrDel, [hLoadedFilename] mov [hLoadedFilename], 0 + call UpdateTitle return .nonew: invoke MessageBox, [hMainForm], cErrorNotSaved, cTitleNotSaved, MB_YESNOCANCEL or MB_ICONQUESTION cmp eax, MR_NO @@ -159,11 +168,11 @@ je @f stdcall StrCat, ebx, [hLoadedFilename] @@: - invoke SendMessage, [hEditor], EM_GETMODIFY, 0, 0 + invoke SendMessage, [hEditor], AEM_GETMODIFIED, 0, 0 test eax, eax jz @f stdcall StrCat, ebx, cModified @@: stdcall StrPtr, ebx @@ -187,10 +196,11 @@ proc _openFileCallback, .name, .lparam .src dd ? begin stdcall SetString, hLoadedFilename, [.name] + call UpdateTitle stdcall StrNew mov [.src], eax stdcall LoadBinaryFile, [.name] @@ -258,11 +268,11 @@ stdcall StrPtr, [hLoadedFilename] stdcall SaveBinaryFile, eax, ecx, [ecx+string.len] stdcall StrDel ; from the stack. - invoke SendMessage, [hEditor], EM_SETMODIFY, 0, 0 + invoke SendMessage, [hEditor], AEM_SETMODIFIED, 0, 0 .nosave: return endp @@ -274,10 +284,11 @@ test eax, eax jz .exit stdcall SetString, hLoadedFilename, eax stdcall StrDel, eax + call UpdateTitle cmp [.wparam], 1 je .exit stdcall OnSave, 0, 0 .exit: Index: wikipad.cfg ================================================================== --- wikipad.cfg +++ wikipad.cfg cannot compute difference between binary files