From: Marco Pesenti Gritti Date: Mon, 11 Jul 2005 10:25:56 +0000 (+0000) Subject: Fix for dbus 0.33. bug #309975 X-Git-Tag: EVINCE_0_3_3~125 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=b2e7a9f7c44d07a2af27c8b7a52c9fc4e19f615c;p=evince.git Fix for dbus 0.33. bug #309975 2005-07-11 Marco Pesenti Gritti * shell/main.c: (load_files_remote): Fix for dbus 0.33. bug #309975 --- diff --git a/ChangeLog b/ChangeLog index 4cf8b64b..32756913 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-07-11 Marco Pesenti Gritti + + * shell/main.c: (load_files_remote): + + Fix for dbus 0.33. bug #309975 + 2005-07-08 Marco Pesenti Gritti * properties/ev-properties-main.c: (ev_properties_get_pages): diff --git a/shell/main.c b/shell/main.c index f6600f0f..334d366e 100644 --- a/shell/main.c +++ b/shell/main.c @@ -92,7 +92,15 @@ load_files_remote (const char **files) "/org/gnome/evince/Evince", "org.gnome.evince.Application"); if (!files) { -#if DBUS_VERSION < 35 +#if DBUS_VERSION <= 33 + call = dbus_g_proxy_begin_call (remote_object, "OpenWindow", DBUS_TYPE_INVALID); + + if (!dbus_g_proxy_end_call (remote_object, call, &error, DBUS_TYPE_INVALID)) { + g_warning (error->message); + g_clear_error (&error); + return FALSE; + } +#elif DBUS_VERSION == 34 call = dbus_g_proxy_begin_call (remote_object, "OpenWindow", G_TYPE_INVALID); if (!dbus_g_proxy_end_call (remote_object, call, &error, G_TYPE_INVALID)) { @@ -117,7 +125,18 @@ load_files_remote (const char **files) uri = gnome_vfs_make_uri_from_shell_arg (files[i]); page_label = ev_page_label ? ev_page_label : ""; -#if DBUS_VERSION < 35 +#if DBUS_VERSION <= 33 + call = dbus_g_proxy_begin_call (remote_object, "OpenURI", + DBUS_TYPE_STRING, &uri, + DBUS_TYPE_STRING, &page_label, + DBUS_TYPE_INVALID); + + if (!dbus_g_proxy_end_call (remote_object, call, &error, DBUS_TYPE_INVALID)) { + g_warning (error->message); + g_clear_error (&error); + result = FALSE; + } +#elif DBUS_VERSION == 34 call = dbus_g_proxy_begin_call (remote_object, "OpenURI", G_TYPE_STRING, uri, G_TYPE_STRING, page_label,