From b0c4c93538f2ae5c99dc58ea19a9fba1500dc935 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Tue, 20 Apr 2010 11:19:18 +0200 Subject: [PATCH] wineconsole: Always show an ASCII string in the font test. --- programs/wineconsole/dialog.c | 31 +++++++++++--------------- programs/wineconsole/wineconsole_Cs.rc | 3 +-- programs/wineconsole/wineconsole_De.rc | 3 +-- programs/wineconsole/wineconsole_En.rc | 3 +-- programs/wineconsole/wineconsole_Eo.rc | 3 +-- programs/wineconsole/wineconsole_Es.rc | 3 +-- programs/wineconsole/wineconsole_Fr.rc | 3 +-- programs/wineconsole/wineconsole_Hu.rc | 3 +-- programs/wineconsole/wineconsole_It.rc | 3 +-- programs/wineconsole/wineconsole_Ko.rc | 3 +-- programs/wineconsole/wineconsole_Lt.rc | 3 +-- programs/wineconsole/wineconsole_Nl.rc | 3 +-- programs/wineconsole/wineconsole_No.rc | 3 +-- programs/wineconsole/wineconsole_Pl.rc | 3 +-- programs/wineconsole/wineconsole_Pt.rc | 6 ++--- programs/wineconsole/wineconsole_Ru.rc | 3 +-- programs/wineconsole/wineconsole_Si.rc | 3 +-- programs/wineconsole/wineconsole_Sv.rc | 3 +-- programs/wineconsole/wineconsole_Tr.rc | 3 +-- programs/wineconsole/wineconsole_Zh.rc | 6 ++--- programs/wineconsole/wineconsole_res.h | 3 +-- 21 files changed, 35 insertions(+), 62 deletions(-) diff --git a/programs/wineconsole/dialog.c b/programs/wineconsole/dialog.c index cde013fc6be..247ea2ac73b 100644 --- a/programs/wineconsole/dialog.c +++ b/programs/wineconsole/dialog.c @@ -187,25 +187,20 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam, hFont = (HFONT)GetWindowLongPtr(hWnd, 0L); if (hFont) { - WCHAR buf1[256]; - WCHAR buf2[256]; - int len1, len2; + WCHAR ascii[] = {'A','S','C','I','I',':',' ','a','b','c','X','Y','Z','\0'}; + WCHAR buf[256]; + int len; - len1 = LoadString(GetModuleHandle(NULL), IDS_FNT_PREVIEW_1, - buf1, sizeof(buf1) / sizeof(WCHAR)); - len2 = LoadString(GetModuleHandle(NULL), IDS_FNT_PREVIEW_2, - buf2, sizeof(buf2) / sizeof(WCHAR)); - buf1[len1] = buf2[len2] = 0; - if (len1) - { - hOldFont = SelectObject(ps.hdc, hFont); - SetBkColor(ps.hdc, WCUSER_ColorMap[GetWindowLong(GetDlgItem(di->hDlg, IDC_FNT_COLOR_BK), 0)]); - SetTextColor(ps.hdc, WCUSER_ColorMap[GetWindowLong(GetDlgItem(di->hDlg, IDC_FNT_COLOR_FG), 0)]); - TextOut(ps.hdc, 0, 0, buf1, len1); - if (len2) - TextOut(ps.hdc, 0, di->font[size_idx].height, buf2, len2); - SelectObject(ps.hdc, hOldFont); - } + hOldFont = SelectObject(ps.hdc, hFont); + SetBkColor(ps.hdc, WCUSER_ColorMap[GetWindowLong(GetDlgItem(di->hDlg, IDC_FNT_COLOR_BK), 0)]); + SetTextColor(ps.hdc, WCUSER_ColorMap[GetWindowLong(GetDlgItem(di->hDlg, IDC_FNT_COLOR_FG), 0)]); + len = LoadString(GetModuleHandle(NULL), IDS_FNT_PREVIEW, + buf, sizeof(buf) / sizeof(buf[0])); + if (len) + TextOut(ps.hdc, 0, 0, buf, len); + TextOut(ps.hdc, 0, di->font[size_idx].height, ascii, + sizeof(ascii)/sizeof(ascii[0]) - 1); + SelectObject(ps.hdc, hOldFont); } EndPaint(hWnd, &ps); } diff --git a/programs/wineconsole/wineconsole_Cs.rc b/programs/wineconsole/wineconsole_Cs.rc index 719d70fe72b..06fc4bdb3d7 100644 --- a/programs/wineconsole/wineconsole_Cs.rc +++ b/programs/wineconsole/wineconsole_Cs.rc @@ -37,8 +37,7 @@ IDS_SELECTALL, "Vy&brat v IDS_SCROLL, "Rolova&t" IDS_SEARCH, "Hl&edat" IDS_FNT_DISPLAY, "Kad znak je %ld pixel irok a %ld pixel vysok" -IDS_FNT_PREVIEW_1, "Toto je test" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "Toto je test" IDS_DLG_TIT_DEFAULT, "Setup - Defaultn nastaven" IDS_DLG_TIT_CURRENT, "Setup - Souasn nastaven" IDS_DLG_TIT_ERROR, "Chyba nastaven" diff --git a/programs/wineconsole/wineconsole_De.rc b/programs/wineconsole/wineconsole_De.rc index 0841152bead..745687dedb1 100644 --- a/programs/wineconsole/wineconsole_De.rc +++ b/programs/wineconsole/wineconsole_De.rc @@ -34,8 +34,7 @@ IDS_SELECTALL, "&Alles auswählen" IDS_SCROLL, "Sc&rollen" IDS_SEARCH, "&Suchen" IDS_FNT_DISPLAY, "Jeder Buchstabe ist %ld Pixel breit und %ld Pixel hoch" -IDS_FNT_PREVIEW_1, "Dies ist ein Test" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "Dies ist ein Test" IDS_DLG_TIT_DEFAULT, "Setup - Standardeinstellungen" IDS_DLG_TIT_CURRENT, "Setup - aktuelle Einstellungen" IDS_DLG_TIT_ERROR, "Konfigurationsfehler" diff --git a/programs/wineconsole/wineconsole_En.rc b/programs/wineconsole/wineconsole_En.rc index c9b849add9b..f453a75df18 100644 --- a/programs/wineconsole/wineconsole_En.rc +++ b/programs/wineconsole/wineconsole_En.rc @@ -32,8 +32,7 @@ IDS_SELECTALL, "&Select all" IDS_SCROLL, "Sc&roll" IDS_SEARCH, "S&earch" IDS_FNT_DISPLAY, "Each character is %ld pixels wide on %ld pixels high" -IDS_FNT_PREVIEW_1, "This is a test" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "This is a test" IDS_DLG_TIT_DEFAULT, "Setup - Default settings" IDS_DLG_TIT_CURRENT, "Setup - Current settings" IDS_DLG_TIT_ERROR, "Configuration error" diff --git a/programs/wineconsole/wineconsole_Eo.rc b/programs/wineconsole/wineconsole_Eo.rc index c60a9d103f1..57ba243973c 100644 --- a/programs/wineconsole/wineconsole_Eo.rc +++ b/programs/wineconsole/wineconsole_Eo.rc @@ -34,8 +34,7 @@ IDS_SELECTALL, "&Elekton IDS_SCROLL, "&Ruliu" IDS_SEARCH, "&Seru" IDS_FNT_DISPLAY, "Tipo estas lara %ld bilderojn kaj alta %ld bilderojn" -IDS_FNT_PREVIEW_1, "i tiu estas provo" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "i tiu estas provo" IDS_DLG_TIT_DEFAULT, "Defaltaj Agordoj" IDS_DLG_TIT_CURRENT, "Nunaj Agordoj" IDS_DLG_TIT_ERROR, "Eroro de agordado" diff --git a/programs/wineconsole/wineconsole_Es.rc b/programs/wineconsole/wineconsole_Es.rc index f1340e49aaa..da6e1fbeb5d 100644 --- a/programs/wineconsole/wineconsole_Es.rc +++ b/programs/wineconsole/wineconsole_Es.rc @@ -35,8 +35,7 @@ IDS_SELECTALL, "&Seleccionar todo" IDS_SCROLL, "Sc&roll" IDS_SEARCH, "&Buscar" IDS_FNT_DISPLAY, "Cada caracter tiene %ld pxeles de ancho por %ld pxeles de alto" -IDS_FNT_PREVIEW_1, "Esto es una prueba" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "Esto es una prueba" IDS_DLG_TIT_DEFAULT, "Configuracin - Valores por defecto" IDS_DLG_TIT_CURRENT, "Configuracin - Valores actuales" IDS_DLG_TIT_ERROR, "Error de configuracin" diff --git a/programs/wineconsole/wineconsole_Fr.rc b/programs/wineconsole/wineconsole_Fr.rc index 99aace419a3..1abcb274714 100644 --- a/programs/wineconsole/wineconsole_Fr.rc +++ b/programs/wineconsole/wineconsole_Fr.rc @@ -37,8 +37,7 @@ IDS_SELECTALL, "&Sélectionner tout" IDS_SCROLL, "&Défiler" IDS_SEARCH, "C&hercher" IDS_FNT_DISPLAY, "Chaque caractère a %ld pixels de largeur et %ld pixels de hauteur" -IDS_FNT_PREVIEW_1, "Ceci est un test" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "Ceci est un test" IDS_DLG_TIT_DEFAULT, "Configuration par défaut" IDS_DLG_TIT_CURRENT, "Configuration courante" IDS_DLG_TIT_ERROR, "Erreur de configuration" diff --git a/programs/wineconsole/wineconsole_Hu.rc b/programs/wineconsole/wineconsole_Hu.rc index 5a269bf62be..bd901d980d2 100644 --- a/programs/wineconsole/wineconsole_Hu.rc +++ b/programs/wineconsole/wineconsole_Hu.rc @@ -33,8 +33,7 @@ IDS_SELECTALL, "&Az IDS_SCROLL, "&Grgets" IDS_SEARCH, "&Keress" IDS_FNT_DISPLAY, "Minden karakter %ld pixel szles s %ld pixel magas" -IDS_FNT_PREVIEW_1, "Ez egy teszt" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "Ez egy teszt" IDS_DLG_TIT_DEFAULT, "Bellts - alaprtelmezett belltsok" IDS_DLG_TIT_CURRENT, "Bellts - aktulis belltsok" IDS_DLG_TIT_ERROR, "Configuration error" diff --git a/programs/wineconsole/wineconsole_It.rc b/programs/wineconsole/wineconsole_It.rc index 61b7b9d48d8..4f6c7fad669 100644 --- a/programs/wineconsole/wineconsole_It.rc +++ b/programs/wineconsole/wineconsole_It.rc @@ -35,8 +35,7 @@ IDS_SELECTALL, "&Seleziona tutto" IDS_SCROLL, "Sc&orri" IDS_SEARCH, "C&erca" IDS_FNT_DISPLAY, "Il carattere è %ld pixel di larghezza e %ld pixel di altezza" -IDS_FNT_PREVIEW_1, "Questa è una prova" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "Questa è una prova" IDS_DLG_TIT_DEFAULT, "Impostazioni di Default" IDS_DLG_TIT_CURRENT, "Impostazioni correnti" IDS_DLG_TIT_ERROR, "Errore di configurazione" diff --git a/programs/wineconsole/wineconsole_Ko.rc b/programs/wineconsole/wineconsole_Ko.rc index 947859041b6..bcaa8797fb8 100644 --- a/programs/wineconsole/wineconsole_Ko.rc +++ b/programs/wineconsole/wineconsole_Ko.rc @@ -33,8 +33,7 @@ IDS_SELECTALL, " IDS_SCROLL, "ũ(&R)" IDS_SEARCH, "ã(&E)" IDS_FNT_DISPLAY, " ڴ %ld ȼ ʺ %ld ȼ ̸ ϴ" -IDS_FNT_PREVIEW_1, "̰ ׽ƮԴϴ" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "̰ ׽ƮԴϴ" IDS_DLG_TIT_DEFAULT, "ġ - ⺻ " IDS_DLG_TIT_CURRENT, "ġ - " IDS_DLG_TIT_ERROR, " " diff --git a/programs/wineconsole/wineconsole_Lt.rc b/programs/wineconsole/wineconsole_Lt.rc index 311bb1f2f77..02140d6d258 100644 --- a/programs/wineconsole/wineconsole_Lt.rc +++ b/programs/wineconsole/wineconsole_Lt.rc @@ -35,8 +35,7 @@ IDS_SELECTALL, "&Pažymėti viską" IDS_SCROLL, "&Slinkti" IDS_SEARCH, "&Ieškoti" IDS_FNT_DISPLAY, "Kiekvienas simbolis yra %ld pikselių pločio ir %ld pikselių aukščio" -IDS_FNT_PREVIEW_1, "Čia yra testas" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "Čia yra testas" IDS_DLG_TIT_DEFAULT, "Konfigūracija - numatytosios nuostatos" IDS_DLG_TIT_CURRENT, "Konfigūracija - dabartinės nuostatos" IDS_DLG_TIT_ERROR, "Konfigūracijos klaida" diff --git a/programs/wineconsole/wineconsole_Nl.rc b/programs/wineconsole/wineconsole_Nl.rc index d02fe76cd1d..850076313de 100644 --- a/programs/wineconsole/wineconsole_Nl.rc +++ b/programs/wineconsole/wineconsole_Nl.rc @@ -35,8 +35,7 @@ IDS_SELECTALL, "&Alles selecteren" IDS_SCROLL, "Sc&rollen" IDS_SEARCH, "&Zoeken" IDS_FNT_DISPLAY, "Elk karakter is %ld pixels breed en %ld pixels hoog" -IDS_FNT_PREVIEW_1, "Dit is een test" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "Dit is een test" IDS_DLG_TIT_DEFAULT, "Configuratie - standaard instelllingen" IDS_DLG_TIT_CURRENT, "Configuratie - huidige instellingen" IDS_DLG_TIT_ERROR, "Configuratiefout" diff --git a/programs/wineconsole/wineconsole_No.rc b/programs/wineconsole/wineconsole_No.rc index 2a11dfbe2bf..831fd89845c 100644 --- a/programs/wineconsole/wineconsole_No.rc +++ b/programs/wineconsole/wineconsole_No.rc @@ -32,8 +32,7 @@ IDS_SELECTALL, "Merk &alt" IDS_SCROLL, "&Rull" IDS_SEARCH, "&Sk" IDS_FNT_DISPLAY, "Hvert tegn er %ld piksler bredt og %ld piksler hyt" -IDS_FNT_PREVIEW_1, "Dette er en test" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "Dette er en test" IDS_DLG_TIT_DEFAULT, "Standardinnstillinger" IDS_DLG_TIT_CURRENT, "Gjeldende innstillinger" IDS_DLG_TIT_ERROR, "Oppsettsfeil" diff --git a/programs/wineconsole/wineconsole_Pl.rc b/programs/wineconsole/wineconsole_Pl.rc index 9ad379925d7..f420f504102 100644 --- a/programs/wineconsole/wineconsole_Pl.rc +++ b/programs/wineconsole/wineconsole_Pl.rc @@ -33,8 +33,7 @@ IDS_SELECTALL, "Z&aznacz wszystko" IDS_SCROLL, "&Przewijaj" IDS_SEARCH, "Sz&ukaj" IDS_FNT_DISPLAY, "Kady znak ma szeroko %ld i wysoko %ld punktw" -IDS_FNT_PREVIEW_1, "To jest test" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "To jest test" IDS_DLG_TIT_DEFAULT, "Setup - Domylne ustawienia" IDS_DLG_TIT_CURRENT, "Setup - Wybrane ustawienia" IDS_DLG_TIT_ERROR, "Bd konfiguracji" diff --git a/programs/wineconsole/wineconsole_Pt.rc b/programs/wineconsole/wineconsole_Pt.rc index 934607c4beb..49186f78373 100644 --- a/programs/wineconsole/wineconsole_Pt.rc +++ b/programs/wineconsole/wineconsole_Pt.rc @@ -39,8 +39,7 @@ IDS_SELECTALL, "&Selecionar tudo" IDS_SCROLL, "&Rolar" IDS_SEARCH, "&Pesquisar" IDS_FNT_DISPLAY, "Cada caracter tem %ld pixels de largura por %ld pixels de altura" -IDS_FNT_PREVIEW_1, "Este é um teste" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "Este é um teste" IDS_DLG_TIT_DEFAULT, "Setup - configurações padrões" IDS_DLG_TIT_CURRENT, "Setup - configurações atuais" IDS_DLG_TIT_ERROR, "Erro de configuração" @@ -61,8 +60,7 @@ IDS_SELECTALL, "&Seleccionar tudo" IDS_SCROLL, "&Rolar" IDS_SEARCH, "&Pesquisar" IDS_FNT_DISPLAY, "Cada caracter tem %ld pixels de largura por %ld pixels de altura" -IDS_FNT_PREVIEW_1, "Este é um teste" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "Este é um teste" IDS_DLG_TIT_DEFAULT, "Configuração - configurações predefinidas" IDS_DLG_TIT_CURRENT, "Configuração - configurações actuais" IDS_DLG_TIT_ERROR, "Erro de configuração" diff --git a/programs/wineconsole/wineconsole_Ru.rc b/programs/wineconsole/wineconsole_Ru.rc index 11ea6d3fb20..e269906c4e2 100644 --- a/programs/wineconsole/wineconsole_Ru.rc +++ b/programs/wineconsole/wineconsole_Ru.rc @@ -38,8 +38,7 @@ IDS_SELECTALL, "Выделить в&сё" IDS_SCROLL, "Прок&рутить" IDS_SEARCH, "По&иск" IDS_FNT_DISPLAY, "Каждый символ %ld пикселей в ширину и %ld пикселей в высоту" -IDS_FNT_PREVIEW_1, "Это тест" -IDS_FNT_PREVIEW_2, "This is a test" +IDS_FNT_PREVIEW, "Это тест" IDS_DLG_TIT_DEFAULT, "Настройка - Установки по умолчанию" IDS_DLG_TIT_CURRENT, "Настройка - Текущие установки" IDS_DLG_TIT_ERROR, "Ошибка настройки" diff --git a/programs/wineconsole/wineconsole_Si.rc b/programs/wineconsole/wineconsole_Si.rc index 79b909337c6..47c614dc708 100644 --- a/programs/wineconsole/wineconsole_Si.rc +++ b/programs/wineconsole/wineconsole_Si.rc @@ -34,8 +34,7 @@ IDS_SELECTALL, "Izberi &vse" IDS_SCROLL, "&Drsenje" IDS_SEARCH, "&Iskanje" IDS_FNT_DISPLAY, "Vsak znak je širok %ld pik in visok %ld pik" -IDS_FNT_PREVIEW_1, "Preizkusno besedilo" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "Preizkusno besedilo" IDS_DLG_TIT_DEFAULT, "Privzete nastavitve" IDS_DLG_TIT_CURRENT, "Trenutne nastavitve" IDS_DLG_TIT_ERROR, "Nastavitvena napaka" diff --git a/programs/wineconsole/wineconsole_Sv.rc b/programs/wineconsole/wineconsole_Sv.rc index 509e876ccdf..59b197e65d7 100644 --- a/programs/wineconsole/wineconsole_Sv.rc +++ b/programs/wineconsole/wineconsole_Sv.rc @@ -32,8 +32,7 @@ IDS_SELECTALL, "&Markera allt" IDS_SCROLL, "R&ulla" IDS_SEARCH, "S&k" IDS_FNT_DISPLAY, "Varje bokstav r %ld bildpunkter bred och %ld bildpunkter hg" -IDS_FNT_PREVIEW_1, "Det hr r ett test" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "Det hr r ett test" IDS_DLG_TIT_DEFAULT, "Setup - Standardinstllningar" IDS_DLG_TIT_CURRENT, "Setup - Aktuella instllningar" IDS_DLG_TIT_ERROR, "Konfigurationsfel" diff --git a/programs/wineconsole/wineconsole_Tr.rc b/programs/wineconsole/wineconsole_Tr.rc index 7642405b0fa..75e6cdbe726 100644 --- a/programs/wineconsole/wineconsole_Tr.rc +++ b/programs/wineconsole/wineconsole_Tr.rc @@ -34,8 +34,7 @@ IDS_SELECTALL, "&T IDS_SCROLL, "Ka&ydr" IDS_SEARCH, "A&ra" IDS_FNT_DISPLAY, "Her karakter %ld piksel geniliinde ve %ld piksel yksekliinde" -IDS_FNT_PREVIEW_1, "Bu bir snamadr" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "Bu bir snamadr" IDS_DLG_TIT_DEFAULT, "Ayarla - ntanml ayarlar" IDS_DLG_TIT_CURRENT, "Ayarla - Geerli ayarlar" IDS_DLG_TIT_ERROR, "Yaplandrma hatas" diff --git a/programs/wineconsole/wineconsole_Zh.rc b/programs/wineconsole/wineconsole_Zh.rc index 88375bba53e..4e0641613e7 100644 --- a/programs/wineconsole/wineconsole_Zh.rc +++ b/programs/wineconsole/wineconsole_Zh.rc @@ -38,8 +38,7 @@ IDS_SELECTALL, "全选(&S)" IDS_SCROLL, "滚动(&R)" IDS_SEARCH, "搜索(&E)" IDS_FNT_DISPLAY, "每个字都是 %ld 个像素宽,%ld 个像素高" -IDS_FNT_PREVIEW_1, "这是一段测试语句" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "这是一段测试语句" IDS_DLG_TIT_DEFAULT, "配置 - 默认设置" IDS_DLG_TIT_CURRENT, "配置 - 当前设置" IDS_DLG_TIT_ERROR, "配置错误" @@ -141,8 +140,7 @@ IDS_SELECTALL, "全選(&S)" IDS_SCROLL, "滾動(&R)" IDS_SEARCH, "搜索(&E)" IDS_FNT_DISPLAY, "每個字都是 %ld 個像素寬,%ld 個像素高" -IDS_FNT_PREVIEW_1, "這是一段測試語句" -IDS_FNT_PREVIEW_2, "" +IDS_FNT_PREVIEW, "這是一段測試語句" IDS_DLG_TIT_DEFAULT, "配置 - 默認設定" IDS_DLG_TIT_CURRENT, "配置 - 當前設定" IDS_DLG_TIT_ERROR, "配置錯誤" diff --git a/programs/wineconsole/wineconsole_res.h b/programs/wineconsole/wineconsole_res.h index a128aa97c9d..ac62b58446b 100644 --- a/programs/wineconsole/wineconsole_res.h +++ b/programs/wineconsole/wineconsole_res.h @@ -41,8 +41,7 @@ #define IDS_DLG_ERR_SBWINSIZE 0x130 #define IDS_FNT_DISPLAY 0x200 -#define IDS_FNT_PREVIEW_1 0x201 -#define IDS_FNT_PREVIEW_2 0x202 +#define IDS_FNT_PREVIEW 0x201 #define IDS_CMD_INVALID_EVENT_ID 0x300 #define IDS_CMD_INVALID_BACKEND 0x301