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

Display an error if no printer is installed.
This commit is contained in:
Alexandre Julliard 2005-11-03 12:12:18 +00:00
parent d5cf055d64
commit a84ce96470
20 changed files with 90 additions and 0 deletions

View File

@ -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

View File

@ -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 документа в опашката"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -409,6 +409,9 @@ Veuillez indiquer un nombre de copies entre 1 et %d."
PD32_OUT_OF_MEMORY "Pas assez de mémoire." PD32_OUT_OF_MEMORY "Pas assez de mémoire."
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 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_DEFAULT_PRINTER "Imprimante par défaut; "
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"

View File

@ -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"

View File

@ -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 \

View File

@ -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 oppstått." PD32_GENERIC_ERROR "En feil har oppstått."
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 køen" PD32_NR_OF_DOCUMENTS_IN_QUEUE "Det er %d dokumenter i køen"

View File

@ -402,6 +402,9 @@ STRINGTABLE DISCARDABLE
PD32_OUT_OF_MEMORY "Za mało pamięci dla tej operacji." PD32_OUT_OF_MEMORY "Za mało pamięci dla tej operacji."
PD32_GENERIC_ERROR "Podczas tej operacji wystąpił błąd." PD32_GENERIC_ERROR "Podczas tej operacji wystąpił błąd."
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 "Domyślna Drukarka; " PD32_DEFAULT_PRINTER "Domyślna 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"

View File

@ -404,6 +404,9 @@ pela sua impressora.\nPor favor entre um valor entre 1 e %d."
PD32_OUT_OF_MEMORY "Memória insuficiente." PD32_OUT_OF_MEMORY "Memória 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 Padrão; " PD32_DEFAULT_PRINTER "Impressora Padrão; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "Existem %d documentos na fila" PD32_NR_OF_DOCUMENTS_IN_QUEUE "Existem %d documentos na fila"

View File

@ -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 документов в очереди"

View File

@ -402,6 +402,9 @@ Vnesite
PD32_OUT_OF_MEMORY "Na voljo ni dovolj pomnilnika, da bi bilo mogoèe dokonèati operacijo." 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_GENERIC_ERROR "Med operacijo je prišlo 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 èakajoèih dok." PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d èakajoèih dok."

View File

@ -375,6 +375,9 @@ supported by your printer.\nPlease enter a value between 1 and %d"
PD32_OUT_OF_MEMORY "Nedostatok pamäte" PD32_OUT_OF_MEMORY "Nedostatok pamäte"
PD32_GENERIC_ERROR "Vyskytla sa chyba" PD32_GENERIC_ERROR "Vyskytla sa chyba"
PD32_DRIVER_UNKNOWN "Neznámy ovládaè tlaèiarne" 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_DEFAULT_PRINTER "Implicitná tlaèiareò; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in queue" PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in queue"

View File

@ -395,6 +395,9 @@ pappersgr
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 "Okänd skrivardrivrutin." 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_DEFAULT_PRINTER "Standardskrivare; "
PD32_NR_OF_DOCUMENTS_IN_QUEUE "Det är %d dokument i kön" PD32_NR_OF_DOCUMENTS_IN_QUEUE "Det är %d dokument i kön"

View File

@ -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 á¿éÁÃÍÍÂÙè"

View File

@ -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 документів у черзі"

View File

@ -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,
} 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,
} 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)