mirror of
https://github.com/reactos/reactos.git
synced 2024-06-28 17:01:28 +00:00
- Add DIALOG_StatusBarUpdateAll() and use it. - Fix the status bar initial contents.
This commit is contained in:
parent
bb67913156
commit
1fdbc80e58
|
@ -165,6 +165,14 @@ static VOID DIALOG_StatusBarUpdateEncoding(VOID)
|
||||||
SendMessageW(Globals.hStatusBar, SB_SETTEXTW, SBPART_ENCODING, (LPARAM)szText);
|
SendMessageW(Globals.hStatusBar, SB_SETTEXTW, SBPART_ENCODING, (LPARAM)szText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static VOID DIALOG_StatusBarUpdateAll(VOID)
|
||||||
|
{
|
||||||
|
DIALOG_StatusBarAlignParts();
|
||||||
|
DIALOG_StatusBarUpdateCaretPos();
|
||||||
|
DIALOG_StatusBarUpdateLineEndings();
|
||||||
|
DIALOG_StatusBarUpdateEncoding();
|
||||||
|
}
|
||||||
|
|
||||||
int DIALOG_StringMsgBox(HWND hParent, int formatId, LPCTSTR szString, DWORD dwFlags)
|
int DIALOG_StringMsgBox(HWND hParent, int formatId, LPCTSTR szString, DWORD dwFlags)
|
||||||
{
|
{
|
||||||
TCHAR szMessage[MAX_STRING_LEN];
|
TCHAR szMessage[MAX_STRING_LEN];
|
||||||
|
@ -462,13 +470,11 @@ VOID DoOpenFile(LPCTSTR szFileName)
|
||||||
UpdateWindowCaption(TRUE);
|
UpdateWindowCaption(TRUE);
|
||||||
NOTEPAD_EnableSearchMenu();
|
NOTEPAD_EnableSearchMenu();
|
||||||
|
|
||||||
/* Update line endings and encoding on the status bar */
|
|
||||||
DIALOG_StatusBarUpdateLineEndings();
|
|
||||||
DIALOG_StatusBarUpdateEncoding();
|
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (hFile != INVALID_HANDLE_VALUE)
|
if (hFile != INVALID_HANDLE_VALUE)
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
|
|
||||||
|
DIALOG_StatusBarUpdateAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID DIALOG_FileNew(VOID)
|
VOID DIALOG_FileNew(VOID)
|
||||||
|
@ -479,6 +485,7 @@ VOID DIALOG_FileNew(VOID)
|
||||||
SendMessage(Globals.hEdit, EM_EMPTYUNDOBUFFER, 0, 0);
|
SendMessage(Globals.hEdit, EM_EMPTYUNDOBUFFER, 0, 0);
|
||||||
SetFocus(Globals.hEdit);
|
SetFocus(Globals.hEdit);
|
||||||
NOTEPAD_EnableSearchMenu();
|
NOTEPAD_EnableSearchMenu();
|
||||||
|
DIALOG_StatusBarUpdateAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -626,11 +633,7 @@ BOOL DIALOG_FileSaveAs(VOID)
|
||||||
if (DoSaveFile())
|
if (DoSaveFile())
|
||||||
{
|
{
|
||||||
UpdateWindowCaption(TRUE);
|
UpdateWindowCaption(TRUE);
|
||||||
|
DIALOG_StatusBarUpdateAll();
|
||||||
/* Update line endings and encoding on the status bar */
|
|
||||||
DIALOG_StatusBarUpdateLineEndings();
|
|
||||||
DIALOG_StatusBarUpdateEncoding();
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -942,9 +945,7 @@ VOID DoShowHideStatusBar(VOID)
|
||||||
ShowWindow(Globals.hStatusBar, (Globals.bShowStatusBar ? SW_SHOWNOACTIVATE : SW_HIDE));
|
ShowWindow(Globals.hStatusBar, (Globals.bShowStatusBar ? SW_SHOWNOACTIVATE : SW_HIDE));
|
||||||
|
|
||||||
/* Update status bar contents */
|
/* Update status bar contents */
|
||||||
DIALOG_StatusBarUpdateCaretPos();
|
DIALOG_StatusBarUpdateAll();
|
||||||
DIALOG_StatusBarUpdateLineEndings();
|
|
||||||
DIALOG_StatusBarUpdateEncoding();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID DoCreateEditWindow(VOID)
|
VOID DoCreateEditWindow(VOID)
|
||||||
|
|
Loading…
Reference in a new issue