Re: how to end a session



Maarten Ditzel <ditzel cobalt et tudelft nl> writes:
> Actually this is what I tried already:
> 
> 1st)
>     gnome_client_request_save (gnome_master_client(), GNOME_SAVE_BOTH,
> TRUE,
>                                GNOME_INTERACT_ANY, 0, 1);
> 
> 2nd)
>     gnome_client_request_save (gnome_master_client(), GNOME_SAVE_BOTH,
> TRUE,
>                                GNOME_INTERACT_ANY, 0, 1);
>     gtk_signal_emit_by_name(GTK_OBJECT(gnome_master_client()), "die");
> 
> both compile and execute without problemns, however gnome is not ended.
> Maybe I send the request to the wrong client. If so, any idea which
> client to send it to ?

You don't want the signal_emit_by_name(), that's just in your own
process, not useful.

gnome_master_client() is right. But maybe you aren't connected to the
session manager - try the same code in a standalone GNOME app instead
of an applet? Try gnome_client_is_connected() or whatever that
function is called?

Havoc



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