From 60cc60c16e52601993c77076dab3eeb9d1f0ab1a Mon Sep 17 00:00:00 2001 From: Tommi Komulainen Date: Tue, 25 Aug 2009 10:46:11 +0000 Subject: browser-plugin: notify browser of title changes PDF loading may (or may not) finish after the browser has had its change to set up the magicWrapper so let the browser know about the document title. Example: let embed = document.embeds[0]; embed.magicWrapper = { onTitleChanged: function() { // update document / page title to that of the PDF file document.title = embed.title; } }; --- (limited to 'browser-plugin/plugin.cpp') diff --git a/browser-plugin/plugin.cpp b/browser-plugin/plugin.cpp index 978f9c0..8398db3 100644 --- a/browser-plugin/plugin.cpp +++ b/browser-plugin/plugin.cpp @@ -246,6 +246,8 @@ Plugin::LoadJobFinishedCallback (EvJob *job, gpointer data) if (doc_info->fields_mask & EV_DOCUMENT_INFO_TITLE) { plugin->mTitle = g_strdup (doc_info->title); + + plugin->CallBrowser ("onTitleChanged"); } ev_document_info_free (doc_info); -- cgit v0.9.1