[PATCH] Re: Help, Ok, Cancel KStandardGuiItems

Allen Winter winter at kde.org
Mon Sep 1 23:35:48 BST 2008


On Sunday 31 August 2008 19:46:40 David Jarvie wrote:
> Le Sat 30 August 2008 16:06:20 Allen Winter, vous avez écrit :
> > On Saturday 30 August 2008 10:44:16 Allen Winter wrote:
> > > On Saturday 30 August 2008 09:34:32 David Jarvie wrote:
> > > > Le Fri 29 August 2008 23:20:02 Allen Winter, vous avez écrit :
> > > > > On Friday 29 August 2008 16:25:30 Allen Winter wrote:
> > > > > > Howdy,
> > > > > >
> > > > > > I noticed that the Help ,Ok and Cancel buttons in KDialogs
> > > > > > don't have tooltips or whatsthis. (Help has a tooltip, but no
> > > > > > whatsthis).
> > > > > >
> > > > > > This is due to those settings missing in KStandardGuiItems::ok(),
> > > > > > et.al.
> > > > > >
> > > > > > Is there a good reason for this?  Should I add the
> > > > > > tooltips/whatthis to the KStandardGuiItems? Or not? Or maybe add
> > > > > > them into
> > > > > > the KDialog class directly?
> > > > >
> > > > > Attached is a patch for review that makes sure Help, Ok and Cancel
> > > > > have tooltips and whatsthis.  Let me know if I can commit.
> > > > > Or if you have better text.
> > > >
> > > > OK and Cancel buttons are not only used in the context of applying
> > > > changes. As an example of kdelibs use which doesn't conform to this,
> > > > Cancel is used in the continue/cancel variant of KMessageBox, where it
> > > > means "don't proceed with the operation which I kicked off". There will
> > > > also be many uses in applications in all sorts of circumstances. So
> > > > it's hard to envisage a generally applicable tooltip or whatsthis which
> > > > expands to anything more than the actual button text ("Cancel" or "OK")
> > > > - not a particularly useful thing to do. Better to leave the tooltips
> > > > and whatsthis texts unset.
> > >
> > > Good point.
> > > Do you think we could generalize the tooltips/whatsthis in KDialog
> > > for the Cancel, OK and Help?  If so, I can provide a patch for that.
> >
> > Attached is such a patch.
> > Let me know if you think this works better.
> 
> I don't think that you can generalise with KDialog either. Before proceeding 
> with the patch, it would be necessary to look at a good selection of examples 
> of how applications use KDialog classes. Speaking for KAlarm, there is at 
> least one example of a KDialog which uses OK and Cancel but which isn't about 
> applying changes - it's about selecting from a list for further processing.
> 
> Perhaps instead an option to use your tooltips/whatsthis texts might be 
> offered in KDialog?
> 
Ok, I'll drop this.

So this means unfortunately, that I need to hand-set the tooltips/whatsthis
for a bunch of KDialog subclasses in kdepim.




More information about the kde-core-devel mailing list