PATCH: let the kcmodule decide if the defaults changed the client state

Dawit A. adawit at kde.org
Mon Dec 15 14:09:28 GMT 2003


On Sunday 14 December 2003 13:34, Sebastian Trueg wrote:
> On Sunday 14 December 2003 18:42, Dawit A. wrote:
> > On Saturday 13 December 2003 07:18, Sebastian Trueg wrote:
> > > Hy,
> > >
> > > I don't understand why the kcontrolcenter always assumes clicking the
> > > default button changes the client's state. The following patch removes
> > > this and leaves this decision to the client.
> > >
> > > May I commit or did I miss something here?
> > >
> > > Cheers,
> > > Sebastian
> > >
> > > --- kcdialog.cpp        11 Nov 2003 16:50:35 -0000      1.28
> > > +++ kcdialog.cpp        13 Dec 2003 12:16:30 -0000
> > > @@ -55,7 +55,6 @@ KCDialog::KCDialog(KCModule *client, int
> > >  void KCDialog::slotDefault()
> > >  {
> > >      _client->defaults();
> > > -    clientChanged(true);
> > >  }
> > >
> > >  void KCDialog::slotOk()
> >
> > You will break a lot of modules as a result. You will have to either
> > check and fix all the modules or simply emit changed(false) in your own
> > module's default function...
>
> i do that but it gets overridden. What about switching the statements to
> void KCDialog::slotDefault()
> {
>     clientChanged(true);
>      _client->defaults();
> }
> would that break things?

Ah... I see. I think reversing the two calls should be okay. 

-- 
Regards,
Dawit A.
"Preach what you practice, practice what you preach"




More information about the kde-core-devel mailing list