diff options
Diffstat (limited to 'indra/newview/llchatbar.cpp')
-rw-r--r-- | indra/newview/llchatbar.cpp | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 5e97157694..46a2179e8d 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -87,6 +87,8 @@ private: }; +extern void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); + // // Functions // @@ -110,7 +112,7 @@ LLChatBar::LLChatBar() LLChatBar::~LLChatBar() { - gGestureManager.removeObserver(mObserver); + LLGestureManager::instance().removeObserver(mObserver); delete mObserver; mObserver = NULL; // LLView destructor cleans up children @@ -211,7 +213,7 @@ void LLChatBar::refreshGestures() // collect list of unique gestures std::map <std::string, BOOL> unique; LLGestureManager::item_map_t::iterator it; - for (it = gGestureManager.mActive.begin(); it != gGestureManager.mActive.end(); ++it) + for (it = LLGestureManager::instance().mActive.begin(); it != LLGestureManager::instance().mActive.end(); ++it) { LLMultiGesture* gesture = (*it).second; if (gesture) @@ -296,7 +298,7 @@ void LLChatBar::setGestureCombo(LLComboBox* combo) // now register observer since we have a place to put the results mObserver = new LLChatBarGestureObserver(this); - gGestureManager.addObserver(mObserver); + LLGestureManager::instance().addObserver(mObserver); // refresh list from current active gestures refreshGestures(); @@ -377,7 +379,7 @@ void LLChatBar::sendChat( EChatType type ) if (0 == channel) { // discard returned "found" boolean - gGestureManager.triggerAndReviseString(utf8text, &utf8_revised_text); + LLGestureManager::instance().triggerAndReviseString(utf8text, &utf8_revised_text); } else { @@ -415,10 +417,11 @@ void LLChatBar::sendChat( EChatType type ) void LLChatBar::startChat(const char* line) { //TODO* remove DUMMY chat - if(LLBottomTray::getInstance()->getChatBox()) - { - LLBottomTray::getInstance()->getChatBox()->setFocus(TRUE); - } + //if(gBottomTray && gBottomTray->getChatBox()) + //{ + // gBottomTray->setVisible(TRUE); + // gBottomTray->getChatBox()->setFocus(TRUE); + //} // *TODO Vadim: Why was this code commented out? @@ -441,10 +444,10 @@ void LLChatBar::startChat(const char* line) void LLChatBar::stopChat() { //TODO* remove DUMMY chat - if(LLBottomTray::getInstance()->getChatBox()) - { - LLBottomTray::getInstance()->getChatBox()->setFocus(FALSE); - } + //if(gBottomTray && gBottomTray->getChatBox()) + ///{ + // gBottomTray->getChatBox()->setFocus(FALSE); + //} // *TODO Vadim: Why was this code commented out? @@ -515,7 +518,7 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata ) std::string utf8_trigger = wstring_to_utf8str(raw_text); std::string utf8_out_str(utf8_trigger); - if (gGestureManager.matchPrefix(utf8_trigger, &utf8_out_str)) + if (LLGestureManager::instance().matchPrefix(utf8_trigger, &utf8_out_str)) { if (self->mInputEditor) { @@ -617,7 +620,7 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL send_chat_from_viewer(utf8_out_text, type, channel); } - +/* void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel) { LLMessageSystem* msg = gMessageSystem; @@ -634,7 +637,7 @@ void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT); } - +*/ void LLChatBar::onCommitGesture(LLUICtrl* ctrl) { @@ -652,7 +655,7 @@ void LLChatBar::onCommitGesture(LLUICtrl* ctrl) // substitution and logging. std::string text(trigger); std::string revised_text; - gGestureManager.triggerAndReviseString(text, &revised_text); + LLGestureManager::instance().triggerAndReviseString(text, &revised_text); revised_text = utf8str_trim(revised_text); if (!revised_text.empty()) @@ -688,4 +691,4 @@ public: }; // Creating the object registers with the dispatcher. -LLChatHandler gChatHandler; +//LLChatHandler gChatHandler; |