Centre();
m_taskBarIcon = new MyTaskBarIcon();
-#if defined(__WXCOCOA__)
- m_dockIcon = new MyTaskBarIcon(wxTaskBarIcon::DOCK);
-#endif
// we should be able to show up to 128 characters on recent Windows versions
// (and 64 on Win9x)
{
wxLogError(wxT("Could not set icon."));
}
+
+#if defined(__WXOSX__) && wxOSX_USE_COCOA
+ m_dockIcon = new MyTaskBarIcon(wxTaskBarIcon::DOCK);
+ if ( !m_dockIcon->SetIcon(wxICON(sample)) )
+ {
+ wxLogError(wxT("Could not set icon."));
+ }
+#endif
}
MyDialog::~MyDialog()
submenu->AppendSeparator();
submenu->Append(PU_SUB2, wxT("Another submenu"));
menu->Append(PU_SUBMAIN, wxT("Submenu"), submenu);
-#ifndef __WXMAC_OSX__ /*Mac has built-in quit menu*/
+#ifndef __WXOSX__ /*Mac has built-in quit menu*/
menu->AppendSeparator();
menu->Append(PU_EXIT, wxT("E&xit"));
#endif
class MyTaskBarIcon : public wxTaskBarIcon
{
public:
-#if defined(__WXCOCOA__)
+#if defined(__WXOSX__) && wxOSX_USE_COCOA
MyTaskBarIcon(wxTaskBarIconType iconType = DEFAULT_TYPE)
: wxTaskBarIcon(iconType)
#else
void OnCloseWindow(wxCloseEvent& event);
MyTaskBarIcon *m_taskBarIcon;
-#if defined(__WXCOCOA__)
+#if defined(__WXOSX__) && wxOSX_USE_COCOA
MyTaskBarIcon *m_dockIcon;
#endif