+static void
+ev_window_emit_doc_loaded (EvWindow *window)
+{
+ GDBusConnection *connection;
+ GError *error = NULL;
+
+ if (window->priv->dbus_object_id <= 0)
+ return;
+
+ connection = ev_application_get_dbus_connection (EV_APP);
+ if (!connection)
+ return;
+
+ g_dbus_connection_emit_signal (connection,
+ NULL,
+ window->priv->dbus_object_path,
+ EV_WINDOW_DBUS_INTERFACE,
+ "DocumentLoaded",
+ g_variant_new("(s)", window->priv->uri),
+ &error);
+ if (error) {
+ g_printerr ("Failed to emit DBus signal DocumentLoaded: %s\n",
+ error->message);
+ g_error_free (error);
+
+ return;
+ }
+}
+