Re: ? gnome_startup_acquire_token in GNOME2



> On Tue, 2002-11-05 at 12:18, Sergey V. Udaltsov wrote:
> > Bad, very bad. I know it was hardcoded in gnome 1 but I expected some
> > changes in gnome2:( So people will just see some gnomish foot trace,
> > won't they?
> 	Terrible that no-one (like you) has fixed it - I personally don't need
> that feature.
Well, I did not feel brave (smart/experienced) enough to work on gnome
core sources. But if you insist :) - I could prepare some patch. The
problem is that I work with the gnome from RH8.0 - which is out of date.
Was gnome-session changed a lot since July?

> 	I've precisely no idea what you want that API for, or what it did in
> Gnome 1.4, and/or whether it's a good idea to have it. Can you state the
> problem you are trying to solve in a clear fashion.
I will try to explain. gnome_startup_acquire_token can be considered as
an atomic "check and conditionally set" function. The first parameter
(char*) is a kind of key. So when I wrote

if ( gnome_startup_acquire_token( "SOME_MY_KEY",
                                  gnome_client_get_id( client ) ) )
{
  // some code
}

I could be sure that my code is executed once per gnome session. Very
simple. I know I can work with OS-dependant mutexes, root window
properties etc - but gnome did all this work for me (well, at least I
believed it did). How can I code the same logic in GNOME 2?

-- 
Sergey




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]