X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ff42758536f8d573409bf6c35528497ba36b4d0e..d2e66707deb10dea6f92e3e4092f8a43ef942a5d:/src/unix/fontenum.cpp diff --git a/src/unix/fontenum.cpp b/src/unix/fontenum.cpp index dc50c9b740..90a63d4a7c 100644 --- a/src/unix/fontenum.cpp +++ b/src/unix/fontenum.cpp @@ -49,7 +49,9 @@ extern GtkWidget *wxGetRootWindow(); #endif // __WXGTK20__ -extern "C" int wxCMPFUNC_CONV +extern "C" +{ +static int wxCMPFUNC_CONV wxCompareFamilies (const void *a, const void *b) { const char *a_name = pango_font_family_get_name (*(PangoFontFamily **)a); @@ -57,6 +59,7 @@ wxCompareFamilies (const void *a, const void *b) return g_utf8_collate (a_name, b_name); } +} bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, bool fixedWidthOnly) @@ -68,46 +71,29 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, return false; } -#if defined(__WXGTK20__) || !defined(HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE) - if ( fixedWidthOnly -#if defined(__WXGTK24__) - && (gtk_check_version(2,4,0) != NULL) -#endif - ) - { - OnFacename( wxT("monospace") ); - } - else // !fixedWidthOnly -#endif // __WXGTK20__ || !HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE - { - PangoFontFamily **families = NULL; - gint n_families = 0; - pango_context_list_families ( + PangoFontFamily **families = NULL; + gint n_families = 0; + pango_context_list_families ( #ifdef __WXGTK20__ - gtk_widget_get_pango_context( wxGetRootWindow() ), + gtk_widget_get_pango_context( wxGetRootWindow() ), #else - wxTheApp->GetPangoContext(), + wxTheApp->GetPangoContext(), #endif - &families, &n_families ); - qsort (families, n_families, sizeof (PangoFontFamily *), wxCompareFamilies); + &families, &n_families ); + qsort (families, n_families, sizeof (PangoFontFamily *), wxCompareFamilies); - for (int i=0; i