-// GTK+ 2.0 compatibility define is broken when used from C++ as it
-// casts enum to int implicitly
-#ifdef __WXGTK20__
- #undef gtk_signal_disconnect_by_func
- #define gtk_signal_disconnect_by_func(object,func,data) \
- gtk_signal_compat_matched((object), (func), (data), \
- (GSignalMatchType)(G_SIGNAL_MATCH_FUNC | \
- G_SIGNAL_MATCH_DATA), 0)
-#endif
+ // helper: use the encoding of the given font if it's valid
+ inline wxCharBuffer wxConvertToGTK(const wxString& s, const wxFont& font)
+ {
+ return wxConvertToGTK(s, font.Ok() ? font.GetEncoding()
+ : wxFONTENCODING_SYSTEM);
+ }