]> www.fi.muni.cz Git - evince.git/commitdiff
Bump requirements to dbus-glib 0.71 and drop all ifdefs used.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 8 Jan 2007 19:04:26 +0000 (19:04 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Mon, 8 Jan 2007 19:04:26 +0000 (19:04 +0000)
2007-01-08  Carlos Garcia Campos  <carlosgc@gnome.org>
* 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

ChangeLog
configure.ac
shell/ev-application.c
shell/main.c

index e118c340e66d56eea3d70e1e75d116671088ac9f..3e92a159e4f93f9e2d3197bcd61a0804a609c8e2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-01-08  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * 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.
+
 2007-01-08  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * doc/debugging.txt:
index 8a21c50b3ffe8bf1c8582bfbb61803ddcd40a1d4..b59e00d38acd661a42ac812a1e0658216a25bae2 100644 (file)
@@ -40,7 +40,7 @@ dnl Check dependencies
 # SHELL_CFLAGS     for shell implementation.
 # SHELL_LIBS
 
-DBUS_GLIB_REQUIRED=0.33
+DBUS_GLIB_REQUIRED=0.71
 GTK_REQUIRED=2.8.15
 KEYRING_REQUIRED=0.4.0
 
@@ -129,9 +129,6 @@ if test "x$enable_dbus" = "xyes" ; then
         fi                                            
 
         AC_DEFINE([ENABLE_DBUS],[1],[Define if DBUS support is enabled])
-
-       DBUS_VERSION=`$PKG_CONFIG --modversion dbus-glib-1 | sed 's/0\.\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\)/\1/'`
-       AC_DEFINE_UNQUOTED(DBUS_VERSION, $DBUS_VERSION, [DBUS version.])
 fi
 
 SHELL_CFLAGS="$SHELL_CORE_CFLAGS $DBUS_CFLAGS -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE"
index aee7390bafb270910767184d52c2d0fa1f023584..f669c140965745753cc108e475e8e98ccdfb6040 100644 (file)
@@ -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));
index 3c5a83d33b1226c0646aa2f33ec61970e9451062..0a653d1a8f76c9b125a5b6b1b027f8a299c3aea0 100644 (file)
@@ -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, &timestamp,
-                                               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, &timestamp,
-                                               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;
         }