Removed Trace macro and replaced it by Wine debug channel facility.
Made the font lookup at startup more robust and now save registry at
startup time if a new font is chosen (as spotted by Sylvain Petreolle).
Fixed an update bug spotted by Jason Edmeades.
diff --git a/programs/wineconsole/dialog.c b/programs/wineconsole/dialog.c
index 79e7fe8..d862ba1 100644
--- a/programs/wineconsole/dialog.c
+++ b/programs/wineconsole/dialog.c
@@ -23,6 +23,10 @@
#include "prsht.h"
#include "winecon_user.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(wineconsole);
+
enum WCUSER_ApplyTo {
/* Prop sheet CFG */
WCUSER_ApplyToCursorSize,
@@ -392,6 +396,7 @@
{
struct dialog_info* di = (struct dialog_info*)lParam;
+ WCUSER_DumpTextMetric(tm, FontType);
if (WCUSER_ValidateFontMetric(di->data, tm, FontType))
{
di->nFont++;
@@ -406,6 +411,7 @@
struct dialog_info* di = (struct dialog_info*)lParam;
HDC hdc;
+ WCUSER_DumpLogFont("font", lf, FontType);
if (WCUSER_ValidateFont(di->data, lf) && (hdc = GetDC(di->hDlg)))
{
if (FontType & RASTER_FONTTYPE)
@@ -439,6 +445,7 @@
WCHAR buf[32];
static const WCHAR fmt[] = {'%','l','d',0};
+ WCUSER_DumpTextMetric(tm, FontType);
if (di->nFont == 0 && !(FontType & RASTER_FONTTYPE))
{
static const int sizes[] = {8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72};
@@ -523,8 +530,8 @@
if (!hFont) return FALSE;
if (config.cell_height != di->font[size_idx].height)
- Trace(0, "select_font: mismatched heights (%u<>%u)\n",
- config.cell_height, di->font[size_idx].height);
+ WINE_TRACE("select_font: mismatched heights (%u<>%u)\n",
+ config.cell_height, di->font[size_idx].height);
hOldFont = (HFONT)SendDlgItemMessage(di->hDlg, IDC_FNT_PREVIEW, WM_GETFONT, 0L, 0L);
SendDlgItemMessage(di->hDlg, IDC_FNT_PREVIEW, WM_SETFONT, (DWORD)hFont, TRUE);
@@ -575,7 +582,7 @@
di->font[idx].weight == di->config->font_weight)
{
if (ref == -1) ref = idx;
- else Trace(0, "Several matches found: ref=%d idx=%d\n", ref, idx);
+ else WINE_TRACE("Several matches found: ref=%d idx=%d\n", ref, idx);
}
}
idx = (ref == -1) ? 0 : ref;