[Kazehakase-cvs] CVS update: kazehakase/module/search

Back to archive index

Hiroyuki Ikezoe ikezo****@users*****
Sun Dec 31 21:50:37 JST 2006


Index: kazehakase/module/search/Makefile.am
diff -u kazehakase/module/search/Makefile.am:1.5 kazehakase/module/search/Makefile.am:1.6
--- kazehakase/module/search/Makefile.am:1.5	Wed Dec  6 14:54:55 2006
+++ kazehakase/module/search/Makefile.am	Sun Dec 31 21:50:37 2006
@@ -38,7 +38,11 @@
 
 search_LTLIBRARIES += librast.la
 
+search_common_sources = 
+	kz-search-common.h
+
 librast_la_SOURCES = \
+	$(search_common_sources) \
 	kz-search-rast.h kz-search-rast.c
 librast_la_LIBADD = $(EST_LIBS)
 librast_la_CPPFLAGS = $(EST_CFLAGS)
@@ -47,6 +51,7 @@
 search_LTLIBRARIES += libhyperestraier.la
 
 libhyperestraier_la_SOURCES = \
+	$(search_common_sources) \
 	kz-search-hyper-estraier.h kz-search-hyper-estraier.c
 libhyperestraier_la_LIBADD = $(EST_LIBS)
 libhyperestraier_la_CPPFLAGS = $(EST_CFLAGS)
Index: kazehakase/module/search/kz-search-hyper-estraier.c
diff -u kazehakase/module/search/kz-search-hyper-estraier.c:1.21 kazehakase/module/search/kz-search-hyper-estraier.c:1.22
--- kazehakase/module/search/kz-search-hyper-estraier.c:1.21	Wed Dec  6 18:48:48 2006
+++ kazehakase/module/search/kz-search-hyper-estraier.c	Sun Dec 31 21:50:37 2006
@@ -28,32 +28,12 @@
 #include "kazehakase.h"
 #include "utils/utils.h"
 #include "glib-utils.h"
+#include "kz-search-common.h"
 #include "kz-search-hyper-estraier.h"
 #include "egg-pixbuf-thumbnail.h"
 
 #define HISTORY_INDEX "history_index.hest"
 
-#define DTD   "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">"
-#define HEAD  "<head>\n" \
-	      "  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>" \
-	      "  <title>Full-text search in history</title>\n" \
-	      "  <link rel=\"stylesheet\" type=\"text/css\" href=\"history-search:?css=search-result.css\">\n" \
-	      "</head>\n"
-#define HEADER  ""
-#define CONTENT "<div class=\"content\">\n" \
-	        "  <div class=\"header\"><span class=\"title\"><a href=\"%s\">%s</a></span></div>\n" \
-		"    <div class=\"summary\"><img src=\"%s\" class=\"thumbnail\">\n" \
-		"    <span class=\"sentence\">%s</span>\n" \
-		"  </div>\n" \
-		"  <div class=\"footer\">\n" \
-		"    <span class=\"uri\">%s</span>\n" \
-		"    %s\n" \
-		"    <span class=\"date\">%s</span>\n" \
-		"  </div>\n" \
-		"</div>\n"
-#define FOOTER  "<div class=\"footer\">\n" \
-	        "Powered by <a href=\"%s\">Hyper Estraier</a> version %s\n" \
-		"</div>\n"
 
 typedef struct _KzSearchHyperEstraierPrivate	KzSearchHyperEstraierPrivate;
 struct _KzSearchHyperEstraierPrivate
@@ -476,7 +456,7 @@
 	db = est_mtdb_open(priv->dbname, ESTDBREADER, &ecode);
 	if (!db)
 	{
-		g_warning("error: %s", est_err_msg(ecode));
+		g_warning("db open error: %s", est_err_msg(ecode));
 		return FALSE;
 	}
 
@@ -487,7 +467,7 @@
 
 	ret = est_mtdb_close(db, &ecode);
 	if (!ret)
-		g_warning("error: %s", est_err_msg(ecode));
+		g_warning("db close error: %s", est_err_msg(ecode));
 
 	return (success != 0) ? TRUE : FALSE;
 }
@@ -502,7 +482,7 @@
 	db = est_mtdb_open(priv->dbname, ESTDBREADER, &ecode);
 	if (!db)
 	{
-		g_warning("error: %s", est_err_msg(ecode));
+		g_warning("db open error: %s", est_err_msg(ecode));
 		return FALSE;
 	}
 
@@ -510,7 +490,7 @@
 
 	ret = est_mtdb_close(db, &ecode);
 	if (!ret)
-		g_warning("error: %s", est_err_msg(ecode));
+		g_warning("db close error: %s", est_err_msg(ecode));
 #warning FIXME! return GSource or something.
 	return 0;
 }


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