5

I'm using ruby-libnotify in a Ruby GTK app, and it works great to create a bubble popup in Ubuntu. I'm on Hardy, and it all works great. Then I had others try the app on Jaunty, and instead of a bubble popup with the new Notify-OSD system, as I expected, the notification turned into a dialog box.

I looked into it, and found the Ubuntu wiki states that the problem is because I set a timeout of 0:

Some programs specify an expire_timeout of 0 to produce notifications that never close by themselves, assuming that they can be closed manually as they can in notification-daemon. Because this is usually done for a message that requires response or acknowledgement, Notify OSD presents it as an alert box rather than as a bubble.

Is there a way I can use libnotify in some way to have a normal bubble with a "never expire" timeout? I would actually prefer it if I could use the old notification system, even, since Notify-OSD doesn't seem to support permanent bubbles at all.

It is unacceptable to have the dialog for me, as it doesn't stay over all windows, so the user won't see the popup right away, necessarily (which is the whole point of using the bubble popup).

4

3 回答 3

3

看起来你只是想将 Notify-OSD 用于它不是为它设计的东西。Notify-OSD 气泡是信息性和短暂的,这意味着不应将任何关键信息放入其中,因为它们被设计为可忽略的。

根据 Ubuntu 设计指南,您似乎正在尝试制作一个变形警报框,它应该可以很好地满足您的需求。

于 2009-12-05T15:21:10.263 回答
0

我记得使用一些命令行工具来显示通知。您可以使用 system 或 `.

于 2009-10-23T14:53:10.050 回答
0

有点偏题的答案,但如果通知 API 不能完全映射到您想要做的事情,您应该考虑使用更通用的库,该库允许您绘制自己的屏幕气泡。想到xosd,虽然我记得它非常有限,但也许还有其他选择......

于 2009-10-05T14:49:44.923 回答