#include "wx/msgdlg.h"
#include "wx/fontdlg.h"
#include "wx/choicdlg.h"
+#include "wx/encinfo.h"
#include "wx/encconv.h"
// remember the alt encoding for this charset -- or remember that
// we don't know it
- long value = n == -1 ? wxFONTENCODING_UNKNOWN : (long)encoding;
+ long value = n == -1 ? (long)wxFONTENCODING_UNKNOWN : (long)encoding;
if ( !config->Write(charset, value) )
{
wxLogError(_("Failed to remember the encoding for the charset '%s'."), charset.c_str());
wxString configEntry,
encName = GetEncodingName(encoding);
- if ( !!facename )
+ if ( !facename.IsEmpty() )
{
configEntry = facename + _T("_");
}
}
else // use the info entered the last time
{
- if ( !!fontinfo && !!facename )
+ if ( !fontinfo.IsEmpty() && !facename.IsEmpty() )
{
// we tried to find a match with facename -- now try without it
fontinfo = GetConfig()->Read(encName);
}
- if ( !!fontinfo )
+ if ( !fontinfo.IsEmpty() )
{
if ( info->FromString(fontinfo) )
{