Re: how to end a session

>>>>> "Maarten" == Maarten Ditzel <ditzel cobalt et tudelft nl> writes:

Maarten>   gnome_client_request_save (gnome_master_client(), GNOME_SAVE_BOTH,
Maarten> TRUE,
Maarten>                              GNOME_INTERACT_ANY, 0, 1);

Maarten>   return 0;

Maarten> Does not work. Digging a bit deeper in the library
Maarten> documentation (especially GnomeClient docs
Maarten> gives me the idea that gnome_master_client does not point to
Maarten> a "global gnome client", but to the current application
Maarten> itself. But I still don't get why in gnome-core/gsm/save.c
Maarten> gnome_client_request_save(...) works.

The master client is an object that is automatically created by
gnome_init.  It represents the main connection to the session manager.

Your problem is that gnome_client_request_save sends a message over
a network connection to the session manager.  So, you have to enter
the main loop for this processing to happen.

See the `save-session' program for an example:


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