Ayatana-like notifications for Plasma
sebas at kde.org
Fri Sep 4 00:39:34 BST 2009
On Thursday 03 September 2009 17:40:44 Aurélien Gâteau wrote:
> Aurélien Gâteau wrote:
> > Sebastian Kügler wrote:
> >> You don't need to remove the notifications from the systray by patching
> >> it, you can just turn it off with the config option (which you're
> >> apparently also removing). This only makes it harder to switch between
> >> those two.
> > I am not removing the config option: in fact I recently added a new one
> > to toggle Ayatana notifications on or off.
OK, then I didn't read the code well enough.
My proposal would be to just add / remove the Ayatana applet and switch off / on the
native notifications. This way it could be done completely at run-time, and doesn't
require separate packaging -- this would make testing the Ayatana version a lot
easier, and make packager's lives less painful. Note that the applet doesn't need to
be visible at all (make it 1x1 px transparant if you wish), or plugged into the
systray (which is supported since KDE 4.3).
> >> Looking at the code, I see that you're basically not using the
> >> (QGraphicsView) canvas-based system Plasma uses.
> > True. I reused some of the code I demonstrated at UDS. Since the
> > PassiveNotificationWidget is a standalone widget which appears over the
> > other windows, what would using QGraphicsView bring?
Deeper integration with other plasma elements, for example the slide animation in
Plasma::Dialog. Not sure if that's what you want, but I though I'd mention it anyway.
> >> The Timeline stuff in there should probably use
> >> Plasma::Animator, so the notify-osd stuff respect desktop-wide settings
> >> for animations (you can switch them off in a central place, and have
> >> animations in different UI elements synced with each other). Also,
> >> hardcoding animation duration seems clunky -- again, no syncing of the
> >> animations with other animations, no way to switch it off in a central
> >> place.
> > Reading the API, it seems it requires QGraphicsItem, which probably
> > answer my previous question.
Right. This will probably change when Qt kinetic arrives, hopefully in time for 4.4.
> More on the subject of using QGraphicsView and Plasma::Animator: I just
> had a look at the tooltip code, since Ayatana notifications aim at
> looking similar to tooltips, I think it make sense to get some
> inspiration from the code.
or share it ... :)
> I found out that Plasma::ToolTip inherits from QWidget, like I do and
> use QTimeLine as well. Is it just because the code predates
> Plasma::Animator or is it accepted architecture for new code?
It's a kludge, because QWidget-based stuff isn't supported by Animator.
> Still I found some interesting code in ToolTip to check global animation
> settings and use Plasma frame margins.
Yes, I think the general point here is that the Ayatana notifications have been
developed with GNOME in mind, which is in many ways more limited than Plasma. This
also means that the scope of the spec, when applied to KDE, changes. IMO, it cannot
be copied 1:1.
http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 489 bytes
Desc: This is a digitally signed message part.
Url : https://lists.ubuntu.com/archives/kubuntu-devel/attachments/20090904/6d438550/attachment.pgp
More information about the kubuntu-devel