}
}
-#if wxUSE_DDE
+#if wxUSE_IPC
// look whether we must issue some DDE requests to the application
// (and not just launch it)
strKey += _T("\\DDEExec");
<< _T('#') << ddeCommand;
}
else
-#endif // wxUSE_DDE
+#endif // wxUSE_IPC
if ( !foundFilename ) {
// we didn't find any '%1' - the application doesn't know which
// file to open (note that we only do it if there is no DDEExec
// suppress possible error messages
wxLogNull nolog;
wxRegKey key(wxRegKey::HKCR, wxT(".") + m_ext);
- if ( key.Open() && key.QueryValue(wxT("Content Type"), *mimeType) ) {
- return TRUE;
- }
- else {
- return FALSE;
- }
+
+ return key.Open() && key.QueryValue(wxT("Content Type"), *mimeType);
}
bool wxFileTypeImpl::GetMimeTypes(wxArrayString& mimeTypes) const
{
wxString s;
-
- if (GetMimeType(&s))
+
+ if ( !GetMimeType(&s) )
{
- mimeTypes.Clear();
- mimeTypes.Add(s);
- return TRUE;
- }
- else
return FALSE;
+ }
+
+ mimeTypes.Clear();
+ mimeTypes.Add(s);
+ return TRUE;
}
}
}
- if ( knownExtension )
- {
- wxFileType *fileType = new wxFileType;
- fileType->m_impl->Init(wxEmptyString, ext);
-
- return fileType;
- }
- else
+ if ( !knownExtension )
{
// unknown extension
return NULL;
}
+
+ wxFileType *fileType = new wxFileType;
+ fileType->m_impl->Init(wxEmptyString, ext);
+
+ return fileType;
}
// MIME type -> extension -> file type