Mercurial > pidgin
comparison libpurple/core.c @ 17729:1d6007400837
Style changes.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 19 May 2007 08:01:02 +0000 |
parents | a217e9b9ebc2 |
children | f160b6e84d0c |
comparison
equal
deleted
inserted
replaced
17728:9a66d81627e9 | 17729:1d6007400837 |
---|---|
297 dbus_error_init(&dbus_error); | 297 dbus_error_init(&dbus_error); |
298 reply = dbus_connection_send_with_reply_and_block(dbus_connection, msg, 5000, &dbus_error); | 298 reply = dbus_connection_send_with_reply_and_block(dbus_connection, msg, 5000, &dbus_error); |
299 dbus_message_unref(msg); | 299 dbus_message_unref(msg); |
300 dbus_error_free(&dbus_error); | 300 dbus_error_free(&dbus_error); |
301 | 301 |
302 if (reply) { | 302 if (reply) |
303 { | |
303 dbus_error_init(&dbus_error); | 304 dbus_error_init(&dbus_error); |
304 dbus_message_get_args(reply, &dbus_error, DBUS_TYPE_STRING, &remote_user_dir, DBUS_TYPE_INVALID); | 305 dbus_message_get_args(reply, &dbus_error, DBUS_TYPE_STRING, &remote_user_dir, DBUS_TYPE_INVALID); |
305 remote_user_dir = g_strdup(remote_user_dir); | 306 remote_user_dir = g_strdup(remote_user_dir); |
306 dbus_error_free(&dbus_error); | 307 dbus_error_free(&dbus_error); |
307 dbus_message_unref(reply); | 308 dbus_message_unref(reply); |
321 | 322 |
322 if ((msg = dbus_message_new_method_call(DBUS_SERVICE_PURPLE, DBUS_PATH_PURPLE, DBUS_INTERFACE_PURPLE, "PurpleBlistShow")) == NULL) | 323 if ((msg = dbus_message_new_method_call(DBUS_SERVICE_PURPLE, DBUS_PATH_PURPLE, DBUS_INTERFACE_PURPLE, "PurpleBlistShow")) == NULL) |
323 return; | 324 return; |
324 | 325 |
325 dbus_error_init(&dbus_error); | 326 dbus_error_init(&dbus_error); |
326 if ((reply = dbus_connection_send_with_reply_and_block(dbus_connection, msg, 5000, &dbus_error)) != NULL) { | 327 if ((reply = dbus_connection_send_with_reply_and_block(dbus_connection, msg, 5000, &dbus_error)) != NULL) |
328 { | |
327 dbus_message_unref(msg); | 329 dbus_message_unref(msg); |
328 } | 330 } |
329 dbus_error_free(&dbus_error); | 331 dbus_error_free(&dbus_error); |
330 } | 332 } |
331 #endif /* HAVE_DBUS */ | 333 #endif /* HAVE_DBUS */ |
332 | 334 |
333 gboolean purple_core_ensure_single_instance() | 335 gboolean |
334 { | 336 purple_core_ensure_single_instance() |
335 gboolean is_single_instance = TRUE; | 337 { |
338 gboolean is_single_instance = TRUE; | |
336 #ifdef HAVE_DBUS | 339 #ifdef HAVE_DBUS |
337 /* in the future, other mechanisms might have already set this to FALSE */ | 340 /* in the future, other mechanisms might have already set this to FALSE */ |
338 if (is_single_instance) { | 341 if (is_single_instance) |
339 if (!purple_dbus_is_owner()) { | 342 { |
343 if (!purple_dbus_is_owner()) | |
344 { | |
340 const char *user_dir = purple_user_dir(); | 345 const char *user_dir = purple_user_dir(); |
341 char *dbus_owner_user_dir = purple_dbus_owner_user_dir(); | 346 char *dbus_owner_user_dir = purple_dbus_owner_user_dir(); |
342 | 347 |
343 if (NULL == user_dir && NULL != dbus_owner_user_dir) | 348 if (NULL == user_dir && NULL != dbus_owner_user_dir) |
344 is_single_instance = TRUE; | 349 is_single_instance = TRUE; |