wxTaskBarIcon in Ubuntu 12.10

后端 未结 1 547
没有蜡笔的小新
没有蜡笔的小新 2020-12-19 10:54

I built wxWidgets 2.9.3 (for the moment I must stick to this version) under Ubuntu 12.10 and I can\'t seem to use wxTaskBarIcon class. The sample which is deliv

相关标签:
1条回答
  • 2020-12-19 11:24

    Under Ubuntu since 11.04 taskbar is managed by Unity which by default doesn't allow all programs to put their icons there. You must whitelist your application to let it access taskbar. Here is where I found the answer originally:

    http://ubuntuforums.org/showthread.php?t=1737589

    Basically you must call:

    gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Mumble', 'Wine', 'Skype', 'YOUR_APPLICATION']"
    

    Then log out, log in. This will add YOUR_APPLICATION to the Unity.Panel whitelist. Bear in mind that in this case you must also list items which were on that list beforehand. You can check how whitelist looks by calling:

    gsettings get com.canonical.Unity.Panel systray-whitelist
    

    In my case (as I am working on development environment) I just set it to "['all']". This will allow all applications to access taskbar.

    Bear in mind that Ubuntu will be dropping such support and in the future you should use AppIndicator library instead to achieve that goal. This means, that wxTaskBarIcon won't be working even with whitelist unless it'll be using AppIndicator library.

    Source: http://www.webupd8.org/2013/02/unity-notification-area-systray.html

    0 讨论(0)
提交回复
热议问题