Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--browser-plugin/plugin.cpp15
-rw-r--r--browser-plugin/plugin.h3
2 files changed, 17 insertions, 1 deletions
diff --git a/browser-plugin/plugin.cpp b/browser-plugin/plugin.cpp
index c8a7de7..db1f4f5 100644
--- a/browser-plugin/plugin.cpp
+++ b/browser-plugin/plugin.cpp
@@ -26,7 +26,8 @@
Plugin::Plugin (NPP instance) : mInstance (instance),
mScriptableObject (0),
mWindow (0),
- mLoadJob (0)
+ mLoadJob (0),
+ mTitle (0)
{
mScrolledWindow = gtk_scrolled_window_new (NULL, NULL);
@@ -56,6 +57,8 @@ Plugin::~Plugin ()
{
ClearLoadJob ();
+ g_free (mTitle);
+
if (mScriptableObject) {
NPN_ReleaseObject (mScriptableObject);
mScriptableObject = 0;
@@ -228,6 +231,16 @@ Plugin::LoadJobFinishedCallback (EvJob *job, gpointer data)
if (!ev_job_is_failed (job)) {
ev_view_set_document (EV_VIEW(plugin->mView),
EV_JOB (job)->document);
+
+ EvDocumentInfo *doc_info = ev_document_get_info (EV_JOB (job)->document);
+ if (doc_info) {
+ if (doc_info->fields_mask & EV_DOCUMENT_INFO_TITLE) {
+
+ plugin->mTitle = g_strdup (doc_info->title);
+ }
+
+ ev_document_info_free (doc_info);
+ }
} else {
plugin->ShowLoadingError ();
}
diff --git a/browser-plugin/plugin.h b/browser-plugin/plugin.h
index 9c24630..58fbc96 100644
--- a/browser-plugin/plugin.h
+++ b/browser-plugin/plugin.h
@@ -59,6 +59,9 @@ class Plugin {
GtkWidget *mScrolledWindow;
GtkWidget *mView;
EvJob *mLoadJob;
+
+ public:
+ char *mTitle;
};
void* NPN_MemDup (const void *aMem, uint32 aLen);