Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3ec165fd
Commit
3ec165fd
authored
Jul 12, 2006
by
Thomas Kho
Committed by
Alexandre Julliard
Jul 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notepad: Change window title to be like Windows' notepad.exe.
parent
cc318be2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
19 deletions
+12
-19
En.rc
programs/notepad/En.rc
+1
-1
dialog.c
programs/notepad/dialog.c
+11
-18
No files found.
programs/notepad/En.rc
View file @
3ec165fd
...
...
@@ -108,7 +108,7 @@ STRING_ERROR, "ERROR"
STRING_WARNING, "WARNING"
STRING_INFO, "Information"
STRING_UNTITLED, "
(untitled)
"
STRING_UNTITLED, "
Untitled
"
STRING_ALL_FILES, "All files (*.*)"
STRING_TEXT_FILES_TXT, "Text files (*.txt)"
...
...
programs/notepad/dialog.c
View file @
3ec165fd
...
...
@@ -54,30 +54,23 @@ VOID ShowLastError(void)
/**
* Sets the caption of the main window according to Globals.szFileTitle:
*
Notepad - (untitled)
if no file is open
*
Notepad - [filename]
if a file is given
*
Untitled - Notepad
if no file is open
*
filename - Notepad
if a file is given
*/
static
void
UpdateWindowCaption
(
void
)
{
WCHAR
szCaption
[
MAX_STRING_LEN
];
WCHAR
szUntitled
[
MAX_STRING_LEN
];
WCHAR
szNotepad
[
MAX_STRING_LEN
];
static
const
WCHAR
hyphenW
[]
=
{
' '
,
'-'
,
' '
,
0
};
LoadString
(
Globals
.
hInstance
,
STRING_NOTEPAD
,
szCaption
,
SIZEOF
(
szCaption
));
if
(
Globals
.
szFileTitle
[
0
]
!=
'\0'
)
{
static
const
WCHAR
bracket_lW
[]
=
{
' '
,
'-'
,
' '
,
'['
,
0
};
static
const
WCHAR
bracket_rW
[]
=
{
']'
,
0
};
lstrcat
(
szCaption
,
bracket_lW
);
lstrcat
(
szCaption
,
Globals
.
szFileTitle
);
lstrcat
(
szCaption
,
bracket_rW
);
}
if
(
Globals
.
szFileTitle
[
0
]
!=
'\0'
)
lstrcpy
(
szCaption
,
Globals
.
szFileTitle
);
else
{
static
const
WCHAR
hyphenW
[]
=
{
' '
,
'-'
,
' '
,
0
};
LoadString
(
Globals
.
hInstance
,
STRING_UNTITLED
,
szUntitled
,
SIZEOF
(
szUntitled
));
lstrcat
(
szCaption
,
hyphenW
);
lstrcat
(
szCaption
,
szUntitled
);
}
LoadString
(
Globals
.
hInstance
,
STRING_UNTITLED
,
szCaption
,
SIZEOF
(
szCaption
));
LoadString
(
Globals
.
hInstance
,
STRING_NOTEPAD
,
szNotepad
,
SIZEOF
(
szNotepad
));
lstrcat
(
szCaption
,
hyphenW
);
lstrcat
(
szCaption
,
szNotepad
);
SetWindowText
(
Globals
.
hMainWnd
,
szCaption
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment