Opened 7 years ago

Closed 6 weeks ago

Last modified 6 weeks ago

#4562 closed enhancement (outdated)

Implement wxFileType::GetIcon on Mac

Reported by: wordtech Owned by: csomor
Priority: normal Milestone:
Component: wxOSX-Carbon Version:
Keywords: wxFileType Cc: wordtech, csomor
Blocked By: Blocking:
Patch: no

Description

From the wxWidgets documents from SVN:

"wxFileType::GetIcon
bool GetIcon(wxIconLocation * iconLoc)

If the function returns true, the iconLoc is filled with the location of the icon for this MIME type. A wxIcon may be created from iconLoc later.

Windows: The function returns the icon shown by Explorer for the files of the specified type.

Mac: This function is not implemented and always returns false.

Unix: MIME manager gathers information about icons from GNOME and KDE settings and thus GetIcon’s success depends on availability of these desktop environments."

Implementing this method on OS X would allow wxWidgets applications to display Mac icons natively, which would greatly enhance the look-and-feel of wxWidgets apps on the Mac. At present most wxWidgets applications (including wxWidgets code samples) that implement such features as a directory browser or other view of the file system use generic icons (folders/documents/etc.) and these do not look native.

Change History (6)

comment:1 Changed 6 years ago by wxsite

  • Status changed from assigned to confirmed

transitioning old 'assigned' status to new 'confirmed' status

comment:2 Changed 6 years ago by wojdyr

  • Component set to wxMac
  • Keywords wxFileType added
  • Type changed from defect to enhancement

comment:3 Changed 6 weeks ago by oneeyeman

There is currently wxFileTypeImpl::GetIcon() in the src/osx/core/mimetype.cpp.
I didn't test if it works though.

comment:4 Changed 6 weeks ago by vadz

  • Resolution set to outdated
  • Status changed from confirmed to closed

Let's be optimistic and assume it works. I'll update the documentation.

comment:5 Changed 6 weeks ago by VZ

In 77015:

Don't document wxFileType::GetIcon() as unimplemented under OS X.

It is implemented and supposed to work.

See #4562.

comment:6 Changed 6 weeks ago by VZ

In 77016:

Don't document wxFileType::GetIcon() as unimplemented under OS X.

It is implemented and supposed to work.

See #4562.

Note: See TracTickets for help on using tickets.