mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 19:57:00 +00:00
Sync to Wine-20040716:
Krishna Murthy <Krishna.Murthy@guptaworldwide.com> - Add the selected extension from file type filter if file name does not contain the file extension. Dmitry Timoshkov <dmitry@codeweavers.com> - Fix control coordinates in German and French versions of open file dialog. - Remove duplicate control ids in Catalan, Russian and Ukrainian dialogs. James Hawkins <truiken@gmail.com> - Fixed collate icon behavior. - Check for empty PrinterName in PRINTDLG_WMCommandW. svn path=/trunk/; revision=10427
This commit is contained in:
parent
1c0c11dcb3
commit
28676c56c8
7 changed files with 63 additions and 40 deletions
|
@ -169,7 +169,7 @@ FONT 8, "Helv"
|
||||||
EDITTEXT 705, 226,152,18,12, WS_BORDER | WS_GROUP | WS_TABSTOP
|
EDITTEXT 705, 226,152,18,12, WS_BORDER | WS_GROUP | WS_TABSTOP
|
||||||
CONTROL "" ,720,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP,4,14,140,86
|
CONTROL "" ,720,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP,4,14,140,86
|
||||||
CONTROL "" ,721,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP,4,116,140,28
|
CONTROL "" ,721,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP,4,116,140,28
|
||||||
CONTROL "" ,710,"STATIC",WS_BORDER|SS_SIMPLE|WS_TABSTOP|WS_GROUP, 152,4,118,116 CONTROL "" ,702,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP, 278,4,8,116
|
CONTROL "" ,710,"STATIC",WS_BORDER|SS_SIMPLE|WS_TABSTOP|WS_GROUP, 152,4,118,116
|
||||||
CONTROL "" ,702,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP, 278,4,8,116
|
CONTROL "" ,702,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP, 278,4,8,116
|
||||||
CONTROL "" ,709,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP, 152,124,40,26
|
CONTROL "" ,709,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP, 152,124,40,26
|
||||||
DEFPUSHBUTTON "D'acord", IDOK, 4, 166, 44, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
DEFPUSHBUTTON "D'acord", IDOK, 4, 166, 44, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||||
|
|
|
@ -255,8 +255,8 @@ FONT 8, "Helv"
|
||||||
LTEXT "&Suche in",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY
|
LTEXT "&Suche in",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY
|
||||||
COMBOBOX IDC_LOOKIN,49,3,132,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_LOOKIN,49,3,132,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
|
||||||
|
|
||||||
LTEXT "" , IDC_TOOLBARSTATIC, 181, 2, 122, 17, NOT WS_GROUP | NOT WS_VISIBLE
|
LTEXT "" , IDC_TOOLBARSTATIC, 181, 2, 102, 17, NOT WS_GROUP | NOT WS_VISIBLE
|
||||||
LISTBOX IDC_SHELLSTATIC,4,20,292,85, LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_HSCROLL | NOT WS_VISIBLE
|
LISTBOX IDC_SHELLSTATIC,4,20,272,85, LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_HSCROLL | NOT WS_VISIBLE
|
||||||
|
|
||||||
LTEXT "Datei&name:",IDC_FILENAMESTATIC,5,112,46,8, SS_NOTIFY
|
LTEXT "Datei&name:",IDC_FILENAMESTATIC,5,112,46,8, SS_NOTIFY
|
||||||
EDITTEXT IDC_FILENAME,54,110,155,12,ES_AUTOHSCROLL
|
EDITTEXT IDC_FILENAME,54,110,155,12,ES_AUTOHSCROLL
|
||||||
|
@ -266,10 +266,9 @@ FONT 8, "Helv"
|
||||||
|
|
||||||
CONTROL "&Schreibgeschützt",IDC_OPENREADONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,54,145,100,10
|
CONTROL "&Schreibgeschützt",IDC_OPENREADONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,54,145,100,10
|
||||||
|
|
||||||
|
DEFPUSHBUTTON "Ö&ffnen", IDOK,222,110,50,14
|
||||||
DEFPUSHBUTTON "Ö&ffnen", IDOK,242,110,50,14
|
PUSHBUTTON "Abbrechen", IDCANCEL,222,128,50,14
|
||||||
PUSHBUTTON "Abbrechen", IDCANCEL,242,128,50,14
|
PUSHBUTTON "&Hilfe", pshHelp,222,145,50,14
|
||||||
PUSHBUTTON "&Hilfe", pshHelp,242,145,50,14
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINT32 DIALOG LOADONCALL MOVEABLE DISCARDABLE 32, 32, 288, 186
|
PRINT32 DIALOG LOADONCALL MOVEABLE DISCARDABLE 32, 32, 288, 186
|
||||||
|
|
|
@ -336,8 +336,8 @@ FONT 8, "Helv"
|
||||||
LTEXT "&Rechercher dans",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY
|
LTEXT "&Rechercher dans",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY
|
||||||
COMBOBOX IDC_LOOKIN,49,3,132,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_LOOKIN,49,3,132,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
|
||||||
|
|
||||||
LTEXT "" , IDC_TOOLBARSTATIC, 181, 2, 122, 17, NOT WS_GROUP | NOT WS_VISIBLE
|
LTEXT "" , IDC_TOOLBARSTATIC, 181, 2, 102, 17, NOT WS_GROUP | NOT WS_VISIBLE
|
||||||
LISTBOX IDC_SHELLSTATIC,4,20,292,85, LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_HSCROLL | NOT WS_VISIBLE
|
LISTBOX IDC_SHELLSTATIC,4,20,272,85, LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_HSCROLL | NOT WS_VISIBLE
|
||||||
|
|
||||||
LTEXT "&Nom du fichier:",IDC_FILENAMESTATIC,5,112,46,8, SS_NOTIFY
|
LTEXT "&Nom du fichier:",IDC_FILENAMESTATIC,5,112,46,8, SS_NOTIFY
|
||||||
EDITTEXT IDC_FILENAME,54,110,155,12,ES_AUTOHSCROLL
|
EDITTEXT IDC_FILENAME,54,110,155,12,ES_AUTOHSCROLL
|
||||||
|
@ -347,9 +347,9 @@ FONT 8, "Helv"
|
||||||
|
|
||||||
CONTROL "&Protection écriture",IDC_OPENREADONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,54,145,100,10
|
CONTROL "&Protection écriture",IDC_OPENREADONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,54,145,100,10
|
||||||
|
|
||||||
DEFPUSHBUTTON "Ouvrir", IDOK,242,110,50,14
|
DEFPUSHBUTTON "Ouvrir", IDOK,222,110,50,14
|
||||||
PUSHBUTTON "Annuler", IDCANCEL,242,128,50,14
|
PUSHBUTTON "Annuler", IDCANCEL,222,128,50,14
|
||||||
PUSHBUTTON "&Aide", pshHelp,242,145,50,14
|
PUSHBUTTON "&Aide", pshHelp,222,145,50,14
|
||||||
}
|
}
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
|
|
|
@ -240,7 +240,7 @@ FONT 8, "Ms Sans Serif"
|
||||||
LTEXT "Эмулирован", stc11, 60, 48, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP
|
LTEXT "Эмулирован", stc11, 60, 48, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP
|
||||||
LTEXT "Место:", stc10, 16, 60, 36,10, SS_NOPREFIX
|
LTEXT "Место:", stc10, 16, 60, 36,10, SS_NOPREFIX
|
||||||
LTEXT "Эмулировано", stc14, 60, 60, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP
|
LTEXT "Эмулировано", stc14, 60, 60, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP
|
||||||
LTEXT "Примечание:", stc13, 16, 72, 36,10, SS_NOPREFIX
|
LTEXT "Примечание:", stc9, 16, 72, 36,10, SS_NOPREFIX
|
||||||
LTEXT "Эмулировано", stc13, 60, 72, 152,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP
|
LTEXT "Эмулировано", stc13, 60, 72, 152,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP
|
||||||
|
|
||||||
GROUPBOX "Копии", grp2, 160, 92, 120,64, WS_GROUP
|
GROUPBOX "Копии", grp2, 160, 92, 120,64, WS_GROUP
|
||||||
|
|
|
@ -240,7 +240,7 @@ FONT 8, "Ms Sans Serif"
|
||||||
LTEXT "Емульовано", stc11, 60, 48, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP
|
LTEXT "Емульовано", stc11, 60, 48, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP
|
||||||
LTEXT "Місце:", stc10, 16, 60, 36,10, SS_NOPREFIX
|
LTEXT "Місце:", stc10, 16, 60, 36,10, SS_NOPREFIX
|
||||||
LTEXT "Емульовано", stc14, 60, 60, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP
|
LTEXT "Емульовано", stc14, 60, 60, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP
|
||||||
LTEXT "Примітка:", stc13, 16, 72, 36,10, SS_NOPREFIX
|
LTEXT "Примітка:", stc9, 16, 72, 36,10, SS_NOPREFIX
|
||||||
LTEXT "Емульовано", stc13, 60, 72, 152,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP
|
LTEXT "Емульовано", stc13, 60, 72, 152,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP
|
||||||
|
|
||||||
GROUPBOX "Копії", grp2, 160, 92, 120,64, WS_GROUP
|
GROUPBOX "Копії", grp2, 160, 92, 120,64, WS_GROUP
|
||||||
|
|
|
@ -1871,35 +1871,48 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
|
||||||
case ONOPEN_OPEN: /* fill in the return struct and close the dialog */
|
case ONOPEN_OPEN: /* fill in the return struct and close the dialog */
|
||||||
TRACE("ONOPEN_OPEN %s\n", debugstr_w(lpstrPathAndFile));
|
TRACE("ONOPEN_OPEN %s\n", debugstr_w(lpstrPathAndFile));
|
||||||
{
|
{
|
||||||
|
WCHAR *ext = NULL;
|
||||||
|
|
||||||
/* update READONLY check box flag */
|
/* update READONLY check box flag */
|
||||||
if ((SendMessageA(GetDlgItem(hwnd,IDC_OPENREADONLY),BM_GETCHECK,0,0) & 0x03) == BST_CHECKED)
|
if ((SendMessageA(GetDlgItem(hwnd,IDC_OPENREADONLY),BM_GETCHECK,0,0) & 0x03) == BST_CHECKED)
|
||||||
fodInfos->ofnInfos->Flags |= OFN_READONLY;
|
fodInfos->ofnInfos->Flags |= OFN_READONLY;
|
||||||
else
|
else
|
||||||
fodInfos->ofnInfos->Flags &= ~OFN_READONLY;
|
fodInfos->ofnInfos->Flags &= ~OFN_READONLY;
|
||||||
|
|
||||||
/* add default extension */
|
/* Attach the file extension with file name*/
|
||||||
if (fodInfos->defext)
|
ext = PathFindExtensionW(lpstrPathAndFile);
|
||||||
|
if (! *ext)
|
||||||
|
{
|
||||||
|
/* if no extension is specified with file name, then */
|
||||||
|
/* attach the extension from file filter or default one */
|
||||||
|
|
||||||
|
WCHAR *filterExt = NULL;
|
||||||
|
LPWSTR lpstrFilter = NULL;
|
||||||
|
static const WCHAR szwDot[] = {'.',0};
|
||||||
|
int PathLength = strlenW(lpstrPathAndFile);
|
||||||
|
|
||||||
|
/* Attach the dot*/
|
||||||
|
strcatW(lpstrPathAndFile, szwDot);
|
||||||
|
|
||||||
|
/*Get the file extension from file type filter*/
|
||||||
|
lpstrFilter = (LPWSTR) CBGetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB,
|
||||||
|
fodInfos->ofnInfos->nFilterIndex-1);
|
||||||
|
|
||||||
|
if (lpstrFilter != (LPWSTR)CB_ERR) /* control is not empty */
|
||||||
|
filterExt = PathFindExtensionW(lpstrFilter);
|
||||||
|
|
||||||
|
if ( *filterExt ) /* attach the file extension from file type filter*/
|
||||||
|
strcatW(lpstrPathAndFile, filterExt + 1);
|
||||||
|
else if ( fodInfos->defext ) /* attach the default file extension*/
|
||||||
|
strcatW(lpstrPathAndFile, fodInfos->defext);
|
||||||
|
|
||||||
|
/* In Open dialog: if file does not exist try without extension */
|
||||||
|
if (!(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG) && !PathFileExistsW(lpstrPathAndFile))
|
||||||
|
lpstrPathAndFile[PathLength] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fodInfos->defext) /* add default extension */
|
||||||
{
|
{
|
||||||
WCHAR *ext = PathFindExtensionW(lpstrPathAndFile);
|
|
||||||
|
|
||||||
if (! *ext)
|
|
||||||
{
|
|
||||||
/* only add "." in case a default extension does exist */
|
|
||||||
if (*fodInfos->defext != '\0')
|
|
||||||
{
|
|
||||||
static const WCHAR szwDot[] = {'.',0};
|
|
||||||
int PathLength = strlenW(lpstrPathAndFile);
|
|
||||||
|
|
||||||
strcatW(lpstrPathAndFile, szwDot);
|
|
||||||
strcatW(lpstrPathAndFile, fodInfos->defext);
|
|
||||||
|
|
||||||
/* In Open dialog: if file does not exist try without extension */
|
|
||||||
if (!(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
|
|
||||||
&& !PathFileExistsW(lpstrPathAndFile))
|
|
||||||
lpstrPathAndFile[PathLength] = '\0';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set/clear the output OFN_EXTENSIONDIFFERENT flag */
|
/* Set/clear the output OFN_EXTENSIONDIFFERENT flag */
|
||||||
if (*ext)
|
if (*ext)
|
||||||
ext++;
|
ext++;
|
||||||
|
|
|
@ -1622,11 +1622,22 @@ static LRESULT PRINTDLG_WMCommandW(HWND hDlg, WPARAM wParam,
|
||||||
if(HIWORD(wParam) == EN_CHANGE) {
|
if(HIWORD(wParam) == EN_CHANGE) {
|
||||||
INT copies = GetDlgItemInt(hDlg, edt3, NULL, FALSE);
|
INT copies = GetDlgItemInt(hDlg, edt3, NULL, FALSE);
|
||||||
if(copies <= 1)
|
if(copies <= 1)
|
||||||
|
{
|
||||||
|
CheckDlgButton(hDlg, chx2, BST_UNCHECKED);
|
||||||
|
SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE,
|
||||||
|
(WPARAM) IMAGE_ICON, 0);
|
||||||
EnableWindow(GetDlgItem(hDlg, chx2), FALSE);
|
EnableWindow(GetDlgItem(hDlg, chx2), FALSE);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
EnableWindow(GetDlgItem(hDlg, chx2), TRUE);
|
{
|
||||||
}
|
EnableWindow(GetDlgItem(hDlg, chx2), TRUE);
|
||||||
break;
|
|
||||||
|
SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE,
|
||||||
|
(WPARAM) IMAGE_ICON,
|
||||||
|
(LPARAM)PrintStructures->hNoCollateIcon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case psh1: /* Print Setup */
|
case psh1: /* Print Setup */
|
||||||
{
|
{
|
||||||
|
@ -1638,7 +1649,7 @@ static LRESULT PRINTDLG_WMCommandW(HWND hDlg, WPARAM wParam,
|
||||||
HANDLE hPrinter;
|
HANDLE hPrinter;
|
||||||
WCHAR PrinterName[256];
|
WCHAR PrinterName[256];
|
||||||
|
|
||||||
GetDlgItemTextW(hDlg, PrinterComboID, PrinterName, 255);
|
if (!GetDlgItemTextW(hDlg, PrinterComboID, PrinterName, 255)) break;
|
||||||
if (!OpenPrinterW(PrinterName, &hPrinter, NULL)) {
|
if (!OpenPrinterW(PrinterName, &hPrinter, NULL)) {
|
||||||
FIXME(" Call to OpenPrinter did not succeed!\n");
|
FIXME(" Call to OpenPrinter did not succeed!\n");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue