From: David Webster Date: Mon, 24 Jan 2000 22:50:28 +0000 (+0000) Subject: Added method for mimietype implementation. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2a6b16e36bd514672d3e978673b82ec2d461cdb5 Added method for mimietype implementation. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/os2/mimetype.h b/include/wx/os2/mimetype.h index 9a22803f48..e6a4440593 100644 --- a/include/wx/os2/mimetype.h +++ b/include/wx/os2/mimetype.h @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/mimetype.h // Purpose: classes and functions to manage MIME types -// Author: David Webster +// Author: David Webster // Modified by: // Created: 01.21.99 // RCS-ID: $Id$ @@ -39,6 +39,7 @@ public: // implement accessor functions bool GetExtensions(wxArrayString& extensions); bool GetMimeType(wxString *mimeType) const; + bool GetMimeTypes(wxArrayString& mimeTypes) const; bool GetIcon(wxIcon *icon) const; bool GetDescription(wxString *desc) const; bool GetOpenCommand(wxString *openCmd, diff --git a/src/os2/mimetype.cpp b/src/os2/mimetype.cpp index 28ba45db1f..623d4f0644 100644 --- a/src/os2/mimetype.cpp +++ b/src/os2/mimetype.cpp @@ -229,6 +229,20 @@ bool wxFileTypeImpl::GetMimeType(wxString *mimeType) const return FALSE; } +bool wxFileTypeImpl::GetMimeTypes(wxArrayString& mimeTypes) const +{ + wxString s; + + if (GetMimeType(&s)) + { + mimeTypes.Clear(); + mimeTypes.Add(s); + return TRUE; + } + else + return FALSE; +} + bool wxFileTypeImpl::GetIcon(wxIcon *icon) const { #if wxUSE_GUI