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
68ce6023
Commit
68ce6023
authored
May 31, 2007
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Jun 04, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Add file saving dialog.
parent
69c9565e
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
45 additions
and
6 deletions
+45
-6
De.rc
programs/wordpad/De.rc
+1
-0
En.rc
programs/wordpad/En.rc
+1
-0
Fr.rc
programs/wordpad/Fr.rc
+2
-1
Hu.rc
programs/wordpad/Hu.rc
+1
-0
Ko.rc
programs/wordpad/Ko.rc
+1
-0
Nl.rc
programs/wordpad/Nl.rc
+1
-0
No.rc
programs/wordpad/No.rc
+1
-0
Pl.rc
programs/wordpad/Pl.rc
+1
-0
Ru.rc
programs/wordpad/Ru.rc
+1
-0
Tr.rc
programs/wordpad/Tr.rc
+1
-0
resource.h
programs/wordpad/resource.h
+4
-3
wordpad.c
programs/wordpad/wordpad.c
+30
-2
No files found.
programs/wordpad/De.rc
View file @
68ce6023
...
...
@@ -25,6 +25,7 @@ BEGIN
MENUITEM "&Neu\tCtrl+N", ID_FILE_NEW
MENUITEM "&ffnen\tCtrl+O", ID_FILE_OPEN
MENUITEM "&Speichern\tCtrl+S", ID_FILE_SAVE
MENUITEM "Speichern &unter...", ID_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "&Beenden", ID_FILE_EXIT
END
...
...
programs/wordpad/En.rc
View file @
68ce6023
...
...
@@ -25,6 +25,7 @@ BEGIN
MENUITEM "&New\tCtrl+N", ID_FILE_NEW
MENUITEM "&Open\tCtrl+O", ID_FILE_OPEN
MENUITEM "&Save\tCtrl+S", ID_FILE_SAVE
MENUITEM "Save &as . . .", ID_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "E&xit", ID_FILE_EXIT
END
...
...
programs/wordpad/Fr.rc
View file @
68ce6023
...
...
@@ -24,7 +24,8 @@ BEGIN
BEGIN
MENUITEM "&Nouveau\tCtrl+N", ID_FILE_NEW
MENUITEM "&Ouvrir\tCtrl+O", ID_FILE_OPEN
MENUITEM "&Sauver\tCtrl+S", ID_FILE_SAVE
MENUITEM "&Enregistrer\tCtrl+S", ID_FILE_SAVE
MENUITEM "Enregistrer &sous...", ID_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "&Quitter", ID_FILE_EXIT
END
...
...
programs/wordpad/Hu.rc
View file @
68ce6023
...
...
@@ -25,6 +25,7 @@ BEGIN
MENUITEM "&j\tCtrl+N", ID_FILE_NEW
MENUITEM "&Megnyits\tCtrl+O", ID_FILE_OPEN
MENUITEM "M&ents\tCtrl+S", ID_FILE_SAVE
MENUITEM "Ments m&sknt...", ID_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "&Kilps", ID_FILE_EXIT
END
...
...
programs/wordpad/Ko.rc
View file @
68ce6023
...
...
@@ -26,6 +26,7 @@ BEGIN
MENUITEM "새 파일(&N)\tCtrl+N", ID_FILE_NEW
MENUITEM "열기(&O)\tCtrl+O", ID_FILE_OPEN
MENUITEM "저장(&S)\tCtrl+S", ID_FILE_SAVE
MENUITEM "다른 이름으로 저장(&A)...", ID_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "나가기(&X)", ID_FILE_EXIT
END
...
...
programs/wordpad/Nl.rc
View file @
68ce6023
...
...
@@ -25,6 +25,7 @@ BEGIN
MENUITEM "&Nieuw\tCtrl+N" ID_FILE_NEW
MENUITEM "&Openen\tCtrl+O", ID_FILE_OPEN
MENUITEM "O&pslaan\tCtrl+S", ID_FILE_SAVE
MENUITEM "Ops&laan als...", ID_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "&Afsluiten", ID_FILE_EXIT
END
...
...
programs/wordpad/No.rc
View file @
68ce6023
...
...
@@ -25,6 +25,7 @@ BEGIN
MENUITEM "&Ny\tCtrl+N", ID_FILE_NEW
MENUITEM "&pne\tCtrl+O", ID_FILE_OPEN
MENUITEM "&Lagre\tCtrl+S", ID_FILE_SAVE
MENUITEM "Lagre &som . . .", ID_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "&Avslutt", ID_FILE_EXIT
END
...
...
programs/wordpad/Pl.rc
View file @
68ce6023
...
...
@@ -26,6 +26,7 @@ BEGIN
MENUITEM "&Nowy\tCtrl+N", ID_FILE_NEW
MENUITEM "&Otwrz\tCtrl+O", ID_FILE_OPEN
MENUITEM "&Zapisz\tCtrl+S", ID_FILE_SAVE
MENUITEM "Z&apisz jako...", ID_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "Za&kocz", ID_FILE_EXIT
END
...
...
programs/wordpad/Ru.rc
View file @
68ce6023
...
...
@@ -25,6 +25,7 @@ BEGIN
MENUITEM "&\tCtrl+N", ID_FILE_NEW
MENUITEM "&\tCtrl+O", ID_FILE_OPEN
MENUITEM "&\tCtrl+S", ID_FILE_SAVE
MENUITEM " &...", ID_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "&", ID_FILE_EXIT
END
...
...
programs/wordpad/Tr.rc
View file @
68ce6023
...
...
@@ -27,6 +27,7 @@ BEGIN
MENUITEM "&Yeni\tCtrl+N", ID_FILE_NEW
MENUITEM "&A\tCtrl+O", ID_FILE_OPEN
MENUITEM "&Kaydet\tCtrl+S", ID_FILE_SAVE
MENUITEM "&Farkl Kaydet...", ID_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "&k", ID_FILE_EXIT
END
...
...
programs/wordpad/resource.h
View file @
68ce6023
...
...
@@ -20,11 +20,12 @@
#define ID_FILE_OPEN 1001
#define ID_FILE_SAVE 1002
#define ID_FILE_NEW 1003
#define ID_FILE_SAVEAS 1004
#define ID_PRINT 100
4
#define ID_PREVIEW 100
5
#define ID_PRINT 100
5
#define ID_PREVIEW 100
6
#define ID_FIND 100
6
#define ID_FIND 100
7
#define ID_ALIGN_LEFT 1100
#define ID_ALIGN_CENTER 1101
...
...
programs/wordpad/wordpad.c
View file @
68ce6023
...
...
@@ -223,6 +223,29 @@ static void DoSaveFile(LPCWSTR wszSaveFileName)
set_caption
(
wszFileName
);
}
static
void
DialogSaveFile
(
void
)
{
OPENFILENAMEW
sfn
;
WCHAR
wszFile
[
MAX_PATH
]
=
{
'\0'
};
static
const
WCHAR
wszDefExt
[]
=
{
'r'
,
't'
,
'f'
,
'\0'
};
ZeroMemory
(
&
sfn
,
sizeof
(
sfn
));
sfn
.
lStructSize
=
sizeof
(
sfn
);
sfn
.
Flags
=
OFN_HIDEREADONLY
|
OFN_PATHMUSTEXIST
;
sfn
.
hwndOwner
=
hMainWnd
;
sfn
.
lpstrFilter
=
wszFilter
;
sfn
.
lpstrFile
=
wszFile
;
sfn
.
nMaxFile
=
MAX_PATH
;
sfn
.
lpstrDefExt
=
wszDefExt
;
if
(
!
GetSaveFileNameW
(
&
sfn
))
return
;
DoSaveFile
(
sfn
.
lpstrFile
);
}
static
void
HandleCommandLine
(
LPWSTR
cmdline
)
{
WCHAR
delimiter
;
...
...
@@ -466,9 +489,14 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
case
ID_FILE_SAVE
:
if
(
wszFileName
[
0
])
{
DoSaveFile
(
wszFileName
);
else
MessageBox
(
hWnd
,
"Can only save existing for now"
,
"WordPad"
,
MB_OK
);
break
;
}
/* Fall through */
case
ID_FILE_SAVEAS
:
DialogSaveFile
();
break
;
case
ID_PRINT
:
...
...
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