X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=cut-n-paste%2Fsmclient%2Feggsmclient-xsmp.c;h=20cd23b10c36aef19d507c1eca345e49165fc7d6;hb=93fd3a3317a107cc56815bd81f29984fc0330878;hp=d4cc9dcf5a7259b39e71caf9b06d8463f80e02c4;hpb=f2678ccd74f0f7a31c056d0e441a8bfaf3f9e34c;p=evince.git diff --git a/cut-n-paste/smclient/eggsmclient-xsmp.c b/cut-n-paste/smclient/eggsmclient-xsmp.c index d4cc9dcf..20cd23b1 100644 --- a/cut-n-paste/smclient/eggsmclient-xsmp.c +++ b/cut-n-paste/smclient/eggsmclient-xsmp.c @@ -36,6 +36,7 @@ #include #include +#include #define EGG_TYPE_SM_CLIENT_XSMP (egg_sm_client_xsmp_get_type ()) #define EGG_SM_CLIENT_XSMP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_SM_CLIENT_XSMP, EggSMClientXSMP)) @@ -367,7 +368,11 @@ sm_client_xsmp_startup (EggSMClient *client, free (ret_client_id); gdk_threads_enter (); +#if !GTK_CHECK_VERSION(2,91,7) && !GTK_CHECK_VERSION(3,0,0) gdk_set_sm_client_id (xsmp->client_id); +#else + gdk_x11_set_sm_client_id (xsmp->client_id); +#endif gdk_threads_leave (); g_debug ("Got client ID \"%s\"", xsmp->client_id); @@ -1052,13 +1057,13 @@ generate_command (char **restart_command, const char *client_id, if (client_id) { - g_ptr_array_add (cmd, "--sm-client-id"); + g_ptr_array_add (cmd, (char *)"--sm-client-id"); g_ptr_array_add (cmd, (char *)client_id); } if (state_file) { - g_ptr_array_add (cmd, "--sm-client-state-file"); + g_ptr_array_add (cmd, (char *)"--sm-client-state-file"); g_ptr_array_add (cmd, (char *)state_file); } @@ -1141,7 +1146,7 @@ array_prop (const char *name, ...) prop = g_new (SmProp, 1); prop->name = (char *)name; - prop->type = SmLISTofARRAY8; + prop->type = (char *)SmLISTofARRAY8; vals = g_array_new (FALSE, FALSE, sizeof (SmPropValue)); @@ -1175,7 +1180,7 @@ ptrarray_prop (const char *name, GPtrArray *values) prop = g_new (SmProp, 1); prop->name = (char *)name; - prop->type = SmLISTofARRAY8; + prop->type = (char *)SmLISTofARRAY8; vals = g_array_new (FALSE, FALSE, sizeof (SmPropValue)); @@ -1205,7 +1210,7 @@ string_prop (const char *name, const char *value) prop = g_new (SmProp, 1); prop->name = (char *)name; - prop->type = SmARRAY8; + prop->type = (char *)SmARRAY8; prop->num_vals = 1; prop->vals = g_new (SmPropValue, 1); @@ -1230,7 +1235,7 @@ card8_prop (const char *name, unsigned char value) prop = g_new (SmProp, 1); prop->name = (char *)name; - prop->type = SmCARD8; + prop->type = (char *)SmCARD8; prop->num_vals = 1; prop->vals = g_new (SmPropValue, 2);