[Kazehakase-cvs] CVS update: kazehakase/src/mozilla

Back to archive index

Hiroyuki Ikezoe ikezo****@users*****
Mon Dec 4 11:19:18 JST 2006


Index: kazehakase/src/mozilla/kz-mozembed.cpp
diff -u kazehakase/src/mozilla/kz-mozembed.cpp:1.211 kazehakase/src/mozilla/kz-mozembed.cpp:1.212
--- kazehakase/src/mozilla/kz-mozembed.cpp:1.211	Sun Dec  3 19:59:07 2006
+++ kazehakase/src/mozilla/kz-mozembed.cpp	Mon Dec  4 11:19:18 2006
@@ -64,6 +64,7 @@
 #include <nsIDOMNamedNodeMap.h>
 #include <nsIDOMDocumentRange.h>
 #include <nsIDOMDocumentFragment.h>
+#include <nsIDOM3Document.h>
 #include <nsIDOMText.h>
 #include <webbrowserpersist/nsIWebBrowserPersist.h>
 #include <nsIWebBrowserFind.h>
@@ -1030,6 +1031,17 @@
 				gchar *time;
 				gchar *timestamp_file;
 				const gchar *title = kz_moz_embed_get_title(KZ_EMBED(kzembed));
+	
+				nsCOMPtr<nsIDOM3Document> dom3doc = do_QueryInterface(domDoc);
+				dom3doc->GetInputEncoding(value);
+				NS_UTF16ToCString(value,
+						  NS_CSTRING_ENCODING_UTF8, cValue);
+				gchar *encoding = g_strdup(cValue.get());
+
+				priv->wrapper->GetBodyString(value);
+				NS_UTF16ToCString(value,
+						  NS_CSTRING_ENCODING_UTF8, cValue);
+				const gchar *contents = cValue.get();
 
 				timestamp_file = g_strconcat(g_get_home_dir(),
 							  HISTORY_DIR,
@@ -1052,10 +1064,11 @@
 #if USE_HYPERESTRAIER
 				KzSearch *search = kz_search_new("hyperestraier");
 				if (search)
-					kz_search_register_document(search, filename, title, last_modified);
+					kz_search_register_document(search, filename, encoding, title, contents, last_modified);
 #elif USE_RAST
 				g_idle_add(rast_update_index, filename);
 #endif
+				g_free(encoding);
 				g_free(timestamp_file);
 				g_free(time);
 			}


More information about the Kazehakase-cvs mailing list
Back to archive index