diff --git a/dlls/commdlg/cdlg.h b/dlls/commdlg/cdlg.h index 2696199af3a..54a65541b1c 100644 --- a/dlls/commdlg/cdlg.h +++ b/dlls/commdlg/cdlg.h @@ -63,6 +63,7 @@ typedef struct { #define PD32_OUT_OF_MEMORY 1113 #define PD32_GENERIC_ERROR 1114 #define PD32_DRIVER_UNKNOWN 1115 +#define PD32_NO_DEVICES 1121 #define PD32_PRINTER_STATUS_READY 1536 #define PD32_PRINTER_STATUS_PAUSED 1537 diff --git a/dlls/commdlg/cdlg_Bg.rc b/dlls/commdlg/cdlg_Bg.rc index 0fbfbfb6ee9..5e0c1309d2c 100644 --- a/dlls/commdlg/cdlg_Bg.rc +++ b/dlls/commdlg/cdlg_Bg.rc @@ -406,6 +406,9 @@ STRINGTABLE DISCARDABLE PD32_OUT_OF_MEMORY "Íåäîñòèã íà ïàìåò." PD32_GENERIC_ERROR "Ïîÿâè ñå ãðåøêà." PD32_DRIVER_UNKNOWN "Íåïîçíàò äðàéâåð çà ïðèíòåðà." + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Ïðèíòåð ïî ïîäðàçáèðàíå; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Èìà %d äîêóìåíòà â îïàøêàòà" diff --git a/dlls/commdlg/cdlg_Cn.rc b/dlls/commdlg/cdlg_Cn.rc index 59d18fccf4d..baaa9fb10f9 100644 --- a/dlls/commdlg/cdlg_Cn.rc +++ b/dlls/commdlg/cdlg_Cn.rc @@ -405,6 +405,9 @@ supported by your printer.\nPlease enter a value between 1 and %d." PD32_OUT_OF_MEMORY "Out of memory." PD32_GENERIC_ERROR "Some error occurred." PD32_DRIVER_UNKNOWN "Unknown printer driver." + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Default Printer; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in the queue" diff --git a/dlls/commdlg/cdlg_De.rc b/dlls/commdlg/cdlg_De.rc index 56648ba97a4..bc9a96f6272 100644 --- a/dlls/commdlg/cdlg_De.rc +++ b/dlls/commdlg/cdlg_De.rc @@ -399,6 +399,9 @@ Bitte geben sie einen Wert zwischen %d und %d an." PD32_OUT_OF_MEMORY "Kein freier Speicher mehr." PD32_GENERIC_ERROR "Ein unbekannter Fehler ist aufgetreten." PD32_DRIVER_UNKNOWN "Unbekannter Druckertreiber." + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Standard Drucker; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Es sind %d Dokumente in der Queue" diff --git a/dlls/commdlg/cdlg_En.rc b/dlls/commdlg/cdlg_En.rc index 732eff0c9f6..732670292df 100644 --- a/dlls/commdlg/cdlg_En.rc +++ b/dlls/commdlg/cdlg_En.rc @@ -405,6 +405,9 @@ supported by your printer.\nPlease enter a value between 1 and %d." PD32_OUT_OF_MEMORY "Out of memory." PD32_GENERIC_ERROR "An error occurred." PD32_DRIVER_UNKNOWN "Unknown printer driver." + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Default Printer; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in the queue" diff --git a/dlls/commdlg/cdlg_Es.rc b/dlls/commdlg/cdlg_Es.rc index 23507d5c17d..84c1b735f6b 100644 --- a/dlls/commdlg/cdlg_Es.rc +++ b/dlls/commdlg/cdlg_Es.rc @@ -406,6 +406,9 @@ defecto." PD32_GENERIC_ERROR "Ocurrió un error." PD32_DRIVER_UNKNOWN "Manejador de la impresora \ desconocido." + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Impresora por defecto; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Hay %d documentos en la cola" diff --git a/dlls/commdlg/cdlg_Fi.rc b/dlls/commdlg/cdlg_Fi.rc index 118f8205e78..569031036a5 100644 --- a/dlls/commdlg/cdlg_Fi.rc +++ b/dlls/commdlg/cdlg_Fi.rc @@ -400,6 +400,9 @@ STRINGTABLE DISCARDABLE PD32_OUT_OF_MEMORY "Muisti loppu." PD32_GENERIC_ERROR "Virhe." PD32_DRIVER_UNKNOWN "Tuntematon tulostinajuri." + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Oletustulostin; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Jonossa on %d dokumenttia" diff --git a/dlls/commdlg/cdlg_Fr.rc b/dlls/commdlg/cdlg_Fr.rc index 304c813d319..63f2b6d4009 100644 --- a/dlls/commdlg/cdlg_Fr.rc +++ b/dlls/commdlg/cdlg_Fr.rc @@ -409,6 +409,9 @@ Veuillez indiquer un nombre de copies entre 1 et %d." PD32_OUT_OF_MEMORY "Pas assez de mémoire." PD32_GENERIC_ERROR "Une erreur est intervenue." PD32_DRIVER_UNKNOWN "Pilote d'imprimante inconnu." + PD32_NO_DEVICES "Avant de pouvoir effectuer des opérations en relation avec l'impression \ +comme la configuration de l'imprimante ou l'impression d'un document, vous devez installer une imprimante. \ +Veuillez en installer une et réessayez." PD32_DEFAULT_PRINTER "Imprimante par défaut; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Il y a %d documents dans la file d'attente" diff --git a/dlls/commdlg/cdlg_It.rc b/dlls/commdlg/cdlg_It.rc index ba734e29aa4..eb6ecef2ae9 100644 --- a/dlls/commdlg/cdlg_It.rc +++ b/dlls/commdlg/cdlg_It.rc @@ -404,6 +404,9 @@ supportato dalla stampante.\nInserire un valore compreso tra 1 e %d" PD32_OUT_OF_MEMORY "Memoria esaurita." PD32_GENERIC_ERROR "Si è verificato un errore." PD32_DRIVER_UNKNOWN "Driver della stampante sconosciuto." + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Stampante predefinita; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Ci sono %d documenti nella coda di stampa" diff --git a/dlls/commdlg/cdlg_Nl.rc b/dlls/commdlg/cdlg_Nl.rc index b5622187849..d848adcb30f 100644 --- a/dlls/commdlg/cdlg_Nl.rc +++ b/dlls/commdlg/cdlg_Nl.rc @@ -285,6 +285,9 @@ beschikbaar" PD32_GENERIC_ERROR "Er onstond een niet nader \ gespecifieerde fout" PD32_DRIVER_UNKNOWN "De printer driver is onbekend" + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Default Printer, " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Er staan %d documenten in de \ diff --git a/dlls/commdlg/cdlg_No.rc b/dlls/commdlg/cdlg_No.rc index e1196f1b506..9a8efab7fac 100644 --- a/dlls/commdlg/cdlg_No.rc +++ b/dlls/commdlg/cdlg_No.rc @@ -401,6 +401,9 @@ Oppgi en verdi mellom %d og %d." PD32_OUT_OF_MEMORY "Ikke mer minne." PD32_GENERIC_ERROR "En feil har oppstått." PD32_DRIVER_UNKNOWN "Ukjent skriverdriver." + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Standardskriver; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Det er %d dokumenter i køen" diff --git a/dlls/commdlg/cdlg_Pl.rc b/dlls/commdlg/cdlg_Pl.rc index eb34f76ad53..89244309659 100644 --- a/dlls/commdlg/cdlg_Pl.rc +++ b/dlls/commdlg/cdlg_Pl.rc @@ -402,6 +402,9 @@ STRINGTABLE DISCARDABLE PD32_OUT_OF_MEMORY "Za ma³o pamiêci dla tej operacji." PD32_GENERIC_ERROR "Podczas tej operacji wyst¹pi³ b³¹d." PD32_DRIVER_UNKNOWN "Nieznany sterownik drukarki." + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Domyœlna Drukarka; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "W kolejce znajduj¹ siê %d dokumenty" diff --git a/dlls/commdlg/cdlg_Pt.rc b/dlls/commdlg/cdlg_Pt.rc index 3b900705666..f71cf78736d 100644 --- a/dlls/commdlg/cdlg_Pt.rc +++ b/dlls/commdlg/cdlg_Pt.rc @@ -404,6 +404,9 @@ pela sua impressora.\nPor favor entre um valor entre 1 e %d." PD32_OUT_OF_MEMORY "Memória insuficiente." PD32_GENERIC_ERROR "Ocorreu algum erro." PD32_DRIVER_UNKNOWN "Driver de impressora desconhecido." + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Impressora Padrão; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Existem %d documentos na fila" diff --git a/dlls/commdlg/cdlg_Ru.rc b/dlls/commdlg/cdlg_Ru.rc index 44ec3286ab0..b6c8e6dd5d1 100644 --- a/dlls/commdlg/cdlg_Ru.rc +++ b/dlls/commdlg/cdlg_Ru.rc @@ -404,6 +404,9 @@ STRINGTABLE DISCARDABLE PD32_OUT_OF_MEMORY "Ìàëî ïàìÿòè" PD32_GENERIC_ERROR "Ïðîèçîøëà(è) îøèáêà(è)" PD32_DRIVER_UNKNOWN "Íåèçâåñòíûé äðàéâåð ïðèíòåðà" + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Ïðèíòåð ïî óìîë÷àíèþ; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d äîêóìåíòîâ â î÷åðåäè" diff --git a/dlls/commdlg/cdlg_Si.rc b/dlls/commdlg/cdlg_Si.rc index da34bc59578..3fdbfab61b7 100644 --- a/dlls/commdlg/cdlg_Si.rc +++ b/dlls/commdlg/cdlg_Si.rc @@ -402,6 +402,9 @@ Vnesite PD32_OUT_OF_MEMORY "Na voljo ni dovolj pomnilnika, da bi bilo mogoèe dokonèati operacijo." PD32_GENERIC_ERROR "Med operacijo je prišlo do napake." PD32_DRIVER_UNKNOWN "Neznan gonilnik tiskalnika." + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Privzeti tiskalnik; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d èakajoèih dok." diff --git a/dlls/commdlg/cdlg_Sk.rc b/dlls/commdlg/cdlg_Sk.rc index 88d60e96857..3834ba582f9 100644 --- a/dlls/commdlg/cdlg_Sk.rc +++ b/dlls/commdlg/cdlg_Sk.rc @@ -375,6 +375,9 @@ supported by your printer.\nPlease enter a value between 1 and %d" PD32_OUT_OF_MEMORY "Nedostatok pamäte" PD32_GENERIC_ERROR "Vyskytla sa chyba" PD32_DRIVER_UNKNOWN "Neznámy ovládaè tlaèiarne" + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Implicitná tlaèiareò; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in queue" diff --git a/dlls/commdlg/cdlg_Sv.rc b/dlls/commdlg/cdlg_Sv.rc index 19c2b7d3766..cd5c56144b6 100644 --- a/dlls/commdlg/cdlg_Sv.rc +++ b/dlls/commdlg/cdlg_Sv.rc @@ -395,6 +395,9 @@ pappersgr PD32_OUT_OF_MEMORY "Slut på minne." PD32_GENERIC_ERROR "Ett fel uppstog." PD32_DRIVER_UNKNOWN "Okänd skrivardrivrutin." + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Standardskrivare; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Det är %d dokument i kön" diff --git a/dlls/commdlg/cdlg_Th.rc b/dlls/commdlg/cdlg_Th.rc index daf3dc81430..6798066e2ee 100644 --- a/dlls/commdlg/cdlg_Th.rc +++ b/dlls/commdlg/cdlg_Th.rc @@ -399,6 +399,9 @@ supported by your printer.\nPlease enter a value between 1 and %d." PD32_OUT_OF_MEMORY "¤ÇÒÁ¨íÒìËÁ´" PD32_GENERIC_ERROR "à¡Ô´¤ÇÒÁ»Ô´¾ÅÒ´" PD32_DRIVER_UNKNOWN "äÁèÃÙé¨Ñ¡´äÃìàÇÍÃììà¤Ã×èͧ¾ÔÁ¾ì" + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "à¤Ã×èͧ¾ÔÁ¾ì»¡µÔ; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "ÁÕ %d á¿éÁÃÍÍÂÙè" diff --git a/dlls/commdlg/cdlg_Uk.rc b/dlls/commdlg/cdlg_Uk.rc index a20944d370b..b416217b66c 100644 --- a/dlls/commdlg/cdlg_Uk.rc +++ b/dlls/commdlg/cdlg_Uk.rc @@ -373,6 +373,9 @@ STRINGTABLE DISCARDABLE PD32_OUT_OF_MEMORY "Ìàëî ïàì'ÿò³" PD32_GENERIC_ERROR "Âèíèêëà(è) ïîìèëêà(è)" PD32_DRIVER_UNKNOWN "Íåâ³äîìèé äðàéâåð ïðèíòåðà" + PD32_NO_DEVICES "Before you can perform printer-related tasks \ +such as page setup or printing a document, you need to install a printer. \ +Please install one and retry." PD32_DEFAULT_PRINTER "Ïðèíòåð çà îáóìîâëåííÿì; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d äîêóìåíò³â ó ÷åðç³" diff --git a/dlls/commdlg/printdlg.c b/dlls/commdlg/printdlg.c index 5c66feeb73d..690a0b71641 100644 --- a/dlls/commdlg/printdlg.c +++ b/dlls/commdlg/printdlg.c @@ -1156,6 +1156,31 @@ static BOOL PRINTDLG_ChangePrinterW(HWND hDlg, WCHAR *name, return TRUE; } + /*********************************************************************** + * check_printer_setup [internal] + */ +static LRESULT check_printer_setup(HWND hDlg) +{ + DWORD needed,num; + WCHAR resourcestr[256],resultstr[256]; + int res; + + EnumPrintersW(PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &needed, &num); + if(needed == 0) + { + EnumPrintersW(PRINTER_ENUM_CONNECTIONS, NULL, 2, NULL, 0, &needed, &num); + } + if(needed > 0) + return TRUE; + else + { + LoadStringW(COMDLG32_hInstance, PD32_NO_DEVICES,resultstr, 255); + LoadStringW(COMDLG32_hInstance, PD32_PRINT_TITLE,resourcestr, 255); + res = MessageBoxW(hDlg, resultstr, resourcestr,MB_OK | MB_ICONWARNING); + return FALSE; + } +} + /*********************************************************************** * PRINTDLG_WMInitDialog [internal] */ @@ -1740,6 +1765,11 @@ static INT_PTR CALLBACK PrintDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, } else { PrintStructures = (PRINT_PTRA*) lParam; SetPropA(hDlg,"__WINE_PRINTDLGDATA",PrintStructures); + if(!check_printer_setup(hDlg)) + { + EndDialog(hDlg,FALSE); + return FALSE; + } res = PRINTDLG_WMInitDialog(hDlg, wParam, PrintStructures); if(PrintStructures->lpPrintDlg->Flags & PD_ENABLEPRINTHOOK) @@ -1785,6 +1815,11 @@ static INT_PTR CALLBACK PrintDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, } else { PrintStructures = (PRINT_PTRW*) lParam; SetPropW(hDlg, propW, PrintStructures); + if(!check_printer_setup(hDlg)) + { + EndDialog(hDlg,FALSE); + return FALSE; + } res = PRINTDLG_WMInitDialogW(hDlg, wParam, PrintStructures); if(PrintStructures->lpPrintDlg->Flags & PD_ENABLEPRINTHOOK)