diff --git a/honoka/plugins/anthyplugin.cpp b/honoka/plugins/anthyplugin.cpp index a3906fd..8c0dcdb 100644 --- a/honoka/plugins/anthyplugin.cpp +++ b/honoka/plugins/anthyplugin.cpp @@ -42,16 +42,7 @@ HonokaSetupCorePage *AnthyPlugin::setup() { - - HonokaSetupPage *page = new HonokaSetupPage(_("Anthy-plugin"),"",""); - - page->append(new HonokaSetupBoolItem( - _("_Use this plugin: "), - String(HONOKA_CONFIG_PLUGINLOADER_PREFIX) + String("/plugin-anthy"), - _("if you use this plugin, check this."), - true - )); - return page; + return new HonokaSetupPage(_("Anthy-plugin"),"",""); }; AnthyPlugin::AnthyPlugin(ConfigPointer cfg) : HonokaMultiplePluginBase(cfg) diff --git a/honoka/plugins/cannaconversion.cpp b/honoka/plugins/cannaconversion.cpp index 4dd39c3..703fb7b 100644 --- a/honoka/plugins/cannaconversion.cpp +++ b/honoka/plugins/cannaconversion.cpp @@ -43,13 +43,6 @@ HonokaSetupCorePage *CannaConversion::setup() { HonokaSetupPage *page = new HonokaSetupPage(_("Canna-plugin"),"",""); - - page->append(new HonokaSetupBoolItem( - _("_Use this plugin: "), - String(HONOKA_CONFIG_PLUGINLOADER_PREFIX) + String("/plugin-canna"), - _("if you use this plugin, check this."), - true - )); page->append(new HonokaSetupEntryItem( _("_Server: "), HONOKA_CONFIG_CANNA_SERVER, diff --git a/honoka/plugins/kanainput.cpp b/honoka/plugins/kanainput.cpp index e06af16..a394275 100644 --- a/honoka/plugins/kanainput.cpp +++ b/honoka/plugins/kanainput.cpp @@ -44,13 +44,6 @@ HonokaSetupCorePage *KanaInput::setup() { HonokaSetupPage *page = new HonokaSetupPage(_("KanaInput-plugin"),"",""); - - page->append(new HonokaSetupBoolItem( - _("_Use this plugin: "), - String(HONOKA_CONFIG_PLUGINLOADER_PREFIX) + String("/plugin-kanainput"), - _("if you use this plugin, check this."), - true - )); page->append(new HonokaSetupBoolItem( _("use _fake kana-input: "), HONOKA_CONFIG_KANAINPUT_FAKEKANA, diff --git a/honoka/plugins/nicolainput.cpp b/honoka/plugins/nicolainput.cpp index 6c51be3..8d78cba 100644 --- a/honoka/plugins/nicolainput.cpp +++ b/honoka/plugins/nicolainput.cpp @@ -44,13 +44,6 @@ HonokaSetupCorePage *NicolaInput::setup() { HonokaSetupPage *page = new HonokaSetupPage(_("Nicola-plugin"),"",""); - - page->append(new HonokaSetupBoolItem( - _("_Use this plugin: "), - String(HONOKA_CONFIG_PLUGINLOADER_PREFIX) + String("/plugin-nicola"), - _("if you use this plugin, check this."), - true - )); page->append(new HonokaSetupKeyItem( _("Left KANA-Shift keys:"), HONOKA_CONFIG_NICOLAINPUT_LSHIFT, diff --git a/honoka/plugins/primeprediction.cpp b/honoka/plugins/primeprediction.cpp index 0919f82..3168f4d 100644 --- a/honoka/plugins/primeprediction.cpp +++ b/honoka/plugins/primeprediction.cpp @@ -50,13 +50,6 @@ { vector l; HonokaSetupPage *page = new HonokaSetupPage(_("PrimePrediction-plugin"),"",""); - - page->append(new HonokaSetupBoolItem( - _("_Use this plugin: "), - String(HONOKA_CONFIG_PLUGINLOADER_PREFIX) + String("/plugin-prime"), - _("if you use this plugin, check this."), - true - )); l.clear(); l.push_back(String("lookup")); l.push_back(String("lookup_all")); diff --git a/honoka/plugins/romkan.cpp b/honoka/plugins/romkan.cpp index 8941673..ad35eed 100644 --- a/honoka/plugins/romkan.cpp +++ b/honoka/plugins/romkan.cpp @@ -44,13 +44,6 @@ HonokaSetupCorePage *RomkanPlugin::setup() { HonokaSetupPage *page = new HonokaSetupPage(_("Romkan-plugin"),"",""); - - page->append(new HonokaSetupBoolItem( - _("_Use this plugin: "), - String(HONOKA_CONFIG_PLUGINLOADER_PREFIX) + String("/plugin-romkan"), - _("if you use this plugin, check this."), - true - )); page->append(new HonokaSetupFileItem( _("_Roma-Kana table: "), HONOKA_CONFIG_ROMKAN_TABLE_FILE, diff --git a/honoka/plugins/simpleprediction.cpp b/honoka/plugins/simpleprediction.cpp index fb62f1d..40412fa 100644 --- a/honoka/plugins/simpleprediction.cpp +++ b/honoka/plugins/simpleprediction.cpp @@ -44,13 +44,6 @@ HonokaSetupCorePage *SimplePrediction::setup() { HonokaSetupPage *page = new HonokaSetupPage(_("SimplePrediction-plugin"),"",""); - - page->append(new HonokaSetupBoolItem( - _("_Use this plugin: "), - String(HONOKA_CONFIG_PLUGINLOADER_PREFIX) + String("/plugin-simpleprediction"), - _("if you use this plugin, check this."), - true - )); page->append(new HonokaSetupIntItem( _("_max history count: "), HONOKA_CONFIG_SIMPLEPREDICTION_SIZE, diff --git a/honoka/plugins/skkdicconversion.cpp b/honoka/plugins/skkdicconversion.cpp index 3323a6b..3ef777a 100644 --- a/honoka/plugins/skkdicconversion.cpp +++ b/honoka/plugins/skkdicconversion.cpp @@ -45,13 +45,6 @@ HonokaSetupCorePage *SKKDicConversion::setup() { HonokaSetupPage *page = new HonokaSetupPage(_("SKKDic-plugin"),"",""); - - page->append(new HonokaSetupBoolItem( - _("_Use this plugin: "), - String(HONOKA_CONFIG_PLUGINLOADER_PREFIX) + String("/plugin-skkdic"), - _("if you use this plugin, check this."), - true - )); page->append(new HonokaSetupFileItem( _("_SKKDic file: "), HONOKA_CONFIG_SKKDIC_DICFILE, diff --git a/honoka/plugins/wnnplugin.cpp b/honoka/plugins/wnnplugin.cpp index a0cb0bb..4879f15 100644 --- a/honoka/plugins/wnnplugin.cpp +++ b/honoka/plugins/wnnplugin.cpp @@ -45,13 +45,6 @@ { HonokaSetupPage *page = new HonokaSetupPage(_("Wnn-plugin"),"",""); vector l; - page->append(new HonokaSetupBoolItem( - _("_Use this plugin: "), - String(HONOKA_CONFIG_PLUGINLOADER_PREFIX) + String("/plugin-wnn"), - _("if you use this plugin, check this."), - true - )); - page->append(new HonokaSetupEntryItem( _("_Server: "), HONOKA_CONFIG_JSERVER, diff --git a/honoka/src/honoka_imengine_setup.cpp b/honoka/src/honoka_imengine_setup.cpp index 60fd361..0a43966 100644 --- a/honoka/src/honoka_imengine_setup.cpp +++ b/honoka/src/honoka_imengine_setup.cpp @@ -437,6 +437,7 @@ while((entry = readdir(dir)) != NULL) { String d = entry->d_name; if ((d.substr(0,6) == "plugin") && (d.substr(d.length() - 3,3) == ".so")) { + String pluginName = d.substr(0,d.length() - 3); d = String(HONOKA_PLUGINDIR) + "/" + d; void* plugin = dlopen(d.c_str(), RTLD_LAZY); if (!plugin) continue; @@ -448,7 +449,19 @@ } if (getPluginVersion() == HONOKA_PLUGIN_VERSION) { HonokaSetupCorePage *p = pluginSetup(); - plugins->append(HonokaSetup::HonokaSetupCoreToGtk(p)); + // "if you use this plugin, check this." ---- + HonokaSetupGtkPage *page = new HonokaSetupGtkPage(p->getLabel(),p->getName(),p->getTip()); + page->append(new HonokaSetupBoolItem( + _("_Use this plugin: "), + String(HONOKA_CONFIG_PLUGINLOADER_PREFIX) + pluginName, + _("if you use this plugin, check this."), + true + )); + for(unsigned int i = 0;i < p->getChildren().size();i ++) { + page->append(HonokaSetup::HonokaSetupCoreToGtk(p->getChildren()[i])); + } + plugins->append(page); + //plugin->append(p); } else { dlclose(plugin); }