gtk+-2.8 compatibility for WX_2_4_BRANCH.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@35241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mart Raudsepp
2005-08-19 23:20:03 +00:00
parent d344e005a7
commit 348b275cb0
6 changed files with 12 additions and 20 deletions

View File

@@ -156,10 +156,11 @@ public:
#ifdef __WXGTK20__ #ifdef __WXGTK20__
// Returns the default context which usually is anti-aliased // Returns the default context which usually is anti-aliased
PangoContext *GtkGetPangoDefaultContext(); PangoContext *GtkGetPangoDefaultContext();
// Returns the X11 context which renders on the X11 client // Returns the X11 context which renders on the X11 client
// side (which can be remote) and which usually is not // side (which can be remote) and which usually is not
// anti-aliased and is thus faster // anti-aliased and is thus faster
// MR: Deprecated and returning GtkGetPangoDefaultContext to avoid libpangox dependancy
PangoContext *GtkGetPangoX11Context(); PangoContext *GtkGetPangoX11Context();
PangoContext *m_x11Context; PangoContext *m_x11Context;
#endif #endif

View File

@@ -156,10 +156,11 @@ public:
#ifdef __WXGTK20__ #ifdef __WXGTK20__
// Returns the default context which usually is anti-aliased // Returns the default context which usually is anti-aliased
PangoContext *GtkGetPangoDefaultContext(); PangoContext *GtkGetPangoDefaultContext();
// Returns the X11 context which renders on the X11 client // Returns the X11 context which renders on the X11 client
// side (which can be remote) and which usually is not // side (which can be remote) and which usually is not
// anti-aliased and is thus faster // anti-aliased and is thus faster
// MR: Deprecated and returning GtkGetPangoDefaultContext to avoid libpangox dependancy
PangoContext *GtkGetPangoX11Context(); PangoContext *GtkGetPangoX11Context();
PangoContext *m_x11Context; PangoContext *m_x11Context;
#endif #endif

View File

@@ -1796,13 +1796,10 @@ void wxWindowDC::SetFont( const wxFont &font )
if (m_font.Ok()) if (m_font.Ok())
{ {
m_fontdesc = m_font.GetNativeFontInfo()->description; m_fontdesc = m_font.GetNativeFontInfo()->description;
if (m_owner) if (m_owner)
{ {
if (m_font.GetNoAntiAliasing()) m_context = m_owner->GtkGetPangoDefaultContext();
m_context = m_owner->GtkGetPangoX11Context();
else
m_context = m_owner->GtkGetPangoDefaultContext();
} }
} }
#endif #endif

View File

@@ -4008,12 +4008,10 @@ PangoContext *wxWindowGTK::GtkGetPangoDefaultContext()
return gtk_widget_get_pango_context( m_widget ); return gtk_widget_get_pango_context( m_widget );
} }
// MR: Deprecated and now returns the same as GtkGetPangoDefaultContext to avoid libpangox dependancy
PangoContext *wxWindowGTK::GtkGetPangoX11Context() PangoContext *wxWindowGTK::GtkGetPangoX11Context()
{ {
if (!m_x11Context) return gtk_widget_get_pango_context( m_widget );
m_x11Context = pango_x_get_context( gdk_display );
return m_x11Context;
} }
#endif #endif

View File

@@ -1796,13 +1796,10 @@ void wxWindowDC::SetFont( const wxFont &font )
if (m_font.Ok()) if (m_font.Ok())
{ {
m_fontdesc = m_font.GetNativeFontInfo()->description; m_fontdesc = m_font.GetNativeFontInfo()->description;
if (m_owner) if (m_owner)
{ {
if (m_font.GetNoAntiAliasing()) m_context = m_owner->GtkGetPangoDefaultContext();
m_context = m_owner->GtkGetPangoX11Context();
else
m_context = m_owner->GtkGetPangoDefaultContext();
} }
} }
#endif #endif

View File

@@ -4008,12 +4008,10 @@ PangoContext *wxWindowGTK::GtkGetPangoDefaultContext()
return gtk_widget_get_pango_context( m_widget ); return gtk_widget_get_pango_context( m_widget );
} }
// MR: Deprecated and now returns the same as GtkGetPangoDefaultContext to avoid libpangox dependancy
PangoContext *wxWindowGTK::GtkGetPangoX11Context() PangoContext *wxWindowGTK::GtkGetPangoX11Context()
{ {
if (!m_x11Context) return gtk_widget_get_pango_context( m_widget );
m_x11Context = pango_x_get_context( gdk_display );
return m_x11Context;
} }
#endif #endif