Add non-vararg wxFileTypeInfo ctor and various setters.
This allows to create wxFileTypeInfo objects in a more readable even if more verbose way. This should also incidentally fix the unit tests compilation with VC6 which seems to have some existential troubles with the vararg ctor in debug DLL build (only). Using the non-vararg ctor should hopefully make it happy and let the unit tests pass with this compiler. Also document wxFileTypeInfo class which wasn't documented at all. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -228,14 +228,10 @@ void InteractiveOutputTestCase::TestMimeAssociate()
|
||||
#ifdef TEST_MIME
|
||||
wxPuts(wxT("*** Testing creation of filetype association ***\n"));
|
||||
|
||||
wxFileTypeInfo ftInfo(
|
||||
wxT("application/x-xyz"),
|
||||
wxT("xyzview '%s'"), // open cmd
|
||||
wxT(""), // print cmd
|
||||
wxT("XYZ File"), // description
|
||||
wxT(".xyz"), // extensions
|
||||
wxNullPtr // end of extensions
|
||||
);
|
||||
wxFileTypeInfo ftInfo("application/x-xyz");
|
||||
ftInfo.SetOpenCommand("xyzview '%s'");
|
||||
ftInfo.SetDescription("XYZ File");
|
||||
ftInfo.AddExtension(".xyz");
|
||||
ftInfo.SetShortDesc(wxT("XYZFile")); // used under Win32 only
|
||||
|
||||
wxFileType *ft = wxTheMimeTypesManager->Associate(ftInfo);
|
||||
|
Reference in New Issue
Block a user