Small notepad fixes

Dmitry Timoshkov dmitry at baikal.ru
Tue Nov 12 22:13:26 CST 2002


"Rok Mandeljc" <rokmandeljc at hotmail.com> wrote:

> I've fixed some minor bugs in notepad
>
> Changelog:
>     - I've added UpdateWindowCaption() to WinMain(...); if you run "wine  notepad -- text.txt" > you get "CAPTION - text.txt" for
the caption, where CAPTION is name for Notepad in your > > > > language. But if you run "wine notepad", you get "Notepad" in
caption. I found out that if you > run notepad with file name, it calls DoOpenFile(...) which calls UpdateWindowCaption in the > >
end. So i've added UpdateWindowCaption in WinMain so it displays proper caption.

Alexandre, please use attached patch instead.

--
Dmitry.
-------------- next part --------------
--- cvs/cw/crossover/office/wine/programs/notepad/main.c	Sat Aug 10 18:05:31 2002
+++ wine/programs/notepad/main.c	Fri Aug 16 00:10:05 2002
@@ -41,6 +41,7 @@
 VOID SetFileName(LPSTR szFileName)
 {
     lstrcpy(Globals.szFileName, szFileName);
+    Globals.szFileTitle[0] = 0;
     GetFileTitle(szFileName, Globals.szFileTitle, sizeof(Globals.szFileTitle));
 }
 
@@ -125,8 +126,6 @@
                              ES_AUTOVSCROLL | ES_MULTILINE,
                              0, 0, rc.right, rc.bottom, hWnd,
                              NULL, Globals.hInstance, NULL);
-            NOTEPAD_InitData();
-            DIALOG_FileNew();
         } else {
             ShowLastError();
             return -1;
@@ -299,6 +298,9 @@
         ShowLastError();
         ExitProcess(1);
     }
+
+    NOTEPAD_InitData();
+    DIALOG_FileNew();
 
     ShowWindow(Globals.hMainWnd, show);
     UpdateWindow(Globals.hMainWnd);


More information about the wine-patches mailing list