From 9b37f57e33131abda883b07833e3e06886d934ac Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 22 Jan 2011 23:53:35 +0000 Subject: [PATCH] [NEW] Make NativeLangSpeaker object available for all classes in Notepad++. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@734 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 2 ++ PowerEditor/src/Parameters.h | 6 ++++++ PowerEditor/src/localization.h | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 540557d51..72aa3fadc 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -121,6 +121,8 @@ Notepad_plus::Notepad_plus(): _mainWindowStatus(0), _pDocTab(NULL), _pEditView(N } #endif + (NppParameters::getInstance())->setNativeLangSpeaker(&_nativeLangSpeaker); + TiXmlDocument *toolIconsDocRoot = (NppParameters::getInstance())->getToolIcons(); if (toolIconsDocRoot) diff --git a/PowerEditor/src/Parameters.h b/PowerEditor/src/Parameters.h index 0c8ef577f..ce5961a2d 100644 --- a/PowerEditor/src/Parameters.h +++ b/PowerEditor/src/Parameters.h @@ -1428,6 +1428,12 @@ public: PluginList & getPluginList() {return _pluginList;}; bool importUDLFromFile(generic_string sourceFile); bool exportUDLToFile(int langIndex2export, generic_string fileName2save); + NativeLangSpeaker * getNativeLangSpeaker() { + return _pNativeLangSpeaker; + }; + void setNativeLangSpeaker(NativeLangSpeaker *nls) { + _pNativeLangSpeaker = nls; + }; private: NppParameters(); diff --git a/PowerEditor/src/localization.h b/PowerEditor/src/localization.h index 75c6b0544..89fe821bb 100644 --- a/PowerEditor/src/localization.h +++ b/PowerEditor/src/localization.h @@ -22,8 +22,8 @@ #include "tinyxmlA.h" #endif //TINYXMLA_INCLUDED -#include "FindReplaceDlg.h" -#include "preferenceDlg.h" +class FindReplaceDlg; +class PreferenceDlg; class NativeLangSpeaker { public: