Ubuntu 11.04上的wx.TaskBarIcon [英] wx.TaskBarIcon on Ubuntu 11.04

查看:98
本文介绍了Ubuntu 11.04上的wx.TaskBarIcon的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Ubuntu 11.04下,Unity中没有托盘.

There is no tray in Unity under Ubuntu 11.04.

如何使图标出现在Unity中的某个位置? wx.TaskBarIcon不会出现在任何地方. 谢谢

How can I make icon appear somewhere in Unity? wx.TaskBarIcon is not appear anywhere. Thanks

推荐答案

最好的答案是来自官方文档:

Best answer to give is from the official Documentation:

在X Window System中,窗口管理器必须支持以下任一功能: freedesktop.org的系统托盘协议(现代台式机使用的WM GNOME> = 2,KDE> = 3和XFCE> = 4等环境都可以)或 GNOME 1.2和KDE 1和2中使用的较旧方法. 图标将显示为用户桌面上的顶级窗口.

Under X Window System, the window manager must support either the System Tray Protocol by freedesktop.org (WMs used by modern desktop environments such as GNOME >= 2, KDE >= 3 and XFCE >= 4 all do) or the older methods used in GNOME 1.2 and KDE 1 and 2. If it doesn't, the icon will appear as a toplevel window on user's desktop.

因为不是所有的窗口管理器都有系统托盘,所以不能保证 wxTaskBarIcon将在X Window System下正常工作,因此 应用程序应仅将其用作其可选组件 用户界面.应该要求用户明确启用 Unix上的任务栏图标,默认情况下不应处于启用状态.

Because not all window managers have system tray, there's no guarantee that wxTaskBarIcon will work correctly under X Window System and so the applications should use it only as an optional component of their user interface. The user should be required to explicitly enable the taskbar icon on Unix, it shouldn't be on by default.

http://docs.wxwidgets.org/stable/wx_wxtaskbaricon.html

因此,这与您的windowmanager有关,而不与对wxWidgets进行编程有关. wxTaskbarIcon仅在wxMSW下才是可靠的,对mac来说是不知道的. 如果您想要真正的XPlatform-Applications,最好是避免使用它.

So this is related to your windowmanager, not programming wxWidgets. wxTaskbarIcon is only reliable under wxMSW, dunno about mac. Best is to avoid it if you want real XPlatform-Applications.

这篇关于Ubuntu 11.04上的wx.TaskBarIcon的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆