aboutsummaryrefslogtreecommitdiffstats
path: root/smclient
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-09 01:24:42 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-05-09 01:37:20 +0800
commit8a186c3588d3598857c36e2122fa68d01eba30fd (patch)
tree731078659d4e04af8346c5ca68512d8537b3707a /smclient
parent2bf3460cd3eb0853a1d10a6e36f5091898a5533f (diff)
downloadgsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar
gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.gz
gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.bz2
gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.lz
gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.xz
gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.zst
gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.zip
Coding style cleanups.
Diffstat (limited to 'smclient')
-rw-r--r--smclient/eggdesktopfile.c6
-rw-r--r--smclient/eggsmclient-xsmp.c46
2 files changed, 26 insertions, 26 deletions
diff --git a/smclient/eggdesktopfile.c b/smclient/eggdesktopfile.c
index 21f2e38209..1d094ad181 100644
--- a/smclient/eggdesktopfile.c
+++ b/smclient/eggdesktopfile.c
@@ -948,11 +948,11 @@ start_startup_notification (GdkDisplay *display,
launch_time = gdk_x11_display_get_user_time (display);
startup_id = g_strdup_printf ("%s-%lu-%s-%s-%d_TIME%lu",
g_get_prgname (),
- (unsigned long)getpid (),
+ (unsigned long) getpid (),
g_get_host_name (),
argv0,
sequence++,
- (unsigned long)launch_time);
+ (unsigned long) launch_time);
description = g_strdup_printf (_("Starting %s"), desktop_file->name);
screen_str = g_strdup_printf ("%d", screen);
@@ -1266,7 +1266,7 @@ egg_desktop_file_launchv (EggDesktopFile *desktop_file,
out:
if (env)
{
- g_ptr_array_foreach (env, (GFunc)g_free, NULL);
+ g_ptr_array_foreach (env, (GFunc) g_free, NULL);
g_ptr_array_free (env, TRUE);
}
free_document_list (translated_documents);
diff --git a/smclient/eggsmclient-xsmp.c b/smclient/eggsmclient-xsmp.c
index c838766da7..c246e17081 100644
--- a/smclient/eggsmclient-xsmp.c
+++ b/smclient/eggsmclient-xsmp.c
@@ -248,7 +248,7 @@ sm_client_xsmp_set_initial_properties (gpointer user_data)
if (cmdline && g_shell_parse_argv (cmdline, &argc, &argv, &err))
{
egg_sm_client_set_restart_command (EGG_SM_CLIENT (xsmp),
- argc, (const gchar **)argv);
+ argc, (const gchar **) argv);
g_strfreev (argv);
}
else
@@ -323,7 +323,7 @@ static void
sm_client_xsmp_startup (EggSMClient *client,
const gchar *client_id)
{
- EggSMClientXSMP *xsmp = (EggSMClientXSMP *)client;
+ EggSMClientXSMP *xsmp = (EggSMClientXSMP *) client;
SmcCallbacks callbacks;
gchar *ret_client_id;
gchar error_string_ret[256];
@@ -401,7 +401,7 @@ sm_client_xsmp_set_restart_command (EggSMClient *client,
gint argc,
const gchar **argv)
{
- EggSMClientXSMP *xsmp = (EggSMClientXSMP *)client;
+ EggSMClientXSMP *xsmp = (EggSMClientXSMP *) client;
gint i;
g_strfreev (xsmp->restart_command);
@@ -418,7 +418,7 @@ static void
sm_client_xsmp_will_quit (EggSMClient *client,
gboolean will_quit)
{
- EggSMClientXSMP *xsmp = (EggSMClientXSMP *)client;
+ EggSMClientXSMP *xsmp = (EggSMClientXSMP *) client;
if (xsmp->state == XSMP_STATE_CONNECTION_CLOSED)
{
@@ -457,7 +457,7 @@ sm_client_xsmp_end_session (EggSMClient *client,
EggSMClientEndStyle style,
gboolean request_confirmation)
{
- EggSMClientXSMP *xsmp = (EggSMClientXSMP *)client;
+ EggSMClientXSMP *xsmp = (EggSMClientXSMP *) client;
gint save_type;
/* To end the session via XSMP, we have to send a
@@ -792,7 +792,7 @@ save_state (EggSMClientXSMP *xsmp)
*/
xsmp->state = XSMP_STATE_SAVE_YOURSELF;
- state_file = egg_sm_client_save_state ((EggSMClient *)xsmp);
+ state_file = egg_sm_client_save_state ((EggSMClient *) xsmp);
if (!state_file)
{
restart = generate_command (xsmp->restart_command, xsmp->client_id, NULL);
@@ -851,7 +851,7 @@ save_state (EggSMClientXSMP *xsmp)
restart->pdata[i] = g_shell_quote (restart->pdata[i]);
g_ptr_array_add (restart, NULL);
exec = g_strjoinv (" ", (gchar **)restart->pdata);
- g_strfreev ((gchar **)restart->pdata);
+ g_strfreev ((gchar **) restart->pdata);
g_ptr_array_free (restart, FALSE);
g_key_file_set_string (state_file, EGG_DESKTOP_FILE_GROUP,
@@ -880,7 +880,7 @@ save_state (EggSMClientXSMP *xsmp)
g_get_user_config_dir (),
G_DIR_SEPARATOR, G_DIR_SEPARATOR,
g_get_prgname (),
- (long)time (NULL) + offset,
+ (long) time (NULL) + offset,
desktop_file ? "desktop" : "state");
fd = open (state_file_path, O_WRONLY | O_CREAT | O_EXCL, 0644);
@@ -1066,13 +1066,13 @@ generate_command (gchar **restart_command, const gchar *client_id,
if (client_id)
{
g_ptr_array_add (cmd, (gchar *)"--sm-client-id");
- g_ptr_array_add (cmd, (gchar *)client_id);
+ g_ptr_array_add (cmd, (gchar *) client_id);
}
if (state_file)
{
g_ptr_array_add (cmd, (gchar *)"--sm-client-state-file");
- g_ptr_array_add (cmd, (gchar *)state_file);
+ g_ptr_array_add (cmd, (gchar *) state_file);
}
for (i = 1; restart_command[i]; i++)
@@ -1103,7 +1103,7 @@ set_properties (EggSMClientXSMP *xsmp, ...)
if (xsmp->connection)
{
SmcSetProperties (xsmp->connection, props->len,
- (SmProp **)props->pdata);
+ (SmProp **) props->pdata);
}
for (i = 0; i < props->len; i++)
@@ -1134,7 +1134,7 @@ delete_properties (EggSMClientXSMP *xsmp, ...)
va_end (ap);
SmcDeleteProperties (xsmp->connection, props->len,
- (gchar **)props->pdata);
+ (gchar **) props->pdata);
g_ptr_array_free (props, TRUE);
}
@@ -1153,8 +1153,8 @@ array_prop (const gchar *name, ...)
va_list ap;
prop = g_new (SmProp, 1);
- prop->name = (gchar *)name;
- prop->type = (gchar *)SmLISTofARRAY8;
+ prop->name = (gchar *) name;
+ prop->type = (gchar *) SmLISTofARRAY8;
vals = g_array_new (FALSE, FALSE, sizeof (SmPropValue));
@@ -1167,7 +1167,7 @@ array_prop (const gchar *name, ...)
}
prop->num_vals = vals->len;
- prop->vals = (SmPropValue *)vals->data;
+ prop->vals = (SmPropValue *) vals->data;
g_array_free (vals, FALSE);
@@ -1187,8 +1187,8 @@ ptrarray_prop (const gchar *name, GPtrArray *values)
guint i;
prop = g_new (SmProp, 1);
- prop->name = (gchar *)name;
- prop->type = (gchar *)SmLISTofARRAY8;
+ prop->name = (gchar *) name;
+ prop->type = (gchar *) SmLISTofARRAY8;
vals = g_array_new (FALSE, FALSE, sizeof (SmPropValue));
@@ -1200,7 +1200,7 @@ ptrarray_prop (const gchar *name, GPtrArray *values)
}
prop->num_vals = vals->len;
- prop->vals = (SmPropValue *)vals->data;
+ prop->vals = (SmPropValue *) vals->data;
g_array_free (vals, FALSE);
@@ -1217,14 +1217,14 @@ string_prop (const gchar *name, const gchar *value)
SmProp *prop;
prop = g_new (SmProp, 1);
- prop->name = (gchar *)name;
- prop->type = (gchar *)SmARRAY8;
+ prop->name = (gchar *) name;
+ prop->type = (gchar *) SmARRAY8;
prop->num_vals = 1;
prop->vals = g_new (SmPropValue, 1);
prop->vals[0].length = strlen (value);
- prop->vals[0].value = (gchar *)value;
+ prop->vals[0].value = (gchar *) value;
return prop;
}
@@ -1242,8 +1242,8 @@ card8_prop (const gchar *name, guchar value)
*/
prop = g_new (SmProp, 1);
- prop->name = (gchar *)name;
- prop->type = (gchar *)SmCARD8;
+ prop->name = (gchar *) name;
+ prop->type = (gchar *) SmCARD8;
prop->num_vals = 1;
prop->vals = g_new (SmPropValue, 2);