Add support for returning item location to wxGTK wxMimeTypesManager.

This is a squash merge of gtk_mimetype branch from
https://github.com/Hanmac/wxWidgets.git with some extra minor cleanup.

Closes https://github.com/wxWidgets/wxWidgets/pull/293
This commit is contained in:
Vadim Zeitlin
2016-06-07 14:27:10 +02:00
parent 5f01172165
commit 4dfde501df
8 changed files with 107 additions and 3 deletions

View File

@@ -945,8 +945,11 @@ void MyApp::DoMIMEDemo(wxCommandEvent& WXUNUSED(event))
else
{
wxString type, desc, open;
wxIconLocation loc;
filetype->GetMimeType(&type);
filetype->GetDescription(&desc);
filetype->GetIcon(&loc);
wxString filename = wxT("filename");
filename << wxT(".") << ext;
@@ -958,6 +961,8 @@ void MyApp::DoMIMEDemo(wxCommandEvent& WXUNUSED(event))
<< wxT("\tDescription: ") << ( !desc ? wxString(wxEmptyString) : desc )
<< wxT('\n')
<< wxT("\tCommand to open: ") << ( !open ? wxString("no") : open )
<< wxT('\n')
<< wxT("\tIcon: ") << ( loc.IsOk() ? loc.GetFileName() : wxString("no") )
<< wxT('\n');
delete filetype;