[haiku-development] Re: 24 h change was (Re: Re: Small Time preflet patch)

  • From: Julun <HOST.HAIKU@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 18 Oct 2007 10:47:10 +0200

Hi,

Ingo Weinhold schrieb:
On 2007-10-17 at 17:15:52 [+0200], Philippe Houdoin <philippe.houdoin@xxxxxxx> wrote:
Quoting Rene Gollent <anevilyak@xxxxxxxxx>:

Would it make sense to send a BMessage to all running apps when this
changes? This shouldn't be difficult to do via the roster, and
shouldn't affect compat since apps which don't recognize the message
will simply do nothing with it. This still leaves the issue of reading
the setting from disk when the app first starts but this could be
relocated to an API call.
+1

BRoster::Broadcast(BMessage *) was designed exactly for such needs.

Let's defined some (future) Locale Kit system messages:
B_LOCALE_TIME_FORMAT_CHANGED or similar, and let the receiving apps handle this
notification by calling the (future) Locale Kit to get the new time format.
For multicasting this notification, we always could add a watch_locale_changes()
 API to the Locale Kit...

We don't really needs another notification system, as we already have one simple enough. The Input Device "kit" does it, for example. Subscriptions are handled by the kit itself (watch_input_devices()), why the (future) Locale Kit can't as
well!?

In case of watch_input_devices() there's an entity (the input server), that manages subscriptions (respectively will do earlier or later) and the current state of the data in question.

Anyway, I agree, we can add a private message code and a private function to retrieve the data, and review those later.

I suppose at some point we should start to track new private/experimental APIs somewhere.

CU, Ingo


thx for all the comments so far. as it seems there will be no locale kit in the near future and there are a lot of ways how things could be done, i would simply stay with what's there atm. that means i reuse as much as code from deskbar and tracker and simple centralize the settings in one place. this should be possible without touching to much, as both are capable of handling things.

thx all,
Julun

Other related posts: