Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2007-01-08 19:04:26 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2007-01-08 19:04:26 (GMT)
commit8c83adb77352c7b8457b14efecc254a1d3f20a2e (patch)
tree37cabc10a209a3b84df763cff1ac1c66eb3e5de8
parent64135b8c178595cba4696564a83134b0568a75ea (diff)
Bump requirements to dbus-glib 0.71 and drop all ifdefs used.
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
-rw-r--r--ChangeLog8
-rw-r--r--configure.ac5
-rw-r--r--shell/ev-application.c15
-rw-r--r--shell/main.c61
4 files changed, 12 insertions, 77 deletions
diff --git a/ChangeLog b/ChangeLog
index e118c34..3e92a15 100644
--- 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:
diff --git a/configure.ac b/configure.ac
index 8a21c50..b59e00d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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"
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, &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;
}