From: Carlos Garcia Campos Date: Sun, 12 Feb 2006 18:26:25 +0000 (+0000) Subject: Use DBUS_NAME_FLAG_DO_NOT_QUEUE flag in RequestName method when X-Git-Tag: EVINCE_0_5_1~36 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=a3cb68f63b899f5b7ea61838eaf3ade5a8c4eac9;p=evince.git Use DBUS_NAME_FLAG_DO_NOT_QUEUE flag in RequestName method when 2006-02-12 Carlos Garcia Campos * shell/ev-application.c: Use DBUS_NAME_FLAG_DO_NOT_QUEUE flag in RequestName method when dbus>=0.60, so that the request is not queued. --- diff --git a/ChangeLog b/ChangeLog index 61b2f1e8..fd14ad8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-02-12 Carlos Garcia Campos + + * shell/ev-application.c: + + Use DBUS_NAME_FLAG_DO_NOT_QUEUE flag in RequestName method when + dbus>=0.60, so that the request is not queued. + 2006-02-10 Nickolay V. Shmyrev * configure.ac: diff --git a/shell/ev-application.c b/shell/ev-application.c index 8802f68a..c0a7ea2b 100644 --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -73,12 +73,22 @@ ev_application_register_service (EvApplication *application) DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); +#if DBUS_VERSION >= 60 if (!org_freedesktop_DBus_request_name (driver_proxy, APPLICATION_SERVICE_NAME, + DBUS_NAME_FLAG_DO_NOT_QUEUE, + &request_name_result, &err)) { + g_warning ("Service registration failed."); + g_clear_error (&err); + } +#else + if (!org_freedesktop_DBus_request_name (driver_proxy, + APPLICATION_SERVICE_NAME, 0, &request_name_result, &err)) { g_warning ("Service registration failed."); g_clear_error (&err); } +#endif if (request_name_result == DBUS_REQUEST_NAME_REPLY_EXISTS) { return FALSE;