...
This commit is contained in:
parent
b1c7811e89
commit
3886f0ecac
3 changed files with 28 additions and 9 deletions
|
@ -196,10 +196,11 @@ msm_client_begin_interact (MsmClient *client)
|
||||||
SmsInteract (client->cnxn);
|
SmsInteract (client->cnxn);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
msm_client_save (MsmClient *client,
|
internal_save (MsmClient *client,
|
||||||
gboolean allow_interaction,
|
int save_style,
|
||||||
gboolean shut_down)
|
gboolean allow_interaction,
|
||||||
|
gboolean shut_down)
|
||||||
{
|
{
|
||||||
if (client->state != MSM_CLIENT_STATE_IDLE)
|
if (client->state != MSM_CLIENT_STATE_IDLE)
|
||||||
{
|
{
|
||||||
|
@ -212,12 +213,30 @@ msm_client_save (MsmClient *client,
|
||||||
client->state = MSM_CLIENT_STATE_SAVING;
|
client->state = MSM_CLIENT_STATE_SAVING;
|
||||||
|
|
||||||
SmsSaveYourself (client->cnxn,
|
SmsSaveYourself (client->cnxn,
|
||||||
SmSaveBoth, /* This arg makes no sense whatsoever */
|
save_style,
|
||||||
shut_down,
|
shut_down,
|
||||||
allow_interaction ? SmInteractStyleAny : SmInteractStyleNone,
|
allow_interaction ? SmInteractStyleAny : SmInteractStyleNone,
|
||||||
FALSE /* not "fast" */);
|
FALSE /* not "fast" */);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
msm_client_save (MsmClient *client,
|
||||||
|
gboolean allow_interaction,
|
||||||
|
gboolean shut_down)
|
||||||
|
{
|
||||||
|
internal_save (client, SmSaveBoth, /* ? don't know what to do here */
|
||||||
|
allow_interaction, shut_down);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
msm_client_initial_save (MsmClient *client)
|
||||||
|
{
|
||||||
|
/* This is the save on client registration in the spec under
|
||||||
|
* RegisterClientReply
|
||||||
|
*/
|
||||||
|
internal_save (client, SmSaveLocal, allow_interaction, shut_down);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
msm_client_shutdown_cancelled (MsmClient *client)
|
msm_client_shutdown_cancelled (MsmClient *client)
|
||||||
{
|
{
|
||||||
|
|
|
@ -83,6 +83,7 @@ void msm_client_begin_interact (MsmClient *client);
|
||||||
void msm_client_save (MsmClient *client,
|
void msm_client_save (MsmClient *client,
|
||||||
gboolean allow_interaction,
|
gboolean allow_interaction,
|
||||||
gboolean shut_down);
|
gboolean shut_down);
|
||||||
|
void msm_client_initial_save (MsmClient *client);
|
||||||
void msm_client_shutdown_cancelled (MsmClient *client);
|
void msm_client_shutdown_cancelled (MsmClient *client);
|
||||||
void msm_client_phase2_request (MsmClient *client);
|
void msm_client_phase2_request (MsmClient *client);
|
||||||
void msm_client_save_phase2 (MsmClient *client);
|
void msm_client_save_phase2 (MsmClient *client);
|
||||||
|
|
|
@ -238,9 +238,8 @@ register_client_callback (SmsConn cnxn,
|
||||||
|
|
||||||
free (id);
|
free (id);
|
||||||
|
|
||||||
/* FIXME ksm and gnome-session send a SaveYourself to the client
|
/* SM spec requires this initial SaveYourself. */
|
||||||
* here. I don't understand why though.
|
msm_client_initial_save (client);
|
||||||
*/
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue