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.
This commit is contained in:
Andriy Palamarchuk 2002-07-08 19:41:09 +00:00 committed by Alexandre Julliard
parent 22ffa982ec
commit c55dce0103
22 changed files with 794 additions and 1901 deletions

View File

@ -22,49 +22,49 @@
MAIN_MENU MENU LANGUAGE LANG_DANISH, SUBLANG_NEUTRAL
{
POPUP "&Filef" {
MENUITEM "&Ny...", 0x100
MENUITEM "Å&bn\tEnter", 0x101
MENUITEM "&Gem", 0x102
MENUITEM "Gem so&m...", 0x103
MENUITEM "&Udskriv", 0x104
MENUITEM "Side&opsætning...", 0x105
MENUITEM "&Indstil printer...", 0x106
MENUITEM "&Ny...", CMD_NEW
MENUITEM "Å&bn\tEnter", CMD_OPEN
MENUITEM "&Gem", CMD_SAVE
MENUITEM "Gem so&m...", CMD_SAVE_AS
MENUITEM "&Udskriv", CMD_PRINT
MENUITEM "Side&opsætning...", CMD_PAGE_SETUP
MENUITEM "&Indstil printer...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR
MENUITEM "&Afslut", 0x108
MENUITEM "&Afslut", CMD_EXIT
}
POPUP "&Rediger" {
MENUITEM "&Fortryd\tCtrl+Z", 0x110
MENUITEM "&Fortryd\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR
MENUITEM "&Klip\tCtrl+X", 0x111
MENUITEM "K&opier\tCtrl+C", 0x112
MENUITEM "Sæt &ind\tCtrl+V", 0x113
MENUITEM "&Slet\tDel", 0x114
MENUITEM "&Klip\tCtrl+X", CMD_CUT
MENUITEM "K&opier\tCtrl+C", CMD_COPY
MENUITEM "Sæt &ind\tCtrl+V", CMD_PASTE
MENUITEM "&Slet\tDel", CMD_DELETE
MENUITEM SEPARATOR
MENUITEM "Marker &alt", 0x116
MENUITEM "&Dato/tid\tF5", 0x117
MENUITEM "Marker &alt", CMD_SELECT_ALL
MENUITEM "&Dato/tid\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR
MENUITEM "Automatisk &linjeskift", 0x119
MENUITEM "Automatisk &linjeskift", CMD_WRAP
}
POPUP "&Søg" {
MENUITEM "&Søg...", 0x120
MENUITEM "&Find næste\tF3", 0x121
MENUITEM "&Søg...", CMD_SEARCH
MENUITEM "&Find næste\tF3", CMD_SEARCH_NEXT
}
POPUP "&Hjælp" {
MENUITEM "&Indhold", 0x130
MENUITEM "&Søg efter hjælp om...", 0x131
MENUITEM "&Brug af Hjælp", 0x132
MENUITEM "&Indhold", CMD_HELP_CONTENTS
MENUITEM "&Søg efter hjælp om...", CMD_HELP_SEARCH
MENUITEM "&Brug af Hjælp", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
POPUP "&Om Notesblok..." {
MENUITEM "&Licens", 0x135
MENUITEM "&NO WARRANTY", 0x136
MENUITEM "&Om WINE", 0x137
MENUITEM "&Licens", CMD_LICENSE
MENUITEM "&NO WARRANTY", CMD_NO_WARRANTY
MENUITEM "&Om WINE", CMD_ABOUT_WINE
}
}
}
/* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95
DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_DANISH, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv"
@ -92,33 +92,33 @@ PUSHBUTTON "&Hj
STRINGTABLE DISCARDABLE LANGUAGE LANG_DANISH, SUBLANG_NEUTRAL
{
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_NOTEPAD, "Notesblok"
STRING_ERROR, "FEJL"
STRING_WARNING, "ADVARSEL"
STRING_INFO, "Information"
STRING_NOTEPAD, "Notesblok"
STRING_ERROR, "FEJL"
STRING_WARNING, "ADVARSEL"
STRING_INFO, "Information"
STRING_UNTITLED, "(ikke-navngivet)"
STRING_UNTITLED, "(ikke-navngivet)"
STRING_ALL_FILES, "Alle filer (*.*)"
STRING_TEXT_FILES_TXT, "Tekst filer (*.txt)"
STRING_ALL_FILES, "Alle filer (*.*)"
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."
STRING_NOTEXT, "Du har ikke skrevet noget tekst. \
STRING_NOTEXT, "Du har ikke skrevet noget tekst. \
\nSkriv noget tekst, og prøv 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 ?"
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 ?"
STRING_NOTFOUND, "Kan ikke finde '%s'."
STRING_OUT_OF_MEMORY, "Der er ikke nok hukommelse til at udføre \
STRING_NOTFOUND, "Kan ikke finde '%s'."
STRING_OUT_OF_MEMORY, "Der er ikke nok hukommelse til at udføre \
denne operation. \nAfslut et eller flere aktive programmer for at frigøre \
hukommelse, og prøv så igen."

View File

@ -23,49 +23,49 @@
MAIN_MENU MENU LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
{
POPUP "&Datei" {
MENUITEM "&Neu...", 0x100
MENUITEM "Ö&ffnen...", 0x101
MENUITEM "&Speichern", 0x102
MENUITEM "Speichern &unter...", 0x103
MENUITEM "&Drucken", 0x104
MENUITEM "Seite ein&richten...", 0x105
MENUITEM "Drucker&einrichtung...", 0x106
MENUITEM "&Neu...", CMD_NEW
MENUITEM "Ö&ffnen...", CMD_OPEN
MENUITEM "&Speichern", CMD_SAVE
MENUITEM "Speichern &unter...", CMD_SAVE_AS
MENUITEM "&Drucken", CMD_PRINT
MENUITEM "Seite ein&richten...", CMD_PAGE_SETUP
MENUITEM "Drucker&einrichtung...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR
MENUITEM "&Beenden", 0x108
MENUITEM "&Beenden", CMD_EXIT
}
POPUP "&Bearbeiten" {
MENUITEM "&Rückgängig\tStrg+Z", 0x110
MENUITEM "&Rückgängig\tStrg+Z", CMD_UNDO
MENUITEM SEPARATOR
MENUITEM "&Ausschneiden\tStrg+X", 0x111
MENUITEM "&Kopieren\tStrg+C", 0x112
MENUITEM "&Einfügen\tStrg+V", 0x113
MENUITEM "&Löschen\tEntf", 0x114
MENUITEM "&Ausschneiden\tStrg+X", CMD_CUT
MENUITEM "&Kopieren\tStrg+C", CMD_COPY
MENUITEM "&Einfügen\tStrg+V", CMD_PASTE
MENUITEM "&Löschen\tEntf", CMD_DELETE
MENUITEM SEPARATOR
MENUITEM "Alles &markieren", 0x116
MENUITEM "&Uhrzeit/Datum\tF5", 0x117
MENUITEM "Alles &markieren", CMD_SELECT_ALL
MENUITEM "&Uhrzeit/Datum\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR
MENUITEM "&Zeilenumbruch", 0x119
MENUITEM "&Zeilenumbruch", CMD_WRAP
}
POPUP "&Suchen" {
MENUITEM "Suchen...", 0x120
MENUITEM "&Weitersuchen\tF3", 0x121
MENUITEM "Suchen...", CMD_SEARCH
MENUITEM "&Weitersuchen\tF3", CMD_SEARCH_NEXT
}
POPUP "&Hilfe" {
MENUITEM "&Inhalt", 0x130
MENUITEM "&Suchen...", 0x131
MENUITEM "&Hilfe benutzen", 0x132
MENUITEM "&Inhalt", CMD_HELP_CONTENTS
MENUITEM "&Suchen...", CMD_HELP_SEARCH
MENUITEM "&Hilfe benutzen", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
POPUP "Inf&o..." {
MENUITEM "&Lizenz", 0x135
MENUITEM "&KEINE GARANTIE", 0x136
MENUITEM "&Über Wine", 0x137
MENUITEM "&Lizenz", CMD_LICENSE
MENUITEM "&KEINE GARANTIE", CMD_NO_WARRANTY
MENUITEM "&Über Wine", CMD_ABOUT_WINE
}
}
}
/* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95
DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv"
@ -93,34 +93,34 @@ PUSHBUTTON "&Hilfe", 0x153, 180, 39, 40, 15, WS_TABSTOP
STRINGTABLE DISCARDABLE LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
{
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_NOTEPAD, "Editor"
STRING_ERROR, "FEHLER"
STRING_WARNING, "ACHTUNG"
STRING_INFO, "Information"
STRING_NOTEPAD, "Editor"
STRING_ERROR, "FEHLER"
STRING_WARNING, "ACHTUNG"
STRING_INFO, "Information"
STRING_UNTITLED, "(unbenannt)"
STRING_UNTITLED, "(unbenannt)"
STRING_ALL_FILES, "Alle Dateien (*.*)"
STRING_TEXT_FILES_TXT, "Textdateien (*.txt)"
STRING_ALL_FILES, "Alle Dateien (*.*)"
STRING_TEXT_FILES_TXT, "Textdateien (*.txt)"
STRING_TOOLARGE, "'%s' ist zu gross für den Editor\n \
STRING_TOOLARGE, "'%s' ist zu gross für den Editor\n \
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 könnte. Geben Sie Text ein, und versuchen Sie es \
\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 ?"
STRING_NOTSAVED, "Datei %s\n wurde geaendert.\n\n \
STRING_NOTSAVED, "Datei %s\n wurde geaendert.\n\n \
Moechten Sie die Aenderungen speichern ?"
STRING_NOTFOUND, "'%s' kann nicht gefunden werden."
STRING_OUT_OF_MEMORY, "Nicht genügend Arbeitsspeicher, \
STRING_NOTFOUND, "'%s' kann nicht gefunden werden."
STRING_OUT_OF_MEMORY, "Nicht genügend Arbeitsspeicher, \
um diese Funktion \nabzuschließen. Beenden Sie eine oder mehrere \
\nAnwendungen, um den verfügbaren Arbeitsspeicher zu \nerhöhen."

View File

@ -23,49 +23,49 @@
MAIN_MENU MENU LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
{
POPUP "&File" {
MENUITEM "&New...", 0x100
MENUITEM "&Open", 0x101
MENUITEM "&Save", 0x102
MENUITEM "Save &as...", 0x103
MENUITEM "&Print", 0x104
MENUITEM "Page Se&tup...", 0x105
MENUITEM "P&rinter Setup...", 0x106
MENUITEM "&New...", CMD_NEW
MENUITEM "&Open", CMD_OPEN
MENUITEM "&Save", CMD_SAVE
MENUITEM "Save &as...", CMD_SAVE_AS
MENUITEM "&Print", CMD_PRINT
MENUITEM "Page Se&tup...", CMD_PAGE_SETUP
MENUITEM "P&rinter Setup...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR
MENUITEM "&Exit", 0x108
MENUITEM "&Exit", CMD_EXIT
}
POPUP "&Edit" {
MENUITEM "&Undo\tCtrl+Z", 0x110
MENUITEM "&Undo\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR
MENUITEM "Cu&t\tCtrl+X", 0x111
MENUITEM "&Copy\tCtrl+C", 0x112
MENUITEM "&Paste\tCtrl+V", 0x113
MENUITEM "&Delete\tDel", 0x114
MENUITEM "Cu&t\tCtrl+X", CMD_CUT
MENUITEM "&Copy\tCtrl+C", CMD_COPY
MENUITEM "&Paste\tCtrl+V", CMD_PASTE
MENUITEM "&Delete\tDel", CMD_DELETE
MENUITEM SEPARATOR
MENUITEM "Select &all", 0x116
MENUITEM "&Time/Date\tF5", 0x117
MENUITEM "Select &all", CMD_SELECT_ALL
MENUITEM "&Time/Date\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR
MENUITEM "&Wrap long lines", 0x119
MENUITEM "&Wrap long lines", CMD_WRAP
}
POPUP "&Search" {
MENUITEM "&Search", 0x120
MENUITEM "&Search next\tF3", 0x121
MENUITEM "&Search", CMD_SEARCH
MENUITEM "&Search next\tF3", CMD_SEARCH_NEXT
}
POPUP "&Help" {
MENUITEM "&Contents", 0x130
MENUITEM "&Search...", 0x131
MENUITEM "&Help on help", 0x132
MENUITEM "&Contents", CMD_HELP_CONTENTS
MENUITEM "&Search...", CMD_HELP_SEARCH
MENUITEM "&Help on help", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
POPUP "Inf&o..." {
MENUITEM "&License", 0x135
MENUITEM "&NO WARRANTY", 0x136
MENUITEM "&About Wine", 0x137
MENUITEM "&License", CMD_LICENSE
MENUITEM "&NO WARRANTY", CMD_NO_WARRANTY
MENUITEM "&About Wine", CMD_ABOUT_WINE
}
}
}
/* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95
DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv"
@ -93,33 +93,33 @@ PUSHBUTTON "&Help", 0x153, 180, 39, 40, 15, WS_TABSTOP
STRINGTABLE DISCARDABLE LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
{
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_NOTEPAD, "Notepad"
STRING_ERROR, "ERROR"
STRING_WARNING, "WARNING"
STRING_INFO, "Information"
STRING_NOTEPAD, "Notepad"
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)"
STRING_ALL_FILES, "All files (*.*)"
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."
STRING_NOTEXT, "You didn't enter any text. \
STRING_NOTEXT, "You didn't enter any text. \
\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 ?"
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 ?"
STRING_NOTFOUND, "'%s' can not be found."
STRING_OUT_OF_MEMORY, "Not enough memory to complete this \
STRING_NOTFOUND, "'%s' can not be found."
STRING_OUT_OF_MEMORY, "Not enough memory to complete this \
task. \nClose one or more applications to increase the amount of \nfree \
memory."

View File

@ -24,49 +24,49 @@
MAIN_MENU MENU LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
{
POPUP "&Archivo" {
MENUITEM "&Nuevo", 0x100
MENUITEM "&Abrir", 0x101
MENUITEM "&Guardar", 0x102
MENUITEM "Guardar co&mo...", 0x103
MENUITEM "&Imprimir", 0x104
MENUITEM "&Configurar página...", 0x105
MENUITEM "&Configuración impresora...", 0x106
MENUITEM "&Nuevo", CMD_NEW
MENUITEM "&Abrir", CMD_OPEN
MENUITEM "&Guardar", CMD_SAVE
MENUITEM "Guardar co&mo...", CMD_SAVE_AS
MENUITEM "&Imprimir", CMD_PRINT
MENUITEM "&Configurar página...", CMD_PAGE_SETUP
MENUITEM "&Configuración impresora...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR
MENUITEM "&Salir", 0x108
MENUITEM "&Salir", CMD_EXIT
}
POPUP "&Editar" {
MENUITEM "&Deshacer\tCtrl+Z", 0x110
MENUITEM "&Deshacer\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR
MENUITEM "Cor&tar\tCtrl+X", 0x111
MENUITEM "&Copiar\tCtrl+C", 0x112
MENUITEM "&Pegar\tCtrl+V", 0x113
MENUITEM "&Borrar\tDel", 0x114
MENUITEM "Cor&tar\tCtrl+X", CMD_CUT
MENUITEM "&Copiar\tCtrl+C", CMD_COPY
MENUITEM "&Pegar\tCtrl+V", CMD_PASTE
MENUITEM "&Borrar\tDel", CMD_DELETE
MENUITEM SEPARATOR
MENUITEM "Seleccionar t&odo", 0x116
MENUITEM "&Hora y Fecha\tF5", 0x117
MENUITEM "Seleccionar t&odo", CMD_SELECT_ALL
MENUITEM "&Hora y Fecha\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR
MENUITEM "&Ajuste de línea automático", 0x119
MENUITEM "&Ajuste de línea automático", CMD_WRAP
}
POPUP "&Buscar" {
MENUITEM "&Buscar...", 0x120
MENUITEM "Buscar &siguiente\tF3", 0x121
MENUITEM "&Buscar...", CMD_SEARCH
MENUITEM "Buscar &siguiente\tF3", CMD_SEARCH_NEXT
}
POPUP "&Ayuda" {
MENUITEM "&Indice", 0x130
MENUITEM "&Buscar...", 0x131
MENUITEM "Ayuda sobre la ayuda", 0x132
MENUITEM "&Indice", CMD_HELP_CONTENTS
MENUITEM "&Buscar...", CMD_HELP_SEARCH
MENUITEM "Ayuda sobre la ayuda", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
POPUP "Inf&ormación..." {
MENUITEM "&Licencia", 0x135
MENUITEM "SIN &GARANTÍA", 0x136
MENUITEM "&Acerca de Wine", 0x137
MENUITEM "&Licencia", CMD_LICENSE
MENUITEM "SIN &GARANTÍA", CMD_NO_WARRANTY
MENUITEM "&Acerca de Wine", CMD_ABOUT_WINE
}
}
}
/* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95
DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv"
@ -94,33 +94,33 @@ PUSHBUTTON "&Ayuda", 0x153, 180, 39, 40, 15, WS_TABSTOP
STRINGTABLE DISCARDABLE LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
{
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Página &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Página &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_NOTEPAD, "Bloc de Notas"
STRING_ERROR, "ERROR"
STRING_WARNING, "CUIDADO"
STRING_INFO, "Información"
STRING_NOTEPAD, "Bloc de Notas"
STRING_ERROR, "ERROR"
STRING_WARNING, "CUIDADO"
STRING_INFO, "Información"
STRING_UNTITLED, "(sin título)"
STRING_UNTITLED, "(sin título)"
STRING_ALL_FILES, "Todos los archivos (*.*)"
STRING_TEXT_FILES_TXT, "Documentos de texto (*.txt)"
STRING_ALL_FILES, "Todos los archivos (*.*)"
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."
STRING_NOTEXT, "Ud. no escribió nada. \
STRING_NOTEXT, "Ud. no escribió nada. \
\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 ?"
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?"
STRING_NOTFOUND, "no se encontró '%s'."
STRING_OUT_OF_MEMORY, "No hay suficiente memoria para terminar \
STRING_NOTFOUND, "no se encontró '%s'."
STRING_OUT_OF_MEMORY, "No hay suficiente memoria para terminar \
esta tarea. \nCierre una o más aplicaciones para aumentar la cantidad \nde \
memoria libre."

View File

@ -22,49 +22,49 @@
MAIN_MENU MENU LANGUAGE LANG_FINNISH, SUBLANG_NEUTRAL
{
POPUP "&Tiedosto" {
MENUITEM "&Uusi...", 0x100
MENUITEM "&Avaa", 0x101
MENUITEM "Ta&lleta", 0x102
MENUITEM "Talleta &nimellä...", 0x103
MENUITEM "T&ulosta", 0x104
MENUITEM "&Sivun asetukset...", 0x105
MENUITEM "&Kirjoittimen asetukset...", 0x106
MENUITEM "&Uusi...", CMD_NEW
MENUITEM "&Avaa", CMD_OPEN
MENUITEM "Ta&lleta", CMD_SAVE
MENUITEM "Talleta &nimellä...", CMD_SAVE_AS
MENUITEM "T&ulosta", CMD_PRINT
MENUITEM "&Sivun asetukset...", CMD_PAGE_SETUP
MENUITEM "&Kirjoittimen asetukset...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR
MENUITEM "&Poistu", 0x108
MENUITEM "&Poistu", CMD_EXIT
}
POPUP "&Muokkaa" {
MENUITEM "&Palauta\tCtrl+Z", 0x110
MENUITEM "&Palauta\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR
MENUITEM "&Leikkaa\tCtrl+X", 0x111
MENUITEM "&Kopioi\tCtrl+C", 0x112
MENUITEM "L&iitä\tCtrl+V", 0x113
MENUITEM "P&oista\tDel", 0x114
MENUITEM "&Leikkaa\tCtrl+X", CMD_CUT
MENUITEM "&Kopioi\tCtrl+C", CMD_COPY
MENUITEM "L&iitä\tCtrl+V", CMD_PASTE
MENUITEM "P&oista\tDel", CMD_DELETE
MENUITEM SEPARATOR
MENUITEM "&Valitse kaikki", 0x116
MENUITEM "&Aika/Päivämäärä\tF5", 0x117
MENUITEM "&Valitse kaikki", CMD_SELECT_ALL
MENUITEM "&Aika/Päivämäärä\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR
MENUITEM "Ka&tkaise pitkä rivi", 0x119
MENUITEM "Ka&tkaise pitkä rivi", CMD_WRAP
}
POPUP "&Etsi" {
MENUITEM "Etsi...", 0x120
MENUITEM "Etsi &seuraava\tF3", 0x121
MENUITEM "Etsi...", CMD_SEARCH
MENUITEM "Etsi &seuraava\tF3", CMD_SEARCH_NEXT
}
POPUP "&Apua" {
MENUITEM "&Sisältö", 0x130
MENUITEM "&Etsi...", 0x131
MENUITEM "Apua &Opastuksesta", 0x132
MENUITEM "&Sisältö", CMD_HELP_CONTENTS
MENUITEM "&Etsi...", CMD_HELP_SEARCH
MENUITEM "Apua &Opastuksesta", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
POPUP "Inf&o..." {
MENUITEM "&Lisenssi", 0x135
MENUITEM "&EI TAKUUTA", 0x136
MENUITEM "&Tietoja Wine:ista", 0x137
MENUITEM "&Lisenssi", CMD_LICENSE
MENUITEM "&EI TAKUUTA", CMD_NO_WARRANTY
MENUITEM "&Tietoja Wine:ista", CMD_ABOUT_WINE
}
}
}
/* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95
DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_FINNISH, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv"

View File

@ -23,49 +23,49 @@
MAIN_MENU MENU LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
{
POPUP "&Fichier" {
MENUITEM "&Nouveau...", 0x100
MENUITEM "&Ouvrir", 0x101
MENUITEM "&Enregistrer", 0x102
MENUITEM "Enregistrer &sous...", 0x103
MENUITEM "Im&primer", 0x104
MENUITEM "&Mise en page...", 0x105
MENUITEM "&Configuration de l'imprimante...", 0x106
MENUITEM "&Nouveau...", CMD_NEW
MENUITEM "&Ouvrir", CMD_OPEN
MENUITEM "&Enregistrer", CMD_SAVE
MENUITEM "Enregistrer &sous...", CMD_SAVE_AS
MENUITEM "Im&primer", CMD_PRINT
MENUITEM "&Mise en page...", CMD_PAGE_SETUP
MENUITEM "&Configuration de l'imprimante...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR
MENUITEM "&Quitter", 0x108
MENUITEM "&Quitter", CMD_EXIT
}
POPUP "&Edition" {
MENUITEM "&Annuler\tCtrl+Z", 0x110
MENUITEM "&Annuler\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR
MENUITEM "Co&uper\tCtrl+X", 0x111
MENUITEM "&Copier\tCtrl+C", 0x112
MENUITEM "&Coller\tCtrl+V", 0x113
MENUITEM "&Effacer\tDel", 0x114
MENUITEM "Co&uper\tCtrl+X", CMD_CUT
MENUITEM "&Copier\tCtrl+C", CMD_COPY
MENUITEM "&Coller\tCtrl+V", CMD_PASTE
MENUITEM "&Effacer\tDel", CMD_DELETE
MENUITEM SEPARATOR
MENUITEM "Tout &sélectionner", 0x116
MENUITEM "&Heure/Date\tF5", 0x117
MENUITEM "Tout &sélectionner", CMD_SELECT_ALL
MENUITEM "&Heure/Date\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR
MENUITEM "&Retour à la ligne", 0x119
MENUITEM "&Retour à la ligne", CMD_WRAP
}
POPUP "&Rechercher" {
MENUITEM "&Rechercher", 0x120
MENUITEM "&Suivant\tF3", 0x121
MENUITEM "&Rechercher", CMD_SEARCH
MENUITEM "&Suivant\tF3", CMD_SEARCH_NEXT
}
POPUP "&Aide" {
MENUITEM "&Sommaire", 0x130
MENUITEM "&Rechercher...", 0x131
MENUITEM "&Aide sur l'aide", 0x132
MENUITEM "&Sommaire", CMD_HELP_CONTENTS
MENUITEM "&Rechercher...", CMD_HELP_SEARCH
MENUITEM "&Aide sur l'aide", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
POPUP "Inf&o..." {
MENUITEM "&Licence", 0x135
MENUITEM "&AUCUNE GARANTIE", 0x136
MENUITEM "&A propos de Wine", 0x137
MENUITEM "&Licence", CMD_LICENSE
MENUITEM "&AUCUNE GARANTIE", CMD_NO_WARRANTY
MENUITEM "&A propos de Wine", CMD_ABOUT_WINE
}
}
}
/* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95
DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv"
@ -93,33 +93,33 @@ PUSHBUTTON "&Aide", 0x153, 180, 39, 40, 15, WS_TABSTOP
STRINGTABLE DISCARDABLE LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
{
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_NOTEPAD, "Notepad"
STRING_ERROR, "ERREUR"
STRING_WARNING, "ATTENTION"
STRING_INFO, "Information"
STRING_NOTEPAD, "Notepad"
STRING_ERROR, "ERREUR"
STRING_WARNING, "ATTENTION"
STRING_INFO, "Information"
STRING_UNTITLED, "(sans-titre)"
STRING_UNTITLED, "(sans-titre)"
STRING_ALL_FILES, "Tous fichiers (*.*)"
STRING_TEXT_FILES_TXT, "Fichiers texte (*.txt)"
STRING_ALL_FILES, "Tous fichiers (*.*)"
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."
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"
STRING_DOESNOTEXIST, "Le fichier '%s'\n\'existe pas.\n\n \
STRING_DOESNOTEXIST, "Le fichier '%s'\n\'existe pas.\n\n \
Voulez vous créer 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 ?"
STRING_NOTFOUND, "'%s' non trouvé."
STRING_OUT_OF_MEMORY, "Pas assez de mémoire pour finir cette tâche. \
STRING_NOTFOUND, "'%s' non trouvé."
STRING_OUT_OF_MEMORY, "Pas assez de mémoire pour finir cette tâche. \
task. \n Fermez une ou plusier applications pour libérer\n\
de la mémoire."

View File

@ -6,15 +6,11 @@ MODULE = notepad.exe
APPMODE = gui
IMPORTS = comdlg32 shell32 user32 gdi32 kernel32
LICENSELANG = En
C_SRCS = \
License_En.c \
dialog.c \
language.c \
license.c \
main.c \
search.c \
$(LICENSELANG:%=License_%.c)
main.c
RC_SRCS = rsrc.rc

View File

@ -22,49 +22,49 @@
MAIN_MENU MENU LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL
{
POPUP "&Arquivo" {
MENUITEM "&Novo...", 0x100
MENUITEM "A&brir", 0x101
MENUITEM "&Salvar", 0x102
MENUITEM "Salvar &como...", 0x103
MENUITEM "&Imprimir", 0x104
MENUITEM "C&onfigurar Página...", 0x105
MENUITEM "Configurar I&mpressora...", 0x106
MENUITEM "&Novo...", CMD_NEW
MENUITEM "A&brir", CMD_OPEN
MENUITEM "&Salvar", CMD_SAVE
MENUITEM "Salvar &como...", CMD_SAVE_AS
MENUITEM "&Imprimir", CMD_PRINT
MENUITEM "C&onfigurar Página...", CMD_PAGE_SETUP
MENUITEM "Configurar I&mpressora...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR
MENUITEM "&Sair", 0x108
MENUITEM "&Sair", CMD_EXIT
}
POPUP "&Editar" {
MENUITEM "&Desfazer\tCtrl+Z", 0x110
MENUITEM "&Desfazer\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR
MENUITEM "C&ortar\tCtrl+X", 0x111
MENUITEM "&Copiar\tCtrl+C", 0x112
MENUITEM "Co&lar\tCtrl+V", 0x113
MENUITEM "&Delete\tDel", 0x114
MENUITEM "C&ortar\tCtrl+X", CMD_CUT
MENUITEM "&Copiar\tCtrl+C", CMD_COPY
MENUITEM "Co&lar\tCtrl+V", CMD_PASTE
MENUITEM "&Delete\tDel", CMD_DELETE
MENUITEM SEPARATOR
MENUITEM "Selecionar &Tudo", 0x116
MENUITEM "&Data/Hora\tF5", 0x117
MENUITEM "Selecionar &Tudo", CMD_SELECT_ALL
MENUITEM "&Data/Hora\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR
MENUITEM "&Quebrar linhas longas", 0x119
MENUITEM "&Quebrar linhas longas", CMD_WRAP
}
POPUP "&Pesquisa" {
MENUITEM "Pesquisar...", 0x120
MENUITEM "&Procurar Próxima\tF3", 0x121
MENUITEM "Pesquisar...", CMD_SEARCH
MENUITEM "&Procurar Próxima\tF3", CMD_SEARCH_NEXT
}
POPUP "&Ajuda" {
MENUITEM "&Conteúdo", 0x130
MENUITEM "&Procurar...", 0x131
MENUITEM "&Ajuda na ajuda", 0x132
MENUITEM "&Conteúdo", CMD_HELP_CONTENTS
MENUITEM "&Procurar...", CMD_HELP_SEARCH
MENUITEM "&Ajuda na ajuda", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
POPUP "Inf&ormações..." {
MENUITEM "&Licença", 0x135
MENUITEM "&SEM GARANTIA", 0x136
MENUITEM "&Sobre Wine", 0x137
MENUITEM "&Licença", CMD_LICENSE
MENUITEM "&SEM GARANTIA", CMD_NO_WARRANTY
MENUITEM "&Sobre Wine", CMD_ABOUT_WINE
}
}
}
/* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95
DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv"

View File

@ -1,16 +0,0 @@
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.

View File

@ -23,49 +23,49 @@
MAIN_MENU MENU LANGUAGE LANG_SLOVAK, SUBLANG_NEUTRAL
{
POPUP "&File" {
MENUITEM "&New...", 0x100
MENUITEM "&Open", 0x101
MENUITEM "&Save", 0x102
MENUITEM "Save &as...", 0x103
MENUITEM "&Print", 0x104
MENUITEM "Page Se&tup...", 0x105
MENUITEM "P&rinter Setup...", 0x106
MENUITEM "&New...", CMD_NEW
MENUITEM "&Open", CMD_OPEN
MENUITEM "&Save", CMD_SAVE
MENUITEM "Save &as...", CMD_SAVE_AS
MENUITEM "&Print", CMD_PRINT
MENUITEM "Page Se&tup...", CMD_PAGE_SETUP
MENUITEM "P&rinter Setup...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR
MENUITEM "&Exit", 0x108
MENUITEM "&Exit", CMD_EXIT
}
POPUP "&Edit" {
MENUITEM "&Undo\tCtrl+Z", 0x110
MENUITEM "&Undo\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR
MENUITEM "Cu&t\tCtrl+X", 0x111
MENUITEM "&Copy\tCtrl+C", 0x112
MENUITEM "&Paste\tCtrl+V", 0x113
MENUITEM "&Delete\tDel", 0x114
MENUITEM "Cu&t\tCtrl+X", CMD_CUT
MENUITEM "&Copy\tCtrl+C", CMD_COPY
MENUITEM "&Paste\tCtrl+V", CMD_PASTE
MENUITEM "&Delete\tDel", CMD_DELETE
MENUITEM SEPARATOR
MENUITEM "Select &all", 0x116
MENUITEM "&Time/Date\tF5", 0x117
MENUITEM "Select &all", CMD_SELECT_ALL
MENUITEM "&Time/Date\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR
MENUITEM "&Wrap long lines", 0x119
MENUITEM "&Wrap long lines", CMD_WRAP
}
POPUP "&Search" {
MENUITEM "&Search", 0x120
MENUITEM "&Search next\tF3", 0x121
MENUITEM "&Search", CMD_SEARCH
MENUITEM "&Search next\tF3", CMD_SEARCH_NEXT
}
POPUP "&Help" {
MENUITEM "&Contents", 0x130
MENUITEM "&Search...", 0x131
MENUITEM "&Help on help", 0x132
MENUITEM "&Contents", CMD_HELP_CONTENTS
MENUITEM "&Search...", CMD_HELP_SEARCH
MENUITEM "&Help on help", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
POPUP "Inf&o..." {
MENUITEM "&License", 0x135
MENUITEM "&NO WARRANTY", 0x136
MENUITEM "&About Wine", 0x137
MENUITEM "&License", CMD_LICENSE
MENUITEM "&NO WARRANTY", CMD_NO_WARRANTY
MENUITEM "&About Wine", CMD_ABOUT_WINE
}
}
}
/* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95
DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_SLOVAK, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv"

View File

@ -23,49 +23,49 @@
MAIN_MENU MENU LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
{
POPUP "&Arkiv" {
MENUITEM "&Ny...", 0x100
MENUITEM "Ö&ppna", 0x101
MENUITEM "&Spara", 0x102
MENUITEM "Spara &som...", 0x103
MENUITEM "&Skriv ut", 0x104
MENUITEM "Sid La&yout...", 0x105
MENUITEM "Skrivar &inställningar...", 0x106
MENUITEM "&Ny...", CMD_NEW
MENUITEM "Ö&ppna", CMD_OPEN
MENUITEM "&Spara", CMD_SAVE
MENUITEM "Spara &som...", CMD_SAVE_AS
MENUITEM "&Skriv ut", CMD_PRINT
MENUITEM "Sid La&yout...", CMD_PAGE_SETUP
MENUITEM "Skrivar &inställningar...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR
MENUITEM "&Avsluta", 0x108
MENUITEM "&Avsluta", CMD_EXIT
}
POPUP "&Redigera" {
MENUITEM "&Undo\tCtrl+Z", 0x110
MENUITEM "&Undo\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR
MENUITEM "Klippa\tCtrl+X", 0x111
MENUITEM "&Kopiera\tCtrl+C", 0x112
MENUITEM "&Klistra in\tCtrl+V", 0x113
MENUITEM "&Ta bort\tDel", 0x114
MENUITEM "Klippa\tCtrl+X", CMD_CUT
MENUITEM "&Kopiera\tCtrl+C", CMD_COPY
MENUITEM "&Klistra in\tCtrl+V", CMD_PASTE
MENUITEM "&Ta bort\tDel", CMD_DELETE
MENUITEM SEPARATOR
MENUITEM "Markera &allt", 0x116
MENUITEM "&Tid/Datum\tF5", 0x117
MENUITEM "Markera &allt", CMD_SELECT_ALL
MENUITEM "&Tid/Datum\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR
MENUITEM "&Dela långa meningar", 0x119
MENUITEM "&Dela långa meningar", CMD_WRAP
}
POPUP "&Sök" {
MENUITEM "Sök...", 0x120
MENUITEM "&Sök nästa\tF3", 0x121
MENUITEM "Sök...", CMD_SEARCH
MENUITEM "&Sök nästa\tF3", CMD_SEARCH_NEXT
}
POPUP "&Hjälp" {
MENUITEM "&Innehåll", 0x130
MENUITEM "&Sök...", 0x131
MENUITEM "Användningen &av hjälp", 0x132
MENUITEM "&Innehåll", CMD_HELP_CONTENTS
MENUITEM "&Sök...", CMD_HELP_SEARCH
MENUITEM "Användningen &av hjälp", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
POPUP "Inf&ormation..." {
MENUITEM "&Licens", 0x135
MENUITEM "&INGEN GARANTI", 0x136
MENUITEM "&Om Wine", 0x137
MENUITEM "&Licens", CMD_LICENSE
MENUITEM "&INGEN GARANTI", CMD_NO_WARRANTY
MENUITEM "&Om Wine", CMD_ABOUT_WINE
}
}
}
/* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95
DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv"
@ -93,33 +93,33 @@ PUSHBUTTON "&Hj
STRINGTABLE DISCARDABLE LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
{
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_NOTEPAD, "Anteckningar"
STRING_ERROR, "FEL"
STRING_WARNING, "WARNING"
STRING_INFO, "Information"
STRING_NOTEPAD, "Anteckningar"
STRING_ERROR, "FEL"
STRING_WARNING, "WARNING"
STRING_INFO, "Information"
STRING_UNTITLED, "(untitled)"
STRING_UNTITLED, "(untitled)"
STRING_ALL_FILES, "Alla filer (*.*)"
STRING_TEXT_FILES_TXT, "Text filer (*.txt)"
STRING_ALL_FILES, "Alla filer (*.*)"
STRING_TEXT_FILES_TXT, "Text filer (*.txt)"
STRING_TOOLARGE, "Filen '%s' är för stor för notepad.\n \
STRING_TOOLARGE, "Filen '%s' är för stor för notepad.\n \
Använd en annan editor."
STRING_NOTEXT, "Du skrev inte in någon text. \
STRING_NOTEXT, "Du skrev inte in någon text. \
\nSkriv något och försök 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 ?"
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 ?"
STRING_NOTFOUND, "'%s' hittades inte."
STRING_OUT_OF_MEMORY, "Inte tillräkligt med minne för att slutföra \
STRING_NOTFOUND, "'%s' hittades inte."
STRING_OUT_OF_MEMORY, "Inte tillräkligt med minne för att slutföra \
den här uppgiften. \nAvsluta ett eller flera program för att öka mängden \nfritt \
minne."

View File

@ -1,9 +0,0 @@
- 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.

View File

@ -23,49 +23,49 @@
MAIN_MENU MENU LANGUAGE LANG_WALON, SUBLANG_NEUTRAL
{
POPUP "&Fitchî" {
MENUITEM "&Novea...", 0x100
MENUITEM "&Drovî", 0x101
MENUITEM "&Schaper", 0x102
MENUITEM "Schaper èt r&lomer...", 0x103
MENUITEM "&Rexhe", 0x104
MENUITEM "Arrandjmint del &Pådje...", 0x105
MENUITEM "&Apontiaedje del scrirece...", 0x106
MENUITEM "&Novea...", CMD_NEW
MENUITEM "&Drovî", CMD_OPEN
MENUITEM "&Schaper", CMD_SAVE
MENUITEM "Schaper èt r&lomer...", CMD_SAVE_AS
MENUITEM "&Rexhe", CMD_PRINT
MENUITEM "Arrandjmint del &Pådje...", CMD_PAGE_SETUP
MENUITEM "&Apontiaedje del scrirece...", CMD_PRINTER_SETUP
MENUITEM SEPARATOR
MENUITEM "Moussî &Foû", 0x108
MENUITEM "Moussî &Foû", CMD_EXIT
}
POPUP "&Candjî" {
MENUITEM "&Disfé\tCtrl+Z", 0x110
MENUITEM "&Disfé\tCtrl+Z", CMD_UNDO
MENUITEM SEPARATOR
MENUITEM "Cô&per\tCtrl+X", 0x111
MENUITEM "&Copyî\tCtrl+C", 0x112
MENUITEM "C&laper\tCtrl+V", 0x113
MENUITEM "&Rafacer\tDel", 0x114
MENUITEM "Cô&per\tCtrl+X", CMD_CUT
MENUITEM "&Copyî\tCtrl+C", CMD_COPY
MENUITEM "C&laper\tCtrl+V", CMD_PASTE
MENUITEM "&Rafacer\tDel", CMD_DELETE
MENUITEM SEPARATOR
MENUITEM "&Tchwezi totafwait", 0x116
MENUITEM "&Eure/Date\tF5", 0x117
MENUITEM "&Tchwezi totafwait", CMD_SELECT_ALL
MENUITEM "&Eure/Date\tF5", CMD_TIME_DATE
MENUITEM SEPARATOR
MENUITEM "Côper les ro&yes", 0x119
MENUITEM "Côper les ro&yes", CMD_WRAP
}
POPUP "C&werî" {
MENUITEM "Cwerî...", 0x120
MENUITEM "&Shûvant\tF3", 0x121
MENUITEM "Cwerî...", CMD_SEARCH
MENUITEM "&Shûvant\tF3", CMD_SEARCH_NEXT
}
POPUP "&Aide" {
MENUITEM "Å&dvins", 0x130
MENUITEM "C&werî...", 0x131
MENUITEM "&Aide so l' Aide", 0x132
MENUITEM "Å&dvins", CMD_HELP_CONTENTS
MENUITEM "C&werî...", CMD_HELP_SEARCH
MENUITEM "&Aide so l' Aide", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
POPUP "&Informåcion..." {
MENUITEM "&Licinse", 0x135
MENUITEM "&NOLE WARANTEYE", 0x136
MENUITEM "Å &dfait di Wine", 0x137
MENUITEM "&Licinse", CMD_LICENSE
MENUITEM "&NOLE WARANTEYE", CMD_NO_WARRANTY
MENUITEM "Å &dfait di Wine", CMD_ABOUT_WINE
}
}
}
/* Dialog `Page setup' */
DIALOG_PAGESETUP_ DIALOG 0, 0, 225, 95
DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
LANGUAGE LANG_WALON, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv"
@ -93,33 +93,33 @@ PUSHBUTTON "&Aide", 0x153, 180, 39, 40, 15, WS_TABSTOP
STRINGTABLE DISCARDABLE LANGUAGE LANG_WALON, SUBLANG_NEUTRAL
{
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Pådje &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */
STRING_PAGESETUP_FOOTERVALUE, "Pådje &s" /* FIXME */
STRING_PAGESETUP_LEFTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_RIGHTVALUE, "20 mm" /* FIXME */
STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
STRING_NOTEPAD, "Notepad"
STRING_ERROR, "AROKE"
STRING_WARNING, "ADVERTIXHMINT"
STRING_INFO, "Informåcion"
STRING_NOTEPAD, "Notepad"
STRING_ERROR, "AROKE"
STRING_WARNING, "ADVERTIXHMINT"
STRING_INFO, "Informåcion"
STRING_UNTITLED, "(sin tite)"
STRING_UNTITLED, "(sin tite)"
STRING_ALL_FILES, "Tos les fitchîs (*.*)"
STRING_TEXT_FILES_TXT, "Fitchîs tekse (*.txt)"
STRING_ALL_FILES, "Tos les fitchîs (*.*)"
STRING_TEXT_FILES_TXT, "Fitchîs 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."
STRING_NOTEXT, "Vos n' avoz rén sicrît. \
STRING_NOTEXT, "Vos n' avoz rén sicrît. \
\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 ?"
STRING_NOTSAVED, "Li fitchî '%s'\na candjî\n\n \
STRING_NOTSAVED, "Li fitchî '%s'\na candjî\n\n \
El voloz schaper ?"
STRING_NOTFOUND, "'%s' pout nén esse trové."
STRING_OUT_OF_MEMORY, "Li memwere est plinne. \n\
STRING_NOTFOUND, "'%s' pout nén esse trové."
STRING_OUT_OF_MEMORY, "Li memwere est plinne. \n\
Cloyoz on programe ou pus po monter li memwere libe."
}

View File

@ -3,6 +3,7 @@
*
* Copyright 1998,99 Marcel Baur <mbaur@g26.ethz.ch>
* Copyright 2002 Sylvain Petreolle <spetreolle@yahoo.fr>
* Copyright 2002 Andriy Palamarchuk
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -27,13 +28,57 @@
#include "main.h"
#include "license.h"
#include "language.h"
#include "dialog.h"
static LRESULT WINAPI DIALOG_PAGESETUP_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
void ShowLastError()
{
DWORD error = GetLastError();
if (error != NO_ERROR)
{
LPVOID lpMsgBuf;
CHAR szTitle[MAX_STRING_LEN];
LoadString(Globals.hInstance, STRING_ERROR, szTitle, sizeof(szTitle));
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, error, 0,
(LPTSTR) &lpMsgBuf, 0, NULL);
MessageBox(NULL, (char*)lpMsgBuf, szTitle, MB_OK | MB_ICONERROR);
LocalFree(lpMsgBuf);
}
}
/**
* 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
*/
void UpdateWindowCaption(void) {
CHAR szCaption[MAX_STRING_LEN];
CHAR szUntitled[MAX_STRING_LEN];
LoadString(Globals.hInstance, STRING_NOTEPAD, szCaption, sizeof(szCaption));
if (Globals.szFileTitle[0] != '\0') {
lstrcat(szCaption, " - [");
lstrcat(szCaption, Globals.szFileTitle);
lstrcat(szCaption, "]");
}
else
{
LoadString(Globals.hInstance, STRING_UNTITLED, szUntitled, sizeof(szUntitled));
lstrcat(szCaption, " - ");
lstrcat(szCaption, szUntitled);
}
SetWindowText(Globals.hMainWnd, szCaption);
}
int AlertIDS(UINT ids_message, UINT ids_caption, WORD type) {
/*
* Given some ids strings, this acts as a language-aware wrapper for
@ -95,37 +140,68 @@ VOID AlertOutOfMemory(void) {
}
BOOL FileExists(LPCSTR szFilename) {
/*
* Returns: TRUE - if "szFileName" exists
* FALSE - if it does not
/**
* Returns:
* TRUE - if file exists
* FALSE - if file does not exist
*/
BOOL FileExists(LPSTR szFilename) {
WIN32_FIND_DATA entry;
HANDLE hFile;
hFile = FindFirstFile(szFilename, &entry);
FindClose(hFile);
return (hFile!=INVALID_HANDLE_VALUE);
return (hFile != INVALID_HANDLE_VALUE);
}
VOID DoSaveFile(VOID) {
HANDLE hFile;
DWORD dwNumWrite;
BOOL bTest;
CHAR *pTemp;
int size;
/* FIXME: Really Save the file */
/* ... (Globals.szFileName); */
hFile = CreateFile(Globals.szFileName, GENERIC_WRITE, FILE_SHARE_WRITE,
NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if(hFile == INVALID_HANDLE_VALUE)
{
ShowLastError();
return;
}
size = GetWindowTextLength(Globals.hEdit);
pTemp = (LPSTR) GlobalAlloc(GMEM_FIXED, size);
if (!pTemp)
{
ShowLastError();
return;
}
GetWindowText(Globals.hEdit, pTemp, size);
bTest = WriteFile(hFile, pTemp, size, &dwNumWrite, NULL);
if(bTest == FALSE)
{
ShowLastError();
}
CloseHandle(hFile);
GlobalFree(pTemp);
}
/**
* Returns:
* TRUE - User agreed to close (both save/don't save)
* FALSE - User cancelled close by selecting "Cancel"
*/
BOOL DoCloseFile(void) {
/* Return value: TRUE - User agreed to close (both save/don't save) */
/* FALSE - User cancelled close by selecting "Cancel" */
int nResult;
if (strlen(Globals.szFileName)>0) {
if (Globals.szFileName[0] != 0) {
/* prompt user to save changes */
nResult = AlertFileNotSaved(Globals.szFileName);
switch (nResult) {
case IDYES: DoSaveFile();
case IDYES: DIALOG_FileSave();
break;
case IDNO: break;
@ -138,147 +214,145 @@ BOOL DoCloseFile(void) {
} /* switch */
} /* if */
/* Forget file name */
lstrcpy(Globals.szFileName, "");
LANGUAGE_UpdateWindowCaption();
SetFileName("");
UpdateWindowCaption();
return(TRUE);
}
void DoOpenFile(LPCSTR szFileName) {
void DoOpenFile(LPSTR szFileName) {
/* Close any files and prompt to save changes */
if (DoCloseFile()) {
GetFileTitle(szFileName, Globals.szFileName, sizeof(Globals.szFileName));
LANGUAGE_UpdateWindowCaption();
if (DoCloseFile())
{
HANDLE hFile;
CHAR *pTemp;
DWORD size;
DWORD dwNumRead;
LoadBufferFromFile(szFileName);
hFile = CreateFile(szFileName, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if(hFile == INVALID_HANDLE_VALUE)
{
ShowLastError();
return;
}
size = GetFileSize(hFile, NULL);
if (size == 0xFFFFFFFF)
{
ShowLastError();
return;
}
size++;
pTemp = (LPSTR) GlobalAlloc(GMEM_FIXED, size);
if (!pTemp)
{
ShowLastError();
return;
}
if (!ReadFile(hFile, pTemp, size, &dwNumRead, NULL))
{
ShowLastError();
return;
}
CloseHandle(hFile);
pTemp[dwNumRead] = '\0';
if (!SetWindowText(Globals.hEdit, pTemp))
{
GlobalFree(pTemp);
ShowLastError();
return;
}
SendMessage(Globals.hEdit, EM_EMPTYUNDOBUFFER, 0, 0);
GlobalFree(pTemp);
SetFocus(Globals.hEdit);
SetFileName(szFileName);
UpdateWindowCaption();
}
}
VOID DIALOG_FileNew(VOID)
{
/* Close any files and promt to save changes */
if (DoCloseFile()) {
TrashBuffer();
SetWindowText(Globals.hEdit, "");
SendMessage(Globals.hEdit, EM_EMPTYUNDOBUFFER, 0, 0);
SetFocus(Globals.hEdit);
}
}
VOID DIALOG_FileOpen(VOID)
{
OPENFILENAME openfilename;
CHAR szPath[MAX_PATHNAME_LEN];
CHAR szDir[MAX_PATHNAME_LEN];
CHAR szzFilter[2 * MAX_STRING_LEN + 100];
CHAR szDefaultExt[4];
LPSTR p = szzFilter;
OPENFILENAME openfilename;
lstrcpy(szDefaultExt, "txt");
CHAR szPath[MAX_PATH];
CHAR szDir[MAX_PATH];
CHAR szDefaultExt[] = "txt";
LoadString(Globals.hInstance, STRING_TEXT_FILES_TXT, p, MAX_STRING_LEN);
p += strlen(p) + 1;
lstrcpy(p, "*.txt");
p += strlen(p) + 1;
LoadString(Globals.hInstance, STRING_ALL_FILES, p, MAX_STRING_LEN);
p += strlen(p) + 1;
lstrcpy(p, "*.*");
p += strlen(p) + 1;
*p = '\0';
ZeroMemory(&openfilename, sizeof(openfilename));
GetCurrentDirectory(sizeof(szDir), szDir);
lstrcpy(szPath,"*.txt");
GetCurrentDirectory(sizeof(szDir), szDir);
lstrcpy(szPath,"*.txt");
openfilename.lStructSize = sizeof(OPENFILENAME);
openfilename.hwndOwner = Globals.hMainWnd;
openfilename.hInstance = Globals.hInstance;
openfilename.lpstrFilter = szzFilter;
openfilename.lpstrCustomFilter = 0;
openfilename.nMaxCustFilter = 0;
openfilename.nFilterIndex = 0;
openfilename.lpstrFile = szPath;
openfilename.nMaxFile = sizeof(szPath);
openfilename.lpstrFileTitle = 0;
openfilename.nMaxFileTitle = 0;
openfilename.lpstrInitialDir = szDir;
openfilename.lpstrTitle = 0;
openfilename.Flags = OFN_FILEMUSTEXIST + OFN_PATHMUSTEXIST;
openfilename.nFileOffset = 0;
openfilename.nFileExtension = 0;
openfilename.lpstrDefExt = szDefaultExt;
openfilename.lCustData = 0;
openfilename.lpfnHook = 0;
openfilename.lpTemplateName = 0;
openfilename.lStructSize = sizeof(openfilename);
openfilename.hwndOwner = Globals.hMainWnd;
openfilename.hInstance = Globals.hInstance;
openfilename.lpstrFilter = Globals.szFilter;
openfilename.lpstrFile = szPath;
openfilename.nMaxFile = sizeof(szPath);
openfilename.lpstrInitialDir = szDir;
openfilename.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST |
OFN_HIDEREADONLY;
openfilename.lpstrDefExt = szDefaultExt;
if (GetOpenFileName(&openfilename)) {
if (FileExists(openfilename.lpstrFile))
DoOpenFile(openfilename.lpstrFile);
else
AlertFileNotFound(openfilename.lpstrFile);
}
if (GetOpenFileName(&openfilename)) {
if (FileExists(openfilename.lpstrFile))
DoOpenFile(openfilename.lpstrFile);
else
AlertFileNotFound(openfilename.lpstrFile);
}
}
VOID DIALOG_FileSave(VOID)
{
/* FIXME: Save File */
if (Globals.szFileName[0] == '\0')
DIALOG_FileSaveAs();
else
DoSaveFile();
}
VOID DIALOG_FileSaveAs(VOID)
{
OPENFILENAME saveas;
CHAR szPath[MAX_PATHNAME_LEN];
CHAR szDir[MAX_PATHNAME_LEN];
CHAR szDefaultExt[4];
CHAR szzFilter[2 * MAX_STRING_LEN + 100];
OPENFILENAME saveas;
CHAR szPath[MAX_PATH];
CHAR szDir[MAX_PATH];
CHAR szDefaultExt[] = "txt";
LPSTR p = szzFilter;
ZeroMemory(&saveas, sizeof(saveas));
lstrcpy(szDefaultExt, "txt");
GetCurrentDirectory(sizeof(szDir), szDir);
lstrcpy(szPath,"*.*");
LoadString(Globals.hInstance, STRING_TEXT_FILES_TXT, p, MAX_STRING_LEN);
p += strlen(p) + 1;
lstrcpy(p, "*.txt");
p += strlen(p) + 1;
LoadString(Globals.hInstance, STRING_ALL_FILES, p, MAX_STRING_LEN);
p += strlen(p) + 1;
lstrcpy(p, "*.*");
p += strlen(p) + 1;
*p = '\0';
saveas.lStructSize = sizeof(OPENFILENAME);
saveas.hwndOwner = Globals.hMainWnd;
saveas.hInstance = Globals.hInstance;
saveas.lpstrFilter = Globals.szFilter;
saveas.lpstrFile = szPath;
saveas.nMaxFile = sizeof(szPath);
saveas.lpstrInitialDir = szDir;
saveas.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT |
OFN_HIDEREADONLY;
saveas.lpstrDefExt = szDefaultExt;
lstrcpy(szPath,"*.*");
GetCurrentDirectory(sizeof(szDir), szDir);
saveas.lStructSize = sizeof(OPENFILENAME);
saveas.hwndOwner = Globals.hMainWnd;
saveas.hInstance = Globals.hInstance;
saveas.lpstrFilter = szzFilter;
saveas.lpstrCustomFilter = 0;
saveas.nMaxCustFilter = 0;
saveas.nFilterIndex = 0;
saveas.lpstrFile = szPath;
saveas.nMaxFile = sizeof(szPath);
saveas.lpstrFileTitle = 0;
saveas.nMaxFileTitle = 0;
saveas.lpstrInitialDir = szDir;
saveas.lpstrTitle = 0;
saveas.Flags = OFN_PATHMUSTEXIST + OFN_OVERWRITEPROMPT + OFN_HIDEREADONLY;
saveas.nFileOffset = 0;
saveas.nFileExtension = 0;
saveas.lpstrDefExt = szDefaultExt;
saveas.lCustData = 0;
saveas.lpfnHook = 0;
saveas.lpTemplateName = 0;
if (GetSaveFileName(&saveas)) {
lstrcpy(Globals.szFileName, saveas.lpstrFile);
LANGUAGE_UpdateWindowCaption();
DIALOG_FileSave();
}
if (GetSaveFileName(&saveas)) {
SetFileName(szPath);
UpdateWindowCaption();
DoSaveFile();
}
}
VOID DIALOG_FilePrint(VOID)
@ -302,34 +376,16 @@ VOID DIALOG_FilePrint(VOID)
/* hDevNames = GlobalAlloc(GMEM_MOVEABLE + GMEM_ZEROINIT, sizeof(DEVNAMES)); */
/* Get Current Settings */
printer.lStructSize = sizeof(PRINTDLG);
ZeroMemory(&printer, sizeof(printer));
printer.lStructSize = sizeof(printer);
printer.hwndOwner = Globals.hMainWnd;
printer.hInstance = Globals.hInstance;
/* Let PrintDlg create a DEVMODE structure */
printer.hDevMode = 0;
printer.hDevNames = 0;
printer.hDC = 0;
printer.Flags = PD_RETURNDEFAULT;
printer.nFromPage = 0;
printer.nToPage = 0;
printer.nMinPage = 0;
printer.nMaxPage = 0;
printer.nCopies = 0;
printer.lCustData = 0;
printer.lpfnPrintHook = 0;
printer.lpfnSetupHook = 0;
printer.lpPrintTemplateName = 0;
printer.lpSetupTemplateName = 0;
printer.hPrintTemplate = 0;
printer.hSetupTemplate = 0;
nResult = PrintDlg(&printer);
/* hContext = CreateDC(, szDeviceName, "TEST.TXT", 0); */
/* Congratulations to those Microsoft Engineers responsable */
/* Congratulations to those Microsoft Engineers responsible */
/* for the following pointer acrobatics */
assert(printer.hDevNames!=0);
@ -337,13 +393,13 @@ VOID DIALOG_FilePrint(VOID)
nBase = (LONG)(printer.hDevNames);
nOffset = (WORD)((LPDEVNAMES) printer.hDevNames)->wDriverOffset;
lstrcpy(szPrinterName, (LPCSTR) (nBase + nOffset));
lstrcpy(szPrinterName, (LPSTR) (nBase + nOffset));
nOffset = (WORD)((LPDEVNAMES) printer.hDevNames)->wDeviceOffset;
lstrcpy(szDeviceName, (LPCSTR) (nBase + nOffset));
lstrcpy(szDeviceName, (LPSTR) (nBase + nOffset));
nOffset = (WORD)((LPDEVNAMES) printer.hDevNames)->wOutputOffset;
lstrcpy(szOutput, (LPCSTR) (nBase + nOffset));
lstrcpy(szOutput, (LPSTR) (nBase + nOffset));
MessageBox(Globals.hMainWnd, szPrinterName, "Printer Name", MB_ICONEXCLAMATION);
MessageBox(Globals.hMainWnd, szDeviceName, "Device Name", MB_ICONEXCLAMATION);
@ -433,45 +489,31 @@ VOID DIALOG_FilePageSetup(VOID)
VOID DIALOG_FilePrinterSetup(VOID)
{
PRINTDLG printer;
PRINTDLG printer;
printer.lStructSize = sizeof(PRINTDLG);
printer.hwndOwner = Globals.hMainWnd;
printer.hInstance = Globals.hInstance;
printer.hDevMode = 0;
printer.hDevNames = 0;
printer.hDC = 0;
printer.Flags = PD_PRINTSETUP;
printer.nFromPage = 0;
printer.nToPage = 0;
printer.nMinPage = 0;
printer.nMaxPage = 0;
printer.nCopies = 1;
printer.lCustData = 0;
printer.lpfnPrintHook = 0;
printer.lpfnSetupHook = 0;
printer.lpPrintTemplateName = 0;
printer.lpSetupTemplateName = 0;
printer.hPrintTemplate = 0;
printer.hSetupTemplate = 0;
if (PrintDlg(&printer)) {
/* do nothing */
};
ZeroMemory(&printer, sizeof(printer));
printer.lStructSize = sizeof(printer);
printer.hwndOwner = Globals.hMainWnd;
printer.hInstance = Globals.hInstance;
printer.Flags = PD_PRINTSETUP;
printer.nCopies = 1;
if (PrintDlg(&printer)) {
/* do nothing */
};
}
VOID DIALOG_FileExit(VOID)
{
if (DoCloseFile()) {
PostQuitMessage(0);
}
if (DoCloseFile())
{
PostQuitMessage(0);
}
}
VOID DIALOG_EditUndo(VOID)
{
MessageBox(Globals.hMainWnd, "Undo", "Debug", MB_ICONEXCLAMATION);
/* undo */
SendMessage(Globals.hEdit, EM_UNDO, 0, 0);
}
VOID DIALOG_EditCut(VOID)
@ -532,6 +574,7 @@ VOID DIALOG_EditSelectAll(VOID)
/* Select all */
}
VOID DIALOG_EditTimeDate(VOID)
{
SYSTEMTIME st;
@ -542,29 +585,24 @@ VOID DIALOG_EditTimeDate(VOID)
GetLocalTime(&st);
GetDateFormat(LOCALE_USER_DEFAULT, LOCALE_SLONGDATE, lpst, NULL, date, MAX_STRING_LEN);
GetTimeFormat(LOCALE_USER_DEFAULT, LOCALE_STIMEFORMAT, lpst, NULL, date, MAX_STRING_LEN);
}
VOID DIALOG_EditWrap(VOID)
{
Globals.bWrapLongLines = !Globals.bWrapLongLines;
CheckMenuItem(Globals.hEditMenu, 0x119, MF_BYCOMMAND |
(Globals.bWrapLongLines ? MF_CHECKED : MF_UNCHECKED));
Globals.bWrapLongLines = !Globals.bWrapLongLines;
CheckMenuItem(GetMenu(Globals.hMainWnd), CMD_WRAP,
MF_BYCOMMAND | (Globals.bWrapLongLines ? MF_CHECKED : MF_UNCHECKED));
}
VOID DIALOG_Search(VOID)
{
ZeroMemory(&Globals.find, sizeof(Globals.find));
Globals.find.lStructSize = sizeof(Globals.find);
Globals.find.hwndOwner = Globals.hMainWnd;
Globals.find.hInstance = Globals.hInstance;
Globals.find.lpstrFindWhat = (CHAR *) &Globals.szFindText;
Globals.find.wFindWhatLen = sizeof(Globals.szFindText);
Globals.find.lpstrReplaceWith = 0;
Globals.find.wReplaceWithLen = 0;
Globals.find.Flags = FR_DOWN;
Globals.find.lCustData = 0;
Globals.find.lpfnHook = 0;
Globals.find.lpTemplateName = 0;
/* We only need to create the modal FindReplace dialog which will */
/* notify us of incoming events using hMainWnd Window Messages */
@ -611,6 +649,7 @@ VOID DIALOG_HelpAboutWine(VOID)
ShellAbout(Globals.hMainWnd, szNotepad, "Notepad\n" WINE_RELEASE_INFO, 0);
}
/***********************************************************************
*
* DIALOG_PageSetup
@ -621,7 +660,8 @@ VOID DIALOG_PageSetup(VOID)
WNDPROC lpfnDlg;
lpfnDlg = MakeProcInstance(DIALOG_PAGESETUP_DlgProc, Globals.hInstance);
DialogBox(Globals.hInstance, STRING_PAGESETUP_Xx, Globals.hMainWnd, (DLGPROC)lpfnDlg);
DialogBox(Globals.hInstance, MAKEINTRESOURCE(DIALOG_PAGESETUP),
Globals.hMainWnd, (DLGPROC)lpfnDlg);
FreeProcInstance(lpfnDlg);
}

View File

@ -18,8 +18,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "windows.h"
VOID DIALOG_FileNew(VOID);
VOID DIALOG_FileOpen(VOID);
VOID DIALOG_FileSave(VOID);
@ -51,3 +49,7 @@ VOID DIALOG_HelpAboutWine(VOID);
VOID DIALOG_PageSetup(VOID);
VOID DIALOG_TimeDate(VOID);
/* utility functions */
BOOL FileExists(LPSTR szFilename);
BOOL DoCloseFile(void);
void DoOpenFile(LPSTR szFileName);

View File

@ -1,93 +0,0 @@
/*
* 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);
}
*/

View File

@ -1,25 +0,0 @@
/*
* 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);*/

File diff suppressed because it is too large Load Diff

View File

@ -22,11 +22,7 @@
#include "notepad_res.h"
#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 LOGPREFIX ".LOG"
/* hide the following from winerc */
#ifndef RC_INVOKED
@ -35,6 +31,8 @@
#include "commdlg.h"
VOID SetFileName(LPSTR szFileName);
/***** Compatibility *****/
#ifndef OIC_WINLOGO
@ -47,46 +45,27 @@ typedef struct
HANDLE hInstance;
HWND hMainWnd;
HWND hFindReplaceDlg;
HWND hEdit;
HICON hMainIcon;
HICON hDefaultIcon;
HMENU hMainMenu;
HMENU hFileMenu;
HMENU hEditMenu;
HMENU hSearchMenu;
HMENU hLanguageMenu;
HMENU hHelpMenu;
LPCSTR lpszIniFile;
LPCSTR lpszIcoFile;
UINT wStringTableOffset;
BOOL bWrapLongLines;
CHAR szFindText[MAX_PATHNAME_LEN];
CHAR szReplaceText[MAX_PATHNAME_LEN];
CHAR szFileName[MAX_PATHNAME_LEN];
CHAR szMarginTop[MAX_PATHNAME_LEN];
CHAR szMarginBottom[MAX_PATHNAME_LEN];
CHAR szMarginLeft[MAX_PATHNAME_LEN];
CHAR szMarginRight[MAX_PATHNAME_LEN];
CHAR szHeader[MAX_PATHNAME_LEN];
CHAR szFooter[MAX_PATHNAME_LEN];
CHAR szFindText[MAX_PATH];
CHAR szFileName[MAX_PATH];
CHAR szFileTitle[MAX_PATH];
CHAR szFilter[2 * MAX_STRING_LEN + 100];
CHAR szMarginTop[MAX_PATH];
CHAR szMarginBottom[MAX_PATH];
CHAR szMarginLeft[MAX_PATH];
CHAR szMarginRight[MAX_PATH];
CHAR szHeader[MAX_PATH];
CHAR szFooter[MAX_PATH];
FINDREPLACE find;
WORD nCommdlgFindReplaceMsg;
CHAR Buffer[12000];
} NOTEPAD_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 */
#endif

View File

@ -1,202 +0,0 @@
/*
* 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

View File

@ -1,7 +1,8 @@
/*
* Notepad (String defines)
* Constants, used in resources.
*
* Copyright 2002 Sylvain Petreolle <spetreolle@yahoo.fr>
* Copyright 2002 Andriy Palamarchuk
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -18,7 +19,39 @@
* 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_FOOTERVALUE 0x161
#define STRING_PAGESETUP_LEFTVALUE 0x162

View File

@ -1,69 +0,0 @@
/*
* 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);
}