+ uri = gnome_vfs_make_uri_from_shell_arg (files[i]);
+ ev_application_open_uri (EV_APP, uri, ev_page_label, NULL);
+ g_free (uri);
+ }
+}
+
+#ifdef ENABLE_DBUS
+static gboolean
+load_files_remote (const char **files)
+{
+ int i;
+ GError *error = NULL;
+ DBusGConnection *connection;
+#if DBUS_VERSION < 35
+ DBusGPendingCall *call;
+#endif
+ DBusGProxy *remote_object;
+
+ connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
+ if (connection == NULL) {
+ g_warning (error->message);
+ g_error_free (error);
+
+ return FALSE;
+ }
+
+ remote_object = dbus_g_proxy_new_for_name (connection,
+ "org.gnome.evince.ApplicationService",
+ "/org/gnome/evince/Evince",
+ "org.gnome.evince.Application");
+ if (!files) {
+#if DBUS_VERSION < 35
+ 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)) {
+ g_warning (error->message);
+ g_clear_error (&error);
+ return FALSE;
+ }
+#else
+ if (!dbus_g_proxy_call (remote_object, "OpenWindow", &error, G_TYPE_INVALID)) {
+ g_warning (error->message);
+ g_clear_error (&error);
+ return FALSE;
+ }
+#endif
+ return TRUE;
+ }