[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    K*View configuration change (Re: kdelibs/kdeui)
From:       David Faure <david () mandrakesoft ! com>
Date:       2000-03-16 0:10:37
[Download RAW message or body]

On Thu, Mar 16, 2000 at 01:00:24AM +0100, Michael Reiher wrote:
> BTW:
> You commented out something like this(and I expanded it to the other
> classes in KGlobalSettings):
>   static int doubleClicks = -1;
>   if(doubleClicks == -1)
>   {
>    ...
>   }
> 
> I thought it makes it possible to notice changes of these settings at
> runtime.
Yes - I left a comment about this, IIRC. Or perhaps I removed it.
But I was wrong anyway, see below.

> Which really makes sence for e.g. KDesktop(at least for the
> mouse stuff). Was that also your intend?
Yes, all those settings should apply without restarting KDE, right ? :-)

> But somehow I have to restart Konqy to make the changes take effect. Do
> they perhaps get cached by KConfig?

Exactly. A reparseConfiguration is needed, but how do we know WHEN to do
that. Well, two solutions:
* using DCOP - this means turning each K*View into a DCOPObject, and
notifying all apps (with a broadcast) when such a change happens - this
is what I did for ksycoca (the databaseChanged() signal)

* the KApplication solution for other global settings. Can't remember
the technical details anymore (some XAtom message passing ?).
This is perhaps better because more consistent with the other
settings (fonts, colors, themes, styles....).

Anybody knowing the kapp solution : please advise !

In any case, whether we do one or the other, we will be able to get rid
of the (useless) polling that the code currently tries to do 
(checkSettings() in each method). Instead, the *view will get _notified_,
which is much better, and will then reparseConfiguration() before
calling KGlobalSettings::blah().

-- 
David FAURE
david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/
KDE, Making The Future of Computing Available Today

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic