Comment out old Google Translate support and as such remove the need for JSON.

Note that on standalone, json headers are installed in json/,
no idea why in the packages this isn't the case... But anyway,
it isn't used at all anymore now so it doesn't really matter.

I didn't remove the json package for non-standalone and the
downloading thereof... (I can't test non-standalone).
This commit is contained in:
Aleric Inglewood
2012-02-18 16:45:11 +01:00
parent 0c82b8bd3a
commit 66ccff964b
4 changed files with 19 additions and 24 deletions

View File

@@ -9,7 +9,7 @@
# also defined, but not for general use are
# JSONCPP_LIBRARY, where to find the jsoncpp library.
FIND_PATH(JSONCPP_INCLUDE_DIR jsoncpp/json.h
FIND_PATH(JSONCPP_INCLUDE_DIR json/json.h
/usr/local/include
/usr/include
)

View File

@@ -19,7 +19,7 @@ endif(NOT FMODEX)
include(OPENAL)
include(HUNSPELL)
include(FindOpenGL)
include(JsonCpp)
#include(JsonCpp)
include(LLAddBuildTest)
include(LLAudio)
include(LLCharacter)
@@ -442,7 +442,6 @@ set(viewer_SOURCE_FILES
lltoolselectrect.cpp
lltoolview.cpp
lltracker.cpp
lltranslate.cpp
lluploaddialog.cpp
lluploadfloaterobservers.cpp
llurl.cpp

View File

@@ -35,7 +35,7 @@
#include "llhttpclient.h"
#include "llbufferstream.h"
#include "jsoncpp/reader.h"
#include "json/reader.h"
class LLTranslate
{

View File

@@ -145,7 +145,6 @@
#include "llfloaterworldmap.h"
#include "llviewerdisplay.h"
#include "llkeythrottle.h"
#include "lltranslate.h"
// <edit>
#include "llviewernetwork.h"
// </edit>
@@ -2954,6 +2953,7 @@ void process_decline_callingcard(LLMessageSystem* msg, void**)
LLNotificationsUtil::add("CallingCardDeclined");
}
#if 0 // Google translate doesn't work anymore
class ChatTranslationReceiver : public LLTranslate::TranslationReceiver
{
public :
@@ -2996,6 +2996,7 @@ private:
LLChat *m_chat;
const BOOL m_history;
};
#endif
void add_floater_chat(const LLChat &chat, const BOOL history)
{
@@ -3011,6 +3012,7 @@ void add_floater_chat(const LLChat &chat, const BOOL history)
}
}
#if 0 // Google translate doesn't work anymore
void check_translate_chat(const std::string &mesg, LLChat &chat, const BOOL history)
{
const bool translate = LLUI::sConfigGroup->getBOOL("TranslateChat");
@@ -3031,6 +3033,7 @@ void check_translate_chat(const std::string &mesg, LLChat &chat, const BOOL hist
add_floater_chat(chat, history);
}
}
#endif
// defined in llchatbar.cpp, but not declared in any header
void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel);
@@ -3523,29 +3526,22 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
}
// truth table:
// LINDEN BUSY MUTED OWNED_BY_YOU TASK DISPLAY STORE IN HISTORY
// F F F F * Yes Yes
// F F F T * Yes Yes
// F F T F * No No
// F F T T * No No
// F T F F * No Yes
// F T F T * Yes Yes
// F T T F * No No
// F T T T * No No
// LINDEN MUTED BUSY OWNED_BY_YOU TASK DISPLAY STORE IN HISTORY
// F T * * * No No
// F F T F * No Yes
// * F F * * Yes Yes
// * F * T * Yes Yes
// T * * * F Yes Yes
chat.mMuted = is_muted && !is_linden;
if (!visible_in_chat_bubble
&& (is_linden || !is_busy || is_owned_by_me))
if (!chat.mMuted)
{
// show on screen and add to history
check_translate_chat(mesg, chat, FALSE);
}
else
{
// just add to chat history
check_translate_chat(mesg, chat, TRUE);
bool only_history = visible_in_chat_bubble || (!is_linden && !is_owned_by_me && is_busy);
#if 0 // Google translate doesn't work anymore
check_translate_chat(mesg, chat, only_history);
#else
add_floater_chat(chat, only_history);
#endif
}
}
}