[Kazehakase-cvs] CVS update: kazehakase/src

Back to archive index

Hiroyuki Ikezoe ikezo****@users*****
Sun Dec 3 15:01:00 JST 2006


Index: kazehakase/src/kz-search.c
diff -u kazehakase/src/kz-search.c:1.1 kazehakase/src/kz-search.c:1.2
--- kazehakase/src/kz-search.c:1.1	Sun Dec  3 12:35:34 2006
+++ kazehakase/src/kz-search.c	Sun Dec  3 15:01:00 2006
@@ -24,7 +24,6 @@
 #include "kazehakase.h"
 #include "glib-utils.h"
 #include "kz-search.h"
-#include "estsearch.h"
 
 typedef struct _KzSearchModule KzSearchModule;
 typedef struct _KzSearchModuleClass KzSearchModuleClass;
@@ -78,8 +77,8 @@
 		return FALSE;
 	}
 
-	s_module->init = initp;
-	s_module->exit = exitp;
+	s_module->init   = initp;
+	s_module->exit   = exitp;
 	s_module->create = createp;
 
 	s_module->init(module);
@@ -97,8 +96,8 @@
 	g_module_close(s_module->library);
 	s_module->library = NULL;
 
-	s_module->init = NULL;
-	s_module->exit = NULL;
+	s_module->init   = NULL;
+	s_module->exit   = NULL;
 	s_module->create = NULL;
 }
 
@@ -149,7 +148,7 @@
 	KzSearchModule *module;
 	KzSearch *search = NULL;
 
-	for (l = loaded_search; l != NULL; l = l->next)
+	for (l = loaded_search; l; l = l->next)
 	{
 		module = l->data;
 
@@ -188,17 +187,6 @@
 
 static void dispose      (GObject *object);
 
-#if 0
-static gchar	  *get_search_result_html     (KzSearch *search, const gchar *text);
-static KzBookmark *get_search_result_bookmark (KzSearch *search, const gchar *text);
-static gboolean    register_document          (KzSearch *search, const gchar *filename);
-static gboolean    update_index		      (KzSearch *search);
-static gboolean    purge_index		      (KzSearch *search);
-static GPid        optimize_index             (KzSearch *search);
-static void        make_index                 (KzSearch *search);
-static gboolean    exist_index_dir            (KzSearch *search);
-#endif
-
 G_DEFINE_ABSTRACT_TYPE(KzSearch, kz_search, G_TYPE_OBJECT)
 
 static void
@@ -235,19 +223,6 @@
 		G_OBJECT_CLASS (kz_search_parent_class)->dispose(object);
 }
 
-KzSearch *
-kz_search_get_instance (const gchar *name)
-{
-	GType type = 0;
-	if (!strcmp(name, "est"))
-		type = KZ_TYPE_SEARCH_EST;
-	
-	if (type)
-		return g_object_new(type, NULL);
-
-	return NULL;
-}
-
 gchar *
 kz_search_get_search_result_html (KzSearch *search, const gchar *text)
 {
Index: kazehakase/src/kz-search.h
diff -u kazehakase/src/kz-search.h:1.1 kazehakase/src/kz-search.h:1.2
--- kazehakase/src/kz-search.h:1.1	Sun Dec  3 12:35:34 2006
+++ kazehakase/src/kz-search.h	Sun Dec  3 15:01:00 2006
@@ -57,11 +57,9 @@
 
 GType      kz_search_get_type      (void) G_GNUC_CONST;
 
-KzSearch *kz_search_get_instance   (const gchar *name);
 KzSearch *kz_search_new            (const gchar *name);
 
 gchar      *kz_search_get_search_result_html     (KzSearch *search, const gchar *text);
-
 KzBookmark *kz_search_get_search_result_bookmark (KzSearch *search, const gchar *text);
 
 gboolean    kz_search_register_document  	(KzSearch *search, const gchar *filename);
Index: kazehakase/src/main.c
diff -u kazehakase/src/main.c:1.116 kazehakase/src/main.c:1.117
--- kazehakase/src/main.c:1.116	Sun Dec  3 11:17:40 2006
+++ kazehakase/src/main.c	Sun Dec  3 15:01:00 2006
@@ -533,7 +533,7 @@
 		if (exists_search_cmd)
 		{
 #if USE_HYPERESTRAIER
-			KzSearch *search = kz_search_get_instance ("est");
+			KzSearch *search = kz_search_new("hyperestraier");
 			if (search)
 			{
 				kz_search_purge_index(search);
@@ -595,7 +595,7 @@
 	if (use_history_search)
 	{
 #if USE_HYPERESTRAIER
-		KzSearch *search = kz_search_get_instance ("est");
+		KzSearch *search = kz_search_new("hyperestraier");
 		search_command = g_find_program_in_path("estcmd");
 		exists_index = kz_search_exist_index_dir(search);
 #elif USE_RAST


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