notepad: cancelling "save as" dialog box should cancel window closing
Hirofumi Katayama
katayama.hirofumi.mz at gmail.com
Wed Aug 27 22:09:52 CDT 2008
When closing window, cancelling "save as" dialog box should
cancel window closing.
diff -u -r wineold/wine-1.1.2/programs/notepad/dialog.c
wine/wine-1.1.2/programs/notepad/dialog.c
--- wineold/wine-1.1.2/programs/notepad/dialog.c 2008-07-26
00:42:25.000000000 +0900
+++ wine/wine-1.1.2/programs/notepad/dialog.c 2008-08-23
12:27:43.817550400 +0900
@@ -182,8 +182,7 @@
/* prompt user to save changes */
nResult = AlertFileNotSaved(Globals.szFileName);
switch (nResult) {
- case IDYES: DIALOG_FileSave();
- break;
+ case IDYES: return DIALOG_FileSave();
case IDNO: break;
@@ -316,15 +315,16 @@
}
-VOID DIALOG_FileSave(VOID)
+BOOL DIALOG_FileSave(VOID)
{
if (Globals.szFileName[0] == '\0')
- DIALOG_FileSaveAs();
+ return DIALOG_FileSaveAs();
else
DoSaveFile();
+ return TRUE;
}
-VOID DIALOG_FileSaveAs(VOID)
+BOOL DIALOG_FileSaveAs(VOID)
{
OPENFILENAME saveas;
WCHAR szPath[MAX_PATH];
@@ -352,7 +352,9 @@
SetFileName(szPath);
UpdateWindowCaption();
DoSaveFile();
+ return TRUE;
}
+ return FALSE;
}
typedef struct {
diff -u -r wineold/wine-1.1.2/programs/notepad/dialog.h
wine/wine-1.1.2/programs/notepad/dialog.h
--- wineold/wine-1.1.2/programs/notepad/dialog.h 2008-07-26
00:42:25.000000000 +0900
+++ wine/wine-1.1.2/programs/notepad/dialog.h 2008-08-23
12:27:34.203726400 +0900
@@ -20,8 +20,8 @@
VOID DIALOG_FileNew(VOID);
VOID DIALOG_FileOpen(VOID);
-VOID DIALOG_FileSave(VOID);
-VOID DIALOG_FileSaveAs(VOID);
+BOOL DIALOG_FileSave(VOID);
+BOOL DIALOG_FileSaveAs(VOID);
VOID DIALOG_FilePrint(VOID);
VOID DIALOG_FilePageSetup(VOID);
VOID DIALOG_FilePrinterSetup(VOID);
More information about the wine-patches
mailing list