git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37199
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
SInt32 endSel;
err = ICStart(&inst, 'STKA'); // put your app creator code here
SInt32 endSel;
err = ICStart(&inst, 'STKA'); // put your app creator code here
- err = ICFindConfigFile(inst, 0, nil);
+ err = ICFindConfigFile(inst, 0, NULL);
#endif
if (err == noErr)
{
#endif
if (err == noErr)
{
}
#elif wxUSE_MIMETYPE
// Non-windows way
}
#elif wxUSE_MIMETYPE
// Non-windows way
- wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension (_T("html"));
+ bool ok = false;
+ wxString cmd;
+
+ wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("html"));
if ( ft )
{
wxString mt;
ft->GetMimeType(&mt);
if ( ft )
{
wxString mt;
ft->GetMimeType(&mt);
- wxString cmd;
- bool ok = ft->GetOpenCommand(&cmd, wxFileType::MessageParameters(url));
+ ok = ft->GetOpenCommand(&cmd, wxFileType::MessageParameters(url));
-
- if ( !ok || cmd.empty() )
- {
- // fallback to checking for the BROWSER environment variable
- cmd = wxGetenv(wxT("BROWSER"));
- if ( !cmd.empty() )
- cmd << _T(' ') << url;
- }
-
- if ( !cmd.empty() && wxExecute(cmd) )
- return true;
- else // no file type for html extension
+
+ if ( !ok || cmd.empty() )
- wxLogError(_T("No default application configured for HTML files."));
+ // fallback to checking for the BROWSER environment variable
+ cmd = wxGetenv(wxT("BROWSER"));
+ if ( !cmd.empty() )
+ cmd << _T(' ') << url;
+
+ ok = ( !cmd.empty() && wxExecute(cmd) );
+ if (ok)
+ return ok;
+
+ // no file type for HTML extension
+ wxLogError(_T("No default application configured for HTML files."));
+
#endif // !wxUSE_MIMETYPE && !__WXMSW__
wxLogSysError(_T("Failed to open URL \"%s\" in default browser."),
#endif // !wxUSE_MIMETYPE && !__WXMSW__
wxLogSysError(_T("Failed to open URL \"%s\" in default browser."),