diff options
author | elektrahesse | 2010-10-01 20:39:47 +0200 |
---|---|---|
committer | elektrahesse | 2010-10-01 20:39:47 +0200 |
commit | 09efe79829b5492e4f1cd91503cfa503378f403e (patch) | |
tree | c2dfd0d0f1ea6bf6a449e22e73c04c684f41050f /linden/indra/newview | |
parent | Enabled friends chat and keywords highlighting for both IMs and Group IMs. (diff) | |
parent | Fixed Windows compile error introduced in 13b1fd24 (diff) | |
download | meta-impy-09efe79829b5492e4f1cd91503cfa503378f403e.zip meta-impy-09efe79829b5492e4f1cd91503cfa503378f403e.tar.gz meta-impy-09efe79829b5492e4f1cd91503cfa503378f403e.tar.bz2 meta-impy-09efe79829b5492e4f1cd91503cfa503378f403e.tar.xz |
Merge branch 'weekly' of git://github.com/mccabe/imprudence into weekly
Diffstat (limited to 'linden/indra/newview')
-rw-r--r-- | linden/indra/newview/lgghunspell_wrapper.cpp | 18 | ||||
-rw-r--r-- | linden/indra/newview/lgghunspell_wrapper.h | 4 | ||||
-rw-r--r-- | linden/indra/newview/llinventorybridge.cpp | 20 | ||||
-rwxr-xr-x | linden/indra/newview/llviewermessage.cpp | 45 | ||||
-rw-r--r-- | linden/indra/newview/llviewermessage.h | 2 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/panel_login.xml | 9 |
6 files changed, 62 insertions, 36 deletions
diff --git a/linden/indra/newview/lgghunspell_wrapper.cpp b/linden/indra/newview/lgghunspell_wrapper.cpp index f800043..aa4507c 100644 --- a/linden/indra/newview/lgghunspell_wrapper.cpp +++ b/linden/indra/newview/lgghunspell_wrapper.cpp | |||
@@ -72,7 +72,7 @@ static char * countryCodesraw[] = { | |||
72 | (char*)"CF",(char*)"Central African Republic", | 72 | (char*)"CF",(char*)"Central African Republic", |
73 | (char*)"CG",(char*)"Congo", | 73 | (char*)"CG",(char*)"Congo", |
74 | (char*)"CH",(char*)"Switzerland", | 74 | (char*)"CH",(char*)"Switzerland", |
75 | (char*)"CI",(char*)"Côte D'ivoire (Ivory Coast)", | 75 | (char*)"CI",(char*)"Côte D'ivoire (Ivory Coast)", |
76 | (char*)"CK",(char*)"Cook Iislands", | 76 | (char*)"CK",(char*)"Cook Iislands", |
77 | (char*)"CL",(char*)"Chile", | 77 | (char*)"CL",(char*)"Chile", |
78 | (char*)"CM",(char*)"Cameroon", | 78 | (char*)"CM",(char*)"Cameroon", |
@@ -212,7 +212,7 @@ static char * countryCodesraw[] = { | |||
212 | (char*)"PW",(char*)"Palau", | 212 | (char*)"PW",(char*)"Palau", |
213 | (char*)"PY",(char*)"Paraguay", | 213 | (char*)"PY",(char*)"Paraguay", |
214 | (char*)"QA",(char*)"Qatar", | 214 | (char*)"QA",(char*)"Qatar", |
215 | (char*)"RE",(char*)"Réunion", | 215 | (char*)"RE",(char*)"Réunion", |
216 | (char*)"RO",(char*)"Romania", | 216 | (char*)"RO",(char*)"Romania", |
217 | (char*)"RU",(char*)"Russian Federation", | 217 | (char*)"RU",(char*)"Russian Federation", |
218 | (char*)"RW",(char*)"Rwanda", | 218 | (char*)"RW",(char*)"Rwanda", |
@@ -333,7 +333,7 @@ static char * languageCodesraw[]={ | |||
333 | (char*)"ga",(char*)"Irish", | 333 | (char*)"ga",(char*)"Irish", |
334 | (char*)"gd",(char*)"Gaelic", | 334 | (char*)"gd",(char*)"Gaelic", |
335 | (char*)"gl",(char*)"Galician", | 335 | (char*)"gl",(char*)"Galician", |
336 | (char*)"gn",(char*)"Guaraní", | 336 | (char*)"gn",(char*)"GuaranÃ", |
337 | (char*)"gu",(char*)"Gujarati", | 337 | (char*)"gu",(char*)"Gujarati", |
338 | (char*)"gv",(char*)"Manx", | 338 | (char*)"gv",(char*)"Manx", |
339 | (char*)"ha",(char*)"Hausa", | 339 | (char*)"ha",(char*)"Hausa", |
@@ -456,7 +456,7 @@ static char * languageCodesraw[]={ | |||
456 | (char*)"uz",(char*)"Uzbek", | 456 | (char*)"uz",(char*)"Uzbek", |
457 | (char*)"ve",(char*)"Venda", | 457 | (char*)"ve",(char*)"Venda", |
458 | (char*)"vi",(char*)"Vietnamese", | 458 | (char*)"vi",(char*)"Vietnamese", |
459 | (char*)"vo",(char*)"Volapük", | 459 | (char*)"vo",(char*)"Volapük", |
460 | (char*)"wa",(char*)"Walloon", | 460 | (char*)"wa",(char*)"Walloon", |
461 | (char*)"wo",(char*)"Wolof", | 461 | (char*)"wo",(char*)"Wolof", |
462 | (char*)"xh",(char*)"Xhosa", | 462 | (char*)"xh",(char*)"Xhosa", |
@@ -470,10 +470,9 @@ static char * languageCodesraw[]={ | |||
470 | #define LANGUAGE_CODES_RAW_SIZE 368 | 470 | #define LANGUAGE_CODES_RAW_SIZE 368 |
471 | 471 | ||
472 | lggHunSpell_Wrapper::lggHunSpell_Wrapper() | 472 | lggHunSpell_Wrapper::lggHunSpell_Wrapper() |
473 | : | ||
474 | mSpellCheckHighlight(false) | ||
475 | { | 473 | { |
476 | //languageCodes(begin(languageCodesraw), end(languageCodesraw)); | 474 | //languageCodes(begin(languageCodesraw), end(languageCodesraw)); |
475 | mSpellCheckHighlight = rebind_llcontrol<BOOL>("EmeraldSpellDisplay", &gSavedSettings, false); | ||
477 | } | 476 | } |
478 | 477 | ||
479 | lggHunSpell_Wrapper::~lggHunSpell_Wrapper() | 478 | lggHunSpell_Wrapper::~lggHunSpell_Wrapper() |
@@ -638,8 +637,6 @@ void lggHunSpell_Wrapper::processSettings() | |||
638 | //expects everything to already be in saved settings | 637 | //expects everything to already be in saved settings |
639 | //this will also reload and read the installed dicts | 638 | //this will also reload and read the installed dicts |
640 | setNewDictionary(gSavedSettings.getString("EmeraldSpellBase")); | 639 | setNewDictionary(gSavedSettings.getString("EmeraldSpellBase")); |
641 | mSpellCheckHighlight = gSavedSettings.getBOOL("EmeraldSpellDisplay"); | ||
642 | |||
643 | } | 640 | } |
644 | 641 | ||
645 | void lggHunSpell_Wrapper::addDictionary(std::string additionalDictionary) | 642 | void lggHunSpell_Wrapper::addDictionary(std::string additionalDictionary) |
@@ -966,5 +963,8 @@ void lggHunSpell_Wrapper::editCustomButton() | |||
966 | 963 | ||
967 | void lggHunSpell_Wrapper::setSpellCheckHighlight(BOOL highlight) | 964 | void lggHunSpell_Wrapper::setSpellCheckHighlight(BOOL highlight) |
968 | { | 965 | { |
969 | mSpellCheckHighlight = highlight; | 966 | if (mSpellCheckHighlight) |
967 | { | ||
968 | *mSpellCheckHighlight = highlight; | ||
969 | } | ||
970 | } | 970 | } |
diff --git a/linden/indra/newview/lgghunspell_wrapper.h b/linden/indra/newview/lgghunspell_wrapper.h index b5f3ddb..71b2f14 100644 --- a/linden/indra/newview/lgghunspell_wrapper.h +++ b/linden/indra/newview/lgghunspell_wrapper.h | |||
@@ -55,7 +55,7 @@ public: | |||
55 | std::string VEC2CSV(std::vector<std::string> vec); | 55 | std::string VEC2CSV(std::vector<std::string> vec); |
56 | 56 | ||
57 | void setSpellCheckHighlight(BOOL highlight); | 57 | void setSpellCheckHighlight(BOOL highlight); |
58 | BOOL getSpellCheckHighlight() { return mSpellCheckHighlight; } | 58 | BOOL getSpellCheckHighlight() { return mSpellCheckHighlight && *mSpellCheckHighlight; } |
59 | 59 | ||
60 | private: | 60 | private: |
61 | void createCustomDic(); | 61 | void createCustomDic(); |
@@ -67,7 +67,7 @@ private: | |||
67 | std::string currentBaseDic; | 67 | std::string currentBaseDic; |
68 | //std::vector<std::string> languageCodes; | 68 | //std::vector<std::string> languageCodes; |
69 | //std::vector<std::string> countryCodes; | 69 | //std::vector<std::string> countryCodes; |
70 | BOOL mSpellCheckHighlight; | 70 | BOOL* mSpellCheckHighlight; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | extern lggHunSpell_Wrapper* glggHunSpell; // the singleton hunspell wrapper | 73 | extern lggHunSpell_Wrapper* glggHunSpell; // the singleton hunspell wrapper |
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index 30b0a4a..0f999fc 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp | |||
@@ -3107,7 +3107,27 @@ void LLNotecardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
3107 | } | 3107 | } |
3108 | items.push_back(std::string("Edit WindLight Settings")); | 3108 | items.push_back(std::string("Edit WindLight Settings")); |
3109 | } | 3109 | } |
3110 | else | ||
3111 | { | ||
3112 | items.push_back(std::string("Open")); | ||
3113 | } | ||
3110 | items.push_back(std::string("Properties")); | 3114 | items.push_back(std::string("Properties")); |
3115 | |||
3116 | // RLVa stuff copied from LLInvFVBridge::buildContextMenu | ||
3117 | // [RLVa:KB] - Checked: 2009-10-13 (RLVa-1.0.5c) | Modified: RLVa-1.0.5c | ||
3118 | if (rlv_handler_t::isEnabled()) | ||
3119 | { | ||
3120 | LLInventoryObject* pItem = (mInventoryPanel->getModel()) ? mInventoryPanel->getModel()->getObject(mUUID) : NULL; | ||
3121 | if ( (pItem) && | ||
3122 | ( ((LLAssetType::AT_NOTECARD == pItem->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWNOTE))) || | ||
3123 | ((LLAssetType::AT_LSL_TEXT == pItem->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWSCRIPT))) || | ||
3124 | ((LLAssetType::AT_NOTECARD == pItem->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE))) ) ) | ||
3125 | { | ||
3126 | disabled_items.push_back(std::string("Open")); | ||
3127 | } | ||
3128 | } | ||
3129 | // [/RLVa:KB] | ||
3130 | |||
3111 | getClipboardEntries(true, items, disabled_items, flags); | 3131 | getClipboardEntries(true, items, disabled_items, flags); |
3112 | } | 3132 | } |
3113 | hideContextEntries(menu, items, disabled_items); | 3133 | hideContextEntries(menu, items, disabled_items); |
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 8fa0f64..52113ce 100755 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp | |||
@@ -2717,43 +2717,46 @@ void process_decline_callingcard(LLMessageSystem* msg, void**) | |||
2717 | class ChatTranslationReceiver : public LLTranslate::TranslationReceiver | 2717 | class ChatTranslationReceiver : public LLTranslate::TranslationReceiver |
2718 | { | 2718 | { |
2719 | public : | 2719 | public : |
2720 | ChatTranslationReceiver(const std::string &fromLang, const std::string &toLang, LLChat *chat, | 2720 | ChatTranslationReceiver(const std::string &fromLang, const std::string &toLang, const LLChat &chat, |
2721 | const BOOL history) | 2721 | const std::string &orig_mesg, const BOOL history) |
2722 | : LLTranslate::TranslationReceiver(fromLang, toLang), | 2722 | : LLTranslate::TranslationReceiver(fromLang, toLang), |
2723 | m_chat(chat), | 2723 | m_chat(chat), |
2724 | m_origMesg(orig_mesg), | ||
2724 | m_history(history) | 2725 | m_history(history) |
2725 | { | 2726 | { |
2726 | } | 2727 | } |
2727 | 2728 | ||
2728 | static boost::intrusive_ptr<ChatTranslationReceiver> build(const std::string &fromLang, const std::string &toLang, LLChat *chat, const BOOL history) | 2729 | static boost::intrusive_ptr<ChatTranslationReceiver> build(const std::string &fromLang, const std::string &toLang, const LLChat &chat, const std::string &orig_mesg, const BOOL history) |
2729 | { | 2730 | { |
2730 | return boost::intrusive_ptr<ChatTranslationReceiver>(new ChatTranslationReceiver(fromLang, toLang, chat, history)); | 2731 | return boost::intrusive_ptr<ChatTranslationReceiver>(new ChatTranslationReceiver(fromLang, toLang, chat, orig_mesg, history)); |
2731 | } | 2732 | } |
2732 | 2733 | ||
2733 | protected: | 2734 | protected: |
2734 | void handleResponse(const std::string &translation, const std::string &detectedLanguage) | 2735 | void handleResponse(const std::string &translation, const std::string &detected_language) |
2735 | { | 2736 | { |
2736 | if (m_toLang != detectedLanguage) | 2737 | // filter out non-interesting responeses |
2737 | m_chat->mText += " (" + translation + ")"; | 2738 | if ( !translation.empty() |
2738 | 2739 | && (m_toLang != detected_language) | |
2739 | add_floater_chat(*m_chat, m_history); | 2740 | && (LLStringUtil::compareInsensitive(translation, m_origMesg) != 0) ) |
2741 | { | ||
2742 | m_chat.mText += " (" + translation + ")"; | ||
2743 | } | ||
2740 | 2744 | ||
2741 | delete m_chat; | 2745 | add_floater_chat(m_chat, m_history); |
2742 | } | 2746 | } |
2743 | 2747 | ||
2744 | void handleFailure() | 2748 | void handleFailure() |
2745 | { | 2749 | { |
2746 | LLTranslate::TranslationReceiver::handleFailure(); | 2750 | LLTranslate::TranslationReceiver::handleFailure(); |
2747 | 2751 | ||
2748 | m_chat->mText += " (?)"; | 2752 | m_chat.mText += " (?)"; |
2749 | 2753 | ||
2750 | add_floater_chat(*m_chat, m_history); | 2754 | add_floater_chat(m_chat, m_history); |
2751 | |||
2752 | delete m_chat; | ||
2753 | } | 2755 | } |
2754 | 2756 | ||
2755 | private: | 2757 | private: |
2756 | LLChat *m_chat; | 2758 | LLChat m_chat; |
2759 | std::string m_origMesg; | ||
2757 | const BOOL m_history; | 2760 | const BOOL m_history; |
2758 | }; | 2761 | }; |
2759 | 2762 | ||
@@ -2771,9 +2774,9 @@ void add_floater_chat(const LLChat &chat, const BOOL history) | |||
2771 | } | 2774 | } |
2772 | } | 2775 | } |
2773 | 2776 | ||
2774 | void check_translate_chat(const std::string &mesg, LLChat &chat, const BOOL history) | 2777 | void check_translate_chat(const std::string &mesg, const LLChat &chat, const BOOL history) |
2775 | { | 2778 | { |
2776 | const bool translate = LLUI::sConfigGroup->getBOOL("TranslateChat"); | 2779 | const bool translate = gSavedSettings.getBOOL("TranslateChat"); |
2777 | 2780 | ||
2778 | if (translate && chat.mSourceType != CHAT_SOURCE_SYSTEM) | 2781 | if (translate && chat.mSourceType != CHAT_SOURCE_SYSTEM) |
2779 | { | 2782 | { |
@@ -2781,9 +2784,8 @@ void check_translate_chat(const std::string &mesg, LLChat &chat, const BOOL hist | |||
2781 | // SVC-4879 | 2784 | // SVC-4879 |
2782 | const std::string &fromLang = ""; | 2785 | const std::string &fromLang = ""; |
2783 | const std::string &toLang = LLTranslate::getTranslateLanguage(); | 2786 | const std::string &toLang = LLTranslate::getTranslateLanguage(); |
2784 | LLChat *newChat = new LLChat(chat); | ||
2785 | 2787 | ||
2786 | LLHTTPClient::ResponderPtr result = ChatTranslationReceiver::build(fromLang, toLang, newChat, history); | 2788 | LLHTTPClient::ResponderPtr result = ChatTranslationReceiver::build(fromLang, toLang, chat, mesg, history); |
2787 | LLTranslate::translateMessage(result, fromLang, toLang, mesg); | 2789 | LLTranslate::translateMessage(result, fromLang, toLang, mesg); |
2788 | } | 2790 | } |
2789 | else | 2791 | else |
@@ -2962,8 +2964,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
2962 | std::string prefix = mesg.substr(0, 4); | 2964 | std::string prefix = mesg.substr(0, 4); |
2963 | if (prefix == "/me " || prefix == "/me'") | 2965 | if (prefix == "/me " || prefix == "/me'") |
2964 | { | 2966 | { |
2965 | chat.mText = from_name; | 2967 | const std::string spacer = mesg.substr(3,1); |
2966 | chat.mText += mesg.substr(3); | 2968 | mesg = mesg.substr(4); |
2969 | chat.mText = from_name + spacer + mesg; | ||
2967 | ircstyle = TRUE; | 2970 | ircstyle = TRUE; |
2968 | } | 2971 | } |
2969 | else | 2972 | else |
diff --git a/linden/indra/newview/llviewermessage.h b/linden/indra/newview/llviewermessage.h index 1a6c03b..11a3554 100644 --- a/linden/indra/newview/llviewermessage.h +++ b/linden/indra/newview/llviewermessage.h | |||
@@ -76,7 +76,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data); | |||
76 | void process_chat_from_simulator(LLMessageSystem *mesgsys, void **user_data); | 76 | void process_chat_from_simulator(LLMessageSystem *mesgsys, void **user_data); |
77 | 77 | ||
78 | void add_floater_chat(const LLChat &chat, const BOOL history); | 78 | void add_floater_chat(const LLChat &chat, const BOOL history); |
79 | void check_translate_chat(const std::string &mesg, LLChat &chat, const BOOL history); | 79 | void check_translate_chat(const std::string &mesg, const LLChat &chat, const BOOL history); |
80 | 80 | ||
81 | //void process_agent_to_new_region(LLMessageSystem *mesgsys, void **user_data); | 81 | //void process_agent_to_new_region(LLMessageSystem *mesgsys, void **user_data); |
82 | void send_agent_update(BOOL force_send, BOOL send_reliable = FALSE); | 82 | void send_agent_update(BOOL force_send, BOOL send_reliable = FALSE); |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_login.xml b/linden/indra/newview/skins/default/xui/en-us/panel_login.xml index dda5e4d..96f3f77 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_login.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_login.xml | |||
@@ -58,7 +58,8 @@ | |||
58 | bevel_style="in" border_style="line" border_thickness="1" | 58 | bevel_style="in" border_style="line" border_thickness="1" |
59 | max_length="31" mouse_opaque="true" | 59 | max_length="31" mouse_opaque="true" |
60 | handle_edit_keys_directly="true" | 60 | handle_edit_keys_directly="true" |
61 | select_all_on_focus_received="true" /> | 61 | select_all_on_focus_received="true" |
62 | allow_translate="false" /> | ||
62 | 63 | ||
63 | 64 | ||
64 | <!-- LAST NAME --> | 65 | <!-- LAST NAME --> |
@@ -77,7 +78,8 @@ | |||
77 | bevel_style="in" border_style="line" border_thickness="1" | 78 | bevel_style="in" border_style="line" border_thickness="1" |
78 | max_length="31" mouse_opaque="true" | 79 | max_length="31" mouse_opaque="true" |
79 | handle_edit_keys_directly="true" | 80 | handle_edit_keys_directly="true" |
80 | select_all_on_focus_received="true" /> | 81 | select_all_on_focus_received="true" |
82 | allow_translate="false" /> | ||
81 | 83 | ||
82 | 84 | ||
83 | <!-- PASSWORD --> | 85 | <!-- PASSWORD --> |
@@ -96,7 +98,8 @@ | |||
96 | bevel_style="in" border_style="line" border_thickness="1" | 98 | bevel_style="in" border_style="line" border_thickness="1" |
97 | max_length="16" mouse_opaque="true" | 99 | max_length="16" mouse_opaque="true" |
98 | handle_edit_keys_directly="true" | 100 | handle_edit_keys_directly="true" |
99 | select_all_on_focus_received="true" /> | 101 | select_all_on_focus_received="true" |
102 | allow_translate="false" /> | ||
100 | <check_box name="remember_check" label="Remember password" | 103 | <check_box name="remember_check" label="Remember password" |
101 | bottom_delta="-24" left_delta="0" height="16" width="140" | 104 | bottom_delta="-24" left_delta="0" height="16" width="140" |
102 | follows="left|bottom" font="SansSerifSmall" control_name="RememberPassword" | 105 | follows="left|bottom" font="SansSerifSmall" control_name="RememberPassword" |