diff --git a/programs/progman/En.rc b/programs/progman/En.rc index 90a4144395b..ed1f69b13bc 100644 --- a/programs/progman/En.rc +++ b/programs/progman/En.rc @@ -2,6 +2,7 @@ * Program Manager * * Copyright 1996 Ulrich Schmid + * Copyright 2002 Sylvain Petreolle * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,116 +19,204 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define LANGUAGE_ID En -#define LANGUAGE_NUMBER 0 -#define LANGUAGE_MENU_ITEM "&English" - /* Menu */ -#define MENU_FILE "&File" -#define MENU_FILE_NEW "&New..." -#define MENU_FILE_OPEN "O&pen\tEnter" -#define MENU_FILE_MOVE "&Move...\tF7" -#define MENU_FILE_COPY "&Copy...\tF8" -#define MENU_FILE_DELETE "&Delete\tEntf" -#define MENU_FILE_ATTRIBUTES "&Attributes...\tAlt+Enter" -#define MENU_FILE_EXECUTE "&Execute..." -#define MENU_FILE_EXIT "E&xit Windows..." +MAIN_MENU MENU LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +{ + POPUP "&File" { + MENUITEM "&New...", PM_NEW + MENUITEM "O&pen\tEnter", PM_OPEN + MENUITEM "&Move...\tF7", PM_MOVE, GRAYED + MENUITEM "&Copy...\tF8", PM_COPY, GRAYED + MENUITEM "&Delete\tEntf", PM_DELETE + MENUITEM "&Attributes...\tAlt+Enter", PM_ATTRIBUTES + MENUITEM SEPARATOR + MENUITEM "&Execute...", PM_EXECUTE + MENUITEM SEPARATOR + MENUITEM "E&xit Windows...", PM_EXIT + } + POPUP "&Options" { + MENUITEM "&Arrange automatically", PM_AUTO_ARRANGE + MENUITEM "&Minimize on run", PM_MIN_ON_RUN + MENUITEM "&Save settings on exit", PM_SAVE_SETTINGS + } + POPUP "&Windows" { + MENUITEM "&Overlapped\tShift+F5", PM_OVERLAP + MENUITEM "&Side by side\tShift+F4", PM_SIDE_BY_SIDE + MENUITEM "&Arrange Symbols", PM_ARRANGE + } + +POPUP "&Help" { + MENUITEM "&Contents", PM_CONTENTS + MENUITEM "&Search...", PM_SEARCH + MENUITEM SEPARATOR + MENUITEM "&Help on Help", PM_HELPONHELP + MENUITEM "&Tutorial", PM_TUTORIAL + MENUITEM SEPARATOR -#define MENU_OPTIONS "&Options" -#define MENU_OPTIONS_AUTO_ARRANGE "&Arrange automatically" -#define MENU_OPTIONS_MIN_ON_RUN "&Minimize on run" -#define MENU_OPTIONS_SAVE_SETTINGS "&Save settings on exit" + POPUP "&Info..." { + MENUITEM "&License", PM_LICENSE + MENUITEM "&NO WARRANTY", PM_NO_WARRANTY + MENUITEM "&About WINE", PM_ABOUT_WINE + } + } +} -#define MENU_WINDOWS "&Windows" -#define MENU_WINDOWS_OVERLAP "&Overlapped\tShift+F5" -#define MENU_WINDOWS_SIDE_BY_SIDE "&Side by side\tShift+F4" -#define MENU_WINDOWS_ARRANGE "&Arrange Symbols" +/* Dialog `New' */ -#define MENU_LANGUAGE "&Language" +DIALOG_NEW_ DIALOG 0, 0, 170, 65 +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +STYLE DS_MODALFRAME +CAPTION "Nouveau" +{ +RADIOBUTTON "", PM_NEW_GROUP, 10, 15, 10, 15 +LTEXT "&Groupe de programmes", PM_NEW_GROUP, 20, 18, 80, 15 +RADIOBUTTON "", PM_NEW_PROGRAM, 10, 35, 10, 15 +LTEXT "&Programme", PM_NEW_PROGRAM, 20, 38, 80, 15 +DEFPUSHBUTTON "OK", IDOK, 105, 5, 60, 15, WS_TABSTOP +PUSHBUTTON "Annuler", IDCANCEL, 105, 25, 60, 15, WS_TABSTOP +PUSHBUTTON "&Aide", PM_HELP, 105, 45, 60, 15, WS_TABSTOP +} -#define MENU_HELP "&Help" -#define MENU_HELP_CONTENTS "&Contents" -#define MENU_HELP_SEARCH "&Search..." -#define MENU_HELP_HELP_ON_HELP "&Help on Help" -#define MENU_HELP_TUTORIAL "&Tutorial" +/* Dialog `Move' */ -#define MENU_INFO "&Info..." -#define MENU_INFO_LICENSE "&License" -#define MENU_INFO_NO_WARRANTY "&NO WARRANTY" -#define MENU_INFO_ABOUT_WINE "&About WINE" +DIALOG_MOVE_ DIALOG 0, 0, 250, 65 +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +STYLE DS_MODALFRAME +CAPTION "Déplacer un programme" +{ +LTEXT "Déplacer le programme:", IDIGNORE, 5, 5, 90, 15 +LTEXT "", PM_PROGRAM, 95, 5, 90, 15 +LTEXT "A partir du groupe:", IDIGNORE, 5, 13, 90, 15 +LTEXT "", PM_FROM_GROUP, 95, 13, 90, 15 +LTEXT "&Vers le groupe:", PM_TO_GROUP_TXT, 5, 28, 140, 15 +COMBOBOX PM_TO_GROUP, 5, 38, 140, 50, WS_TABSTOP | CBS_DROPDOWNLIST +DEFPUSHBUTTON "OK", IDOK, 185, 5, 60, 15, WS_TABSTOP +PUSHBUTTON "Annuler", IDCANCEL, 185, 25, 60, 15, WS_TABSTOP +PUSHBUTTON "&Aide", PM_HELP, 185, 45, 60, 15, WS_TABSTOP +} -/* Dialogs */ +/* Dialog `Copy' */ -#define DIALOG_OK "OK" -#define DIALOG_CANCEL "Cancel" -#define DIALOG_BROWSE "&Browse" -#define DIALOG_HELP "&Help" +DIALOG_COPY_ DIALOG 0, 0, 250, 65 +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +STYLE DS_MODALFRAME +CAPTION "Copier un programme" +{ +LTEXT "Copier le programme:", IDIGNORE, 5, 5, 90, 15 +LTEXT "", PM_PROGRAM, 95, 5, 90, 15 +LTEXT "A partir du groupe:", IDIGNORE, 5, 13, 90, 15 +LTEXT "", PM_FROM_GROUP, 95, 13, 90, 15 +LTEXT "&Vers le groupe:", PM_TO_GROUP_TXT, 5, 28, 140, 15 +COMBOBOX PM_TO_GROUP, 5, 38, 140, 50, WS_TABSTOP | CBS_DROPDOWNLIST +DEFPUSHBUTTON "&Vers le groupe:", IDOK, 185, 5, 60, 15, WS_TABSTOP +PUSHBUTTON "Annuler", IDCANCEL, 185, 25, 60, 15, WS_TABSTOP +PUSHBUTTON "&Aide", PM_HELP, 185, 45, 60, 15, WS_TABSTOP +} -#define DIALOG_NEW_CAPTION "New Program Object" -#define DIALOG_NEW_NEW "New" -#define DIALOG_NEW_GROUP "Program &group" -#define DIALOG_NEW_PROGRAM "&Program" +/* Dialog `Group attributes' */ -#define DIALOG_MOVE_CAPTION "Move Program" -#define DIALOG_MOVE_PROGRAM "Move program:" -#define DIALOG_MOVE_FROM_GROUP "From group:" -#define DIALOG_MOVE_TO_GROUP "&To group:" +DIALOG_GROUP_ DIALOG 0, 0, 230, 65 +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +STYLE DS_MODALFRAME +CAPTION "Propriétés de groupe" +{ +LTEXT "&Nom:", PM_DESCRIPTION_TXT, 05, 18, 50, 10 +EDITTEXT PM_DESCRIPTION, 60, 18, 90, 15, WS_TABSTOP +LTEXT "&Fichier de groupe:", PM_FILE_TXT, 05, 38, 50, 10 +EDITTEXT PM_FILE, 60, 38, 90, 15, WS_TABSTOP +DEFPUSHBUTTON "OK", IDOK, 155, 5, 60, 15, WS_TABSTOP +PUSHBUTTON "Annuler", IDCANCEL, 155, 25, 60, 15, WS_TABSTOP +PUSHBUTTON "&Aide", PM_HELP, 155, 45, 60, 15, WS_TABSTOP +} -#define DIALOG_COPY_CAPTION "Copy Program" -#define DIALOG_COPY_PROGRAM "Copy program:" -#define DIALOG_COPY_FROM_GROUP DIALOG_MOVE_FROM_GROUP -#define DIALOG_COPY_TO_GROUP DIALOG_MOVE_TO_GROUP +/* Dialog `Program attributes' */ -#define DIALOG_GROUP_CAPTION "Program Group Attributes" -#define DIALOG_GROUP_DESCRIPTION "&Description:" -#define DIALOG_GROUP_FILE "&Group file:" +DIALOG_PROGRAM_ DIALOG 0, 0, 250, 105 +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +STYLE DS_MODALFRAME +CAPTION "Propriétés de programme" +{ +LTEXT "&Nom:", PM_DESCRIPTION_TXT, 05, 10, 60, 10 +EDITTEXT PM_DESCRIPTION, 80, 10, 90, 15, WS_TABSTOP +LTEXT "&Ligne de commande:", PM_COMMAND_LINE_TXT, 05, 25, 60, 10 +EDITTEXT PM_COMMAND_LINE, 80, 25, 90, 15, WS_TABSTOP +LTEXT "Répertoire de tra&vail:", PM_DIRECTORY_TXT, 05, 40, 60, 10 +EDITTEXT PM_DIRECTORY, 80, 40, 90, 15, WS_TABSTOP +LTEXT "&Touche de raccourci:", PM_HOT_KEY_TXT, 05, 55, 60, 10 +EDITTEXT PM_HOT_KEY, 80, 55, 90, 15, WS_TABSTOP +ICON "", PM_ICON, 20, 70 +CHECKBOX "", PM_SYMBOL, 80, 75, 10, 10, WS_TABSTOP +LTEXT "Réduire à l'&utilisation", IDIGNORE, 95, 75, 75, 10 +DEFPUSHBUTTON "OK", IDOK, 185, 5, 60, 15, WS_TABSTOP +PUSHBUTTON "Annuler", IDCANCEL, 185, 25, 60, 15, WS_TABSTOP +PUSHBUTTON "Pa&rcourir...", PM_BROWSE, 185, 45, 60, 15, WS_TABSTOP +PUSHBUTTON "&Changer d'icône...", PM_OTHER_SYMBOL, 185, 65, 60, 15, WS_TABSTOP +PUSHBUTTON "&Aide", PM_HELP, 185, 85, 60, 15, WS_TABSTOP +} -#define DIALOG_PROGRAM_CAPTION "Program Attributes" -#define DIALOG_PROGRAM_DESCRIPTION DIALOG_GROUP_DESCRIPTION -#define DIALOG_PROGRAM_COMMAND_LINE "&Command line:" -#define DIALOG_PROGRAM_DIRECTORY "&Working directory:" -#define DIALOG_PROGRAM_HOT_KEY "&Key combination:" -#define DIALOG_PROGRAM_SYMBOL "As &Symbol" -#define DIALOG_PROGRAM_OTHER_SYMBOL "&Other Symbol..." +/* Dialog `Symbol' */ -#define DIALOG_SYMBOL_CAPTION "Select Symbol" -#define DIALOG_SYMBOL_FILE "&Filename:" -#define DIALOG_SYMBOL_CURRENT "&Current Symbol:" +DIALOG_SYMBOL_ DIALOG 0, 0, 200, 85 +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +STYLE DS_MODALFRAME +CAPTION "Changer d'icône" +{ +LTEXT "&Nom:", PM_ICON_FILE_TXT, 5, 15, 40, 10 +EDITTEXT PM_ICON_FILE, 45, 15, 85, 15, WS_TABSTOP +LTEXT "Icône a&ctuelle:", PM_SYMBOL_LIST_TXT, 5, 30, 125, 10 +COMBOBOX PM_SYMBOL_LIST, 5, 40, 125, 50, + CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_OWNERDRAWFIXED | WS_TABSTOP +DEFPUSHBUTTON "OK", IDOK, 135, 5, 60, 15, WS_TABSTOP +PUSHBUTTON "Annuler", IDCANCEL, 135, 25, 60, 15, WS_TABSTOP +PUSHBUTTON "Pa&rcourir...", PM_BROWSE, 135, 45, 60, 15, WS_TABSTOP +PUSHBUTTON "&Aide", PM_HELP, 135, 65, 60, 15, WS_TABSTOP +} -#define DIALOG_EXECUTE_CAPTION "Execute Program" -#define DIALOG_EXECUTE_COMMAND_LINE DIALOG_PROGRAM_COMMAND_LINE -#define DIALOG_EXECUTE_SYMBOL DIALOG_PROGRAM_SYMBOL +/* Dialog `Execute' */ + +DIALOG_EXECUTE_ DIALOG 0, 0, 200, 85 +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +STYLE DS_MODALFRAME +CAPTION "Exécuter" +{ +LTEXT "&Ligne de commande:", IDIGNORE, 05, 15, 120, 10 +EDITTEXT PM_COMMAND, 05, 25, 120, 15, WS_TABSTOP +CHECKBOX "", PM_SYMBOL, 05, 45, 10, 10, WS_TABSTOP +LTEXT "Réduire à l'&utilisation", IDIGNORE, 20, 45, 120, 10 +DEFPUSHBUTTON "OK", IDOK, 135, 5, 60, 15, WS_TABSTOP +PUSHBUTTON "Annuler", IDCANCEL, 135, 25, 60, 15, WS_TABSTOP +PUSHBUTTON "Pa&rcourir...", PM_BROWSE, 135, 45, 60, 15, WS_TABSTOP +PUSHBUTTON "&Aide", PM_HELP, 135, 65, 60, 15, WS_TABSTOP +} /* Strings */ -#define STRING_PROGRAM_MANAGER "Program Manager" -#define STRING_ERROR "ERROR" -#define STRING_WARNING "WARNING" -#define STRING_INFO "Information" -#define STRING_DELETE "Delete" -#define STRING_DELETE_GROUP_s "Delete group `%s' ?" -#define STRING_DELETE_PROGRAM_s "Delete program `%s' ?" -#define STRING_NOT_IMPLEMENTED "Not implemented" -#define STRING_FILE_READ_ERROR_s "Error reading `%s'" -#define STRING_FILE_WRITE_ERROR_s "Error writeing `%s'" - -#define STRING_GRPFILE_READ_ERROR_s "\ -The group file `%s' cannot be opened.\n\ -Should it be tried further on?" - -#define STRING_OUT_OF_MEMORY "Out of memory" -#define STRING_WINHELP_ERROR "Help not available" -#define STRING_UNKNOWN_FEATURE_s "Unknown feature in %s" -#define STRING_FILE_NOT_OVERWRITTEN_s "File `%s' exists. Not overwritten." -#define STRING_SAVE_GROUP_AS_s "Save group as `%s' to prevent overwriting original files" - -#define STRING_NO_HOT_KEY "None" - -#define STRING_ALL_FILES "All files (*.*)" -#define STRING_PROGRAMS "Programs" -#define STRING_LIBRARIES_DLL "Libraries (*.dll)" -#define STRING_SYMBOL_FILES "Symbol files" -#define STRING_SYMBOLS_ICO "Symbols (*.ico)" - -#include "Xx.rc" +STRINGTABLE DISCARDABLE LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +{ +IDS_PROGRAM_MANAGER, "Gestionaire de programmes" +IDS_ERROR, "ERREUR" +IDS_WARNING, "ATTENTION" +IDS_INFO, "Information" +IDS_DELETE, "Supprimer" +IDS_DELETE_GROUP_s, "Voulez-vous supprimer le groupe '%s'?" +IDS_DELETE_PROGRAM_s, "Voulez-vous supprimer le programme '%s'?" +IDS_NOT_IMPLEMENTED, "Non implementé" +IDS_FILE_READ_ERROR_s, "Impossible d'ouvrir '%s'." +IDS_FILE_WRITE_ERROR_s, "Impossible d'enregistrer '%s'." +IDS_GRPFILE_READ_ERROR_s, "\ +Impossible d'ouvrir le groupe '%s'.\n\ +Voulez-vous que le Gestionnaire de programmes essaie\n\ +de l'ouvrir dans les prochaines sessions?" +IDS_OUT_OF_MEMORY, "Mémoire insuffisante." +IDS_WINHELP_ERROR, "Impossible d'afficher l'Aide." +IDS_UNKNOWN_FEATURE_s, "Caracteristique inconnue dans %s" +IDS_FILE_NOT_OVERWRITTEN_s, "Le fichier `%s' existe. Non écrasé." +IDS_SAVE_GROUP_AS_s, "Groupe sauvé sous `%s' pour éviter l'écrasement du fichier original." +IDS_NO_HOT_KEY, "Aucun" +IDS_ALL_FILES, "Tout fichier (*.*)" +IDS_PROGRAMS, "Programmes" +IDS_LIBRARIES_DLL, "Bibliothèques (*.dll)" +IDS_SYMBOL_FILES, "Icônes" +IDS_SYMBOLS_ICO, "Icônes (*.ico)" +} diff --git a/programs/progman/Fr.rc b/programs/progman/Fr.rc index 127df40526f..6bcf94409b5 100644 --- a/programs/progman/Fr.rc +++ b/programs/progman/Fr.rc @@ -2,7 +2,8 @@ * Program Manager * * Copyright 1996 Ulrich Schmid - * French Fr.rc by Pablo Saratxaga + * French Fr.rc by Pablo Saratxaga + * Copyright 2002 Sylvain Petreolle * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,118 +20,204 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define LANGUAGE_ID Fr -#define LANGUAGE_NUMBER 4 -#define LANGUAGE_MENU_ITEM "&Français" - /* Menu */ -#define MENU_FILE "&Fichier" -#define MENU_FILE_NEW "&Nouveau..." -#define MENU_FILE_OPEN "O&uvrir\tEntrée" -#define MENU_FILE_MOVE "&Déplacer...\tF7" -#define MENU_FILE_COPY "&Copier...\tF8" -#define MENU_FILE_DELETE "&Supprimer\tSuppr" -#define MENU_FILE_ATTRIBUTES "&Propriétés...\tAlt+Entrée" -#define MENU_FILE_EXECUTE "E&xécuter..." -#define MENU_FILE_EXIT "&Quitter Windows..." +MAIN_MENU MENU LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL +{ + POPUP "&Fichier" { + MENUITEM "&Nouveau...", PM_NEW + MENUITEM "O&uvrir\tEntrée", PM_OPEN + MENUITEM "&Déplacer...\tF7", PM_MOVE, GRAYED + MENUITEM "&Copier...\tF8", PM_COPY, GRAYED + MENUITEM "&Supprimer\tSuppr", PM_DELETE + MENUITEM "&Propriétés...\tAlt+Entrée", PM_ATTRIBUTES + MENUITEM SEPARATOR + MENUITEM "E&xécuter...", PM_EXECUTE + MENUITEM SEPARATOR + MENUITEM "&Quitter Windows...", PM_EXIT + } + POPUP "&Options" { + MENUITEM "Réorg&anisation automatique", PM_AUTO_ARRANGE + MENUITEM "&Réduire à l'utilisation", PM_MIN_ON_RUN + MENUITEM "&Enregistrer la configuration en quittant", PM_SAVE_SETTINGS + } + POPUP "F&enêtre" { + MENUITEM "&Cascade\tMaj+F5", PM_OVERLAP + MENUITEM "&Mosaïque\tMaj+F4", PM_SIDE_BY_SIDE + MENUITEM "&Réorganiser les icônes", PM_ARRANGE + } + + POPUP "&?" { + MENUITEM "&Index", PM_CONTENTS + MENUITEM "&Rechercher l'Aide sur...", PM_SEARCH + MENUITEM SEPARATOR + MENUITEM "&Utiliser l'Aide", PM_HELPONHELP + MENUITEM "Didacticiel &Windows", PM_TUTORIAL + MENUITEM SEPARATOR -#define MENU_OPTIONS "&Options" -#define MENU_OPTIONS_AUTO_ARRANGE "Réorg&anisation automatique" -#define MENU_OPTIONS_MIN_ON_RUN "&Réduire à l'utilisation" -#define MENU_OPTIONS_SAVE_SETTINGS "&Enregistrer la configuration en quittant" + POPUP "&Info..." { + MENUITEM "&License", PM_LICENSE + MENUITEM "&NO WARRANTY", PM_NO_WARRANTY + MENUITEM "&A propos de WINE", PM_ABOUT_WINE + } + } +} -#define MENU_WINDOWS "F&enêtre" -#define MENU_WINDOWS_OVERLAP "&Cascade\tMaj+F5" -#define MENU_WINDOWS_SIDE_BY_SIDE "&Mosaïque\tMaj+F4" -#define MENU_WINDOWS_ARRANGE "&Réorganiser les icônes" +/* Dialog `New' */ -#define MENU_LANGUAGE "&Langue" +DIALOG_NEW DIALOG 0, 0, 170, 65 +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL +STYLE DS_MODALFRAME +CAPTION "Nouveau" +{ +RADIOBUTTON "", PM_NEW_GROUP, 10, 15, 10, 15 +LTEXT "&Groupe de programmes", PM_NEW_GROUP, 20, 18, 80, 15 +RADIOBUTTON "", PM_NEW_PROGRAM, 10, 35, 10, 15 +LTEXT "&Programme", PM_NEW_PROGRAM, 20, 38, 80, 15 +DEFPUSHBUTTON "OK", IDOK, 105, 5, 60, 15, WS_TABSTOP +PUSHBUTTON "Annuler", IDCANCEL, 105, 25, 60, 15, WS_TABSTOP +PUSHBUTTON "&Aide", PM_HELP, 105, 45, 60, 15, WS_TABSTOP +} -#define MENU_HELP "&?" -#define MENU_HELP_CONTENTS "&Index" -#define MENU_HELP_SEARCH "&Rechercher l'Aide sur..." -#define MENU_HELP_HELP_ON_HELP "&Utiliser l'Aide" -#define MENU_HELP_TUTORIAL "Didacticiel &Windows" +/* Dialog `Move' */ -#define MENU_INFO "&Info..." -#define MENU_INFO_LICENSE "&License" -#define MENU_INFO_NO_WARRANTY "&NO WARRANTY" -#define MENU_INFO_ABOUT_WINE "&A propos de WINE" +DIALOG_MOVE DIALOG 0, 0, 250, 65 +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL +STYLE DS_MODALFRAME +CAPTION "Déplacer un programme" +{ +LTEXT "Déplacer le programme:", IDIGNORE, 5, 5, 90, 15 +LTEXT "", PM_PROGRAM, 95, 5, 90, 15 +LTEXT "A partir du groupe:", IDIGNORE, 5, 13, 90, 15 +LTEXT "", PM_FROM_GROUP, 95, 13, 90, 15 +LTEXT "&Vers le groupe:", PM_TO_GROUP_TXT, 5, 28, 140, 15 +COMBOBOX PM_TO_GROUP, 5, 38, 140, 50, WS_TABSTOP | CBS_DROPDOWNLIST +DEFPUSHBUTTON "OK", IDOK, 185, 5, 60, 15, WS_TABSTOP +PUSHBUTTON "Annuler", IDCANCEL, 185, 25, 60, 15, WS_TABSTOP +PUSHBUTTON "&Aide", PM_HELP, 185, 45, 60, 15, WS_TABSTOP +} -/* Dialogs */ +/* Dialog `Copy' */ -#define DIALOG_OK "OK" -#define DIALOG_CANCEL "Annuler" -#define DIALOG_BROWSE "Pa&rcourir..." -#define DIALOG_HELP "&Aide" +DIALOG_COPY DIALOG 0, 0, 250, 65 +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL +STYLE DS_MODALFRAME +CAPTION "Copier un programme" +{ +LTEXT "Copier le programme:", IDIGNORE, 5, 5, 90, 15 +LTEXT "", PM_PROGRAM, 95, 5, 90, 15 +LTEXT "A partir du groupe:", IDIGNORE, 5, 13, 90, 15 +LTEXT "", PM_FROM_GROUP, 95, 13, 90, 15 +LTEXT "&Vers le groupe:", PM_TO_GROUP_TXT, 5, 28, 140, 15 +COMBOBOX PM_TO_GROUP, 5, 38, 140, 50, WS_TABSTOP | CBS_DROPDOWNLIST +DEFPUSHBUTTON "&Vers le groupe:", IDOK, 185, 5, 60, 15, WS_TABSTOP +PUSHBUTTON "Annuler", IDCANCEL, 185, 25, 60, 15, WS_TABSTOP +PUSHBUTTON "&Aide", PM_HELP, 185, 45, 60, 15, WS_TABSTOP +} -#define DIALOG_NEW_CAPTION "Nouveau" -#define DIALOG_NEW_NEW "Nouveau" -#define DIALOG_NEW_GROUP "&Groupe de programmes" -#define DIALOG_NEW_PROGRAM "&Programme" +/* Dialog `Group attributes' */ -#define DIALOG_MOVE_CAPTION "Déplacer un programme" -#define DIALOG_MOVE_PROGRAM "Déplacer le programme:" -#define DIALOG_MOVE_FROM_GROUP "A partir du groupe:" -#define DIALOG_MOVE_TO_GROUP "&Vers le groupe:" +DIALOG_GROUP DIALOG 0, 0, 230, 65 +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL +STYLE DS_MODALFRAME +CAPTION "Propriétés de groupe" +{ +LTEXT "&Nom:", PM_DESCRIPTION_TXT, 05, 18, 50, 10 +EDITTEXT PM_DESCRIPTION, 60, 18, 90, 15, WS_TABSTOP +LTEXT "&Fichier de groupe:", PM_FILE_TXT, 05, 38, 50, 10 +EDITTEXT PM_FILE, 60, 38, 90, 15, WS_TABSTOP +DEFPUSHBUTTON "OK", IDOK, 155, 5, 60, 15, WS_TABSTOP +PUSHBUTTON "Annuler", IDCANCEL, 155, 25, 60, 15, WS_TABSTOP +PUSHBUTTON "&Aide", PM_HELP, 155, 45, 60, 15, WS_TABSTOP +} -#define DIALOG_COPY_CAPTION "Copier un programme" -#define DIALOG_COPY_PROGRAM "Copier le programme:" -#define DIALOG_COPY_FROM_GROUP DIALOG_MOVE_FROM_GROUP -#define DIALOG_COPY_TO_GROUP DIALOG_MOVE_TO_GROUP +/* Dialog `Program attributes' */ -#define DIALOG_GROUP_CAPTION "Propriétés de groupe" -#define DIALOG_GROUP_DESCRIPTION "&Nom:" -#define DIALOG_GROUP_FILE "&Fichier de groupe:" +DIALOG_PROGRAM DIALOG 0, 0, 250, 105 +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL +STYLE DS_MODALFRAME +CAPTION "Propriétés de programme" +{ +LTEXT "&Nom:", PM_DESCRIPTION_TXT, 05, 10, 60, 10 +EDITTEXT PM_DESCRIPTION, 80, 10, 90, 15, WS_TABSTOP +LTEXT "&Ligne de commande:", PM_COMMAND_LINE_TXT, 05, 25, 60, 10 +EDITTEXT PM_COMMAND_LINE, 80, 25, 90, 15, WS_TABSTOP +LTEXT "Répertoire de tra&vail:", PM_DIRECTORY_TXT, 05, 40, 60, 10 +EDITTEXT PM_DIRECTORY, 80, 40, 90, 15, WS_TABSTOP +LTEXT "&Touche de raccourci:", PM_HOT_KEY_TXT, 05, 55, 60, 10 +EDITTEXT PM_HOT_KEY, 80, 55, 90, 15, WS_TABSTOP +ICON "", PM_ICON, 20, 70 +CHECKBOX "", PM_SYMBOL, 80, 75, 10, 10, WS_TABSTOP +LTEXT "Réduire à l'&utilisation", IDIGNORE, 95, 75, 75, 10 +DEFPUSHBUTTON "OK", IDOK, 185, 5, 60, 15, WS_TABSTOP +PUSHBUTTON "Annuler", IDCANCEL, 185, 25, 60, 15, WS_TABSTOP +PUSHBUTTON "Pa&rcourir...", PM_BROWSE, 185, 45, 60, 15, WS_TABSTOP +PUSHBUTTON "&Changer d'icône...", PM_OTHER_SYMBOL, 185, 65, 60, 15, WS_TABSTOP +PUSHBUTTON "&Aide", PM_HELP, 185, 85, 60, 15, WS_TABSTOP +} -#define DIALOG_PROGRAM_CAPTION "Propriétés de programme" -#define DIALOG_PROGRAM_DESCRIPTION DIALOG_GROUP_DESCRIPTION -#define DIALOG_PROGRAM_COMMAND_LINE "&Ligne de commande:" -#define DIALOG_PROGRAM_DIRECTORY "Répertoire de tra&vail:" -#define DIALOG_PROGRAM_HOT_KEY "&Touche de raccourci:" -#define DIALOG_PROGRAM_SYMBOL "Réduire à l'&utilisation" -#define DIALOG_PROGRAM_OTHER_SYMBOL "&Changer d'icône..." +/* Dialog `Symbol' */ -#define DIALOG_SYMBOL_CAPTION "Changer d'icône" -#define DIALOG_SYMBOL_FILE "&Nom:" -#define DIALOG_SYMBOL_CURRENT "Icône a&ctuelle:" +DIALOG_SYMBOL DIALOG 0, 0, 200, 85 +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL +STYLE DS_MODALFRAME +CAPTION "Changer d'icône" +{ +LTEXT "&Nom:", PM_ICON_FILE_TXT, 5, 15, 40, 10 +EDITTEXT PM_ICON_FILE, 45, 15, 85, 15, WS_TABSTOP +LTEXT "Icône a&ctuelle:", PM_SYMBOL_LIST_TXT, 5, 30, 125, 10 +COMBOBOX PM_SYMBOL_LIST, 5, 40, 125, 50, + CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_OWNERDRAWFIXED | WS_TABSTOP +DEFPUSHBUTTON "OK", IDOK, 135, 5, 60, 15, WS_TABSTOP +PUSHBUTTON "Annuler", IDCANCEL, 135, 25, 60, 15, WS_TABSTOP +PUSHBUTTON "Pa&rcourir...", PM_BROWSE, 135, 45, 60, 15, WS_TABSTOP +PUSHBUTTON "&Aide", PM_HELP, 135, 65, 60, 15, WS_TABSTOP +} -#define DIALOG_EXECUTE_CAPTION "Exécuter" -#define DIALOG_EXECUTE_COMMAND_LINE DIALOG_PROGRAM_COMMAND_LINE -#define DIALOG_EXECUTE_SYMBOL DIALOG_PROGRAM_SYMBOL +/* Dialog `Execute' */ +DIALOG_EXECUTE DIALOG 0, 0, 200, 85 +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL +STYLE DS_MODALFRAME +CAPTION "Exécuter" +{ +LTEXT "&Ligne de commande:", IDIGNORE, 05, 15, 120, 10 +EDITTEXT PM_COMMAND, 05, 25, 120, 15, WS_TABSTOP +CHECKBOX "", PM_SYMBOL, 05, 45, 10, 10, WS_TABSTOP +LTEXT "Réduire à l'&utilisation", IDIGNORE, 20, 45, 120, 10 +DEFPUSHBUTTON "OK", IDOK, 135, 5, 60, 15, WS_TABSTOP +PUSHBUTTON "Annuler", IDCANCEL, 135, 25, 60, 15, WS_TABSTOP +PUSHBUTTON "Pa&rcourir...", PM_BROWSE, 135, 45, 60, 15, WS_TABSTOP +PUSHBUTTON "&Aide", PM_HELP, 135, 65, 60, 15, WS_TABSTOP +} /* Strings */ -#define STRING_PROGRAM_MANAGER "Gestionaire de programmes" -#define STRING_ERROR "ERREUR" -#define STRING_WARNING "WARNING" -#define STRING_INFO "Information" -#define STRING_DELETE "Supprimer" -#define STRING_DELETE_GROUP_s "Voulez-vous supprimer le groupe '%s'?" -#define STRING_DELETE_PROGRAM_s "Voulez-vous supprimer le programme '%s'?" -#define STRING_NOT_IMPLEMENTED "Non implementé" -#define STRING_FILE_READ_ERROR_s "Impossible d'ouvrir '%s'." -#define STRING_FILE_WRITE_ERROR_s "Impossible d'enregistrer '%s'." - -#define STRING_GRPFILE_READ_ERROR_s "\ +STRINGTABLE DISCARDABLE LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL +{ +IDS_PROGRAM_MANAGER, "Gestionaire de programmes" +IDS_ERROR, "ERREUR" +IDS_WARNING, "ATTENTION" +IDS_INFO, "Information" +IDS_DELETE, "Supprimer" +IDS_DELETE_GROUP_s, "Voulez-vous supprimer le groupe '%s'?" +IDS_DELETE_PROGRAM_s, "Voulez-vous supprimer le programme '%s'?" +IDS_NOT_IMPLEMENTED, "Non implementé" +IDS_FILE_READ_ERROR_s, "Impossible d'ouvrir '%s'." +IDS_FILE_WRITE_ERROR_s, "Impossible d'enregistrer '%s'." +IDS_GRPFILE_READ_ERROR_s, "\ Impossible d'ouvrir le groupe '%s'.\n\ Voulez-vous que le Gestionnaire de programmes essaie\n\ de l'ouvrir dans les prochaines sessions?" - -#define STRING_OUT_OF_MEMORY "Mémoire insuffisante." -#define STRING_WINHELP_ERROR "Impossible d'afficher l'Aide." -#define STRING_UNKNOWN_FEATURE_s "Caracteristique inconnue dans %s" -#define STRING_FILE_NOT_OVERWRITTEN_s "Le fichier `%s' existe. Non écrasé." -#define STRING_SAVE_GROUP_AS_s "Groupe sauvé sous `%s' pour éviter l'écrasement du fichier original." - -#define STRING_NO_HOT_KEY "Aucun" - -#define STRING_ALL_FILES "Tout fichier (*.*)" -#define STRING_PROGRAMS "Programmes" -#define STRING_LIBRARIES_DLL "Bibliothèques (*.dll)" -#define STRING_SYMBOL_FILES "Icônes" -#define STRING_SYMBOLS_ICO "Icônes (*.ico)" - -#include "Xx.rc" +IDS_OUT_OF_MEMORY, "Mémoire insuffisante." +IDS_WINHELP_ERROR, "Impossible d'afficher l'Aide." +IDS_UNKNOWN_FEATURE_s, "Caracteristique inconnue dans %s" +IDS_FILE_NOT_OVERWRITTEN_s, "Le fichier `%s' existe. Non écrasé." +IDS_SAVE_GROUP_AS_s, "Groupe sauvé sous `%s' pour éviter l'écrasement du fichier original." +IDS_NO_HOT_KEY, "Aucun" +IDS_ALL_FILES, "Tout fichier (*.*)" +IDS_PROGRAMS, "Programmes" +IDS_LIBRARIES_DLL, "Bibliothèques (*.dll)" +IDS_SYMBOL_FILES, "Icônes" +IDS_SYMBOLS_ICO, "Icônes (*.ico)" +} diff --git a/programs/progman/dialog.c b/programs/progman/dialog.c index 1a4a9410c3e..e0cf2f372b8 100644 --- a/programs/progman/dialog.c +++ b/programs/progman/dialog.c @@ -2,6 +2,7 @@ * Program Manager * * Copyright 1996 Ulrich Schmid + * Copyright 2002 Sylvain Petreolle * Copyright 2002 Andriy Palamarchuk * * This library is free software; you can redistribute it and/or @@ -48,7 +49,7 @@ INT DIALOG_New(INT nDefault) New.nDefault = nDefault; - ret = DialogBox(Globals.hInstance, STRING_NEW_Xx, + ret = DialogBox(Globals.hInstance, STRING_NEW, Globals.hMainWnd, lpfnDlg); FreeProcInstance(lpfnDlg); return ret; @@ -110,7 +111,7 @@ HLOCAL DIALOG_CopyMove(LPCSTR lpszProgramName, LPCSTR lpszFromGroupName, CopyMove.hToGroup = 0; ret = DialogBox(Globals.hInstance, - bMove ? STRING_MOVE_Xx : STRING_COPY_Xx, + bMove ? STRING_MOVE : STRING_COPY, Globals.hMainWnd, lpfnDlg); FreeProcInstance(lpfnDlg); @@ -199,7 +200,7 @@ BOOL DIALOG_GroupAttributes(LPSTR lpszTitle, LPSTR lpszGrpFile, INT nSize) GroupAttributes.lpszTitle = lpszTitle; GroupAttributes.lpszGrpFile = lpszGrpFile; - ret = DialogBox(Globals.hInstance, STRING_GROUP_Xx, + ret = DialogBox(Globals.hInstance, STRING_GROUP, Globals.hMainWnd, lpfnDlg); FreeProcInstance(lpfnDlg); return(ret == IDOK); @@ -282,7 +283,7 @@ BOOL DIALOG_ProgramAttributes(LPSTR lpszTitle, LPSTR lpszCmdLine, ProgramAttributes.lpszTmpIconFile = szTmpIconFile; lstrcpyn(ProgramAttributes.lpszTmpIconFile, lpszIconFile, MAX_PATHNAME_LEN); - ret = DialogBox(Globals.hInstance, STRING_PROGRAM_Xx, + ret = DialogBox(Globals.hInstance, STRING_PROGRAM, Globals.hMainWnd, lpfnDlg); FreeProcInstance(lpfnDlg); @@ -404,7 +405,7 @@ VOID DIALOG_Symbol(HICON *lphIcon, LPSTR lpszIconFile, Symbol.lphIcon = lphIcon; Symbol.lpnIconIndex = lpnIconIndex; - DialogBox(Globals.hInstance, STRING_SYMBOL_Xx, + DialogBox(Globals.hInstance, STRING_SYMBOL, Globals.hMainWnd, lpfnDlg); FreeProcInstance(lpfnDlg); } @@ -488,10 +489,11 @@ static BOOL CALLBACK DIALOG_SYMBOL_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, L VOID DIALOG_Execute() { - DLGPROC lpfnDlg = MakeProcInstance(DIALOG_EXECUTE_DlgProc, Globals.hInstance); - DialogBox(Globals.hInstance, STRING_EXECUTE_Xx, +INT_PTR z; + DLGPROC lpfnDlg = MakeProcInstance(DIALOG_EXECUTE_DlgProc, Globals.hInstance); + z=DialogBox(Globals.hInstance, STRING_EXECUTE, Globals.hMainWnd, lpfnDlg); - FreeProcInstance(lpfnDlg); + FreeProcInstance(lpfnDlg); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/programs/progman/license.c b/programs/progman/license.c index 0ba00535244..7ac27172d4a 100644 --- a/programs/progman/license.c +++ b/programs/progman/license.c @@ -1,5 +1,6 @@ /* * Copyright 1996 Ulrich Schmid + * Copyright 2002 Sylvain Petreolle * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,9 +20,9 @@ #include "windows.h" #include "license.h" +#if 0 static LICENSE* SelectLanguage(LPCSTR Language) { -#if 0 if (!lstrcmp(Language, "Cz")) return(&WineLicense_Cz); if (!lstrcmp(Language, "Da")) return(&WineLicense_Da); if (!lstrcmp(Language, "De")) return(&WineLicense_De); @@ -37,21 +38,23 @@ static LICENSE* SelectLanguage(LPCSTR Language) if (!lstrcmp(Language, "Pl")) return(&WineLicense_Pl); if (!lstrcmp(Language, "Po")) return(&WineLicense_Po); if (!lstrcmp(Language, "Va")) return(&WineLicense_Va); -#endif return(&WineLicense_En); } +#endif -VOID WineLicense(HWND Wnd, LPCSTR Language) +VOID WineLicense(HWND Wnd) { - LICENSE *License = SelectLanguage(Language); +/* LICENSE *License = SelectLanguage(Language); */ +LICENSE *License = &WineLicense_En; MessageBox(Wnd, License->License, License->LicenseCaption, MB_ICONINFORMATION | MB_OK); } -VOID WineWarranty(HWND Wnd, LPCSTR Language) +VOID WineWarranty(HWND Wnd) { - LICENSE *License = SelectLanguage(Language); +/* LICENSE *License = SelectLanguage(Language); */ +LICENSE *License = &WineLicense_En; MessageBox(Wnd, License->Warranty, License->WarrantyCaption, MB_ICONEXCLAMATION | MB_OK); diff --git a/programs/progman/license.h b/programs/progman/license.h index 35649e63f29..4820c9f81a6 100644 --- a/programs/progman/license.h +++ b/programs/progman/license.h @@ -1,5 +1,6 @@ /* * Copyright 1996 Ulrich Schmid + * Copyright 2002 Sylvain Petreolle * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,8 +17,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -VOID WineLicense(HWND hWnd, LPCSTR lpszLanguage); -VOID WineWarranty(HWND hWnd, LPCSTR language); +VOID WineLicense(HWND hWnd); +VOID WineWarranty(HWND hWnd); typedef struct { diff --git a/programs/progman/main.c b/programs/progman/main.c index ac7b57f2c66..3476bdd369c 100644 --- a/programs/progman/main.c +++ b/programs/progman/main.c @@ -1,7 +1,8 @@ /* * Program Manager * - * Copyright 1996 Ulrich Schmid + * Copyright 1996 Ulrich Schmid + * Copyright 2002 Sylvain Petreolle * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -48,8 +49,6 @@ int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show Globals.lpszIniFile = "progman.ini"; Globals.lpszIcoFile = "progman.ico"; - /* Select Language */ - Globals.lpszLanguage = "En"; Globals.hInstance = hInstance; Globals.hGroups = 0; Globals.hActiveGroup = 0; @@ -83,7 +82,7 @@ int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show Globals.hAccel = LoadAccelerators(Globals.hInstance, STRING_ACCEL); /* Setup menu, stringtable and resourcenames */ - STRING_SelectLanguageByName(Globals.lpszLanguage); + STRING_LoadMenus(); MAIN_CreateMDIWindow(); @@ -180,8 +179,9 @@ static LRESULT CALLBACK MAIN_MainWndProc(HWND hWnd, UINT msg, break; case WM_COMMAND: - if (wParam < PM_FIRST_CHILD) + if (wParam < PM_FIRST_CHILD){ MAIN_MenuCommand(hWnd, wParam, lParam); + } break; case WM_DESTROY: @@ -296,6 +296,7 @@ static VOID MAIN_MenuCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) /* Menu Windows */ case PM_ARRANGE: + if (hActiveGroupWnd && !IsIconic(hActiveGroupWnd)) ArrangeIconicWindows(hActiveGroupWnd); else @@ -304,7 +305,7 @@ static VOID MAIN_MenuCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) /* Menu Help */ case PM_CONTENTS: - if (!WinHelp(Globals.hMainWnd, "progman.hlp", HELP_INDEX, 0)) + if (!WinHelp(Globals.hMainWnd, "progman.hlp", HELP_CONTENTS, 0)) MAIN_MessageBoxIDS(IDS_WINHELP_ERROR, IDS_ERROR, MB_OK); break; @@ -318,11 +319,11 @@ static VOID MAIN_MenuCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) break; case PM_LICENSE: - WineLicense(Globals.hMainWnd, Globals.lpszLanguage); + WineLicense(Globals.hMainWnd); break; case PM_NO_WARRANTY: - WineWarranty(Globals.hMainWnd, Globals.lpszLanguage); + WineWarranty(Globals.hMainWnd); break; case PM_ABOUT_WINE: @@ -330,9 +331,6 @@ static VOID MAIN_MenuCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) break; default: - if (wParam >= PM_FIRST_LANGUAGE && wParam <= PM_LAST_LANGUAGE) - STRING_SelectLanguageByNumber(wParam - PM_FIRST_LANGUAGE); - else MAIN_MessageBoxIDS(IDS_NOT_IMPLEMENTED, IDS_ERROR, MB_OK); break; } diff --git a/programs/progman/progman.h b/programs/progman/progman.h index 4fbc9e9c520..3ebc2492ef5 100644 --- a/programs/progman/progman.h +++ b/programs/progman/progman.h @@ -2,6 +2,7 @@ * Program Manager * * Copyright 1996 Ulrich Schmid + * Copyright 2002 Sylvain Petreolle * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -25,8 +26,6 @@ #define MAX_PATHNAME_LEN 1024 #define MAX_LANGUAGE_NUMBER (PM_LAST_LANGUAGE - PM_FIRST_LANGUAGE) -#ifndef RC_INVOKED - #include "windows.h" /* Fallback icon */ @@ -132,8 +131,6 @@ typedef struct BOOL bSaveSettings; BOOL bMinOnRun; HLOCAL hGroups; - LPCSTR lpszLanguage; - UINT wStringTableOffset; HLOCAL hActiveGroup; } GLOBALS; @@ -191,8 +188,7 @@ VOID DIALOG_Symbol(HICON *lphIcon, LPSTR lpszIconFile, INT *lpnIconIndex, INT nSize); VOID DIALOG_Execute(void); -VOID STRING_SelectLanguageByName(LPCSTR); -VOID STRING_SelectLanguageByNumber(UINT); +VOID STRING_LoadMenus(VOID); /* Class names */ extern CHAR STRING_MAIN_WIN_CLASS_NAME[]; @@ -202,128 +198,121 @@ extern CHAR STRING_PROGRAM_WIN_CLASS_NAME[]; /* Resource names */ extern CHAR STRING_ACCEL[]; -extern CHAR STRING_MAIN_Xx[]; -extern CHAR STRING_NEW_Xx[]; -extern CHAR STRING_OPEN_Xx[]; -extern CHAR STRING_MOVE_Xx[]; -extern CHAR STRING_COPY_Xx[]; -extern CHAR STRING_DELETE_Xx[]; -extern CHAR STRING_GROUP_Xx[]; -extern CHAR STRING_PROGRAM_Xx[]; -extern CHAR STRING_SYMBOL_Xx[]; -extern CHAR STRING_EXECUTE_Xx[]; - -#define STRINGID(id) (0x##id + Globals.wStringTableOffset) - -#else /* RC_INVOKED */ - -#define STRINGID(id) id - -#endif +extern CHAR STRING_MAIN[]; +extern CHAR STRING_NEW[]; +extern CHAR STRING_OPEN[]; +extern CHAR STRING_MOVE[]; +extern CHAR STRING_COPY[]; +extern CHAR STRING_DELETE[]; +extern CHAR STRING_GROUP[]; +extern CHAR STRING_PROGRAM[]; +extern CHAR STRING_SYMBOL[]; +extern CHAR STRING_EXECUTE[]; /* Stringtable index */ -#define IDS_LANGUAGE_ID STRINGID(00) -#define IDS_LANGUAGE_MENU_ITEM STRINGID(01) -#define IDS_PROGRAM_MANAGER STRINGID(02) -#define IDS_ERROR STRINGID(03) -#define IDS_WARNING STRINGID(04) -#define IDS_INFO STRINGID(05) -#define IDS_DELETE STRINGID(06) -#define IDS_DELETE_GROUP_s STRINGID(07) -#define IDS_DELETE_PROGRAM_s STRINGID(08) -#define IDS_NOT_IMPLEMENTED STRINGID(09) -#define IDS_FILE_READ_ERROR_s STRINGID(0a) -#define IDS_FILE_WRITE_ERROR_s STRINGID(0b) -#define IDS_GRPFILE_READ_ERROR_s STRINGID(0c) -#define IDS_OUT_OF_MEMORY STRINGID(0d) -#define IDS_WINHELP_ERROR STRINGID(0e) -#define IDS_UNKNOWN_FEATURE_s STRINGID(0f) -#define IDS_FILE_NOT_OVERWRITTEN_s STRINGID(10) -#define IDS_SAVE_GROUP_AS_s STRINGID(11) -#define IDS_NO_HOT_KEY STRINGID(12) -#define IDS_ALL_FILES STRINGID(13) -#define IDS_PROGRAMS STRINGID(14) -#define IDS_LIBRARIES_DLL STRINGID(15) -#define IDS_SYMBOL_FILES STRINGID(16) -#define IDS_SYMBOLS_ICO STRINGID(17) +#define IDS_PROGRAM_MANAGER 0x02 +#define IDS_ERROR 0x03 +#define IDS_WARNING 0x04 +#define IDS_INFO 0x05 +#define IDS_DELETE 0x06 +#define IDS_DELETE_GROUP_s 0x07 +#define IDS_DELETE_PROGRAM_s 0x08 +#define IDS_NOT_IMPLEMENTED 0x09 +#define IDS_FILE_READ_ERROR_s 0x0a +#define IDS_FILE_WRITE_ERROR_s 0x0b +#define IDS_GRPFILE_READ_ERROR_s 0x0c +#define IDS_OUT_OF_MEMORY 0x0d +#define IDS_WINHELP_ERROR 0x0e +#define IDS_UNKNOWN_FEATURE_s 0x0f +#define IDS_FILE_NOT_OVERWRITTEN_s 0x10 +#define IDS_SAVE_GROUP_AS_s 0x11 +#define IDS_NO_HOT_KEY 0x12 +#define IDS_ALL_FILES 0x13 +#define IDS_PROGRAMS 0x14 +#define IDS_LIBRARIES_DLL 0x15 +#define IDS_SYMBOL_FILES 0x16 +#define IDS_SYMBOLS_ICO 0x17 /* Menu */ -#define PM_NEW 100 -#define PM_OPEN 101 -#define PM_MOVE 102 -#define PM_COPY 103 -#define PM_DELETE 104 -#define PM_ATTRIBUTES 105 -#define PM_EXECUTE 107 -#define PM_EXIT 108 +#define MAIN_MENU 0x109 +#define PM_NEW 0x100 +#define PM_OPEN 0x101 +#define PM_MOVE 0x102 +#define PM_COPY 0x103 +#define PM_DELETE 0x104 +#define PM_ATTRIBUTES 0x105 +#define PM_EXECUTE 0x107 +#define PM_EXIT 0x108 -#define PM_AUTO_ARRANGE 200 -#define PM_MIN_ON_RUN 201 -#define PM_SAVE_SETTINGS 203 +#define PM_AUTO_ARRANGE 0x110 +#define PM_MIN_ON_RUN 0x111 +#define PM_SAVE_SETTINGS 0x113 -#define PM_OVERLAP 300 -#define PM_SIDE_BY_SIDE 301 -#define PM_ARRANGE 302 -#define PM_FIRST_CHILD 3030 +#define PM_OVERLAP 0x120 +#define PM_SIDE_BY_SIDE 0x121 +#define PM_ARRANGE 0x122 +#define PM_FIRST_CHILD 0x3030 -#define PM_FIRST_LANGUAGE 400 -#define PM_LAST_LANGUAGE 499 +/* + *#define PM_FIRST_LANGUAGE 0x400 + *#define PM_LAST_LANGUAGE 0x499 + */ -#define PM_CONTENTS 501 -#define PM_SEARCH 502 -#define PM_HELPONHELP 503 -#define PM_TUTORIAL 504 +#define PM_CONTENTS 0x131 +#define PM_SEARCH 0x132 +#define PM_HELPONHELP 0x133 +#define PM_TUTORIAL 0x134 -#define PM_LICENSE 510 -#define PM_NO_WARRANTY 511 -#define PM_ABOUT_WINE 512 +#define PM_LICENSE 0x140 +#define PM_NO_WARRANTY 0x141 +#define PM_ABOUT_WINE 0x142 /* Dialog `New' */ /* RADIOBUTTON: The next two must be in sequence */ -#define PM_NEW_GROUP 1000 -#define PM_NEW_PROGRAM 1001 -#define PM_NEW_GROUP_TXT 1002 -#define PM_NEW_PROGRAM_TXT 1003 +#define PM_NEW_GROUP 0x150 +#define PM_NEW_PROGRAM 0x151 +#define PM_NEW_GROUP_TXT 0x152 +#define PM_NEW_PROGRAM_TXT 0x153 /* Dialogs `Copy', `Move' */ -#define PM_PROGRAM 1200 -#define PM_FROM_GROUP 1201 -#define PM_TO_GROUP 1202 -#define PM_TO_GROUP_TXT 1203 +#define PM_PROGRAM 0x160 +#define PM_FROM_GROUP 0x161 +#define PM_TO_GROUP 0x162 +#define PM_TO_GROUP_TXT 0x163 /* Dialogs `Group attributes' */ -#define PM_DESCRIPTION 1500 -#define PM_DESCRIPTION_TXT 1501 -#define PM_FILE 1502 -#define PM_FILE_TXT 1503 +#define PM_DESCRIPTION 0x170 +#define PM_DESCRIPTION_TXT 0x171 +#define PM_FILE 0x172 +#define PM_FILE_TXT 0x173 /* Dialogs `Program attributes' */ -#define PM_COMMAND_LINE 1510 -#define PM_COMMAND_LINE_TXT 1511 -#define PM_DIRECTORY 1512 -#define PM_DIRECTORY_TXT 1513 -#define PM_HOT_KEY 1514 -#define PM_HOT_KEY_TXT 1515 -#define PM_ICON 1516 -#define PM_OTHER_SYMBOL 1517 +#define PM_COMMAND_LINE 0x180 +#define PM_COMMAND_LINE_TXT 0x181 +#define PM_DIRECTORY 0x182 +#define PM_DIRECTORY_TXT 0x183 +#define PM_HOT_KEY 0x184 +#define PM_HOT_KEY_TXT 0x185 +#define PM_ICON 0x186 +#define PM_OTHER_SYMBOL 0x187 /* Dialog `Symbol' */ -#define PM_ICON_FILE 1520 -#define PM_ICON_FILE_TXT 1521 -#define PM_SYMBOL_LIST 1522 -#define PM_SYMBOL_LIST_TXT 1523 +#define PM_ICON_FILE 0x190 +#define PM_ICON_FILE_TXT 0x191 +#define PM_SYMBOL_LIST 0x192 +#define PM_SYMBOL_LIST_TXT 0x193 /* Dialog `Execute' */ -#define PM_COMMAND 1600 -#define PM_SYMBOL 1601 -#define PM_BROWSE 1602 -#define PM_HELP 1603 +#define PM_COMMAND 0x1a0 +#define PM_SYMBOL 0x1a1 +#define PM_BROWSE 0x1a2 +#define PM_HELP 0x1a3 #endif /* PROGMAN_H */ diff --git a/programs/progman/rsrc.rc b/programs/progman/rsrc.rc index 1ce448c35ff..dd39a273ba1 100644 --- a/programs/progman/rsrc.rc +++ b/programs/progman/rsrc.rc @@ -18,32 +18,21 @@ #include "windows.h" #include "progman.h" - -#define CONCAT(a, b) CONCAT1(a, b) -#define CONCAT1(a, b) a##b - -#define ADDSTRING(str) ADDSTRING1(LANGUAGE_NUMBER, IDS_ ## str) STRING_ ## str -#define ADDSTRING1(langnum, ids) ADDSTRING2(langnum, ids) -#define ADDSTRING2(langnum, ids) 0x ## langnum ## ids - -#define STRINGIFY(str) STRINGIFY1(str) -#define STRINGIFY1(str) #str - #include "accel.rc" -#include "Da.rc" -#include "De.rc" +/* #include "Da.rc" */ +/* #include "De.rc" */ #include "En.rc" -#include "Es.rc" -#include "Fi.rc" +/* #include "Es.rc" */ +/* #include "Fi.rc" */ #include "Fr.rc" -#include "Hu.rc" -#include "It.rc" -#include "Ko.rc" -#include "Pt.rc" -#include "Si.rc" -#include "Sk.rc" -#include "Sw.rc" -#include "Va.rc" -#include "Wa.rc" -#include "Ru.rc" +/* #include "Hu.rc" */ +/* #include "It.rc" */ +/* #include "Ko.rc" */ +/* #include "Pt.rc" */ +/* #include "Si.rc" */ +/* #include "Sk.rc" */ +/* #include "Sw.rc" */ +/* #include "Va.rc" */ +/* #include "Wa.rc" */ +/* #include "Ru.rc" */ diff --git a/programs/progman/string.c b/programs/progman/string.c index e359810f356..ea0a8dcccd2 100644 --- a/programs/progman/string.c +++ b/programs/progman/string.c @@ -2,6 +2,7 @@ * Program Manager * * Copyright 1996 Ulrich Schmid + * Copyright 2002 Sylvain Petreolle * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -29,97 +30,35 @@ CHAR STRING_GROUP_WIN_CLASS_NAME[] = "PMGroup"; CHAR STRING_PROGRAM_WIN_CLASS_NAME[] = "PMProgram"; /* Resource names */ -/* Xx will be overwritten with En, ... */ CHAR STRING_ACCEL[] = "ACCEL"; -CHAR STRING_MENU_Xx[] = "MENU_Xx"; -CHAR STRING_NEW_Xx[] = "DIALOG_NEW_Xx"; -CHAR STRING_OPEN_Xx[] = "DIALOG_OPEN_Xx"; -CHAR STRING_MOVE_Xx[] = "DIALOG_MOVE_Xx"; -CHAR STRING_COPY_Xx[] = "DIALOG_COPY_Xx"; -CHAR STRING_DELETE_Xx[] = "DIALOG_DELETE_Xx"; -CHAR STRING_GROUP_Xx[] = "DIALOG_GROUP_Xx"; -CHAR STRING_PROGRAM_Xx[] = "DIALOG_PROGRAM_Xx"; -CHAR STRING_SYMBOL_Xx[] = "DIALOG_SYMBOL_Xx"; -CHAR STRING_EXECUTE_Xx[] = "DIALOG_EXECUTE_Xx"; +CHAR STRING_MENU[] = "MENU"; +CHAR STRING_NEW[] = "DIALOG_NEW"; +CHAR STRING_OPEN[] = "DIALOG_OPEN"; +CHAR STRING_MOVE[] = "DIALOG_MOVE"; +CHAR STRING_COPY[] = "DIALOG_COPY"; +CHAR STRING_DELETE[] = "DIALOG_DELETE"; +CHAR STRING_GROUP[] = "DIALOG_GROUP"; +CHAR STRING_PROGRAM[] = "DIALOG_PROGRAM"; +CHAR STRING_SYMBOL[] = "DIALOG_SYMBOL"; +CHAR STRING_EXECUTE[] = "DIALOG_EXECUTE"; -static BOOL STRING_LoadStringOtherLanguage(UINT num, UINT ids, LPSTR str, UINT len) + +VOID STRING_LoadMenus(VOID) { - ids -= Globals.wStringTableOffset; - ids += num * 0x100; - return(LoadString(Globals.hInstance, ids, str, len)); -}; - -VOID STRING_SelectLanguageByName(LPCSTR lang) -{ - INT i; - CHAR newlang[3]; - - for (i = 0; i <= MAX_LANGUAGE_NUMBER; i++) - if (STRING_LoadStringOtherLanguage(i, IDS_LANGUAGE_ID, newlang, sizeof(newlang)) && - !lstrcmp(lang, newlang)) - { - STRING_SelectLanguageByNumber(i); - return; - } - - /* Fallback */ - for (i = 0; i <= MAX_LANGUAGE_NUMBER; i++) - if (STRING_LoadStringOtherLanguage(i, IDS_LANGUAGE_ID, newlang, sizeof(newlang))) - { - STRING_SelectLanguageByNumber(i); - return; - } - - MessageBox(Globals.hMainWnd, "No language found", "FATAL ERROR", MB_OK); - PostQuitMessage(1); -} - -VOID STRING_SelectLanguageByNumber(UINT num) -{ - INT i; - CHAR lang[3]; CHAR caption[MAX_STRING_LEN]; - CHAR item[MAX_STRING_LEN]; HMENU hMainMenu; - /* Select string table */ - Globals.wStringTableOffset = num * 0x100; - - /* Get Language id */ - LoadString(Globals.hInstance, IDS_LANGUAGE_ID, lang, sizeof(lang)); - Globals.lpszLanguage = lang; - /* Set frame caption */ LoadString(Globals.hInstance, IDS_PROGRAM_MANAGER, caption, sizeof(caption)); SetWindowText(Globals.hMainWnd, caption); - /* Change Resource names */ - lstrcpyn(STRING_MENU_Xx + sizeof(STRING_MENU_Xx) - 3, lang, 3); - lstrcpyn(STRING_NEW_Xx + sizeof(STRING_NEW_Xx) - 3, lang, 3); - lstrcpyn(STRING_OPEN_Xx + sizeof(STRING_OPEN_Xx) - 3, lang, 3); - lstrcpyn(STRING_MOVE_Xx + sizeof(STRING_MOVE_Xx) - 3, lang, 3); - lstrcpyn(STRING_COPY_Xx + sizeof(STRING_COPY_Xx) - 3, lang, 3); - lstrcpyn(STRING_DELETE_Xx + sizeof(STRING_DELETE_Xx) - 3, lang, 3); - lstrcpyn(STRING_GROUP_Xx + sizeof(STRING_GROUP_Xx) - 3, lang, 3); - lstrcpyn(STRING_PROGRAM_Xx + sizeof(STRING_PROGRAM_Xx) - 3, lang, 3); - lstrcpyn(STRING_SYMBOL_Xx + sizeof(STRING_SYMBOL_Xx) - 3, lang, 3); - lstrcpyn(STRING_EXECUTE_Xx + sizeof(STRING_EXECUTE_Xx) - 3, lang, 3); - /* Create menu */ - hMainMenu = LoadMenu(Globals.hInstance, STRING_MENU_Xx); + hMainMenu = LoadMenu(Globals.hInstance, MAKEINTRESOURCE(MAIN_MENU)); Globals.hFileMenu = GetSubMenu(hMainMenu, 0); Globals.hOptionMenu = GetSubMenu(hMainMenu, 1); Globals.hWindowsMenu = GetSubMenu(hMainMenu, 2); Globals.hLanguageMenu = GetSubMenu(hMainMenu, 3); - /* Remove dummy item */ - RemoveMenu(Globals.hLanguageMenu, 0, MF_BYPOSITION); - /* Add language items */ - for (i = 0; i <= MAX_LANGUAGE_NUMBER; i++) - if (STRING_LoadStringOtherLanguage(i, IDS_LANGUAGE_MENU_ITEM, item, sizeof(item))) - AppendMenu(Globals.hLanguageMenu, MF_STRING | MF_BYCOMMAND, - PM_FIRST_LANGUAGE + i, item); - if (Globals.hMDIWnd) SendMessage(Globals.hMDIWnd, WM_MDISETMENU, (WPARAM) hMainMenu,