mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 07:06:52 +00:00
notepad: Fix trying to open non-existent files with the command line.
This commit is contained in:
parent
f57c603798
commit
42729bc1c1
|
@ -59,7 +59,7 @@ VOID ShowLastError(void)
|
||||||
* Untitled - Notepad if no file is open
|
* Untitled - Notepad if no file is open
|
||||||
* filename - Notepad if a file is given
|
* filename - Notepad if a file is given
|
||||||
*/
|
*/
|
||||||
static void UpdateWindowCaption(void)
|
void UpdateWindowCaption(void)
|
||||||
{
|
{
|
||||||
WCHAR szCaption[MAX_STRING_LEN];
|
WCHAR szCaption[MAX_STRING_LEN];
|
||||||
WCHAR szNotepad[MAX_STRING_LEN];
|
WCHAR szNotepad[MAX_STRING_LEN];
|
||||||
|
|
|
@ -52,6 +52,7 @@ int DIALOG_StringMsgBox(HWND hParent, int formatId, LPCWSTR szString, DWORD dwFl
|
||||||
|
|
||||||
/* utility functions */
|
/* utility functions */
|
||||||
VOID ShowLastError(void);
|
VOID ShowLastError(void);
|
||||||
|
void UpdateWindowCaption(void);
|
||||||
BOOL FileExists(LPCWSTR szFilename);
|
BOOL FileExists(LPCWSTR szFilename);
|
||||||
BOOL DoCloseFile(void);
|
BOOL DoCloseFile(void);
|
||||||
void DoOpenFile(LPCWSTR szFileName);
|
void DoOpenFile(LPCWSTR szFileName);
|
||||||
|
|
|
@ -698,7 +698,8 @@ static void HandleCommandLine(LPWSTR cmdline)
|
||||||
{
|
{
|
||||||
switch (AlertFileDoesNotExist(file_name)) {
|
switch (AlertFileDoesNotExist(file_name)) {
|
||||||
case IDYES:
|
case IDYES:
|
||||||
DoOpenFile(file_name);
|
SetFileName(file_name);
|
||||||
|
UpdateWindowCaption();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDNO:
|
case IDNO:
|
||||||
|
|
Loading…
Reference in a new issue