wxArrayString strExtensions;
wxString strDesc, strIcon;
- wxMimeTypeCommands *entry = new wxMimeTypeCommands();
- entry->Add(verb + wxT("=") + cmd + wxT(" %s "));
-
wxArrayString strTypes;
GetMimeTypes(strTypes);
- if (strTypes.GetCount() < 1)
+ if ( strTypes.IsEmpty() )
return false;
- size_t i;
+ wxMimeTypeCommands *entry = new wxMimeTypeCommands();
+ entry->Add(verb + wxT("=") + cmd + wxT(" %s "));
+
bool ok = true;
- for (i = 0; i < strTypes.GetCount(); i++)
+ for ( size_t i = 0; i < strTypes.GetCount(); i++ )
{
if (!m_manager->DoAssociation(strTypes[i], strIcon, entry, strExtensions, strDesc))
ok = false;