- GValue *new;
-
- *label = 0; label++;
-
- old = g_hash_table_lookup (args, "page-label");
-
- new = g_new0 (GValue, 1);
- g_value_init (new, G_TYPE_STRING);
- g_value_set_string (new, label);
-
- g_hash_table_insert (args, g_strdup ("page-label"), new);
-
- }
-
- ev_application_open_uri (EV_APP, uri, args,
- GDK_CURRENT_TIME, NULL);
-
- if (old)
- g_hash_table_insert (args, g_strdup ("page-label"), old);
-
- g_free (uri);
- }
-}
-
-#ifdef ENABLE_DBUS
-static gboolean
-load_files_remote (const char **files,
- GHashTable *args)
-{
- int i;
- GError *error = NULL;
- DBusGConnection *connection;
- gboolean result = FALSE;
- DBusGProxy *remote_object;
- GdkDisplay *display;
- guint32 timestamp;
-
- display = gdk_display_get_default ();
- timestamp = gdk_x11_display_get_user_time (display);
- connection = dbus_g_bus_get (DBUS_BUS_STARTER, &error);
-
- if (connection == NULL) {
- g_warning ("%s", 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_g_proxy_call (remote_object, "OpenWindow", &error,
- dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), args,
- G_TYPE_UINT, timestamp,
- G_TYPE_INVALID,
- G_TYPE_INVALID)) {
- g_warning ("%s", error->message);
- g_clear_error (&error);
- g_object_unref (remote_object);
- dbus_g_connection_unref (connection);
- return FALSE;