From: Robert Roebling Date: Sun, 25 Aug 2002 20:27:35 +0000 (+0000) Subject: Compile fix for prop. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9ac71bef070f553f4ecef2c549dba33b10422f06 Compile fix for prop. Test change for dcclient. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/prop.cpp b/src/generic/prop.cpp index cca2ecdd45..ae8170a5ab 100644 --- a/src/generic/prop.cpp +++ b/src/generic/prop.cpp @@ -1141,13 +1141,13 @@ bool wxPropertyValidator::StringToLong (wxChar *s, long *number) { wxChar *wxPropertyValidator::FloatToString (float number) { static wxChar buf[20]; - wxSprintf (buf, wxT("%.6g"), number); + wxSnprintf (buf, 20, wxT("%.6g"), number); return buf; } wxChar *wxPropertyValidator::DoubleToString (double number) { static wxChar buf[20]; - wxSprintf (buf, wxT("%.6g"), number); + wxSnprintf (buf, 20, wxT("%.6g"), number); return buf; } diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 2b469dfbea..8a33377614 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -332,6 +332,10 @@ wxWindowDC::wxWindowDC( wxWindow *window ) #ifdef __WXGTK20__ m_context = gtk_widget_get_pango_context( widget ); + // Always take Xft context to get matching fonts + // for display and printing. + // m_context = pango_xft_get_context (GDK_DISPLAY (), DefaultScreen (GDK_DISPLAY ())); + m_fontdesc = widget->style->font_desc; #endif diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 2b469dfbea..8a33377614 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -332,6 +332,10 @@ wxWindowDC::wxWindowDC( wxWindow *window ) #ifdef __WXGTK20__ m_context = gtk_widget_get_pango_context( widget ); + // Always take Xft context to get matching fonts + // for display and printing. + // m_context = pango_xft_get_context (GDK_DISPLAY (), DefaultScreen (GDK_DISPLAY ())); + m_fontdesc = widget->style->font_desc; #endif