From: Ryan Norton Date: Sun, 26 Sep 2004 01:57:38 +0000 (+0000) Subject: todos, cleanups, detabified X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/976f924083419b6a7feb1ff7d597c746a70abf1a todos, cleanups, detabified git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/taskbar.cpp b/src/mac/carbon/taskbar.cpp index b122b034a2..2d78d89fdc 100644 --- a/src/mac/carbon/taskbar.cpp +++ b/src/mac/carbon/taskbar.cpp @@ -28,6 +28,12 @@ #endif +// +//TODO: Implement Apple Software Guidelines - show the top window it it's not shown, +//and force it to be unminimized - and all unminimized windows should be brought to +//the front +//http://developer.apple.com/documentation/MacOSX/Conceptual/AppleSWDesign/MacOSXEnvironment/chapter_6_section_4.html +//TODO: IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIcon, wxEvtHandler) pascal OSStatus wxDockEventHandler( EventHandlerCallRef inHandlerCallRef, @@ -40,6 +46,11 @@ pascal OSStatus wxDockEventHandler( EventHandlerCallRef inHandlerCallRef, if (eventClass == kEventClassCommand && eventKind == kEventCommandProcess) { + //TODO: + //TODO: This is a complete copy of + //static pascal OSStatus wxMacAppCommandEventHandler( EventHandlerCallRef handler , EventRef event , void *data ) + //FIND A WAY TO EXTERN THIS AND USE THAT HERE INSTEAD!! + //TODO: MenuRef hMenu = MAC_WXHMENU(pTB->GetCurrentMenu()->GetHMenu()); OSStatus result = eventNotHandledErr ; @@ -150,7 +161,7 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip) return true; #else - //TODO: Educated guess + //TODO: (IT WORKS!) Make work without mask - mayby by using a wxDC? CGImageRef pImage; //create the icon from the bitmap and mask bitmap contained within @@ -169,19 +180,16 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip) if (pImage != NULL) CGImageRelease(pImage); - m_iconAdded = true; - return true; + return m_iconAdded = err == noErr; #endif } bool wxTaskBarIcon::RemoveIcon() { - //TODO: Not tested OSStatus err = RestoreApplicationDockTileImage(); wxASSERT(err == 0); - m_iconAdded = false; - return true; + return !(m_iconAdded = !(err == noErr)); } bool wxTaskBarIcon::PopupMenu(wxMenu *menu) @@ -208,7 +216,7 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu) &hMenu); wxASSERT(err == 0); - return true; + return err == noErr; } #endif //wxHAS_TASK_BAR_ICON