change in behavior of wx.TaskBarIcon() in 2.9.2 and/or wxOSX_Cocoa

I’d known for months that the task bar icon was no longer showing up on the Dock, but I just noticed that it ends up on the menu bar instead. Is there a way to override this behavior? In 2.8.12/Carbon, it is still on the Dock, which I much prefer - otherwise I get stuck with that Python rocketship icon, which isn’t very helpful for users. The appended code is sufficient to reproduce the problem.

thanks,

Nat

from wx.lib.embeddedimage import PyEmbeddedImage

import wx

viewmag = PyEmbeddedImage(

“iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACFElEQVQ4jZWT30tTcRjGn+85”

“Lo7T2XJ1PG79MH9gBI2xiIggatRVRasbQxndRGBRQpdGF0KIF7srm0iLCKI/wLqREKHIm4yg”

“oqDmNsd+lLa1zdX0cPZ0sQyjnWAPPLzw5eXDA8/7FSSxrsHBa3Ik+qm5VCypirLpW1dX78rk”

“5Pga/iOxDrh46Yq2UshenpmZtaiaRkM3oLW1Ojq79zwI35uYMyWQhP9cn8131BciuURymWSY”

“5BOSU979h+/3ne8/QBK1LAkhpHQyfn0i/EgBkATwEAABFAGk5l+9cKyW9VsnT/mlWgEkAI0t”

“W1y9PZ3aXgAzleobAOwAsB1AqkxrOZNOOMwA2/Z5DtkA6ABaJKBZB6wAPgJIA+hwunbLsmxR”

“zQBLAroKYKcB9GQAuwX4UQFOAHgJQHW5tG5dX82ZAX5OP338NrOGVhnwSIC3Up2tAILPY2gr”

“ZhcLkiR9MW0BgDYWDMW+GvxL0RVyLDjOQGBgxKyFht+QjBDi2OyzqZDnoO+40qjKhlGiUcrM”

“j46OJPoHBm5GFmJH2p3aWauifP8nwUbbbDYFQEdTk3Wz2+2WSMJisUyfPuPnu/cfFkju2rhf”

“M1Yt2+32uUDgAj9Hosu5fN5aN4AkNKfzzdWhIebyhVQ8vqjUDQAgVFV9PTx8gyQjyWS6vaFm”

“NSZileLdqqrzxVIpcffO7eyf31iPhBAyqjdk/AIEL4Xptl+gaQAAAABJRU5ErkJggg==”)

app = wx.App(0)

icon = wx.EmptyIcon()

icon.CopyFromBitmap(viewmag.GetBitmap())

tbicon = wx.TaskBarIcon()

tbicon.SetIcon(icon, “Nat’s test app”)

frame = wx.Frame(None, -1, “Test frame”, size=(600,400))

frame.Show()

app.MainLoop()

From the CHANGES.txt file:

"""The wx.TaskBarIcon in the wxOSX-cocoa port can now either be a custom
dock icon as before, or a status icon in the menu bar, and can be
selected by passing wx.TBI_DOCK or wx.TBI_CUSTOM_STATUSITEM to the
wx.TaskBarIcon constructor. The default is menubar status item. The
type flag is ignored on the other ports.
"""

···

On 8/16/11 4:02 PM, Nat Echols wrote:

I'd known for months that the task bar icon was no longer showing up on
the Dock, but I just noticed that it ends up on the menu bar instead.
  Is there a way to override this behavior? In 2.8.12/Carbon, it is
still on the Dock, which I much prefer - otherwise I get stuck with that
Python rocketship icon, which isn't very helpful for users. The
appended code is sufficient to reproduce the problem.

--
Robin Dunn
Software Craftsman