Plasma queued notifications

Charly Ghislain charlyghislain at gmail.com
Tue Jan 12 21:05:08 CET 2010


Hi all,

As an excuse to get used to the c++ and the kde api, i thought of implementing 
queued notifications as there are issues with the current system. I'd like to 
hear your thought about how such feature should be implemented.

I forward here the mail i sent to aseigo and normart so that everyone can get 
involved. 

Thank you,

Charly (cghislai)


== forwarded message

Hi,

I'm getting into kde api slowly and thought it could be interesting to 
implements queued notifications (be it jobs or whatever). With the current 
implementation, a badly designed application might start a lot of jobs in 
parallel pulluting the desktop with lots of extenders.

I was told that you, notmart, should know that code and i saw that you, 
aseigo, planned this feature in the release Schedule. Its stated as 'IN 
PROGRESS', maybe you are handling this already.

If you're not, i'd like to know how you think this should be implemented.
The easy way seems to restrict a number of notifications to be showed 
simultaneously, yet im not really sure which class should be in charge, it 
seems the ExtenderTask's ExtenderBusyWidget does. It might be interesting to 
think if jobs should be queued or run simultaneously.

Another possibility is to create another widget, which could then be any kind 
of applet. the ExtenderTask (which should then be renamed) will create either 
a ExtenderBusyWidget orthis another one with respect to user preferences.

IMHO, the proper way to do this with modularity in mind is using the following 
classes:
- The task with its help-about icon, and a notificationPresenter
- A NotificationWidget, in charge of showing notifications to the user. It 
should be abstract and the current extenders implementation a subclass of it.
- A NotificationsQueue, keeping track of waiting, running or finished 
notifications /jobs. This could be the Manager.
- A NotificationPresenter, which hold the behaviour of notifications, like 
what to do when whatever event happened. This behaviour shoud be common 
amongst the different widgets (extenders / queued popups), so it might be 
useful to put it into his own class. the presenter should create its own 
NotificationWidget

This is my MVP design, it might not be suitable or not fit in the plasma code. 
I'd like to hear from you if you had another design in mind, if you think it's 
not necessary, if you think something's wrong with my proposal, if you have 
already something you're working on, whatever.
One thing to keep in mind is im somewhat new to c++, im usually coding in java 
and i tend to use interfaces a lot and i like type-safety and i don't like 
passing new Strings as identifiers. 

Thank you!

Charly


More information about the Plasma-devel mailing list