From 8c83adb77352c7b8457b14efecc254a1d3f20a2e Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Mon, 08 Jan 2007 19:04:26 +0000 Subject: Bump requirements to dbus-glib 0.71 and drop all ifdefs used. 2007-01-08 Carlos Garcia Campos * configure.ac: * shell/ev-application.c: (ev_application_register_service): * shell/main.c: (load_files_remote): Bump requirements to dbus-glib 0.71 and drop all ifdefs used. svn path=/trunk/; revision=2201 --- (limited to 'shell') diff --git a/shell/ev-application.c b/shell/ev-application.c index aee7390..f669c14 100644 --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -75,7 +75,6 @@ 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, @@ -83,14 +82,6 @@ ev_application_register_service (EvApplication *application) 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 g_object_unref (driver_proxy); @@ -98,14 +89,8 @@ ev_application_register_service (EvApplication *application) return FALSE; } -#if DBUS_VERSION == 33 - dbus_g_object_class_install_info (G_OBJECT_GET_CLASS (application), - &dbus_glib_ev_application_object_info); -#else dbus_g_object_type_install_info (EV_TYPE_APPLICATION, &dbus_glib_ev_application_object_info); -#endif - dbus_g_connection_register_g_object (connection, "/org/gnome/evince/Evince", G_OBJECT (application)); diff --git a/shell/main.c b/shell/main.c index 3c5a83d..0a653d1 100644 --- a/shell/main.c +++ b/shell/main.c @@ -180,7 +180,6 @@ load_files (const char **files, } #ifdef ENABLE_DBUS - static gboolean load_files_remote (const char **files, GHashTable *args) @@ -189,9 +188,6 @@ load_files_remote (const char **files, GError *error = NULL; DBusGConnection *connection; gboolean result = FALSE; -#if DBUS_VERSION < 35 - DBusGPendingCall *call; -#endif DBusGProxy *remote_object; GdkDisplay *display; guint32 timestamp; @@ -212,31 +208,6 @@ load_files_remote (const char **files, "/org/gnome/evince/Evince", "org.gnome.evince.Application"); if (!files) { -#if DBUS_VERSION <= 33 - call = dbus_g_proxy_begin_call (remote_object, "OpenWindow", - DBUS_TYPE_UINT32, ×tamp, - DBUS_TYPE_INVALID); - - if (!dbus_g_proxy_end_call (remote_object, call, &error, DBUS_TYPE_INVALID)) { - g_warning (error->message); - g_clear_error (&error); - g_object_unref (remote_object); - dbus_g_connection_unref (connection); - return FALSE; - } -#elif DBUS_VERSION == 34 - call = dbus_g_proxy_begin_call (remote_object, "OpenWindow", - G_TYPE_UINT, timestamp, - G_TYPE_INVALID); - - if (!dbus_g_proxy_end_call (remote_object, call, &error, G_TYPE_INVALID)) { - g_warning (error->message); - g_clear_error (&error); - g_object_unref (remote_object); - dbus_g_connection_unref (connection); - return FALSE; - } -#else if (!dbus_g_proxy_call (remote_object, "OpenWindow", &error, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), args, G_TYPE_UINT, timestamp, @@ -248,7 +219,7 @@ load_files_remote (const char **files, dbus_g_connection_unref (connection); return FALSE; } -#endif + g_object_unref (remote_object); dbus_g_connection_unref (connection); @@ -261,33 +232,7 @@ 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 <= 33 - call = dbus_g_proxy_begin_call (remote_object, "OpenURI", - DBUS_TYPE_STRING, &uri, - DBUS_TYPE_STRING, &page_label, - DBUS_TYPE_UINT32, ×tamp, - DBUS_TYPE_INVALID); - - if (!dbus_g_proxy_end_call (remote_object, call, &error, DBUS_TYPE_INVALID)) { - g_warning (error->message); - g_clear_error (&error); - g_free (uri); - continue; - } -#elif DBUS_VERSION == 34 - call = dbus_g_proxy_begin_call (remote_object, "OpenURI", - G_TYPE_STRING, uri, - G_TYPE_STRING, page_label, - G_TYPE_UINT, timestamp, - G_TYPE_INVALID); - - if (!dbus_g_proxy_end_call (remote_object, call, &error, G_TYPE_INVALID)) { - g_warning (error->message); - g_clear_error (&error); - g_free (uri); - continue; - } -#else + if (!dbus_g_proxy_call (remote_object, "OpenURI", &error, G_TYPE_STRING, uri, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), args, @@ -299,7 +244,7 @@ load_files_remote (const char **files, g_free (uri); continue; } -#endif + g_free (uri); result = TRUE; } -- cgit v0.9.1