From kde-core-devel Thu Sep 03 23:12:14 2009 From: Olivier Goffart Date: Thu, 03 Sep 2009 23:12:14 +0000 To: kde-core-devel Subject: Re: [PATCH] Detecting notification popup server capabilities Message-Id: <200909040112.15172.ogoffart () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=125202070213728 Le Friday 04 September 2009, John Tapsell a écrit : > 2009/9/3 Marco Martin : > > they are really a model/view approach, and the model shouldn't need to > > know about the view exactly. > > I think it's reasonable for applications to optionally provide a > second string. E.g. > > KNotification *notify=new KNotification("new_message"); > notify->setText(i18n("Download complete. Click view to view") , > message->from() ); > notify->setActions( i18n("View,Ignore").split(',') ); > notify->setNoActionText(i18n("Download complete")); > > > I can't think of a decent example where you'd want different text when > no actions are available, but maybe also useful so that you could do > notify->setNoActionText("") or something for the action to be ignored > if actions aren't supported. Application should not do that. Again, they should not rely on the action being show. The text may be use by another presentation (OSD, ktts, log, ...) The action should be just additional information that may or may not be displayed. Your example is wrong, and i can't think either of a good use case for it.