Commit in reactos/lib/comdlg32 on MAIN
cdlg_Ca.rc+1-11.1 -> 1.2
cdlg_De.rc+5-61.5 -> 1.6
cdlg_Fr.rc+5-51.4 -> 1.5
cdlg_Ru.rc+1-11.4 -> 1.5
cdlg_Uk.rc+1-11.2 -> 1.3
filedlg.c+35-221.7 -> 1.8
printdlg.c+15-41.4 -> 1.5
+63-40
7 modified files
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.

reactos/lib/comdlg32
cdlg_Ca.rc 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- cdlg_Ca.rc	9 Jan 2004 01:58:22 -0000	1.1
+++ cdlg_Ca.rc	8 Aug 2004 20:15:05 -0000	1.2
@@ -169,7 +169,7 @@
  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 "" ,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 "" ,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

reactos/lib/comdlg32
cdlg_De.rc 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- cdlg_De.rc	8 May 2004 12:53:14 -0000	1.5
+++ cdlg_De.rc	8 Aug 2004 20:15:05 -0000	1.6
@@ -255,8 +255,8 @@
     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
 
-    LTEXT	"" , IDC_TOOLBARSTATIC, 181, 2, 122, 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
+    LTEXT	"" , IDC_TOOLBARSTATIC, 181, 2, 102, 17, NOT WS_GROUP | 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
     EDITTEXT	IDC_FILENAME,54,110,155,12,ES_AUTOHSCROLL
@@ -266,10 +266,9 @@
 
     CONTROL	"&Schreibgesch�tzt",IDC_OPENREADONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,54,145,100,10
 
-
-    DEFPUSHBUTTON	"�&ffnen",		 IDOK,242,110,50,14
-    PUSHBUTTON		"Abbrechen",		 IDCANCEL,242,128,50,14
-    PUSHBUTTON		"&Hilfe",		 pshHelp,242,145,50,14
+    DEFPUSHBUTTON	"�&ffnen",		 IDOK,222,110,50,14
+    PUSHBUTTON		"Abbrechen",		 IDCANCEL,222,128,50,14
+    PUSHBUTTON		"&Hilfe",		 pshHelp,222,145,50,14
 }
 
 PRINT32 DIALOG LOADONCALL MOVEABLE DISCARDABLE  32, 32, 288, 186

reactos/lib/comdlg32
cdlg_Fr.rc 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- cdlg_Fr.rc	8 May 2004 12:53:14 -0000	1.4
+++ cdlg_Fr.rc	8 Aug 2004 20:15:06 -0000	1.5
@@ -336,8 +336,8 @@
     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
 
-    LTEXT	"" , IDC_TOOLBARSTATIC, 181, 2, 122, 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
+    LTEXT	"" , IDC_TOOLBARSTATIC, 181, 2, 102, 17, NOT WS_GROUP | 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
     EDITTEXT	IDC_FILENAME,54,110,155,12,ES_AUTOHSCROLL
@@ -347,9 +347,9 @@
 
     CONTROL	"&Protection �criture",IDC_OPENREADONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,54,145,100,10
 
-    DEFPUSHBUTTON	"Ouvrir",		 IDOK,242,110,50,14
-    PUSHBUTTON		"Annuler",		 IDCANCEL,242,128,50,14
-    PUSHBUTTON		"&Aide",		 pshHelp,242,145,50,14
+    DEFPUSHBUTTON	"Ouvrir",		 IDOK,222,110,50,14
+    PUSHBUTTON		"Annuler",		 IDCANCEL,222,128,50,14
+    PUSHBUTTON		"&Aide",		 pshHelp,222,145,50,14
 }
 
 STRINGTABLE DISCARDABLE

reactos/lib/comdlg32
cdlg_Ru.rc 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- cdlg_Ru.rc	8 May 2004 12:53:14 -0000	1.4
+++ cdlg_Ru.rc	8 Aug 2004 20:15:06 -0000	1.5
@@ -240,7 +240,7 @@
     LTEXT           "����������",     stc11, 60, 48, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP
     LTEXT           "�����:",         stc10, 16, 60,  36,10, SS_NOPREFIX
     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
 
     GROUPBOX        "�����",         grp2, 160, 92, 120,64, WS_GROUP

reactos/lib/comdlg32
cdlg_Uk.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- cdlg_Uk.rc	16 Jun 2004 06:54:39 -0000	1.2
+++ cdlg_Uk.rc	8 Aug 2004 20:15:06 -0000	1.3
@@ -240,7 +240,7 @@
     LTEXT           "����������",     stc11, 60, 48, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP
     LTEXT           "�����:",         stc10, 16, 60,  36,10, SS_NOPREFIX
     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
 
     GROUPBOX        "�����",         grp2, 160, 92, 120,64, WS_GROUP

reactos/lib/comdlg32
filedlg.c 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- filedlg.c	14 Jul 2004 06:52:29 -0000	1.7
+++ filedlg.c	8 Aug 2004 20:15:06 -0000	1.8
@@ -1871,35 +1871,48 @@
     case ONOPEN_OPEN:   /* fill in the return struct and close the dialog */
       TRACE("ONOPEN_OPEN %s\n", debugstr_w(lpstrPathAndFile));
       {
+        WCHAR *ext = NULL;
+
         /* update READONLY check box flag */
 	if ((SendMessageA(GetDlgItem(hwnd,IDC_OPENREADONLY),BM_GETCHECK,0,0) & 0x03) == BST_CHECKED)
 	  fodInfos->ofnInfos->Flags |= OFN_READONLY;
 	else
 	  fodInfos->ofnInfos->Flags &= ~OFN_READONLY;
 
-	/* add default extension */
-	if (fodInfos->defext)
-	{
-	  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';
-	    }
-	  }
+        /* Attach the file extension with file name*/
+        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 */
+	{
 	  /* Set/clear the output OFN_EXTENSIONDIFFERENT flag */
 	  if (*ext)
 	    ext++;

reactos/lib/comdlg32
printdlg.c 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- printdlg.c	8 May 2004 12:53:14 -0000	1.4
+++ printdlg.c	8 Aug 2004 20:15:06 -0000	1.5
@@ -1622,11 +1622,22 @@
         if(HIWORD(wParam) == EN_CHANGE) {
 	    INT copies = GetDlgItemInt(hDlg, edt3, NULL, FALSE);
 	    if(copies <= 1)
+            {
+                CheckDlgButton(hDlg, chx2, BST_UNCHECKED);
+                SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, 
+				    (WPARAM) IMAGE_ICON, 0);
 	        EnableWindow(GetDlgItem(hDlg, chx2), FALSE);
+            }
 	    else
-	        EnableWindow(GetDlgItem(hDlg, chx2), TRUE);
-	}
-	break;
+            {
+                EnableWindow(GetDlgItem(hDlg, chx2), TRUE);
+                
+                SendDlgItemMessageA(hDlg, ico3, STM_SETIMAGE, 
+                                    (WPARAM) IMAGE_ICON,
+                                    (LPARAM)PrintStructures->hNoCollateIcon);
+             }
+        }
+        break;
 
      case psh1:                       /* Print Setup */
 	{
@@ -1638,7 +1649,7 @@
          HANDLE hPrinter;
          WCHAR  PrinterName[256];
 
-         GetDlgItemTextW(hDlg, PrinterComboID, PrinterName, 255);
+         if (!GetDlgItemTextW(hDlg, PrinterComboID, PrinterName, 255)) break;
          if (!OpenPrinterW(PrinterName, &hPrinter, NULL)) {
 	     FIXME(" Call to OpenPrinter did not succeed!\n");
 	     break;
CVSspam 0.2.8