Commit a84ce964 authored by Alexandre Julliard's avatar Alexandre Julliard

Authors: Vijay Kiran Kamuju <infyquest@gmail.com>, Jonathan Ernst <Jonathan@ErnstFamily.ch>

Display an error if no printer is installed.
parent d5cf055d
...@@ -63,6 +63,7 @@ typedef struct { ...@@ -63,6 +63,7 @@ typedef struct {
#define PD32_OUT_OF_MEMORY 1113 #define PD32_OUT_OF_MEMORY 1113
#define PD32_GENERIC_ERROR 1114 #define PD32_GENERIC_ERROR 1114
#define PD32_DRIVER_UNKNOWN 1115 #define PD32_DRIVER_UNKNOWN 1115
#define PD32_NO_DEVICES 1121
#define PD32_PRINTER_STATUS_READY 1536 #define PD32_PRINTER_STATUS_READY 1536
#define PD32_PRINTER_STATUS_PAUSED 1537 #define PD32_PRINTER_STATUS_PAUSED 1537
......
...@@ -406,6 +406,9 @@ STRINGTABLE DISCARDABLE ...@@ -406,6 +406,9 @@ STRINGTABLE DISCARDABLE
PD32_OUT_OF_MEMORY " ." PD32_OUT_OF_MEMORY " ."
PD32_GENERIC_ERROR " ." PD32_GENERIC_ERROR " ."
PD32_DRIVER_UNKNOWN " ." 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_DEFAULT_PRINTER " ; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE " %d " PD32_NR_OF_DOCUMENTS_IN_QUEUE " %d "
......
...@@ -405,6 +405,9 @@ supported by your printer.\nPlease enter a value between 1 and %d." ...@@ -405,6 +405,9 @@ supported by your printer.\nPlease enter a value between 1 and %d."
PD32_OUT_OF_MEMORY "Out of memory." PD32_OUT_OF_MEMORY "Out of memory."
PD32_GENERIC_ERROR "Some error occurred." PD32_GENERIC_ERROR "Some error occurred."
PD32_DRIVER_UNKNOWN "Unknown printer driver." 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_DEFAULT_PRINTER "Default Printer; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in the queue" PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in the queue"
......
...@@ -399,6 +399,9 @@ Bitte geben sie einen Wert zwischen %d und %d an." ...@@ -399,6 +399,9 @@ Bitte geben sie einen Wert zwischen %d und %d an."
PD32_OUT_OF_MEMORY "Kein freier Speicher mehr." PD32_OUT_OF_MEMORY "Kein freier Speicher mehr."
PD32_GENERIC_ERROR "Ein unbekannter Fehler ist aufgetreten." PD32_GENERIC_ERROR "Ein unbekannter Fehler ist aufgetreten."
PD32_DRIVER_UNKNOWN "Unbekannter Druckertreiber." 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_DEFAULT_PRINTER "Standard Drucker; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "Es sind %d Dokumente in der Queue" PD32_NR_OF_DOCUMENTS_IN_QUEUE "Es sind %d Dokumente in der Queue"
......
...@@ -405,6 +405,9 @@ supported by your printer.\nPlease enter a value between 1 and %d." ...@@ -405,6 +405,9 @@ supported by your printer.\nPlease enter a value between 1 and %d."
PD32_OUT_OF_MEMORY "Out of memory." PD32_OUT_OF_MEMORY "Out of memory."
PD32_GENERIC_ERROR "An error occurred." PD32_GENERIC_ERROR "An error occurred."
PD32_DRIVER_UNKNOWN "Unknown printer driver." 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_DEFAULT_PRINTER "Default Printer; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in the queue" PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in the queue"
......
...@@ -406,6 +406,9 @@ defecto." ...@@ -406,6 +406,9 @@ defecto."
PD32_GENERIC_ERROR "Ocurri un error." PD32_GENERIC_ERROR "Ocurri un error."
PD32_DRIVER_UNKNOWN "Manejador de la impresora \ PD32_DRIVER_UNKNOWN "Manejador de la impresora \
desconocido." 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_DEFAULT_PRINTER "Impresora por defecto; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "Hay %d documentos en la cola" PD32_NR_OF_DOCUMENTS_IN_QUEUE "Hay %d documentos en la cola"
......
...@@ -400,6 +400,9 @@ STRINGTABLE DISCARDABLE ...@@ -400,6 +400,9 @@ STRINGTABLE DISCARDABLE
PD32_OUT_OF_MEMORY "Muisti loppu." PD32_OUT_OF_MEMORY "Muisti loppu."
PD32_GENERIC_ERROR "Virhe." PD32_GENERIC_ERROR "Virhe."
PD32_DRIVER_UNKNOWN "Tuntematon tulostinajuri." 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_DEFAULT_PRINTER "Oletustulostin; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "Jonossa on %d dokumenttia" PD32_NR_OF_DOCUMENTS_IN_QUEUE "Jonossa on %d dokumenttia"
......
...@@ -409,6 +409,9 @@ Veuillez indiquer un nombre de copies entre 1 et %d." ...@@ -409,6 +409,9 @@ Veuillez indiquer un nombre de copies entre 1 et %d."
PD32_OUT_OF_MEMORY "Pas assez de mmoire." PD32_OUT_OF_MEMORY "Pas assez de mmoire."
PD32_GENERIC_ERROR "Une erreur est intervenue." PD32_GENERIC_ERROR "Une erreur est intervenue."
PD32_DRIVER_UNKNOWN "Pilote d'imprimante inconnu." PD32_DRIVER_UNKNOWN "Pilote d'imprimante inconnu."
PD32_NO_DEVICES "Avant de pouvoir effectuer des oprations 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 ressayez."
PD32_DEFAULT_PRINTER "Imprimante par dfaut; " PD32_DEFAULT_PRINTER "Imprimante par dfaut; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "Il y a %d documents dans la file d'attente" PD32_NR_OF_DOCUMENTS_IN_QUEUE "Il y a %d documents dans la file d'attente"
......
...@@ -404,6 +404,9 @@ supportato dalla stampante.\nInserire un valore compreso tra 1 e %d" ...@@ -404,6 +404,9 @@ supportato dalla stampante.\nInserire un valore compreso tra 1 e %d"
PD32_OUT_OF_MEMORY "Memoria esaurita." PD32_OUT_OF_MEMORY "Memoria esaurita."
PD32_GENERIC_ERROR "Si verificato un errore." PD32_GENERIC_ERROR "Si verificato un errore."
PD32_DRIVER_UNKNOWN "Driver della stampante sconosciuto." 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_DEFAULT_PRINTER "Stampante predefinita; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "Ci sono %d documenti nella coda di stampa" PD32_NR_OF_DOCUMENTS_IN_QUEUE "Ci sono %d documenti nella coda di stampa"
......
...@@ -285,6 +285,9 @@ beschikbaar" ...@@ -285,6 +285,9 @@ beschikbaar"
PD32_GENERIC_ERROR "Er onstond een niet nader \ PD32_GENERIC_ERROR "Er onstond een niet nader \
gespecifieerde fout" gespecifieerde fout"
PD32_DRIVER_UNKNOWN "De printer driver is onbekend" 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_DEFAULT_PRINTER "Default Printer, "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "Er staan %d documenten in de \ PD32_NR_OF_DOCUMENTS_IN_QUEUE "Er staan %d documenten in de \
......
...@@ -401,6 +401,9 @@ Oppgi en verdi mellom %d og %d." ...@@ -401,6 +401,9 @@ Oppgi en verdi mellom %d og %d."
PD32_OUT_OF_MEMORY "Ikke mer minne." PD32_OUT_OF_MEMORY "Ikke mer minne."
PD32_GENERIC_ERROR "En feil har oppsttt." PD32_GENERIC_ERROR "En feil har oppsttt."
PD32_DRIVER_UNKNOWN "Ukjent skriverdriver." 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_DEFAULT_PRINTER "Standardskriver; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "Det er %d dokumenter i ken" PD32_NR_OF_DOCUMENTS_IN_QUEUE "Det er %d dokumenter i ken"
......
...@@ -402,6 +402,9 @@ STRINGTABLE DISCARDABLE ...@@ -402,6 +402,9 @@ STRINGTABLE DISCARDABLE
PD32_OUT_OF_MEMORY "Za mao pamici dla tej operacji." PD32_OUT_OF_MEMORY "Za mao pamici dla tej operacji."
PD32_GENERIC_ERROR "Podczas tej operacji wystpi bd." PD32_GENERIC_ERROR "Podczas tej operacji wystpi bd."
PD32_DRIVER_UNKNOWN "Nieznany sterownik drukarki." 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 "Domylna Drukarka; " PD32_DEFAULT_PRINTER "Domylna Drukarka; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "W kolejce znajduj si %d dokumenty" PD32_NR_OF_DOCUMENTS_IN_QUEUE "W kolejce znajduj si %d dokumenty"
......
...@@ -404,6 +404,9 @@ pela sua impressora.\nPor favor entre um valor entre 1 e %d." ...@@ -404,6 +404,9 @@ pela sua impressora.\nPor favor entre um valor entre 1 e %d."
PD32_OUT_OF_MEMORY "Memria insuficiente." PD32_OUT_OF_MEMORY "Memria insuficiente."
PD32_GENERIC_ERROR "Ocorreu algum erro." PD32_GENERIC_ERROR "Ocorreu algum erro."
PD32_DRIVER_UNKNOWN "Driver de impressora desconhecido." 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 Padro; " PD32_DEFAULT_PRINTER "Impressora Padro; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "Existem %d documentos na fila" PD32_NR_OF_DOCUMENTS_IN_QUEUE "Existem %d documentos na fila"
......
...@@ -404,6 +404,9 @@ STRINGTABLE DISCARDABLE ...@@ -404,6 +404,9 @@ STRINGTABLE DISCARDABLE
PD32_OUT_OF_MEMORY " " PD32_OUT_OF_MEMORY " "
PD32_GENERIC_ERROR "() ()" PD32_GENERIC_ERROR "() ()"
PD32_DRIVER_UNKNOWN " " 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_DEFAULT_PRINTER " ; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d " PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d "
......
...@@ -402,6 +402,9 @@ Vnesite tevilo med %d in %d." ...@@ -402,6 +402,9 @@ Vnesite tevilo med %d in %d."
PD32_OUT_OF_MEMORY "Na voljo ni dovolj pomnilnika, da bi bilo mogoe dokonati operacijo." PD32_OUT_OF_MEMORY "Na voljo ni dovolj pomnilnika, da bi bilo mogoe dokonati operacijo."
PD32_GENERIC_ERROR "Med operacijo je prilo do napake." PD32_GENERIC_ERROR "Med operacijo je prilo do napake."
PD32_DRIVER_UNKNOWN "Neznan gonilnik tiskalnika." 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_DEFAULT_PRINTER "Privzeti tiskalnik; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d akajoih dok." PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d akajoih dok."
......
...@@ -375,6 +375,9 @@ supported by your printer.\nPlease enter a value between 1 and %d" ...@@ -375,6 +375,9 @@ supported by your printer.\nPlease enter a value between 1 and %d"
PD32_OUT_OF_MEMORY "Nedostatok pamte" PD32_OUT_OF_MEMORY "Nedostatok pamte"
PD32_GENERIC_ERROR "Vyskytla sa chyba" PD32_GENERIC_ERROR "Vyskytla sa chyba"
PD32_DRIVER_UNKNOWN "Neznmy ovlda tlaiarne" PD32_DRIVER_UNKNOWN "Neznmy ovlda tlaiarne"
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 tlaiare; " PD32_DEFAULT_PRINTER "Implicitn tlaiare; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in queue" PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in queue"
......
...@@ -395,6 +395,9 @@ pappersgrnserna.\nVar god skriv in marginallerna igen." ...@@ -395,6 +395,9 @@ pappersgrnserna.\nVar god skriv in marginallerna igen."
PD32_OUT_OF_MEMORY "Slut p minne." PD32_OUT_OF_MEMORY "Slut p minne."
PD32_GENERIC_ERROR "Ett fel uppstog." PD32_GENERIC_ERROR "Ett fel uppstog."
PD32_DRIVER_UNKNOWN "Oknd skrivardrivrutin." PD32_DRIVER_UNKNOWN "Oknd 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_DEFAULT_PRINTER "Standardskrivare; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "Det r %d dokument i kn" PD32_NR_OF_DOCUMENTS_IN_QUEUE "Det r %d dokument i kn"
......
...@@ -399,6 +399,9 @@ supported by your printer.\nPlease enter a value between 1 and %d." ...@@ -399,6 +399,9 @@ supported by your printer.\nPlease enter a value between 1 and %d."
PD32_OUT_OF_MEMORY "" PD32_OUT_OF_MEMORY ""
PD32_GENERIC_ERROR "ԴԴҴ" PD32_GENERIC_ERROR "ԴԴҴ"
PD32_DRIVER_UNKNOWN "ѡͧ" 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_DEFAULT_PRINTER "ͧ컡; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE " %d " PD32_NR_OF_DOCUMENTS_IN_QUEUE " %d "
......
...@@ -373,6 +373,9 @@ STRINGTABLE DISCARDABLE ...@@ -373,6 +373,9 @@ STRINGTABLE DISCARDABLE
PD32_OUT_OF_MEMORY " '" PD32_OUT_OF_MEMORY " '"
PD32_GENERIC_ERROR "() ()" PD32_GENERIC_ERROR "() ()"
PD32_DRIVER_UNKNOWN " " 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_DEFAULT_PRINTER " ; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d " PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d "
......
...@@ -1156,6 +1156,31 @@ static BOOL PRINTDLG_ChangePrinterW(HWND hDlg, WCHAR *name, ...@@ -1156,6 +1156,31 @@ static BOOL PRINTDLG_ChangePrinterW(HWND hDlg, WCHAR *name,
return TRUE; 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] * PRINTDLG_WMInitDialog [internal]
*/ */
...@@ -1740,6 +1765,11 @@ static INT_PTR CALLBACK PrintDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, ...@@ -1740,6 +1765,11 @@ static INT_PTR CALLBACK PrintDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam,
} else { } else {
PrintStructures = (PRINT_PTRA*) lParam; PrintStructures = (PRINT_PTRA*) lParam;
SetPropA(hDlg,"__WINE_PRINTDLGDATA",PrintStructures); SetPropA(hDlg,"__WINE_PRINTDLGDATA",PrintStructures);
if(!check_printer_setup(hDlg))
{
EndDialog(hDlg,FALSE);
return FALSE;
}
res = PRINTDLG_WMInitDialog(hDlg, wParam, PrintStructures); res = PRINTDLG_WMInitDialog(hDlg, wParam, PrintStructures);
if(PrintStructures->lpPrintDlg->Flags & PD_ENABLEPRINTHOOK) if(PrintStructures->lpPrintDlg->Flags & PD_ENABLEPRINTHOOK)
...@@ -1785,6 +1815,11 @@ static INT_PTR CALLBACK PrintDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, ...@@ -1785,6 +1815,11 @@ static INT_PTR CALLBACK PrintDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam,
} else { } else {
PrintStructures = (PRINT_PTRW*) lParam; PrintStructures = (PRINT_PTRW*) lParam;
SetPropW(hDlg, propW, PrintStructures); SetPropW(hDlg, propW, PrintStructures);
if(!check_printer_setup(hDlg))
{
EndDialog(hDlg,FALSE);
return FALSE;
}
res = PRINTDLG_WMInitDialogW(hDlg, wParam, PrintStructures); res = PRINTDLG_WMInitDialogW(hDlg, wParam, PrintStructures);
if(PrintStructures->lpPrintDlg->Flags & PD_ENABLEPRINTHOOK) if(PrintStructures->lpPrintDlg->Flags & PD_ENABLEPRINTHOOK)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment