gnome-web-photo r127 - trunk/src



Author: chpe
Date: Wed Mar 25 11:38:12 2009
New Revision: 127
URL: http://svn.gnome.org/viewvc/gnome-web-photo?rev=127&view=rev

Log:
Fix build with xulrunner 1.9.1. Bug #576674, based on a patch by Jan Horak.

Modified:
   trunk/src/Writer.cpp

Modified: trunk/src/Writer.cpp
==============================================================================
--- trunk/src/Writer.cpp	(original)
+++ trunk/src/Writer.cpp	Wed Mar 25 11:38:12 2009
@@ -42,6 +42,7 @@
 #include <nsIDeviceContext.h>
 #include <nsIViewManager.h>
 #include <nsIScrollableView.h>
+#include <nsIDOMNSDocument.h>
 #include <gfxContext.h>
 #include <gfxPlatform.h>
 #include <nsRect.h>
@@ -95,7 +96,11 @@
   NS_ENSURE_SUCCESS (rv, PR_FALSE);
 
   /* Get document information */
-  CopyUTF16toUTF8 (doc->GetDocumentTitle(), mTitle);
+  nsString title;
+  nsCOMPtr<nsIDOMNSDocument> domNSDoc = do_QueryInterface(doc);
+  if (domNSDoc)
+    domNSDoc->GetTitle(title);
+  CopyUTF16toUTF8 (title, mTitle);
 
   nsIURI *uri = doc->GetDocumentURI();
   if (uri) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]