Commit c55dce01 authored by Andriy Palamarchuk's avatar Andriy Palamarchuk Committed by Alexandre Julliard

Use rich text edit control instead of handling user input and

rendering on its own, use named constants instead of magic numbers, cleaned code, implemented Undo functionality.
parent 22ffa982
...@@ -22,49 +22,49 @@ ...@@ -22,49 +22,49 @@
MAIN_MENU MENU LANGUAGE LANG_DANISH, SUBLANG_NEUTRAL MAIN_MENU MENU LANGUAGE LANG_DANISH, SUBLANG_NEUTRAL
{ {
POPUP "&Filef" { POPUP "&Filef" {
MENUITEM "&Ny...", 0x100 MENUITEM "&Ny...", CMD_NEW
MENUITEM "&bn\tEnter", 0x101 MENUITEM "&bn\tEnter", CMD_OPEN
MENUITEM "&Gem", 0x102 MENUITEM "&Gem", CMD_SAVE
MENUITEM "Gem so&m...", 0x103 MENUITEM "Gem so&m...", CMD_SAVE_AS
MENUITEM "&Udskriv", 0x104 MENUITEM "&Udskriv", CMD_PRINT
MENUITEM "Side&opstning...", 0x105 MENUITEM "Side&opstning...", CMD_PAGE_SETUP
MENUITEM "&Indstil printer...", 0x106 MENUITEM "&Indstil printer...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Afslut", 0x108 MENUITEM "&Afslut", CMD_EXIT
} }
POPUP "&Rediger" { POPUP "&Rediger" {
MENUITEM "&Fortryd\tCtrl+Z", 0x110 MENUITEM "&Fortryd\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Klip\tCtrl+X", 0x111 MENUITEM "&Klip\tCtrl+X", CMD_CUT
MENUITEM "K&opier\tCtrl+C", 0x112 MENUITEM "K&opier\tCtrl+C", CMD_COPY
MENUITEM "St &ind\tCtrl+V", 0x113 MENUITEM "St &ind\tCtrl+V", CMD_PASTE
MENUITEM "&Slet\tDel", 0x114 MENUITEM "&Slet\tDel", CMD_DELETE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Marker &alt", 0x116 MENUITEM "Marker &alt", CMD_SELECT_ALL
MENUITEM "&Dato/tid\tF5", 0x117 MENUITEM "&Dato/tid\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Automatisk &linjeskift", 0x119 MENUITEM "Automatisk &linjeskift", CMD_WRAP
} }
POPUP "&Sg" { POPUP "&Sg" {
MENUITEM "&Sg...", 0x120 MENUITEM "&Sg...", CMD_SEARCH
MENUITEM "&Find nste\tF3", 0x121 MENUITEM "&Find nste\tF3", CMD_SEARCH_NEXT
} }
POPUP "&Hjlp" { POPUP "&Hjlp" {
MENUITEM "&Indhold", 0x130 MENUITEM "&Indhold", CMD_HELP_CONTENTS
MENUITEM "&Sg efter hjlp om...", 0x131 MENUITEM "&Sg efter hjlp om...", CMD_HELP_SEARCH
MENUITEM "&Brug af Hjlp", 0x132 MENUITEM "&Brug af Hjlp", CMD_HELP_ON_HELP
MENUITEM SEPARATOR MENUITEM SEPARATOR
POPUP "&Om Notesblok..." { POPUP "&Om Notesblok..." {
MENUITEM "&Licens", 0x135 MENUITEM "&Licens", CMD_LICENSE
MENUITEM "&NO WARRANTY", 0x136 MENUITEM "&NO WARRANTY", CMD_NO_WARRANTY
MENUITEM "&Om WINE", 0x137 MENUITEM "&Om WINE", CMD_ABOUT_WINE
} }
} }
} }
/* Dialog `Page setup' */ /* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95 DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_DANISH, SUBLANG_NEUTRAL LANGUAGE LANG_DANISH, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv" FONT 8, "Helv"
...@@ -92,33 +92,33 @@ PUSHBUTTON "&Hjlp", 0x153, 180, 39, 40, 15, WS_TABSTOP ...@@ -92,33 +92,33 @@ PUSHBUTTON "&Hjlp", 0x153, 180, 39, 40, 15, WS_TABSTOP
STRINGTABLE DISCARDABLE LANGUAGE LANG_DANISH, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE LANGUAGE LANG_DANISH, SUBLANG_NEUTRAL
{ {
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */ STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */ STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_NOTEPAD, "Notesblok" STRING_NOTEPAD, "Notesblok"
STRING_ERROR, "FEJL" STRING_ERROR, "FEJL"
STRING_WARNING, "ADVARSEL" STRING_WARNING, "ADVARSEL"
STRING_INFO, "Information" STRING_INFO, "Information"
STRING_UNTITLED, "(ikke-navngivet)" STRING_UNTITLED, "(ikke-navngivet)"
STRING_ALL_FILES, "Alle filer (*.*)" STRING_ALL_FILES, "Alle filer (*.*)"
STRING_TEXT_FILES_TXT, "Tekst filer (*.txt)" STRING_TEXT_FILES_TXT, "Tekst filer (*.txt)"
STRING_TOOLARGE, "Filen '%s' er for stor til Notesblok. \ STRING_TOOLARGE, "Filen '%s' er for stor til Notesblok. \
\nBrug en anden editor til at redigere filen." \nBrug en anden editor til at redigere filen."
STRING_NOTEXT, "Du har ikke skrevet noget tekst. \ STRING_NOTEXT, "Du har ikke skrevet noget tekst. \
\nSkriv noget tekst, og prv s igen" \nSkriv noget tekst, og prv s igen"
STRING_DOESNOTEXIST, "File '%s'\ndoes not exist\n\n \ STRING_DOESNOTEXIST, "File '%s'\ndoes not exist\n\n \
Do you want to create a new file ?" Do you want to create a new file ?"
STRING_NOTSAVED, "File '%s'\nhas been modified\n\n \ STRING_NOTSAVED, "File '%s'\nhas been modified\n\n \
Would you like to save the changes ?" Would you like to save the changes ?"
STRING_NOTFOUND, "Kan ikke finde '%s'." STRING_NOTFOUND, "Kan ikke finde '%s'."
STRING_OUT_OF_MEMORY, "Der er ikke nok hukommelse til at udfre \ STRING_OUT_OF_MEMORY, "Der er ikke nok hukommelse til at udfre \
denne operation. \nAfslut et eller flere aktive programmer for at frigre \ denne operation. \nAfslut et eller flere aktive programmer for at frigre \
hukommelse, og prv s igen." hukommelse, og prv s igen."
......
...@@ -23,49 +23,49 @@ ...@@ -23,49 +23,49 @@
MAIN_MENU MENU LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL MAIN_MENU MENU LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
{ {
POPUP "&Datei" { POPUP "&Datei" {
MENUITEM "&Neu...", 0x100 MENUITEM "&Neu...", CMD_NEW
MENUITEM "&ffnen...", 0x101 MENUITEM "&ffnen...", CMD_OPEN
MENUITEM "&Speichern", 0x102 MENUITEM "&Speichern", CMD_SAVE
MENUITEM "Speichern &unter...", 0x103 MENUITEM "Speichern &unter...", CMD_SAVE_AS
MENUITEM "&Drucken", 0x104 MENUITEM "&Drucken", CMD_PRINT
MENUITEM "Seite ein&richten...", 0x105 MENUITEM "Seite ein&richten...", CMD_PAGE_SETUP
MENUITEM "Drucker&einrichtung...", 0x106 MENUITEM "Drucker&einrichtung...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Beenden", 0x108 MENUITEM "&Beenden", CMD_EXIT
} }
POPUP "&Bearbeiten" { POPUP "&Bearbeiten" {
MENUITEM "&Rckgngig\tStrg+Z", 0x110 MENUITEM "&Rckgngig\tStrg+Z", CMD_UNDO
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Ausschneiden\tStrg+X", 0x111 MENUITEM "&Ausschneiden\tStrg+X", CMD_CUT
MENUITEM "&Kopieren\tStrg+C", 0x112 MENUITEM "&Kopieren\tStrg+C", CMD_COPY
MENUITEM "&Einfgen\tStrg+V", 0x113 MENUITEM "&Einfgen\tStrg+V", CMD_PASTE
MENUITEM "&Lschen\tEntf", 0x114 MENUITEM "&Lschen\tEntf", CMD_DELETE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Alles &markieren", 0x116 MENUITEM "Alles &markieren", CMD_SELECT_ALL
MENUITEM "&Uhrzeit/Datum\tF5", 0x117 MENUITEM "&Uhrzeit/Datum\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Zeilenumbruch", 0x119 MENUITEM "&Zeilenumbruch", CMD_WRAP
} }
POPUP "&Suchen" { POPUP "&Suchen" {
MENUITEM "Suchen...", 0x120 MENUITEM "Suchen...", CMD_SEARCH
MENUITEM "&Weitersuchen\tF3", 0x121 MENUITEM "&Weitersuchen\tF3", CMD_SEARCH_NEXT
} }
POPUP "&Hilfe" { POPUP "&Hilfe" {
MENUITEM "&Inhalt", 0x130 MENUITEM "&Inhalt", CMD_HELP_CONTENTS
MENUITEM "&Suchen...", 0x131 MENUITEM "&Suchen...", CMD_HELP_SEARCH
MENUITEM "&Hilfe benutzen", 0x132 MENUITEM "&Hilfe benutzen", CMD_HELP_ON_HELP
MENUITEM SEPARATOR MENUITEM SEPARATOR
POPUP "Inf&o..." { POPUP "Inf&o..." {
MENUITEM "&Lizenz", 0x135 MENUITEM "&Lizenz", CMD_LICENSE
MENUITEM "&KEINE GARANTIE", 0x136 MENUITEM "&KEINE GARANTIE", CMD_NO_WARRANTY
MENUITEM "&ber Wine", 0x137 MENUITEM "&ber Wine", CMD_ABOUT_WINE
} }
} }
} }
/* Dialog `Page setup' */ /* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95 DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv" FONT 8, "Helv"
...@@ -93,34 +93,34 @@ PUSHBUTTON "&Hilfe", 0x153, 180, 39, 40, 15, WS_TABSTOP ...@@ -93,34 +93,34 @@ PUSHBUTTON "&Hilfe", 0x153, 180, 39, 40, 15, WS_TABSTOP
STRINGTABLE DISCARDABLE LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
{ {
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */ STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */ STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_NOTEPAD, "Editor" STRING_NOTEPAD, "Editor"
STRING_ERROR, "FEHLER" STRING_ERROR, "FEHLER"
STRING_WARNING, "ACHTUNG" STRING_WARNING, "ACHTUNG"
STRING_INFO, "Information" STRING_INFO, "Information"
STRING_UNTITLED, "(unbenannt)" STRING_UNTITLED, "(unbenannt)"
STRING_ALL_FILES, "Alle Dateien (*.*)" STRING_ALL_FILES, "Alle Dateien (*.*)"
STRING_TEXT_FILES_TXT, "Textdateien (*.txt)" STRING_TEXT_FILES_TXT, "Textdateien (*.txt)"
STRING_TOOLARGE, "'%s' ist zu gross fr den Editor\n \ STRING_TOOLARGE, "'%s' ist zu gross fr den Editor\n \
Benutzen Sie bitte einen anderen Editor, um diese Datei zu bearbeiten." Benutzen Sie bitte einen anderen Editor, um diese Datei zu bearbeiten."
STRING_NOTEXT, "Sie haben keinen Text eingegeben, der \ STRING_NOTEXT, "Sie haben keinen Text eingegeben, der \
gespeichert\n werden knnte. Geben Sie Text ein, und versuchen Sie es \ gespeichert\n werden knnte. Geben Sie Text ein, und versuchen Sie es \
\nerneut." \nerneut."
STRING_DOESNOTEXIST, "File '%s'\ndoes not exist\n\n \ STRING_DOESNOTEXIST, "File '%s'\ndoes not exist\n\n \
Do you want to create a new file ?" Do you want to create a new file ?"
STRING_NOTSAVED, "Datei %s\n wurde geaendert.\n\n \ STRING_NOTSAVED, "Datei %s\n wurde geaendert.\n\n \
Moechten Sie die Aenderungen speichern ?" Moechten Sie die Aenderungen speichern ?"
STRING_NOTFOUND, "'%s' kann nicht gefunden werden." STRING_NOTFOUND, "'%s' kann nicht gefunden werden."
STRING_OUT_OF_MEMORY, "Nicht gengend Arbeitsspeicher, \ STRING_OUT_OF_MEMORY, "Nicht gengend Arbeitsspeicher, \
um diese Funktion \nabzuschlieen. Beenden Sie eine oder mehrere \ um diese Funktion \nabzuschlieen. Beenden Sie eine oder mehrere \
\nAnwendungen, um den verfgbaren Arbeitsspeicher zu \nerhhen." \nAnwendungen, um den verfgbaren Arbeitsspeicher zu \nerhhen."
......
...@@ -23,49 +23,49 @@ ...@@ -23,49 +23,49 @@
MAIN_MENU MENU LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL MAIN_MENU MENU LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
{ {
POPUP "&File" { POPUP "&File" {
MENUITEM "&New...", 0x100 MENUITEM "&New...", CMD_NEW
MENUITEM "&Open", 0x101 MENUITEM "&Open", CMD_OPEN
MENUITEM "&Save", 0x102 MENUITEM "&Save", CMD_SAVE
MENUITEM "Save &as...", 0x103 MENUITEM "Save &as...", CMD_SAVE_AS
MENUITEM "&Print", 0x104 MENUITEM "&Print", CMD_PRINT
MENUITEM "Page Se&tup...", 0x105 MENUITEM "Page Se&tup...", CMD_PAGE_SETUP
MENUITEM "P&rinter Setup...", 0x106 MENUITEM "P&rinter Setup...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Exit", 0x108 MENUITEM "&Exit", CMD_EXIT
} }
POPUP "&Edit" { POPUP "&Edit" {
MENUITEM "&Undo\tCtrl+Z", 0x110 MENUITEM "&Undo\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Cu&t\tCtrl+X", 0x111 MENUITEM "Cu&t\tCtrl+X", CMD_CUT
MENUITEM "&Copy\tCtrl+C", 0x112 MENUITEM "&Copy\tCtrl+C", CMD_COPY
MENUITEM "&Paste\tCtrl+V", 0x113 MENUITEM "&Paste\tCtrl+V", CMD_PASTE
MENUITEM "&Delete\tDel", 0x114 MENUITEM "&Delete\tDel", CMD_DELETE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Select &all", 0x116 MENUITEM "Select &all", CMD_SELECT_ALL
MENUITEM "&Time/Date\tF5", 0x117 MENUITEM "&Time/Date\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Wrap long lines", 0x119 MENUITEM "&Wrap long lines", CMD_WRAP
} }
POPUP "&Search" { POPUP "&Search" {
MENUITEM "&Search", 0x120 MENUITEM "&Search", CMD_SEARCH
MENUITEM "&Search next\tF3", 0x121 MENUITEM "&Search next\tF3", CMD_SEARCH_NEXT
} }
POPUP "&Help" { POPUP "&Help" {
MENUITEM "&Contents", 0x130 MENUITEM "&Contents", CMD_HELP_CONTENTS
MENUITEM "&Search...", 0x131 MENUITEM "&Search...", CMD_HELP_SEARCH
MENUITEM "&Help on help", 0x132 MENUITEM "&Help on help", CMD_HELP_ON_HELP
MENUITEM SEPARATOR MENUITEM SEPARATOR
POPUP "Inf&o..." { POPUP "Inf&o..." {
MENUITEM "&License", 0x135 MENUITEM "&License", CMD_LICENSE
MENUITEM "&NO WARRANTY", 0x136 MENUITEM "&NO WARRANTY", CMD_NO_WARRANTY
MENUITEM "&About Wine", 0x137 MENUITEM "&About Wine", CMD_ABOUT_WINE
} }
} }
} }
/* Dialog `Page setup' */ /* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95 DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv" FONT 8, "Helv"
...@@ -93,33 +93,33 @@ PUSHBUTTON "&Help", 0x153, 180, 39, 40, 15, WS_TABSTOP ...@@ -93,33 +93,33 @@ PUSHBUTTON "&Help", 0x153, 180, 39, 40, 15, WS_TABSTOP
STRINGTABLE DISCARDABLE LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
{ {
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */ STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */ STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_NOTEPAD, "Notepad" STRING_NOTEPAD, "Notepad"
STRING_ERROR, "ERROR" STRING_ERROR, "ERROR"
STRING_WARNING, "WARNING" STRING_WARNING, "WARNING"
STRING_INFO, "Information" STRING_INFO, "Information"
STRING_UNTITLED, "(untitled)" STRING_UNTITLED, "(untitled)"
STRING_ALL_FILES, "All files (*.*)" STRING_ALL_FILES, "All files (*.*)"
STRING_TEXT_FILES_TXT, "Text files (*.txt)" STRING_TEXT_FILES_TXT, "Text files (*.txt)"
STRING_TOOLARGE, "File '%s' is too large for notepad.\n \ STRING_TOOLARGE, "File '%s' is too large for notepad.\n \
Please use a different editor." Please use a different editor."
STRING_NOTEXT, "You didn't enter any text. \ STRING_NOTEXT, "You didn't enter any text. \
\nPlease type something and try again" \nPlease type something and try again"
STRING_DOESNOTEXIST, "File '%s'\ndoes not exist\n\n \ STRING_DOESNOTEXIST, "File '%s'\ndoes not exist\n\n \
Do you want to create a new file ?" Do you want to create a new file ?"
STRING_NOTSAVED, "File '%s'\nhas been modified\n\n \ STRING_NOTSAVED, "File '%s'\nhas been modified\n\n \
Would you like to save the changes ?" Would you like to save the changes ?"
STRING_NOTFOUND, "'%s' can not be found." STRING_NOTFOUND, "'%s' can not be found."
STRING_OUT_OF_MEMORY, "Not enough memory to complete this \ STRING_OUT_OF_MEMORY, "Not enough memory to complete this \
task. \nClose one or more applications to increase the amount of \nfree \ task. \nClose one or more applications to increase the amount of \nfree \
memory." memory."
......
...@@ -24,49 +24,49 @@ ...@@ -24,49 +24,49 @@
MAIN_MENU MENU LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL MAIN_MENU MENU LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
{ {
POPUP "&Archivo" { POPUP "&Archivo" {
MENUITEM "&Nuevo", 0x100 MENUITEM "&Nuevo", CMD_NEW
MENUITEM "&Abrir", 0x101 MENUITEM "&Abrir", CMD_OPEN
MENUITEM "&Guardar", 0x102 MENUITEM "&Guardar", CMD_SAVE
MENUITEM "Guardar co&mo...", 0x103 MENUITEM "Guardar co&mo...", CMD_SAVE_AS
MENUITEM "&Imprimir", 0x104 MENUITEM "&Imprimir", CMD_PRINT
MENUITEM "&Configurar pgina...", 0x105 MENUITEM "&Configurar pgina...", CMD_PAGE_SETUP
MENUITEM "&Configuracin impresora...", 0x106 MENUITEM "&Configuracin impresora...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Salir", 0x108 MENUITEM "&Salir", CMD_EXIT
} }
POPUP "&Editar" { POPUP "&Editar" {
MENUITEM "&Deshacer\tCtrl+Z", 0x110 MENUITEM "&Deshacer\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Cor&tar\tCtrl+X", 0x111 MENUITEM "Cor&tar\tCtrl+X", CMD_CUT
MENUITEM "&Copiar\tCtrl+C", 0x112 MENUITEM "&Copiar\tCtrl+C", CMD_COPY
MENUITEM "&Pegar\tCtrl+V", 0x113 MENUITEM "&Pegar\tCtrl+V", CMD_PASTE
MENUITEM "&Borrar\tDel", 0x114 MENUITEM "&Borrar\tDel", CMD_DELETE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Seleccionar t&odo", 0x116 MENUITEM "Seleccionar t&odo", CMD_SELECT_ALL
MENUITEM "&Hora y Fecha\tF5", 0x117 MENUITEM "&Hora y Fecha\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Ajuste de lnea automtico", 0x119 MENUITEM "&Ajuste de lnea automtico", CMD_WRAP
} }
POPUP "&Buscar" { POPUP "&Buscar" {
MENUITEM "&Buscar...", 0x120 MENUITEM "&Buscar...", CMD_SEARCH
MENUITEM "Buscar &siguiente\tF3", 0x121 MENUITEM "Buscar &siguiente\tF3", CMD_SEARCH_NEXT
} }
POPUP "&Ayuda" { POPUP "&Ayuda" {
MENUITEM "&Indice", 0x130 MENUITEM "&Indice", CMD_HELP_CONTENTS
MENUITEM "&Buscar...", 0x131 MENUITEM "&Buscar...", CMD_HELP_SEARCH
MENUITEM "Ayuda sobre la ayuda", 0x132 MENUITEM "Ayuda sobre la ayuda", CMD_HELP_ON_HELP
MENUITEM SEPARATOR MENUITEM SEPARATOR
POPUP "Inf&ormacin..." { POPUP "Inf&ormacin..." {
MENUITEM "&Licencia", 0x135 MENUITEM "&Licencia", CMD_LICENSE
MENUITEM "SIN &GARANTA", 0x136 MENUITEM "SIN &GARANTA", CMD_NO_WARRANTY
MENUITEM "&Acerca de Wine", 0x137 MENUITEM "&Acerca de Wine", CMD_ABOUT_WINE
} }
} }
} }
/* Dialog `Page setup' */ /* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95 DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv" FONT 8, "Helv"
...@@ -94,33 +94,33 @@ PUSHBUTTON "&Ayuda", 0x153, 180, 39, 40, 15, WS_TABSTOP ...@@ -94,33 +94,33 @@ PUSHBUTTON "&Ayuda", 0x153, 180, 39, 40, 15, WS_TABSTOP
STRINGTABLE DISCARDABLE LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
{ {
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Pgina &s" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Pgina &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */ STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */ STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_NOTEPAD, "Bloc de Notas" STRING_NOTEPAD, "Bloc de Notas"
STRING_ERROR, "ERROR" STRING_ERROR, "ERROR"
STRING_WARNING, "CUIDADO" STRING_WARNING, "CUIDADO"
STRING_INFO, "Informacin" STRING_INFO, "Informacin"
STRING_UNTITLED, "(sin ttulo)" STRING_UNTITLED, "(sin ttulo)"
STRING_ALL_FILES, "Todos los archivos (*.*)" STRING_ALL_FILES, "Todos los archivos (*.*)"
STRING_TEXT_FILES_TXT, "Documentos de texto (*.txt)" STRING_TEXT_FILES_TXT, "Documentos de texto (*.txt)"
STRING_TOOLARGE, "El archivo '%s' es demasiado grande para el bloc de notas.\n \ STRING_TOOLARGE, "El archivo '%s' es demasiado grande para el bloc de notas.\n \
Use otro editor." Use otro editor."
STRING_NOTEXT, "Ud. no escribi nada. \ STRING_NOTEXT, "Ud. no escribi nada. \
\nPor favor escriba algo y pruebe de nuevo" \nPor favor escriba algo y pruebe de nuevo"
STRING_DOESNOTEXIST, "File '%s'\ndoes not exist\n\n \ STRING_DOESNOTEXIST, "File '%s'\ndoes not exist\n\n \
Do you want to create a new file ?" Do you want to create a new file ?"
STRING_NOTSAVED, "El texto en el archivo '%s' ha cambiado\n\n \ STRING_NOTSAVED, "El texto en el archivo '%s' ha cambiado\n\n \
Desea guardar los cambios?" Desea guardar los cambios?"
STRING_NOTFOUND, "no se encontr '%s'." STRING_NOTFOUND, "no se encontr '%s'."
STRING_OUT_OF_MEMORY, "No hay suficiente memoria para terminar \ STRING_OUT_OF_MEMORY, "No hay suficiente memoria para terminar \
esta tarea. \nCierre una o ms aplicaciones para aumentar la cantidad \nde \ esta tarea. \nCierre una o ms aplicaciones para aumentar la cantidad \nde \
memoria libre." memoria libre."
......
...@@ -22,49 +22,49 @@ ...@@ -22,49 +22,49 @@
MAIN_MENU MENU LANGUAGE LANG_FINNISH, SUBLANG_NEUTRAL MAIN_MENU MENU LANGUAGE LANG_FINNISH, SUBLANG_NEUTRAL
{ {
POPUP "&Tiedosto" { POPUP "&Tiedosto" {
MENUITEM "&Uusi...", 0x100 MENUITEM "&Uusi...", CMD_NEW
MENUITEM "&Avaa", 0x101 MENUITEM "&Avaa", CMD_OPEN
MENUITEM "Ta&lleta", 0x102 MENUITEM "Ta&lleta", CMD_SAVE
MENUITEM "Talleta &nimell...", 0x103 MENUITEM "Talleta &nimell...", CMD_SAVE_AS
MENUITEM "T&ulosta", 0x104 MENUITEM "T&ulosta", CMD_PRINT
MENUITEM "&Sivun asetukset...", 0x105 MENUITEM "&Sivun asetukset...", CMD_PAGE_SETUP
MENUITEM "&Kirjoittimen asetukset...", 0x106 MENUITEM "&Kirjoittimen asetukset...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Poistu", 0x108 MENUITEM "&Poistu", CMD_EXIT
} }
POPUP "&Muokkaa" { POPUP "&Muokkaa" {
MENUITEM "&Palauta\tCtrl+Z", 0x110 MENUITEM "&Palauta\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Leikkaa\tCtrl+X", 0x111 MENUITEM "&Leikkaa\tCtrl+X", CMD_CUT
MENUITEM "&Kopioi\tCtrl+C", 0x112 MENUITEM "&Kopioi\tCtrl+C", CMD_COPY
MENUITEM "L&iit\tCtrl+V", 0x113 MENUITEM "L&iit\tCtrl+V", CMD_PASTE
MENUITEM "P&oista\tDel", 0x114 MENUITEM "P&oista\tDel", CMD_DELETE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Valitse kaikki", 0x116 MENUITEM "&Valitse kaikki", CMD_SELECT_ALL
MENUITEM "&Aika/Pivmr\tF5", 0x117 MENUITEM "&Aika/Pivmr\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Ka&tkaise pitk rivi", 0x119 MENUITEM "Ka&tkaise pitk rivi", CMD_WRAP
} }
POPUP "&Etsi" { POPUP "&Etsi" {
MENUITEM "Etsi...", 0x120 MENUITEM "Etsi...", CMD_SEARCH
MENUITEM "Etsi &seuraava\tF3", 0x121 MENUITEM "Etsi &seuraava\tF3", CMD_SEARCH_NEXT
} }
POPUP "&Apua" { POPUP "&Apua" {
MENUITEM "&Sislt", 0x130 MENUITEM "&Sislt", CMD_HELP_CONTENTS
MENUITEM "&Etsi...", 0x131 MENUITEM "&Etsi...", CMD_HELP_SEARCH
MENUITEM "Apua &Opastuksesta", 0x132 MENUITEM "Apua &Opastuksesta", CMD_HELP_ON_HELP
MENUITEM SEPARATOR MENUITEM SEPARATOR
POPUP "Inf&o..." { POPUP "Inf&o..." {
MENUITEM "&Lisenssi", 0x135 MENUITEM "&Lisenssi", CMD_LICENSE
MENUITEM "&EI TAKUUTA", 0x136 MENUITEM "&EI TAKUUTA", CMD_NO_WARRANTY
MENUITEM "&Tietoja Wine:ista", 0x137 MENUITEM "&Tietoja Wine:ista", CMD_ABOUT_WINE
} }
} }
} }
/* Dialog `Page setup' */ /* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95 DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_FINNISH, SUBLANG_NEUTRAL LANGUAGE LANG_FINNISH, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv" FONT 8, "Helv"
......
...@@ -23,49 +23,49 @@ ...@@ -23,49 +23,49 @@
MAIN_MENU MENU LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL MAIN_MENU MENU LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
{ {
POPUP "&Fichier" { POPUP "&Fichier" {
MENUITEM "&Nouveau...", 0x100 MENUITEM "&Nouveau...", CMD_NEW
MENUITEM "&Ouvrir", 0x101 MENUITEM "&Ouvrir", CMD_OPEN
MENUITEM "&Enregistrer", 0x102 MENUITEM "&Enregistrer", CMD_SAVE
MENUITEM "Enregistrer &sous...", 0x103 MENUITEM "Enregistrer &sous...", CMD_SAVE_AS
MENUITEM "Im&primer", 0x104 MENUITEM "Im&primer", CMD_PRINT
MENUITEM "&Mise en page...", 0x105 MENUITEM "&Mise en page...", CMD_PAGE_SETUP
MENUITEM "&Configuration de l'imprimante...", 0x106 MENUITEM "&Configuration de l'imprimante...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Quitter", 0x108 MENUITEM "&Quitter", CMD_EXIT
} }
POPUP "&Edition" { POPUP "&Edition" {
MENUITEM "&Annuler\tCtrl+Z", 0x110 MENUITEM "&Annuler\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Co&uper\tCtrl+X", 0x111 MENUITEM "Co&uper\tCtrl+X", CMD_CUT
MENUITEM "&Copier\tCtrl+C", 0x112 MENUITEM "&Copier\tCtrl+C", CMD_COPY
MENUITEM "&Coller\tCtrl+V", 0x113 MENUITEM "&Coller\tCtrl+V", CMD_PASTE
MENUITEM "&Effacer\tDel", 0x114 MENUITEM "&Effacer\tDel", CMD_DELETE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Tout &slectionner", 0x116 MENUITEM "Tout &slectionner", CMD_SELECT_ALL
MENUITEM "&Heure/Date\tF5", 0x117 MENUITEM "&Heure/Date\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Retour la ligne", 0x119 MENUITEM "&Retour la ligne", CMD_WRAP
} }
POPUP "&Rechercher" { POPUP "&Rechercher" {
MENUITEM "&Rechercher", 0x120 MENUITEM "&Rechercher", CMD_SEARCH
MENUITEM "&Suivant\tF3", 0x121 MENUITEM "&Suivant\tF3", CMD_SEARCH_NEXT
} }
POPUP "&Aide" { POPUP "&Aide" {
MENUITEM "&Sommaire", 0x130 MENUITEM "&Sommaire", CMD_HELP_CONTENTS
MENUITEM "&Rechercher...", 0x131 MENUITEM "&Rechercher...", CMD_HELP_SEARCH
MENUITEM "&Aide sur l'aide", 0x132 MENUITEM "&Aide sur l'aide", CMD_HELP_ON_HELP
MENUITEM SEPARATOR MENUITEM SEPARATOR
POPUP "Inf&o..." { POPUP "Inf&o..." {
MENUITEM "&Licence", 0x135 MENUITEM "&Licence", CMD_LICENSE
MENUITEM "&AUCUNE GARANTIE", 0x136 MENUITEM "&AUCUNE GARANTIE", CMD_NO_WARRANTY
MENUITEM "&A propos de Wine", 0x137 MENUITEM "&A propos de Wine", CMD_ABOUT_WINE
} }
} }
} }
/* Dialog `Page setup' */ /* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95 DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv" FONT 8, "Helv"
...@@ -93,33 +93,33 @@ PUSHBUTTON "&Aide", 0x153, 180, 39, 40, 15, WS_TABSTOP ...@@ -93,33 +93,33 @@ PUSHBUTTON "&Aide", 0x153, 180, 39, 40, 15, WS_TABSTOP
STRINGTABLE DISCARDABLE LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
{ {
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */ STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */ STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_NOTEPAD, "Notepad" STRING_NOTEPAD, "Notepad"
STRING_ERROR, "ERREUR" STRING_ERROR, "ERREUR"
STRING_WARNING, "ATTENTION" STRING_WARNING, "ATTENTION"
STRING_INFO, "Information" STRING_INFO, "Information"
STRING_UNTITLED, "(sans-titre)" STRING_UNTITLED, "(sans-titre)"
STRING_ALL_FILES, "Tous fichiers (*.*)" STRING_ALL_FILES, "Tous fichiers (*.*)"
STRING_TEXT_FILES_TXT, "Fichiers texte (*.txt)" STRING_TEXT_FILES_TXT, "Fichiers texte (*.txt)"
STRING_TOOLARGE, "Le fichier '%s' est trop grand pour le bloc-notes.\n \ STRING_TOOLARGE, "Le fichier '%s' est trop grand pour le bloc-notes.\n \
Veuillez utiliser un autre diteur." Veuillez utiliser un autre diteur."
STRING_NOTEXT, "Vous n'avez pas entr de texte. Veuillez taper quelque chose et recommencer\ STRING_NOTEXT, "Vous n'avez pas entr de texte. Veuillez taper quelque chose et recommencer\
\n" \n"
STRING_DOESNOTEXIST, "Le fichier '%s'\n\'existe pas.\n\n \ STRING_DOESNOTEXIST, "Le fichier '%s'\n\'existe pas.\n\n \
Voulez vous crer un nouveau fichier ?" Voulez vous crer un nouveau fichier ?"
STRING_NOTSAVED, "Le fichier '%s'\na t modifi\n\n \ STRING_NOTSAVED, "Le fichier '%s'\na t modifi\n\n \
Voulez vous enregistrer vos modifications ?" Voulez vous enregistrer vos modifications ?"
STRING_NOTFOUND, "'%s' non trouv." STRING_NOTFOUND, "'%s' non trouv."
STRING_OUT_OF_MEMORY, "Pas assez de mmoire pour finir cette tche. \ STRING_OUT_OF_MEMORY, "Pas assez de mmoire pour finir cette tche. \
task. \n Fermez une ou plusier applications pour librer\n\ task. \n Fermez une ou plusier applications pour librer\n\
de la mmoire." de la mmoire."
......
...@@ -6,15 +6,11 @@ MODULE = notepad.exe ...@@ -6,15 +6,11 @@ MODULE = notepad.exe
APPMODE = gui APPMODE = gui
IMPORTS = comdlg32 shell32 user32 gdi32 kernel32 IMPORTS = comdlg32 shell32 user32 gdi32 kernel32
LICENSELANG = En
C_SRCS = \ C_SRCS = \
License_En.c \
dialog.c \ dialog.c \
language.c \
license.c \ license.c \
main.c \ main.c
search.c \
$(LICENSELANG:%=License_%.c)
RC_SRCS = rsrc.rc RC_SRCS = rsrc.rc
......
...@@ -22,49 +22,49 @@ ...@@ -22,49 +22,49 @@
MAIN_MENU MENU LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL MAIN_MENU MENU LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL
{ {
POPUP "&Arquivo" { POPUP "&Arquivo" {
MENUITEM "&Novo...", 0x100 MENUITEM "&Novo...", CMD_NEW
MENUITEM "A&brir", 0x101 MENUITEM "A&brir", CMD_OPEN
MENUITEM "&Salvar", 0x102 MENUITEM "&Salvar", CMD_SAVE
MENUITEM "Salvar &como...", 0x103 MENUITEM "Salvar &como...", CMD_SAVE_AS
MENUITEM "&Imprimir", 0x104 MENUITEM "&Imprimir", CMD_PRINT
MENUITEM "C&onfigurar Pgina...", 0x105 MENUITEM "C&onfigurar Pgina...", CMD_PAGE_SETUP
MENUITEM "Configurar I&mpressora...", 0x106 MENUITEM "Configurar I&mpressora...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Sair", 0x108 MENUITEM "&Sair", CMD_EXIT
} }
POPUP "&Editar" { POPUP "&Editar" {
MENUITEM "&Desfazer\tCtrl+Z", 0x110 MENUITEM "&Desfazer\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "C&ortar\tCtrl+X", 0x111 MENUITEM "C&ortar\tCtrl+X", CMD_CUT
MENUITEM "&Copiar\tCtrl+C", 0x112 MENUITEM "&Copiar\tCtrl+C", CMD_COPY
MENUITEM "Co&lar\tCtrl+V", 0x113 MENUITEM "Co&lar\tCtrl+V", CMD_PASTE
MENUITEM "&Delete\tDel", 0x114 MENUITEM "&Delete\tDel", CMD_DELETE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Selecionar &Tudo", 0x116 MENUITEM "Selecionar &Tudo", CMD_SELECT_ALL
MENUITEM "&Data/Hora\tF5", 0x117 MENUITEM "&Data/Hora\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Quebrar linhas longas", 0x119 MENUITEM "&Quebrar linhas longas", CMD_WRAP
} }
POPUP "&Pesquisa" { POPUP "&Pesquisa" {
MENUITEM "Pesquisar...", 0x120 MENUITEM "Pesquisar...", CMD_SEARCH
MENUITEM "&Procurar Prxima\tF3", 0x121 MENUITEM "&Procurar Prxima\tF3", CMD_SEARCH_NEXT
} }
POPUP "&Ajuda" { POPUP "&Ajuda" {
MENUITEM "&Contedo", 0x130 MENUITEM "&Contedo", CMD_HELP_CONTENTS
MENUITEM "&Procurar...", 0x131 MENUITEM "&Procurar...", CMD_HELP_SEARCH
MENUITEM "&Ajuda na ajuda", 0x132 MENUITEM "&Ajuda na ajuda", CMD_HELP_ON_HELP
MENUITEM SEPARATOR MENUITEM SEPARATOR
POPUP "Inf&ormaes..." { POPUP "Inf&ormaes..." {
MENUITEM "&Licena", 0x135 MENUITEM "&Licena", CMD_LICENSE
MENUITEM "&SEM GARANTIA", 0x136 MENUITEM "&SEM GARANTIA", CMD_NO_WARRANTY
MENUITEM "&Sobre Wine", 0x137 MENUITEM "&Sobre Wine", CMD_ABOUT_WINE
} }
} }
} }
/* Dialog `Page setup' */ /* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95 DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv" FONT 8, "Helv"
......
NOTEPAD for WINE
================
There is now a web page dedicated to Notepad for Wine I am maintaing.
Please see http://www.vis.inf.ethz.ch/students/mbaur/notepad for
latest info about Notepad. This page also includes screenshots.
This is an early release of notepad and most of the code is still
broken. It will probably compile but the application will not make
much sense yet.
Please see file TODO for things to do and keep the file ChangeLog
up to date.
I also try to read wine-devel@winehq.com frequently.
...@@ -23,49 +23,49 @@ ...@@ -23,49 +23,49 @@
MAIN_MENU MENU LANGUAGE LANG_SLOVAK, SUBLANG_NEUTRAL MAIN_MENU MENU LANGUAGE LANG_SLOVAK, SUBLANG_NEUTRAL
{ {
POPUP "&File" { POPUP "&File" {
MENUITEM "&New...", 0x100 MENUITEM "&New...", CMD_NEW
MENUITEM "&Open", 0x101 MENUITEM "&Open", CMD_OPEN
MENUITEM "&Save", 0x102 MENUITEM "&Save", CMD_SAVE
MENUITEM "Save &as...", 0x103 MENUITEM "Save &as...", CMD_SAVE_AS
MENUITEM "&Print", 0x104 MENUITEM "&Print", CMD_PRINT
MENUITEM "Page Se&tup...", 0x105 MENUITEM "Page Se&tup...", CMD_PAGE_SETUP
MENUITEM "P&rinter Setup...", 0x106 MENUITEM "P&rinter Setup...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Exit", 0x108 MENUITEM "&Exit", CMD_EXIT
} }
POPUP "&Edit" { POPUP "&Edit" {
MENUITEM "&Undo\tCtrl+Z", 0x110 MENUITEM "&Undo\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Cu&t\tCtrl+X", 0x111 MENUITEM "Cu&t\tCtrl+X", CMD_CUT
MENUITEM "&Copy\tCtrl+C", 0x112 MENUITEM "&Copy\tCtrl+C", CMD_COPY
MENUITEM "&Paste\tCtrl+V", 0x113 MENUITEM "&Paste\tCtrl+V", CMD_PASTE
MENUITEM "&Delete\tDel", 0x114 MENUITEM "&Delete\tDel", CMD_DELETE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Select &all", 0x116 MENUITEM "Select &all", CMD_SELECT_ALL
MENUITEM "&Time/Date\tF5", 0x117 MENUITEM "&Time/Date\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Wrap long lines", 0x119 MENUITEM "&Wrap long lines", CMD_WRAP
} }
POPUP "&Search" { POPUP "&Search" {
MENUITEM "&Search", 0x120 MENUITEM "&Search", CMD_SEARCH
MENUITEM "&Search next\tF3", 0x121 MENUITEM "&Search next\tF3", CMD_SEARCH_NEXT
} }
POPUP "&Help" { POPUP "&Help" {
MENUITEM "&Contents", 0x130 MENUITEM "&Contents", CMD_HELP_CONTENTS
MENUITEM "&Search...", 0x131 MENUITEM "&Search...", CMD_HELP_SEARCH
MENUITEM "&Help on help", 0x132 MENUITEM "&Help on help", CMD_HELP_ON_HELP
MENUITEM SEPARATOR MENUITEM SEPARATOR
POPUP "Inf&o..." { POPUP "Inf&o..." {
MENUITEM "&License", 0x135 MENUITEM "&License", CMD_LICENSE
MENUITEM "&NO WARRANTY", 0x136 MENUITEM "&NO WARRANTY", CMD_NO_WARRANTY
MENUITEM "&About Wine", 0x137 MENUITEM "&About Wine", CMD_ABOUT_WINE
} }
} }
} }
/* Dialog `Page setup' */ /* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95 DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_SLOVAK, SUBLANG_NEUTRAL LANGUAGE LANG_SLOVAK, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv" FONT 8, "Helv"
......
...@@ -23,49 +23,49 @@ ...@@ -23,49 +23,49 @@
MAIN_MENU MENU LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL MAIN_MENU MENU LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
{ {
POPUP "&Arkiv" { POPUP "&Arkiv" {
MENUITEM "&Ny...", 0x100 MENUITEM "&Ny...", CMD_NEW
MENUITEM "&ppna", 0x101 MENUITEM "&ppna", CMD_OPEN
MENUITEM "&Spara", 0x102 MENUITEM "&Spara", CMD_SAVE
MENUITEM "Spara &som...", 0x103 MENUITEM "Spara &som...", CMD_SAVE_AS
MENUITEM "&Skriv ut", 0x104 MENUITEM "&Skriv ut", CMD_PRINT
MENUITEM "Sid La&yout...", 0x105 MENUITEM "Sid La&yout...", CMD_PAGE_SETUP
MENUITEM "Skrivar &instllningar...", 0x106 MENUITEM "Skrivar &instllningar...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Avsluta", 0x108 MENUITEM "&Avsluta", CMD_EXIT
} }
POPUP "&Redigera" { POPUP "&Redigera" {
MENUITEM "&Undo\tCtrl+Z", 0x110 MENUITEM "&Undo\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Klippa\tCtrl+X", 0x111 MENUITEM "Klippa\tCtrl+X", CMD_CUT
MENUITEM "&Kopiera\tCtrl+C", 0x112 MENUITEM "&Kopiera\tCtrl+C", CMD_COPY
MENUITEM "&Klistra in\tCtrl+V", 0x113 MENUITEM "&Klistra in\tCtrl+V", CMD_PASTE
MENUITEM "&Ta bort\tDel", 0x114 MENUITEM "&Ta bort\tDel", CMD_DELETE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Markera &allt", 0x116 MENUITEM "Markera &allt", CMD_SELECT_ALL
MENUITEM "&Tid/Datum\tF5", 0x117 MENUITEM "&Tid/Datum\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Dela lnga meningar", 0x119 MENUITEM "&Dela lnga meningar", CMD_WRAP
} }
POPUP "&Sk" { POPUP "&Sk" {
MENUITEM "Sk...", 0x120 MENUITEM "Sk...", CMD_SEARCH
MENUITEM "&Sk nsta\tF3", 0x121 MENUITEM "&Sk nsta\tF3", CMD_SEARCH_NEXT
} }
POPUP "&Hjlp" { POPUP "&Hjlp" {
MENUITEM "&Innehll", 0x130 MENUITEM "&Innehll", CMD_HELP_CONTENTS
MENUITEM "&Sk...", 0x131 MENUITEM "&Sk...", CMD_HELP_SEARCH
MENUITEM "Anvndningen &av hjlp", 0x132 MENUITEM "Anvndningen &av hjlp", CMD_HELP_ON_HELP
MENUITEM SEPARATOR MENUITEM SEPARATOR
POPUP "Inf&ormation..." { POPUP "Inf&ormation..." {
MENUITEM "&Licens", 0x135 MENUITEM "&Licens", CMD_LICENSE
MENUITEM "&INGEN GARANTI", 0x136 MENUITEM "&INGEN GARANTI", CMD_NO_WARRANTY
MENUITEM "&Om Wine", 0x137 MENUITEM "&Om Wine", CMD_ABOUT_WINE
} }
} }
} }
/* Dialog `Page setup' */ /* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95 DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv" FONT 8, "Helv"
...@@ -93,33 +93,33 @@ PUSHBUTTON "&Hjlp", 0x153, 180, 39, 40, 15, WS_TABSTOP ...@@ -93,33 +93,33 @@ PUSHBUTTON "&Hjlp", 0x153, 180, 39, 40, 15, WS_TABSTOP
STRINGTABLE DISCARDABLE LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
{ {
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */ STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */ STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_NOTEPAD, "Anteckningar" STRING_NOTEPAD, "Anteckningar"
STRING_ERROR, "FEL" STRING_ERROR, "FEL"
STRING_WARNING, "WARNING" STRING_WARNING, "WARNING"
STRING_INFO, "Information" STRING_INFO, "Information"
STRING_UNTITLED, "(untitled)" STRING_UNTITLED, "(untitled)"
STRING_ALL_FILES, "Alla filer (*.*)" STRING_ALL_FILES, "Alla filer (*.*)"
STRING_TEXT_FILES_TXT, "Text filer (*.txt)" STRING_TEXT_FILES_TXT, "Text filer (*.txt)"
STRING_TOOLARGE, "Filen '%s' r fr stor fr notepad.\n \ STRING_TOOLARGE, "Filen '%s' r fr stor fr notepad.\n \
Anvnd en annan editor." Anvnd en annan editor."
STRING_NOTEXT, "Du skrev inte in ngon text. \ STRING_NOTEXT, "Du skrev inte in ngon text. \
\nSkriv ngot och frsk sedan igen" \nSkriv ngot och frsk sedan igen"
STRING_DOESNOTEXIST, "File '%s'\ndoes not exist\n\n \ STRING_DOESNOTEXIST, "File '%s'\ndoes not exist\n\n \
Do you want to create a new file ?" Do you want to create a new file ?"
STRING_NOTSAVED, "File '%s'\nhas been modified\n\n \ STRING_NOTSAVED, "File '%s'\nhas been modified\n\n \
Would you like to save the changes ?" Would you like to save the changes ?"
STRING_NOTFOUND, "'%s' hittades inte." STRING_NOTFOUND, "'%s' hittades inte."
STRING_OUT_OF_MEMORY, "Inte tillrkligt med minne fr att slutfra \ STRING_OUT_OF_MEMORY, "Inte tillrkligt med minne fr att slutfra \
den hr uppgiften. \nAvsluta ett eller flera program fr att ka mngden \nfritt \ den hr uppgiften. \nAvsluta ett eller flera program fr att ka mngden \nfritt \
minne." minne."
......
- Logfile feature
if Notepad opens a file with ".LOG" (really?) in the first line, the
current date/time should automatically be inserted into the last line
of the file at startup.
- Notepad segfaults when selecting "Find" button in "Search" dialog.
- create new *.rc files for all languages you know.
...@@ -23,49 +23,49 @@ ...@@ -23,49 +23,49 @@
MAIN_MENU MENU LANGUAGE LANG_WALON, SUBLANG_NEUTRAL MAIN_MENU MENU LANGUAGE LANG_WALON, SUBLANG_NEUTRAL
{ {
POPUP "&Fitch" { POPUP "&Fitch" {
MENUITEM "&Novea...", 0x100 MENUITEM "&Novea...", CMD_NEW
MENUITEM "&Drov", 0x101 MENUITEM "&Drov", CMD_OPEN
MENUITEM "&Schaper", 0x102 MENUITEM "&Schaper", CMD_SAVE
MENUITEM "Schaper t r&lomer...", 0x103 MENUITEM "Schaper t r&lomer...", CMD_SAVE_AS
MENUITEM "&Rexhe", 0x104 MENUITEM "&Rexhe", CMD_PRINT
MENUITEM "Arrandjmint del &Pdje...", 0x105 MENUITEM "Arrandjmint del &Pdje...", CMD_PAGE_SETUP
MENUITEM "&Apontiaedje del scrirece...", 0x106 MENUITEM "&Apontiaedje del scrirece...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Mouss &Fo", 0x108 MENUITEM "Mouss &Fo", CMD_EXIT
} }
POPUP "&Candj" { POPUP "&Candj" {
MENUITEM "&Disf\tCtrl+Z", 0x110 MENUITEM "&Disf\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "C&per\tCtrl+X", 0x111 MENUITEM "C&per\tCtrl+X", CMD_CUT
MENUITEM "&Copy\tCtrl+C", 0x112 MENUITEM "&Copy\tCtrl+C", CMD_COPY
MENUITEM "C&laper\tCtrl+V", 0x113 MENUITEM "C&laper\tCtrl+V", CMD_PASTE
MENUITEM "&Rafacer\tDel", 0x114 MENUITEM "&Rafacer\tDel", CMD_DELETE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "&Tchwezi totafwait", 0x116 MENUITEM "&Tchwezi totafwait", CMD_SELECT_ALL
MENUITEM "&Eure/Date\tF5", 0x117 MENUITEM "&Eure/Date\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Cper les ro&yes", 0x119 MENUITEM "Cper les ro&yes", CMD_WRAP
} }
POPUP "C&wer" { POPUP "C&wer" {
MENUITEM "Cwer...", 0x120 MENUITEM "Cwer...", CMD_SEARCH
MENUITEM "&Shvant\tF3", 0x121 MENUITEM "&Shvant\tF3", CMD_SEARCH_NEXT
} }
POPUP "&Aide" { POPUP "&Aide" {
MENUITEM "&dvins", 0x130 MENUITEM "&dvins", CMD_HELP_CONTENTS
MENUITEM "C&wer...", 0x131 MENUITEM "C&wer...", CMD_HELP_SEARCH
MENUITEM "&Aide so l' Aide", 0x132 MENUITEM "&Aide so l' Aide", CMD_HELP_ON_HELP
MENUITEM SEPARATOR MENUITEM SEPARATOR
POPUP "&Informcion..." { POPUP "&Informcion..." {
MENUITEM "&Licinse", 0x135 MENUITEM "&Licinse", CMD_LICENSE
MENUITEM "&NOLE WARANTEYE", 0x136 MENUITEM "&NOLE WARANTEYE", CMD_NO_WARRANTY
MENUITEM " &dfait di Wine", 0x137 MENUITEM " &dfait di Wine", CMD_ABOUT_WINE
} }
} }
} }
/* Dialog `Page setup' */ /* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95 DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_WALON, SUBLANG_NEUTRAL LANGUAGE LANG_WALON, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv" FONT 8, "Helv"
...@@ -93,33 +93,33 @@ PUSHBUTTON "&Aide", 0x153, 180, 39, 40, 15, WS_TABSTOP ...@@ -93,33 +93,33 @@ PUSHBUTTON "&Aide", 0x153, 180, 39, 40, 15, WS_TABSTOP
STRINGTABLE DISCARDABLE LANGUAGE LANG_WALON, SUBLANG_NEUTRAL STRINGTABLE DISCARDABLE LANGUAGE LANG_WALON, SUBLANG_NEUTRAL
{ {
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Pdje &s" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Pdje &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */ STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */ STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */ STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_NOTEPAD, "Notepad" STRING_NOTEPAD, "Notepad"
STRING_ERROR, "AROKE" STRING_ERROR, "AROKE"
STRING_WARNING, "ADVERTIXHMINT" STRING_WARNING, "ADVERTIXHMINT"
STRING_INFO, "Informcion" STRING_INFO, "Informcion"
STRING_UNTITLED, "(sin tite)" STRING_UNTITLED, "(sin tite)"
STRING_ALL_FILES, "Tos les fitchs (*.*)" STRING_ALL_FILES, "Tos les fitchs (*.*)"
STRING_TEXT_FILES_TXT, "Fitchs tekse (*.txt)" STRING_TEXT_FILES_TXT, "Fitchs tekse (*.txt)"
STRING_TOOLARGE, "Li fitch '%s' est trop gros pol notepad.\n \ STRING_TOOLARGE, "Li fitch '%s' est trop gros pol notepad.\n \
Eployoz on te aspougneu di tekse." Eployoz on te aspougneu di tekse."
STRING_NOTEXT, "Vos n' avoz rn sicrt. \ STRING_NOTEXT, "Vos n' avoz rn sicrt. \
\nTapez ene sacwe t rasayez" \nTapez ene sacwe t rasayez"
STRING_DOESNOTEXIST, "File '%s'\ndoes not exist\n\n \ STRING_DOESNOTEXIST, "File '%s'\ndoes not exist\n\n \
Do you want to create a new file ?" Do you want to create a new file ?"
STRING_NOTSAVED, "Li fitch '%s'\na candj\n\n \ STRING_NOTSAVED, "Li fitch '%s'\na candj\n\n \
El voloz schaper ?" El voloz schaper ?"
STRING_NOTFOUND, "'%s' pout nn esse trov." STRING_NOTFOUND, "'%s' pout nn esse trov."
STRING_OUT_OF_MEMORY, "Li memwere est plinne. \n\ STRING_OUT_OF_MEMORY, "Li memwere est plinne. \n\
Cloyoz on programe ou pus po monter li memwere libe." Cloyoz on programe ou pus po monter li memwere libe."
} }
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "windows.h"
VOID DIALOG_FileNew(VOID); VOID DIALOG_FileNew(VOID);
VOID DIALOG_FileOpen(VOID); VOID DIALOG_FileOpen(VOID);
VOID DIALOG_FileSave(VOID); VOID DIALOG_FileSave(VOID);
...@@ -51,3 +49,7 @@ VOID DIALOG_HelpAboutWine(VOID); ...@@ -51,3 +49,7 @@ VOID DIALOG_HelpAboutWine(VOID);
VOID DIALOG_PageSetup(VOID); VOID DIALOG_PageSetup(VOID);
VOID DIALOG_TimeDate(VOID); VOID DIALOG_TimeDate(VOID);
/* utility functions */
BOOL FileExists(LPSTR szFilename);
BOOL DoCloseFile(void);
void DoOpenFile(LPSTR szFileName);
/*
* Notepad
*
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
* Copyright 1998 Karl Backstrm <karl_b@geocities.com>
* Copyright 2002 Sylvain Petreolle <spetreolle@yahoo.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include "windows.h"
#include "main.h"
#include "language.h"
CHAR STRING_MENU_Xx[] = "MENU_Xx";
CHAR STRING_PAGESETUP_Xx[] = "DIALOG_PAGESETUP_Xx";
void LANGUAGE_UpdateWindowCaption(void) {
/* Sets the caption of the main window according to Globals.szFileName:
Notepad - (untitled) if no file is open
Notepad - [filename] if a file is given
*/
CHAR szCaption[MAX_STRING_LEN];
CHAR szUntitled[MAX_STRING_LEN];
LoadString(Globals.hInstance, STRING_NOTEPAD, szCaption, sizeof(szCaption));
if (strlen(Globals.szFileName)>0) {
lstrcat(szCaption, " - [");
lstrcat(szCaption, Globals.szFileName);
lstrcat(szCaption, "]");
}
else
{
LoadString(Globals.hInstance, STRING_UNTITLED, szUntitled, sizeof(szUntitled));
lstrcat(szCaption, " - ");
lstrcat(szCaption, szUntitled);
}
SetWindowText(Globals.hMainWnd, szCaption);
}
VOID LANGUAGE_LoadMenus(VOID)
{
HMENU hMainMenu;
/* Set frame caption */
LANGUAGE_UpdateWindowCaption();
/* Change Resource names */
/*lstrcpyn(STRING_MENU_Xx + sizeof(STRING_MENU_Xx) - 3, lang, 3);*/
/*lstrcpyn(STRING_PAGESETUP_Xx + sizeof(STRING_PAGESETUP_Xx) - 3, lang, 3);*/
/* Create menu */
hMainMenu = LoadMenu(Globals.hInstance, MAKEINTRESOURCE(MAIN_MENU));
Globals.hFileMenu = GetSubMenu(hMainMenu, 0);
Globals.hEditMenu = GetSubMenu(hMainMenu, 1);
Globals.hSearchMenu = GetSubMenu(hMainMenu, 2);
Globals.hLanguageMenu = GetSubMenu(hMainMenu, 3);
Globals.hHelpMenu = GetSubMenu(hMainMenu, 4);
SetMenu(Globals.hMainWnd, hMainMenu);
/* Destroy old menu */
if (Globals.hMainMenu) DestroyMenu(Globals.hMainMenu);
Globals.hMainMenu = hMainMenu;
}
/*VOID LANGUAGE_DefaultHandle(WPARAM wParam)
{
if ((wParam >=NP_FIRST_LANGUAGE) && (wParam<=NP_LAST_LANGUAGE))
LANGUAGE_SelectByNumber(wParam - NP_FIRST_LANGUAGE);
else printf("Unimplemented menu command %i\n", wParam);
}
*/
/*
* Notepad
*
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
* Copyright 1998 Karl Backstrm <karl_b@geocities.com>
* Copyright 2002 Sylvain Petreolle <spetreolle@yahoo.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
VOID LANGUAGE_UpdateWindowCaption(VOID);
VOID LANGUAGE_LoadMenus(VOID);
/*VOID LANGUAGE_DefaultHandle(WPARAM wParam);*/
...@@ -22,11 +22,7 @@ ...@@ -22,11 +22,7 @@
#include "notepad_res.h" #include "notepad_res.h"
#define MAX_STRING_LEN 255 #define MAX_STRING_LEN 255
#define MAX_PATHNAME_LEN 1024
#define MAX_LANGUAGE_NUMBER (NP_LAST_LANGUAGE - NP_FIRST_LANGUAGE)
#define HELPFILE "notepad.hlp" #define HELPFILE "notepad.hlp"
#define LOGPREFIX ".LOG"
/* hide the following from winerc */ /* hide the following from winerc */
#ifndef RC_INVOKED #ifndef RC_INVOKED
...@@ -35,6 +31,8 @@ ...@@ -35,6 +31,8 @@
#include "commdlg.h" #include "commdlg.h"
VOID SetFileName(LPSTR szFileName);
/***** Compatibility *****/ /***** Compatibility *****/
#ifndef OIC_WINLOGO #ifndef OIC_WINLOGO
...@@ -47,46 +45,27 @@ typedef struct ...@@ -47,46 +45,27 @@ typedef struct
HANDLE hInstance; HANDLE hInstance;
HWND hMainWnd; HWND hMainWnd;
HWND hFindReplaceDlg; HWND hFindReplaceDlg;
HWND hEdit;
HICON hMainIcon; HICON hMainIcon;
HICON hDefaultIcon; HICON hDefaultIcon;
HMENU hMainMenu;
HMENU hFileMenu;
HMENU hEditMenu;
HMENU hSearchMenu;
HMENU hLanguageMenu;
HMENU hHelpMenu;
LPCSTR lpszIniFile;
LPCSTR lpszIcoFile; LPCSTR lpszIcoFile;
UINT wStringTableOffset;
BOOL bWrapLongLines; BOOL bWrapLongLines;
CHAR szFindText[MAX_PATHNAME_LEN]; CHAR szFindText[MAX_PATH];
CHAR szReplaceText[MAX_PATHNAME_LEN]; CHAR szFileName[MAX_PATH];
CHAR szFileName[MAX_PATHNAME_LEN]; CHAR szFileTitle[MAX_PATH];
CHAR szMarginTop[MAX_PATHNAME_LEN]; CHAR szFilter[2 * MAX_STRING_LEN + 100];
CHAR szMarginBottom[MAX_PATHNAME_LEN]; CHAR szMarginTop[MAX_PATH];
CHAR szMarginLeft[MAX_PATHNAME_LEN]; CHAR szMarginBottom[MAX_PATH];
CHAR szMarginRight[MAX_PATHNAME_LEN]; CHAR szMarginLeft[MAX_PATH];
CHAR szHeader[MAX_PATHNAME_LEN]; CHAR szMarginRight[MAX_PATH];
CHAR szFooter[MAX_PATHNAME_LEN]; CHAR szHeader[MAX_PATH];
CHAR szFooter[MAX_PATH];
FINDREPLACE find; FINDREPLACE find;
WORD nCommdlgFindReplaceMsg;
CHAR Buffer[12000];
} NOTEPAD_GLOBALS; } NOTEPAD_GLOBALS;
extern NOTEPAD_GLOBALS Globals; extern NOTEPAD_GLOBALS Globals;
/* function prototypes */
void TrashBuffer(void);
void LoadBufferFromFile(LPCSTR lpFileName);
/* class names */
/* Resource names */
extern CHAR STRING_MENU_Xx[];
extern CHAR STRING_PAGESETUP_Xx[];
#else /* RC_INVOKED */ #else /* RC_INVOKED */
#endif #endif
/*
* Notepad (notepad.rc)
*
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* Main Menu */
CONCAT(MENU_, LANGUAGE_ID) MENU
{
POPUP MENU_FILE {
MENUITEM MENU_FILE_NEW, NP_FILE_NEW
MENUITEM MENU_FILE_OPEN, NP_FILE_OPEN
MENUITEM MENU_FILE_SAVE, NP_FILE_SAVE
MENUITEM MENU_FILE_SAVEAS, NP_FILE_SAVEAS
MENUITEM MENU_FILE_PRINT, NP_FILE_PRINT
MENUITEM MENU_FILE_PAGESETUP, NP_FILE_PAGESETUP
MENUITEM MENU_FILE_PRINTSETUP, NP_FILE_PRINTSETUP
MENUITEM SEPARATOR
MENUITEM MENU_FILE_EXIT, NP_FILE_EXIT
}
POPUP MENU_EDIT {
MENUITEM MENU_EDIT_UNDO, NP_EDIT_UNDO
MENUITEM SEPARATOR
MENUITEM MENU_EDIT_CUT, NP_EDIT_CUT
MENUITEM MENU_EDIT_COPY, NP_EDIT_COPY
MENUITEM MENU_EDIT_PASTE, NP_EDIT_PASTE
MENUITEM MENU_EDIT_DELETE, NP_EDIT_DELETE
MENUITEM SEPARATOR
MENUITEM MENU_EDIT_SELECTALL, NP_EDIT_SELECTALL
MENUITEM MENU_EDIT_TIMEDATE, NP_EDIT_TIMEDATE
MENUITEM SEPARATOR
MENUITEM MENU_EDIT_WRAP, NP_EDIT_WRAP
}
POPUP MENU_SEARCH {
MENUITEM MENU_SEARCH_SEARCH, NP_SEARCH_SEARCH
MENUITEM MENU_SEARCH_NEXT, NP_SEARCH_NEXT
}
POPUP MENU_LANGUAGE {
/* Dummy item, will be removed */
MENUITEM SEPARATOR
}
POPUP MENU_HELP {
MENUITEM MENU_HELP_CONTENTS, NP_HELP_CONTENTS
MENUITEM MENU_HELP_SEARCH, NP_HELP_SEARCH
MENUITEM MENU_HELP_HELP_ON_HELP, NP_HELP_ON_HELP
MENUITEM SEPARATOR
POPUP MENU_INFO {
MENUITEM MENU_INFO_LICENSE, NP_HELP_LICENSE
MENUITEM MENU_INFO_NO_WARRANTY, NP_HELP_NO_WARRANTY
MENUITEM MENU_INFO_ABOUT_WINE, NP_HELP_ABOUT_WINE
}
}
}
/* Dialog `Page setup' */
CONCAT(DIALOG_PAGESETUP_, LANGUAGE_ID) DIALOG 0, 0, 225, 95
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv"
CAPTION DIALOG_PAGESETUP_CAPTION
{
LTEXT DIALOG_PAGESETUP_HEAD, NP_PAGESETUP_HEAD_TXT, 10, 07, 40, 15
EDITTEXT NP_PAGESETUP_HEAD, 60, 05,110, 12, WS_BORDER | WS_TABSTOP
LTEXT DIALOG_PAGESETUP_TAIL, NP_PAGESETUP_TAIL_TXT, 10, 24, 40, 15
EDITTEXT NP_PAGESETUP_TAIL, 60, 22,110, 12, WS_BORDER | WS_TABSTOP
GROUPBOX DIALOG_PAGESETUP_MARGIN, NP_PAGESETUP_MARGIN, 10, 43,160, 45
LTEXT DIALOG_PAGESETUP_LEFT, NP_PAGESETUP_LEFT_TXT, 20, 55, 30, 10, WS_CHILD
EDITTEXT /*STRING_PAGESETUP_LEFTVALUE,*/ NP_PAGESETUP_LEFT, 50, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
LTEXT DIALOG_PAGESETUP_TOP, NP_PAGESETUP_TOP_TXT, 20, 73, 30, 10, WS_CHILD
EDITTEXT /*STRING_PAGESETUP_TOPVALUE,*/ NP_PAGESETUP_TOP, 50, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
LTEXT DIALOG_PAGESETUP_RIGHT, NP_PAGESETUP_RIGHT_TXT, 100, 55, 30, 10, WS_CHILD
EDITTEXT /*STRING_PAGESETUP_RIGHTVALUE,*/ NP_PAGESETUP_RIGHT, 130, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
LTEXT DIALOG_PAGESETUP_BOTTOM, NP_PAGESETUP_BOTTOM_TXT,100, 73, 30, 10, WS_CHILD
EDITTEXT /*STRING_PAGESETUP_BOTTOMVALUE,*/ NP_PAGESETUP_BOTTOM, 130, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
DEFPUSHBUTTON DIALOG_OK, IDOK, 180, 3, 40, 15, WS_TABSTOP
PUSHBUTTON DIALOG_CANCEL, IDCANCEL, 180, 21, 40, 15, WS_TABSTOP
PUSHBUTTON DIALOG_HELP, NP_HELP, 180, 39, 40, 15, WS_TABSTOP
}
/* Strings */
#define STRING_LANGUAGE_ID STRINGIFY(LANGUAGE_ID)
#define STRING_LANGUAGE_MENU_ITEM LANGUAGE_MENU_ITEM
STRINGTABLE
{
ADDSTRING(LANGUAGE_ID)
ADDSTRING(LANGUAGE_MENU_ITEM)
ADDSTRING(NOTEPAD)
ADDSTRING(TEXT_FILES_TXT)
ADDSTRING(ALL_FILES)
ADDSTRING(ERROR)
ADDSTRING(WARNING)
ADDSTRING(INFO)
ADDSTRING(TOOLARGE)
ADDSTRING(NOTEXT)
ADDSTRING(DOESNOTEXIST)
ADDSTRING(NOTSAVED)
ADDSTRING(NOTFOUND)
ADDSTRING(OUT_OF_MEMORY)
ADDSTRING(UNTITLED)
ADDSTRING(PAGESETUP_HEADERVALUE)
ADDSTRING(PAGESETUP_FOOTERVALUE)
ADDSTRING(PAGESETUP_LEFTVALUE)
ADDSTRING(PAGESETUP_RIGHTVALUE)
ADDSTRING(PAGESETUP_TOPVALUE)
ADDSTRING(PAGESETUP_BOTTOMVALUE)
}
/* Undefine all language-specific strings */
#undef LANGUAGE_ID
#undef LANGUAGE_NUMBER
#undef LANGUAGE_MENU_ITEM
#undef MENU_FILE
#undef MENU_FILE_NEW
#undef MENU_FILE_OPEN
#undef MENU_FILE_SAVE
#undef MENU_FILE_SAVEAS
#undef MENU_FILE_PRINT
#undef MENU_FILE_PAGESETUP
#undef MENU_FILE_PRINTSETUP
#undef MENU_FILE_EXIT
#undef MENU_EDIT
#undef MENU_EDIT_UNDO
#undef MENU_EDIT_CUT
#undef MENU_EDIT_COPY
#undef MENU_EDIT_PASTE
#undef MENU_EDIT_DELETE
#undef MENU_EDIT_SELECTALL
#undef MENU_EDIT_TIMEDATE
#undef MENU_EDIT_WRAP
#undef MENU_SEARCH
#undef MENU_SEARCH_SEARCH
#undef MENU_SEARCH_NEXT
#undef MENU_LANGUAGE
#undef MENU_HELP
#undef MENU_HELP_CONTENTS
#undef MENU_HELP_SEARCH
#undef MENU_HELP_HELP_ON_HELP
#undef MENU_INFO
#undef MENU_INFO_LICENSE
#undef MENU_INFO_NO_WARRANTY
#undef MENU_INFO_ABOUT_WINE
#undef DIALOG_OK
#undef DIALOG_CANCEL
#undef DIALOG_BROWSE
#undef DIALOG_HELP
#undef DIALOG_PAGESETUP_CAPTION
#undef DIALOG_PAGESETUP_HEAD
#undef DIALOG_PAGESETUP_TAIL
#undef DIALOG_PAGESETUP_MARGIN
#undef DIALOG_PAGESETUP_LEFT
#undef DIALOG_PAGESETUP_RIGHT
#undef DIALOG_PAGESETUP_TOP
#undef DIALOG_PAGESETUP_BOTTOM
#undef STRING_LANGUAGE_ID
#undef STRING_LANGUAGE_MENU_ITEM
#undef STRING_PAGESETUP_HEADERVALUE
#undef STRING_PAGESETUP_FOOTERVALUE
#undef STRING_PAGESETUP_LEFTVALUE
#undef STRING_PAGESETUP_RIGHTVALUE
#undef STRING_PAGESETUP_TOPVALUE
#undef STRING_PAGESETUP_BOTTOMVALUE
#undef STRING_NOTEPAD
#undef STRING_ERROR
#undef STRING_WARNING
#undef STRING_INFO
#undef STRING_UNTITLED
#undef STRING_ALL_FILES
#undef STRING_TEXT_FILES_TXT
#undef STRING_TOOLARGE
#undef STRING_NOTEXT
#undef STRING_DOESNOTEXIST
#undef STRING_NOTSAVED
#undef STRING_NOTFOUND
#undef STRING_OUT_OF_MEMORY
/* /*
* Notepad (String defines) * Constants, used in resources.
* *
* Copyright 2002 Sylvain Petreolle <spetreolle@yahoo.fr> * Copyright 2002 Sylvain Petreolle <spetreolle@yahoo.fr>
* Copyright 2002 Andriy Palamarchuk
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -18,7 +19,39 @@ ...@@ -18,7 +19,39 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#define MAIN_MENU 0x10F #define MAIN_MENU 0x201
#define DIALOG_PAGESETUP 0x202
/* Commands */
#define CMD_NEW 0x100
#define CMD_OPEN 0x101
#define CMD_SAVE 0x102
#define CMD_SAVE_AS 0x103
#define CMD_PRINT 0x104
#define CMD_PAGE_SETUP 0x105
#define CMD_PRINTER_SETUP 0x106
#define CMD_EXIT 0x108
#define CMD_UNDO 0x110
#define CMD_CUT 0x111
#define CMD_COPY 0x112
#define CMD_PASTE 0x113
#define CMD_DELETE 0x114
#define CMD_SELECT_ALL 0x116
#define CMD_TIME_DATE 0x117
#define CMD_WRAP 0x119
#define CMD_SEARCH 0x120
#define CMD_SEARCH_NEXT 0x121
#define CMD_HELP_CONTENTS 0x130
#define CMD_HELP_SEARCH 0x131
#define CMD_HELP_ON_HELP 0x132
#define CMD_LICENSE 0x135
#define CMD_NO_WARRANTY 0x136
#define CMD_ABOUT_WINE 0x137
/* Strings */
#define STRING_PAGESETUP_HEADERVALUE 0x160 #define STRING_PAGESETUP_HEADERVALUE 0x160
#define STRING_PAGESETUP_FOOTERVALUE 0x161 #define STRING_PAGESETUP_FOOTERVALUE 0x161
#define STRING_PAGESETUP_LEFTVALUE 0x162 #define STRING_PAGESETUP_LEFTVALUE 0x162
......
/*
* Notepad (search.c)
* Copyright (C) 1999 by Marcel Baur
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* This file features Heuristic Boyer-Moore Text Search
*
* Always: - Buf is the Buffer containing the whole text
* ======= - SP is the Search Pattern, which has to be found in Buf.
*
*/
#include <windows.h>
#define CHARSETSIZE 255
int delta[CHARSETSIZE];
/* rightmostpos: return rightmost position of ch in szSP (or -1) */
int rightmostpos(char ch, LPSTR szSP, int nSPLen) {
int i = nSPLen;
while ((i>0) & (szSP[i]!=ch)) i--;
return(i);
}
/* setup_delta: setup delta1 cache */
void setup_delta(LPSTR szSP, int nSPLen) {
int i;
for (i=0; i<CHARSETSIZE; i++) {
delta[i] = nSPLen;
}
for (i=0; i<nSPLen; i++) {
delta[(int)szSP[i]] = (nSPLen - rightmostpos(szSP[i], szSP, nSPLen));
}
}
int bm_search(LPSTR szBuf, int nBufLen, LPSTR szSP, int nSPLen) {
int i = nSPLen;
int j = nSPLen;
do {
if ((szBuf[i] = szSP[j])) {
i--; j--;
} else {
if ((nSPLen-j+1) > delta[(int)szBuf[i]]) {
i+= (nSPLen-j+1);
} else {
i+= delta[(int)szBuf[i]];
}
}
} while (j>0 && i<=nBufLen);
return(i+1);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment