// Author: David Elliott, Stefan Csomor
// Modified by:
// Created: 2004/01/24
-// RCS-ID: $Id: taskbar.mm 35650 2005-09-23 12:56:45Z MR $
+// RCS-ID: $Id$
// Copyright: (c) 2004 David Elliott, Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////
#if wxUSE_TASKBARICON
#ifndef WX_PRECOMP
+ #include "wx/toplevel.h"
#include "wx/menu.h"
#include "wx/icon.h"
#include "wx/log.h"
virtual bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString) = 0;
virtual bool RemoveIcon() = 0;
- bool IsIconInstalled() const { return m_icon.Ok(); }
+ bool IsIconInstalled() const { return m_icon.IsOk(); }
virtual bool PopupMenu(wxMenu *menu) = 0;
virtual ~wxTaskBarIconImpl();
wxTaskBarIcon::wxTaskBarIcon(wxTaskBarIconType iconType)
{
- if(iconType == DOCK)
+ if(iconType == wxTBI_DOCK)
m_impl = new wxTaskBarIconDockImpl(this);
- else if(iconType == CUSTOM_STATUSITEM)
+ else if(iconType == wxTBI_CUSTOM_STATUSITEM)
m_impl = new wxTaskBarIconCustomStatusItemImpl(this);
else
{ m_impl = NULL;
@implementation wxNSAppController(wxTaskBarIconNSApplicationDelegateCategory)
- (NSMenu*)applicationDockMenu:(NSApplication *)sender
{
+ wxUnusedVar(sender);
+
return wxTaskBarIconDockImpl::OSXGetDockHMenu();
}
@end
- (void) clickedAction: (id) sender
{
+ wxUnusedVar(sender);
wxMenu *menu = impl->CreatePopupMenu();
if (menu)
{
{
}
-bool wxTaskBarIconCustomStatusItemImpl::SetIcon(const wxIcon& icon, const wxString& WXUNUSED(tooltip))
+bool wxTaskBarIconCustomStatusItemImpl::SetIcon(const wxIcon& icon, const wxString& tooltip)
{
if(!m_statusItem)
{
m_target = [[wxOSXStatusItemTarget alloc] init];
[m_target setImplementation:this];
+ [m_statusItem setHighlightMode:YES];
[m_statusItem setTarget:m_target];
[m_statusItem setAction:@selector(clickedAction:)];
[m_statusItem sendActionOn:NSLeftMouseDownMask];
}
[m_statusItem setImage:m_icon.GetNSImage()];
+ wxCFStringRef cfTooltip(tooltip);
+ [m_statusItem setToolTip:cfTooltip.AsNSString()];
return true;
}