KMessage/KMessageHandler: a core/ui seperation for displaying message.
Michaël Larouche
michael.larouche at kdemail.net
Sun May 28 21:28:24 BST 2006
Le May 28, 2006 14:35, Olivier Goffart a écrit :
> Le Dimanche 28 Mai 2006 20:00, Leo Savernik a écrit :
> > Am Sonntag, 28. Mai 2006 19:06 schrieb Michaël Larouche:
> > [...]
> >
> > > So I've made the required classes to separate the message display.
> > >
> > > kdecore: KMessage and KMessageHandler
> > > KMessage is the "frontend" API static class developers use the display
> > > a message. You must supply a KMessageHandler to work properly.
> > >
> > > KMessageHandler is the abstract class for the message handle.
> > >
> > > kdeui: KMessageBoxMessageHandler and KPassivePopupMessageHandler
> > > Those are obvious, there are KMessageHandler implementation that
> > > developers can use right away.
> >
> > [...]
> >
> > That's way cool!
> >
> > I'd like to make some suggestions wrt default settings.
> > - KMessageBoxMessageHandler should be set by default in KApplication such
> > that GUI-applications work "as expected".
>
> I'd add that K*MessageHandler should not even be public API
>
> maybe
> KGlobal::setDefaultMessageHandler( enum{ StdErr, MessageBox, PassivePopup }
> ) or something similair
No, the goal is for applications to develop their own KMessageHandler, I don't
want to limit them.
As for KMessageBox and KPassivePopup message handler, I provide then for
convience, so people doesn't need to reinvent the wheel. Also these could be
assured that it respect the new KDE HIG and standards.
I find this more easy for people, expectialy newcomers. You want your message
to be passive popup ? then just use KPassivePopup message handler.
> > - The default handler should write to stderr, not to stdout. Otherwise,
> > implementing filters becomes more difficult than necessary.
>
> - Another feature that can be usefull (specially for information message
> box) is the "don't show again"
Then use KMessageBox directly.
> - using queued message box instead would be nice.
Can be done.
--
Michaël Larouche
KDE developer working on Kopete, Kamefu, Solid...on dial-up :P
--------------------------------------
Website: http://www.tehbisnatch.org/
MSN/Email: michael.larouche at kdemail.net
IRC: irc.freenode.org/DarkShock on #kopete,#solid,#kamefu,#plasma
Jabber: darkshock at myjabber.net
More information about the kde-core-devel
mailing list