From 9c66ac87fd46db3987e60ae50989b2497099480b Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 20 Jan 2012 18:06:32 +0100 Subject: STORM-276 Basic spellchecking framework --- indra/newview/app_settings/settings.xml | 22 +++++++++ indra/newview/llappviewer.cpp | 14 ++++++ indra/newview/llstartup.cpp | 1 + indra/newview/llviewercontrol.cpp | 24 +++++++++ indra/newview/llviewermenu.cpp | 86 +++++++++++++++++++++++++++++++++ indra/newview/llviewermenu.h | 1 + indra/newview/viewer_manifest.py | 8 +++ 7 files changed, 156 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 1ea623791d..1ad3ee1dd1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12082,6 +12082,28 @@ Value 10.0 + SpellCheck + + Comment + Enable spellchecking on line and text editors + Persist + 1 + Type + Boolean + Value + 1 + + SpellCheckDictionary + + Comment + Current primary and secondary dictionaries used for spell checking + Persist + 1 + Type + String + Value + English (United States) + UseNewWalkRun Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0861fe85a8..698f2469a3 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -91,6 +91,7 @@ #include "llsecondlifeurls.h" #include "llupdaterservice.h" #include "llcallfloater.h" +#include "llspellcheck.h" // Linden library includes #include "llavatarnamecache.h" @@ -112,6 +113,7 @@ // Third party library includes #include #include +#include @@ -2488,6 +2490,18 @@ bool LLAppViewer::initConfiguration() //gDirUtilp->setSkinFolder("default"); } + if (gSavedSettings.getBOOL("SpellCheck")) + { + std::list dict_list; + boost::split(dict_list, gSavedSettings.getString("SpellCheckDictionary"), boost::is_any_of(std::string(","))); + if (!dict_list.empty()) + { + LLSpellChecker::setUseSpellCheck(dict_list.front()); + dict_list.pop_front(); + LLSpellChecker::instance().setSecondaryDictionaries(dict_list); + } + } + mYieldTime = gSavedSettings.getS32("YieldTime"); // Read skin/branding settings if specified. diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 7e02a41e7e..89360778d1 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -739,6 +739,7 @@ bool idle_startup() { display_startup(); initialize_edit_menu(); + initialize_spellcheck_menu(); display_startup(); init_menus(); display_startup(); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 093b84413a..7b6dbfaa0b 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -71,8 +71,12 @@ #include "llpaneloutfitsinventory.h" #include "llpanellogin.h" #include "llpaneltopinfobar.h" +#include "llspellcheck.h" #include "llupdaterservice.h" +// Third party library includes +#include + #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; #endif @@ -498,6 +502,24 @@ bool handleForceShowGrid(const LLSD& newvalue) return true; } +bool handleSpellCheckChanged() +{ + if (gSavedSettings.getBOOL("SpellCheck")) + { + std::list dict_list; + boost::split(dict_list, gSavedSettings.getString("SpellCheckDictionary"), boost::is_any_of(std::string(","))); + if (!dict_list.empty()) + { + LLSpellChecker::setUseSpellCheck(dict_list.front()); + dict_list.pop_front(); + LLSpellChecker::instance().setSecondaryDictionaries(dict_list); + return true; + } + } + LLSpellChecker::setUseSpellCheck(LLStringUtil::null); + return true; +} + bool toggle_agent_pause(const LLSD& newvalue) { if ( newvalue.asBoolean() ) @@ -704,6 +726,8 @@ void settings_setup_listeners() gSavedSettings.getControl("UpdaterServiceSetting")->getSignal()->connect(boost::bind(&toggle_updater_service_active, _2)); gSavedSettings.getControl("ForceShowGrid")->getSignal()->connect(boost::bind(&handleForceShowGrid, _2)); gSavedSettings.getControl("RenderTransparentWater")->getSignal()->connect(boost::bind(&handleRenderTransparentWaterChanged, _2)); + gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&handleSpellCheckChanged)); + gSavedSettings.getControl("SpellCheckDictionary")->getSignal()->connect(boost::bind(&handleSpellCheckChanged)); } #if TEST_CACHED_CONTROL diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0104d35e53..2a11f3cc16 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -81,6 +81,7 @@ #include "llrootview.h" #include "llsceneview.h" #include "llselectmgr.h" +#include "llspellcheckmenuhandler.h" #include "llstatusbar.h" #include "lltextureview.h" #include "lltoolcomp.h" @@ -4984,6 +4985,78 @@ class LLEditDelete : public view_listener_t } }; +void handle_spellcheck_replace_with_suggestion(const LLUICtrl* ctrl, const LLSD& param) +{ + const LLContextMenu* menu = dynamic_cast(ctrl->getParent()); + LLSpellCheckMenuHandler* spellcheck_handler = (menu) ? dynamic_cast(menu->getSpawningView()) : NULL; + if ( (!spellcheck_handler) || (!spellcheck_handler->getSpellCheck()) ) + { + return; + } + + U32 index = 0; + if ( (!LLStringUtil::convertToU32(param.asString(), index)) || (index >= spellcheck_handler->getSuggestionCount()) ) + { + return; + } + + spellcheck_handler->replaceWithSuggestion(index); +} + +bool visible_spellcheck_suggestion(LLUICtrl* ctrl, const LLSD& param) +{ + LLMenuItemGL* item = dynamic_cast(ctrl); + const LLContextMenu* menu = (item) ? dynamic_cast(item->getParent()) : NULL; + const LLSpellCheckMenuHandler* spellcheck_handler = (menu) ? dynamic_cast(menu->getSpawningView()) : NULL; + if ( (!spellcheck_handler) || (!spellcheck_handler->getSpellCheck()) ) + { + return false; + } + + U32 index = 0; + if ( (!LLStringUtil::convertToU32(param.asString(), index)) || (index >= spellcheck_handler->getSuggestionCount()) ) + { + return false; + } + + item->setLabel(spellcheck_handler->getSuggestion(index)); + return true; +} + +void handle_spellcheck_add_to_dictionary(const LLUICtrl* ctrl) +{ + const LLContextMenu* menu = dynamic_cast(ctrl->getParent()); + LLSpellCheckMenuHandler* spellcheck_handler = (menu) ? dynamic_cast(menu->getSpawningView()) : NULL; + if ( (spellcheck_handler) && (spellcheck_handler->canAddToDictionary()) ) + { + spellcheck_handler->addToDictionary(); + } +} + +bool enable_spellcheck_add_to_dictionary(const LLUICtrl* ctrl) +{ + const LLContextMenu* menu = dynamic_cast(ctrl->getParent()); + const LLSpellCheckMenuHandler* spellcheck_handler = (menu) ? dynamic_cast(menu->getSpawningView()) : NULL; + return (spellcheck_handler) && (spellcheck_handler->canAddToDictionary()); +} + +void handle_spellcheck_add_to_ignore(const LLUICtrl* ctrl) +{ + const LLContextMenu* menu = dynamic_cast(ctrl->getParent()); + LLSpellCheckMenuHandler* spellcheck_handler = (menu) ? dynamic_cast(menu->getSpawningView()) : NULL; + if ( (spellcheck_handler) && (spellcheck_handler->canAddToIgnore()) ) + { + spellcheck_handler->addToIgnore(); + } +} + +bool enable_spellcheck_add_to_ignore(const LLUICtrl* ctrl) +{ + const LLContextMenu* menu = dynamic_cast(ctrl->getParent()); + const LLSpellCheckMenuHandler* spellcheck_handler = (menu) ? dynamic_cast(menu->getSpawningView()) : NULL; + return (spellcheck_handler) && (spellcheck_handler->canAddToIgnore()); +} + bool enable_object_delete() { bool new_value = @@ -7933,6 +8006,19 @@ void initialize_edit_menu() } +void initialize_spellcheck_menu() +{ + LLUICtrl::CommitCallbackRegistry::Registrar& commit = LLUICtrl::CommitCallbackRegistry::currentRegistrar(); + LLUICtrl::EnableCallbackRegistry::Registrar& enable = LLUICtrl::EnableCallbackRegistry::currentRegistrar(); + + commit.add("SpellCheck.ReplaceWithSuggestion", boost::bind(&handle_spellcheck_replace_with_suggestion, _1, _2)); + enable.add("SpellCheck.VisibleSuggestion", boost::bind(&visible_spellcheck_suggestion, _1, _2)); + commit.add("SpellCheck.AddToDictionary", boost::bind(&handle_spellcheck_add_to_dictionary, _1)); + enable.add("SpellCheck.EnableAddToDictionary", boost::bind(&enable_spellcheck_add_to_dictionary, _1)); + commit.add("SpellCheck.AddToIgnore", boost::bind(&handle_spellcheck_add_to_ignore, _1)); + enable.add("SpellCheck.EnableAddToIgnore", boost::bind(&enable_spellcheck_add_to_ignore, _1)); +} + void initialize_menus() { // A parameterized event handler used as ctrl-8/9/0 zoom controls below. diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 87cb4efbc4..8c40762865 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -39,6 +39,7 @@ class LLObjectSelection; class LLSelectNode; void initialize_edit_menu(); +void initialize_spellcheck_menu(); void init_menus(); void cleanup_menus(); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 0931c4ec9b..1b732676e4 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -91,6 +91,8 @@ class ViewerManifest(LLManifest): # ... and the entire windlight directory self.path("windlight") + # ... and the pre-installed spell checking dictionaries + self.path("dictionaries") self.end_prefix("app_settings") if self.prefix(src="character"): @@ -393,6 +395,9 @@ class WindowsManifest(ViewerManifest): self.path("ssleay32.dll") self.path("libeay32.dll") + # Hunspell + self.path("libhunspell.dll") + # For google-perftools tcmalloc allocator. try: if self.args['configuration'].lower() == 'debug': @@ -659,6 +664,7 @@ class DarwinManifest(ViewerManifest): # copy additional libs in /Contents/MacOS/ self.path("../packages/lib/release/libndofdev.dylib", dst="Resources/libndofdev.dylib") + self.path("../packages/lib/release/libhunspell-1.3.dylib", dst="Resources/libhunspell-1.3.dylib") self.path("../viewer_components/updater/scripts/darwin/update_install", "MacOS/update_install") @@ -1053,6 +1059,8 @@ class Linux_i686Manifest(LinuxManifest): self.path("libopenjpeg.so.1.4.0") self.path("libopenjpeg.so.1") self.path("libopenjpeg.so") + self.path("libhunspell-1.3.so") + self.path("libhunspell-1.3.so.0") self.path("libalut.so") self.path("libopenal.so", "libopenal.so.1") self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname -- cgit v1.2.3 From f0d1afc2266e13b4f36f750ba5e721e427caf7b8 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 20 Jan 2012 18:07:35 +0100 Subject: STORM-276 Added spellcheck functionality to the LLLineEditor control --- .../skins/default/xui/en/menu_text_editor.xml | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/menu_text_editor.xml b/indra/newview/skins/default/xui/en/menu_text_editor.xml index fe8489166b..70b40dd89b 100644 --- a/indra/newview/skins/default/xui/en/menu_text_editor.xml +++ b/indra/newview/skins/default/xui/en/menu_text_editor.xml @@ -1,6 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Date: Mon, 23 Jan 2012 19:22:47 +0100 Subject: STORM-276 Added missing library includes --- indra/newview/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6b2fe1e45a..bb0c4a9979 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -71,6 +71,7 @@ include_directories( ${LLLOGIN_INCLUDE_DIRS} ${UPDATER_INCLUDE_DIRS} ${LIBS_PREBUILT_DIR}/include/collada + ${LIBS_PREBUILD_DIR}/include/hunspell ${OPENAL_LIB_INCLUDE_DIRS} ${LIBS_PREBUILT_DIR}/include/collada/1.4 ) @@ -1566,6 +1567,9 @@ if (WINDOWS) ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/msvcp100.dll ${SHARED_LIB_STAGING_DIR}/Debug/msvcr100d.dll ${SHARED_LIB_STAGING_DIR}/Debug/msvcp100d.dll + ${SHARED_LIB_STAGING_DIR}/Release/libhunspell.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libhunspell.dll + ${SHARED_LIB_STAGING_DIR}/Debug/libhunspell.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/SLVoice.exe ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp.dll @@ -1745,6 +1749,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} ${NDOF_LIBRARY} + ${HUNSPELL_LIBRARY} ${viewer_LIBRARIES} ${BOOST_PROGRAM_OPTIONS_LIBRARY} ${BOOST_REGEX_LIBRARY} -- cgit v1.2.3 From b81bf4f6f182e6345889d70140b34b15cbfb8d27 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Mon, 23 Jan 2012 19:31:47 +0100 Subject: STORM-276 Enabled spellchecking on selective line editors --- indra/newview/skins/default/xui/en/floater_chat_bar.xml | 1 + indra/newview/skins/default/xui/en/floater_im_session.xml | 1 + indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml | 1 + 3 files changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml index 63992462b3..32a2c26cf0 100644 --- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/floater_chat_bar.xml @@ -46,6 +46,7 @@ left="0" max_length_bytes="1023" name="chat_box" + spellcheck="true" text_pad_left="5" text_pad_right="25" tool_tip="Press Enter to say, Ctrl+Enter to shout" diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index a2739a8339..2f3788ec3d 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -84,6 +84,7 @@ label="To" layout="bottomleft" name="chat_editor" + spellcheck="true" tab_group="3" width="249"> diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml index 21c627cdfb..6bc9c48729 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml @@ -19,6 +19,7 @@ left="0" max_length_bytes="1023" name="chat_box" + spellcheck="true" text_pad_left="5" text_pad_right="25" tool_tip="Press Enter to say, Ctrl+Enter to shout" -- cgit v1.2.3 From 49e0c38ee85214eb7d0e7e995d1a380ee2f60720 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 3 Feb 2012 19:45:00 +0100 Subject: STORM-276 Added preferences panel --- indra/newview/llfloaterpreference.cpp | 95 +++++++++++++++ indra/newview/llfloaterpreference.h | 2 + indra/newview/skins/default/textures/textures.xml | 2 + .../skins/default/textures/widgets/Arrow_Left.png | Bin 0 -> 311 bytes .../skins/default/textures/widgets/Arrow_Right.png | Bin 0 -> 313 bytes .../skins/default/xui/en/floater_preferences.xml | 6 + .../xui/en/panel_preferences_spellcheck.xml | 132 +++++++++++++++++++++ 7 files changed, 237 insertions(+) create mode 100644 indra/newview/skins/default/textures/widgets/Arrow_Left.png create mode 100644 indra/newview/skins/default/textures/widgets/Arrow_Right.png create mode 100644 indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index a333989e7e..29b07d2479 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -66,6 +66,7 @@ #include "llsky.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" +#include "llspellcheck.h" #include "llsliderctrl.h" #include "lltabcontainer.h" #include "lltrans.h" @@ -110,6 +111,8 @@ #include "lllogininstance.h" // to check if logged in yet #include "llsdserialize.h" +#include + const F32 MAX_USER_FAR_CLIP = 512.f; const F32 MIN_USER_FAR_CLIP = 64.f; const F32 BANDWIDTH_UPDATER_TIMEOUT = 0.5f; @@ -445,6 +448,9 @@ BOOL LLFloaterPreference::postBuild() getChild("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this)); + getChild("btn_spellcheck_moveleft")->setCommitCallback(boost::bind(&LLFloaterPreference::onClickDictMove, this, "list_spellcheck_active", "list_spellcheck_available")); + getChild("btn_spellcheck_moveright")->setCommitCallback(boost::bind(&LLFloaterPreference::onClickDictMove, this, "list_spellcheck_available", "list_spellcheck_active")); + // if floater is opened before login set default localized busy message if (LLStartUp::getStartupState() < STATE_STARTED) { @@ -577,6 +583,19 @@ void LLFloaterPreference::apply() } } + if (hasChild("check_spellcheck"), TRUE) + { + LLScrollListCtrl* list_ctrl = findChild("list_spellcheck_active"); + std::vector list_items = list_ctrl->getAllData(); + + std::list list_dict; + list_dict.push_back(LLSpellChecker::instance().getActiveDictionary()); + for (std::vector::const_iterator item_it = list_items.begin(); item_it != list_items.end(); ++item_it) + list_dict.push_back((*item_it)->getColumn(0)->getValue().asString()); + + gSavedSettings.setString("SpellCheckDictionary", boost::join(list_dict, ",")); + } + saveAvatarProperties(); if (mClickActionDirty) @@ -687,6 +706,8 @@ void LLFloaterPreference::onOpen(const LLSD& key) // Load (double-)click to walk/teleport settings. updateClickActionControls(); + buildDictLists(); + // Enabled/disabled popups, might have been changed by user actions // while preferences floater was closed. buildPopupLists(); @@ -865,6 +886,25 @@ void LLFloaterPreference::onNameTagOpacityChange(const LLSD& newvalue) } } +void LLFloaterPreference::onClickDictMove(const std::string& from, const std::string& to) +{ + LLScrollListCtrl* from_ctrl = findChild(from); + LLScrollListCtrl* to_ctrl = findChild(to); + + LLSD row; + row["columns"][0]["column"] = "name"; + row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; + row["columns"][0]["font"]["style"] = "NORMAL"; + + std::vector sel_items = from_ctrl->getAllSelected(); + for (std::vector::const_iterator sel_it = sel_items.begin(); sel_it != sel_items.end(); ++sel_it) + { + row["columns"][0]["value"] = (*sel_it)->getColumn(0)->getValue(); + to_ctrl->addElement(row); + } + from_ctrl->deleteSelectedItems(); +} + void LLFloaterPreference::onClickSetCache() { std::string cur_name(gSavedSettings.getString("CacheLocation")); @@ -930,6 +970,61 @@ void LLFloaterPreference::refreshSkin(void* data) self->getChild("skin_selection", true)->setValue(sSkin); } +void LLFloaterPreference::buildDictLists() +{ + LLComboBox* dict_combo = findChild("combo_spellcheck_dict"); + dict_combo->clearRows(); + + LLScrollListCtrl* active_ctrl = findChild("list_spellcheck_active"); + active_ctrl->clearRows(); + + LLScrollListCtrl* avail_ctrl = findChild("list_spellcheck_available"); + avail_ctrl->clearRows(); + + if (LLSpellChecker::getUseSpellCheck()) + { + // Populate the main dictionary combobox + const LLSD& dict_map = LLSpellChecker::instance().getDictionaryMap(); + if (dict_map.size()) + { + for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) + { + const LLSD& dict = *dict_it; + if ( (dict["installed"].asBoolean()) && (dict.has("language")) ) + dict_combo->add(dict["language"].asString()); + } + dict_combo->selectByValue(LLSpellChecker::instance().getActiveDictionary()); + } + + LLSD row; + row["columns"][0]["column"] = "name"; + row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; + row["columns"][0]["font"]["style"] = "NORMAL"; + + // Populate the active dictionary list + LLSpellChecker::dict_list_t active_list = LLSpellChecker::instance().getSecondaryDictionaries(); + active_ctrl->sortByColumnIndex(0, true); + for (LLSpellChecker::dict_list_t::const_iterator it = active_list.begin(); it != active_list.end(); ++it) + { + row["columns"][0]["value"] = *it; + active_ctrl->addElement(row); + } + active_list.push_back(LLSpellChecker::instance().getActiveDictionary()); + + // Populate the available dictionary list + avail_ctrl->sortByColumnIndex(0, true); + for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) + { + const LLSD& dict = *dict_it; + if ( (dict["installed"].asBoolean()) && (dict.has("language")) && + (active_list.end() == std::find(active_list.begin(), active_list.end(), dict["language"].asString())) ) + { + row["columns"][0]["value"] = dict["language"].asString(); + avail_ctrl->addElement(row); + } + } + } +} void LLFloaterPreference::buildPopupLists() { diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 7ee3294478..cd258b5614 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -121,6 +121,7 @@ public: void setCacheLocation(const LLStringExplicit& location); + void onClickDictMove(const std::string& from, const std::string& to); void onClickSetCache(); void onClickResetCache(); void onClickSkin(LLUICtrl* ctrl,const LLSD& userdata); @@ -160,6 +161,7 @@ public: void applyUIColor(LLUICtrl* ctrl, const LLSD& param); void getUIColor(LLUICtrl* ctrl, const LLSD& param); + void buildDictLists(); void buildPopupLists(); static void refreshSkin(void* data); private: diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 8702ebde2a..bc0363014a 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -54,6 +54,8 @@ with the same filename but different name + + diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Left.png b/indra/newview/skins/default/textures/widgets/Arrow_Left.png new file mode 100644 index 0000000000..a424282839 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Arrow_Left.png differ diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Right.png b/indra/newview/skins/default/textures/widgets/Arrow_Right.png new file mode 100644 index 0000000000..e32bee8f34 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Arrow_Right.png differ diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 402868bb97..eebc3a9cca 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -120,6 +120,12 @@ layout="topleft" help_topic="preferences_advanced1_tab" name="advanced1" /> + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml b/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml new file mode 100644 index 0000000000..9b5d429846 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml @@ -0,0 +1,132 @@ + + + + + Main dictionary : + + + + + Additional dictionaries : + + + Available + + + Active + + + + + + + -- cgit v1.2.3 From 2114e88cd1291ef1dba4b79bcdcca4b2d134262f Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 3 Feb 2012 19:51:18 +0100 Subject: STORM-276 Enabled spell checking on notecards, picks and group notices --- indra/newview/skins/default/xui/en/floater_preview_notecard.xml | 1 + indra/newview/skins/default/xui/en/panel_edit_pick.xml | 1 + indra/newview/skins/default/xui/en/panel_group_notices.xml | 4 ++++ 3 files changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml index be3b2d179d..2e1c8ce670 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml @@ -70,6 +70,7 @@ max_length="65536" name="Notecard Editor" parse_urls="false" + spellcheck="true" tab_group="1" top="46" width="392" diff --git a/indra/newview/skins/default/xui/en/panel_edit_pick.xml b/indra/newview/skins/default/xui/en/panel_edit_pick.xml index 2ec2e03e8c..6d0be7fdec 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml @@ -134,6 +134,7 @@ top_pad="2" max_length="1023" name="pick_desc" + spellcheck="true" text_color="black" word_wrap="true" /> @@ -309,6 +311,7 @@ Maximum 200 per group daily left_pad="3" max_length_bytes="63" name="view_subject" + spellcheck="true" top_delta="-1" visible="false" width="200" /> @@ -333,6 +336,7 @@ Maximum 200 per group daily right="-1" max_length="511" name="view_message" + spellcheck="true" top_delta="-40" width="313" word_wrap="true" /> -- cgit v1.2.3 From 60e39343b17f29c65e8a60a415f7ed83ff069a12 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 14 Feb 2012 21:48:22 +0100 Subject: STORM-276 Reworked the spell check preferences to be more robust and less error-prone --- indra/newview/llfloaterpreference.cpp | 121 +++++++++++++-------- indra/newview/llfloaterpreference.h | 2 +- .../xui/en/panel_preferences_spellcheck.xml | 4 + 3 files changed, 80 insertions(+), 47 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 29b07d2479..c41488ce91 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -448,6 +448,8 @@ BOOL LLFloaterPreference::postBuild() getChild("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this)); + gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&LLFloaterPreference::refreshDictLists, this, false)); + getChild("combo_spellcheck_dict")->setCommitCallback(boost::bind(&LLFloaterPreference::refreshDictLists, this, false)); getChild("btn_spellcheck_moveleft")->setCommitCallback(boost::bind(&LLFloaterPreference::onClickDictMove, this, "list_spellcheck_active", "list_spellcheck_available")); getChild("btn_spellcheck_moveright")->setCommitCallback(boost::bind(&LLFloaterPreference::onClickDictMove, this, "list_spellcheck_available", "list_spellcheck_active")); @@ -585,14 +587,19 @@ void LLFloaterPreference::apply() if (hasChild("check_spellcheck"), TRUE) { - LLScrollListCtrl* list_ctrl = findChild("list_spellcheck_active"); - std::vector list_items = list_ctrl->getAllData(); - std::list list_dict; - list_dict.push_back(LLSpellChecker::instance().getActiveDictionary()); - for (std::vector::const_iterator item_it = list_items.begin(); item_it != list_items.end(); ++item_it) - list_dict.push_back((*item_it)->getColumn(0)->getValue().asString()); + LLComboBox* dict_combo = findChild("combo_spellcheck_dict"); + const std::string dict_name = dict_combo->getSelectedItemLabel(); + if (!dict_name.empty()) + { + list_dict.push_back(dict_name); + + LLScrollListCtrl* list_ctrl = findChild("list_spellcheck_active"); + std::vector list_items = list_ctrl->getAllData(); + for (std::vector::const_iterator item_it = list_items.begin(); item_it != list_items.end(); ++item_it) + list_dict.push_back((*item_it)->getColumn(0)->getValue().asString()); + } gSavedSettings.setString("SpellCheckDictionary", boost::join(list_dict, ",")); } @@ -706,7 +713,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) // Load (double-)click to walk/teleport settings. updateClickActionControls(); - buildDictLists(); + refreshDictLists(true); // Enabled/disabled popups, might have been changed by user actions // while preferences floater was closed. @@ -970,58 +977,80 @@ void LLFloaterPreference::refreshSkin(void* data) self->getChild("skin_selection", true)->setValue(sSkin); } -void LLFloaterPreference::buildDictLists() +void LLFloaterPreference::refreshDictLists(bool from_settings) { + bool enabled = gSavedSettings.getBOOL("SpellCheck"); + getChild("btn_spellcheck_moveleft")->setEnabled(enabled); + getChild("btn_spellcheck_moveright")->setEnabled(enabled); + + // Populate the dictionary combobox LLComboBox* dict_combo = findChild("combo_spellcheck_dict"); + std::string dict_cur = dict_combo->getSelectedItemLabel(); + if ((dict_cur.empty() || from_settings) && (LLSpellChecker::getUseSpellCheck())) + dict_cur = LLSpellChecker::instance().getActiveDictionary(); dict_combo->clearRows(); + dict_combo->setEnabled(enabled); - LLScrollListCtrl* active_ctrl = findChild("list_spellcheck_active"); - active_ctrl->clearRows(); + const LLSD& dict_map = LLSpellChecker::getDictionaryMap(); + if (dict_map.size()) + { + for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) + { + const LLSD& dict = *dict_it; + if ( (dict["installed"].asBoolean()) && (dict.has("language")) ) + dict_combo->add(dict["language"].asString()); + } + if (!dict_combo->selectByValue(dict_cur)) + dict_combo->clear(); + } + // Populate the available and active dictionary list LLScrollListCtrl* avail_ctrl = findChild("list_spellcheck_available"); - avail_ctrl->clearRows(); + LLScrollListCtrl* active_ctrl = findChild("list_spellcheck_active"); - if (LLSpellChecker::getUseSpellCheck()) + LLSpellChecker::dict_list_t active_list; + if ( ((!avail_ctrl->getItemCount()) && (!active_ctrl->getItemCount())) || (from_settings) ) { - // Populate the main dictionary combobox - const LLSD& dict_map = LLSpellChecker::instance().getDictionaryMap(); - if (dict_map.size()) + if (LLSpellChecker::getUseSpellCheck()) + active_list = LLSpellChecker::instance().getSecondaryDictionaries(); + } + else + { + std::vector active_items = active_ctrl->getAllData(); + for (std::vector::const_iterator item_it = active_items.begin(); item_it != active_items.end(); ++item_it) { - for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) - { - const LLSD& dict = *dict_it; - if ( (dict["installed"].asBoolean()) && (dict.has("language")) ) - dict_combo->add(dict["language"].asString()); - } - dict_combo->selectByValue(LLSpellChecker::instance().getActiveDictionary()); + std::string dict = (*item_it)->getColumn(0)->getValue().asString(); + if (dict_cur != dict) + active_list.push_back(dict); } + } - LLSD row; - row["columns"][0]["column"] = "name"; - row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; - row["columns"][0]["font"]["style"] = "NORMAL"; - - // Populate the active dictionary list - LLSpellChecker::dict_list_t active_list = LLSpellChecker::instance().getSecondaryDictionaries(); - active_ctrl->sortByColumnIndex(0, true); - for (LLSpellChecker::dict_list_t::const_iterator it = active_list.begin(); it != active_list.end(); ++it) - { - row["columns"][0]["value"] = *it; - active_ctrl->addElement(row); - } - active_list.push_back(LLSpellChecker::instance().getActiveDictionary()); + LLSD row; + row["columns"][0]["column"] = "name"; + row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; + row["columns"][0]["font"]["style"] = "NORMAL"; - // Populate the available dictionary list - avail_ctrl->sortByColumnIndex(0, true); - for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) + active_ctrl->clearRows(); + active_ctrl->setEnabled(enabled); + active_ctrl->sortByColumnIndex(0, true); + for (LLSpellChecker::dict_list_t::const_iterator it = active_list.begin(); it != active_list.end(); ++it) + { + row["columns"][0]["value"] = *it; + active_ctrl->addElement(row); + } + active_list.push_back(dict_cur); + + avail_ctrl->clearRows(); + avail_ctrl->setEnabled(enabled); + avail_ctrl->sortByColumnIndex(0, true); + for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) + { + const LLSD& dict = *dict_it; + if ( (dict["installed"].asBoolean()) && (dict.has("language")) && + (active_list.end() == std::find(active_list.begin(), active_list.end(), dict["language"].asString())) ) { - const LLSD& dict = *dict_it; - if ( (dict["installed"].asBoolean()) && (dict.has("language")) && - (active_list.end() == std::find(active_list.begin(), active_list.end(), dict["language"].asString())) ) - { - row["columns"][0]["value"] = dict["language"].asString(); - avail_ctrl->addElement(row); - } + row["columns"][0]["value"] = dict["language"].asString(); + avail_ctrl->addElement(row); } } } diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index cd258b5614..f75f71cc3d 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -161,8 +161,8 @@ public: void applyUIColor(LLUICtrl* ctrl, const LLSD& param); void getUIColor(LLUICtrl* ctrl, const LLSD& param); - void buildDictLists(); void buildPopupLists(); + void refreshDictLists(bool from_settings); static void refreshSkin(void* data); private: static std::string sSkin; diff --git a/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml b/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml index 9b5d429846..f1b16c5d0d 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml @@ -86,6 +86,7 @@ Active Date: Thu, 9 Feb 2012 22:02:32 +0100 Subject: STORM-276 Differentiate between primary and secondary dictionaries --- indra/newview/llfloaterpreference.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index c41488ce91..c444d2bb6f 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -997,7 +997,7 @@ void LLFloaterPreference::refreshDictLists(bool from_settings) for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) { const LLSD& dict = *dict_it; - if ( (dict["installed"].asBoolean()) && (dict.has("language")) ) + if ( (dict["installed"].asBoolean()) && (dict["is_primary"].asBoolean()) && (dict.has("language")) ) dict_combo->add(dict["language"].asString()); } if (!dict_combo->selectByValue(dict_cur)) -- cgit v1.2.3 From 2587f6d9d8167bb29491ff681dcd133eb28aba67 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 29 Mar 2012 18:25:48 +0200 Subject: Minor fix for GCC --- indra/newview/llappviewer.cpp | 3 ++- indra/newview/llviewercontrol.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5a68cd531e..fac5416aab 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2502,7 +2502,8 @@ bool LLAppViewer::initConfiguration() if (gSavedSettings.getBOOL("SpellCheck")) { std::list dict_list; - boost::split(dict_list, gSavedSettings.getString("SpellCheckDictionary"), boost::is_any_of(std::string(","))); + std::string dict_setting = gSavedSettings.getString("SpellCheckDictionary"); + boost::split(dict_list, dict_setting, boost::is_any_of(std::string(","))); if (!dict_list.empty()) { LLSpellChecker::setUseSpellCheck(dict_list.front()); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 7b6dbfaa0b..d7168a401c 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -507,7 +507,8 @@ bool handleSpellCheckChanged() if (gSavedSettings.getBOOL("SpellCheck")) { std::list dict_list; - boost::split(dict_list, gSavedSettings.getString("SpellCheckDictionary"), boost::is_any_of(std::string(","))); + std::string dict_setting = gSavedSettings.getString("SpellCheckDictionary"); + boost::split(dict_list, dict_setting, boost::is_any_of(std::string(","))); if (!dict_list.empty()) { LLSpellChecker::setUseSpellCheck(dict_list.front()); -- cgit v1.2.3 From e60dac5ce486f55fe69949a6a3a2949d4f868193 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 29 Mar 2012 21:07:09 +0200 Subject: STORM-276 Added dictionaries.xml and the Second Life glossary dictionary (enabled by default) --- .../app_settings/dictionaries/dictionaries.xml | 45 ++++ indra/newview/app_settings/dictionaries/sl.dic | 226 +++++++++++++++++++++ indra/newview/app_settings/settings.xml | 2 +- 3 files changed, 272 insertions(+), 1 deletion(-) create mode 100644 indra/newview/app_settings/dictionaries/dictionaries.xml create mode 100644 indra/newview/app_settings/dictionaries/sl.dic (limited to 'indra/newview') diff --git a/indra/newview/app_settings/dictionaries/dictionaries.xml b/indra/newview/app_settings/dictionaries/dictionaries.xml new file mode 100644 index 0000000000..0ba959766b --- /dev/null +++ b/indra/newview/app_settings/dictionaries/dictionaries.xml @@ -0,0 +1,45 @@ + + + + + name + en_gb + is_primary + 1 + language + English (United Kingdom) + + + name + en_us + is_primary + 1 + language + English (United States) + + + name + es_es + is_primary + 1 + language + Español (España) + + + name + pt_br + is_primary + 1 + language + Português (Brasil) + + + name + sl + is_primary + 0 + language + Second Life Glossary + + + diff --git a/indra/newview/app_settings/dictionaries/sl.dic b/indra/newview/app_settings/dictionaries/sl.dic new file mode 100644 index 0000000000..06decad74b --- /dev/null +++ b/indra/newview/app_settings/dictionaries/sl.dic @@ -0,0 +1,226 @@ +225 +account +aditi +adult +agent +agni +alpha +alt +animation +AR +asset +attachment +autoreturn +avatar +avie +baked +ban +banlines +banlist +BDSM +beacon +bling +block +blog +blogger +bodyparts +bot +box +build +busy +cache +cage +camp +campie +Catznip +chim +classified +client +coalesced +collar +collision +combat +community +concierge +conference +continent +contribution +coordinate +copy +covenant +CS +damage +damage-enabled +death +deed +detach +displayname +Dolphin +drama +drop +estate +event +face +facelight +favorites +FIC +Firestorm +flexible +flexiprim +floater +fly +flycam +FMOD +follower +forums +freebie +freeze +friendship +fullperm +furry +gadget +general +gesture +goo +grid +gridnaut +griefer +griefing +ground +group +GSLR +GUI +Havok +hippo +hippotropolis +home +homestead +host +HUD +IM +impostors +Imprudence +indra +infohub +inspector +inventory +invisiprim +inworld +island +item +JIRA +JPEG2000 +Kakadu +KDU +kick +L$ +lag +land +landmark +LDPW +liaison +library +limits +linden +LindeX +link +linkset +live +lock +log +machinima +mainland +mainlanders +map +marketplace +mature +media +mega +megaprim +mentor +mesh +minimap +mini-map +moderate +modify +mono +morph +MOTD +mouselook +mouseview +move +mute +neko +newbie +non-physical +notecard +NPIOF +object +occlusion +off-world +officer +offline +ogg +online +ONSR +openspace +orbiter +orientation +parcel +particles +partner +permission +PG +phantom +Phoenix +physics +pick +poofer +position +premium +prim +primitar +primitive +profile +quaternion +Radegast +region +relog +resi +resident +return +rez +rezday +RLV +RLVa +roleplay +run +ruth +script +sculpted +sculptie +sculpty +shout +sim +simulator +Singularity +skin +SLEX +SLurl +snapshot +stipend +telehub +teleport +terraform +texture +tier +TOS +transfer +unlink +username +UUID +vendor +viewer +walk +whisper +windlight diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e15822ed1f..7dc06cda0e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12168,7 +12168,7 @@ Type String Value - English (United States) + English (United States),Second Life Glossary UseNewWalkRun -- cgit v1.2.3 From 5f32e6493ed4f8b9b480da857f487fa21f32bd64 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 30 Mar 2012 14:09:39 -0400 Subject: convert line endings on sl.dic for coding standards compliance --- indra/newview/app_settings/dictionaries/sl.dic | 452 ++++++++++++------------- 1 file changed, 226 insertions(+), 226 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/dictionaries/sl.dic b/indra/newview/app_settings/dictionaries/sl.dic index 06decad74b..57e9dd06cd 100644 --- a/indra/newview/app_settings/dictionaries/sl.dic +++ b/indra/newview/app_settings/dictionaries/sl.dic @@ -1,226 +1,226 @@ -225 -account -aditi -adult -agent -agni -alpha -alt -animation -AR -asset -attachment -autoreturn -avatar -avie -baked -ban -banlines -banlist -BDSM -beacon -bling -block -blog -blogger -bodyparts -bot -box -build -busy -cache -cage -camp -campie -Catznip -chim -classified -client -coalesced -collar -collision -combat -community -concierge -conference -continent -contribution -coordinate -copy -covenant -CS -damage -damage-enabled -death -deed -detach -displayname -Dolphin -drama -drop -estate -event -face -facelight -favorites -FIC -Firestorm -flexible -flexiprim -floater -fly -flycam -FMOD -follower -forums -freebie -freeze -friendship -fullperm -furry -gadget -general -gesture -goo -grid -gridnaut -griefer -griefing -ground -group -GSLR -GUI -Havok -hippo -hippotropolis -home -homestead -host -HUD -IM -impostors -Imprudence -indra -infohub -inspector -inventory -invisiprim -inworld -island -item -JIRA -JPEG2000 -Kakadu -KDU -kick -L$ -lag -land -landmark -LDPW -liaison -library -limits -linden -LindeX -link -linkset -live -lock -log -machinima -mainland -mainlanders -map -marketplace -mature -media -mega -megaprim -mentor -mesh -minimap -mini-map -moderate -modify -mono -morph -MOTD -mouselook -mouseview -move -mute -neko -newbie -non-physical -notecard -NPIOF -object -occlusion -off-world -officer -offline -ogg -online -ONSR -openspace -orbiter -orientation -parcel -particles -partner -permission -PG -phantom -Phoenix -physics -pick -poofer -position -premium -prim -primitar -primitive -profile -quaternion -Radegast -region -relog -resi -resident -return -rez -rezday -RLV -RLVa -roleplay -run -ruth -script -sculpted -sculptie -sculpty -shout -sim -simulator -Singularity -skin -SLEX -SLurl -snapshot -stipend -telehub -teleport -terraform -texture -tier -TOS -transfer -unlink -username -UUID -vendor -viewer -walk -whisper -windlight +225 +account +aditi +adult +agent +agni +alpha +alt +animation +AR +asset +attachment +autoreturn +avatar +avie +baked +ban +banlines +banlist +BDSM +beacon +bling +block +blog +blogger +bodyparts +bot +box +build +busy +cache +cage +camp +campie +Catznip +chim +classified +client +coalesced +collar +collision +combat +community +concierge +conference +continent +contribution +coordinate +copy +covenant +CS +damage +damage-enabled +death +deed +detach +displayname +Dolphin +drama +drop +estate +event +face +facelight +favorites +FIC +Firestorm +flexible +flexiprim +floater +fly +flycam +FMOD +follower +forums +freebie +freeze +friendship +fullperm +furry +gadget +general +gesture +goo +grid +gridnaut +griefer +griefing +ground +group +GSLR +GUI +Havok +hippo +hippotropolis +home +homestead +host +HUD +IM +impostors +Imprudence +indra +infohub +inspector +inventory +invisiprim +inworld +island +item +JIRA +JPEG2000 +Kakadu +KDU +kick +L$ +lag +land +landmark +LDPW +liaison +library +limits +linden +LindeX +link +linkset +live +lock +log +machinima +mainland +mainlanders +map +marketplace +mature +media +mega +megaprim +mentor +mesh +minimap +mini-map +moderate +modify +mono +morph +MOTD +mouselook +mouseview +move +mute +neko +newbie +non-physical +notecard +NPIOF +object +occlusion +off-world +officer +offline +ogg +online +ONSR +openspace +orbiter +orientation +parcel +particles +partner +permission +PG +phantom +Phoenix +physics +pick +poofer +position +premium +prim +primitar +primitive +profile +quaternion +Radegast +region +relog +resi +resident +return +rez +rezday +RLV +RLVa +roleplay +run +ruth +script +sculpted +sculptie +sculpty +shout +sim +simulator +Singularity +skin +SLEX +SLurl +snapshot +stipend +telehub +teleport +terraform +texture +tier +TOS +transfer +unlink +username +UUID +vendor +viewer +walk +whisper +windlight -- cgit v1.2.3 From 3af3d5e83c81ecfa77735e6811470d1aa0f705da Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 30 Mar 2012 15:07:46 -0400 Subject: move all dictionaries to the prebuilt package, and install from there --- .../app_settings/dictionaries/dictionaries.xml | 45 ---- indra/newview/app_settings/dictionaries/sl.dic | 226 --------------------- indra/newview/viewer_manifest.py | 2 +- 3 files changed, 1 insertion(+), 272 deletions(-) delete mode 100644 indra/newview/app_settings/dictionaries/dictionaries.xml delete mode 100644 indra/newview/app_settings/dictionaries/sl.dic (limited to 'indra/newview') diff --git a/indra/newview/app_settings/dictionaries/dictionaries.xml b/indra/newview/app_settings/dictionaries/dictionaries.xml deleted file mode 100644 index 0ba959766b..0000000000 --- a/indra/newview/app_settings/dictionaries/dictionaries.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - name - en_gb - is_primary - 1 - language - English (United Kingdom) - - - name - en_us - is_primary - 1 - language - English (United States) - - - name - es_es - is_primary - 1 - language - Español (España) - - - name - pt_br - is_primary - 1 - language - Português (Brasil) - - - name - sl - is_primary - 0 - language - Second Life Glossary - - - diff --git a/indra/newview/app_settings/dictionaries/sl.dic b/indra/newview/app_settings/dictionaries/sl.dic deleted file mode 100644 index 57e9dd06cd..0000000000 --- a/indra/newview/app_settings/dictionaries/sl.dic +++ /dev/null @@ -1,226 +0,0 @@ -225 -account -aditi -adult -agent -agni -alpha -alt -animation -AR -asset -attachment -autoreturn -avatar -avie -baked -ban -banlines -banlist -BDSM -beacon -bling -block -blog -blogger -bodyparts -bot -box -build -busy -cache -cage -camp -campie -Catznip -chim -classified -client -coalesced -collar -collision -combat -community -concierge -conference -continent -contribution -coordinate -copy -covenant -CS -damage -damage-enabled -death -deed -detach -displayname -Dolphin -drama -drop -estate -event -face -facelight -favorites -FIC -Firestorm -flexible -flexiprim -floater -fly -flycam -FMOD -follower -forums -freebie -freeze -friendship -fullperm -furry -gadget -general -gesture -goo -grid -gridnaut -griefer -griefing -ground -group -GSLR -GUI -Havok -hippo -hippotropolis -home -homestead -host -HUD -IM -impostors -Imprudence -indra -infohub -inspector -inventory -invisiprim -inworld -island -item -JIRA -JPEG2000 -Kakadu -KDU -kick -L$ -lag -land -landmark -LDPW -liaison -library -limits -linden -LindeX -link -linkset -live -lock -log -machinima -mainland -mainlanders -map -marketplace -mature -media -mega -megaprim -mentor -mesh -minimap -mini-map -moderate -modify -mono -morph -MOTD -mouselook -mouseview -move -mute -neko -newbie -non-physical -notecard -NPIOF -object -occlusion -off-world -officer -offline -ogg -online -ONSR -openspace -orbiter -orientation -parcel -particles -partner -permission -PG -phantom -Phoenix -physics -pick -poofer -position -premium -prim -primitar -primitive -profile -quaternion -Radegast -region -relog -resi -resident -return -rez -rezday -RLV -RLVa -roleplay -run -ruth -script -sculpted -sculptie -sculpty -shout -sim -simulator -Singularity -skin -SLEX -SLurl -snapshot -stipend -telehub -teleport -terraform -texture -tier -TOS -transfer -unlink -username -UUID -vendor -viewer -walk -whisper -windlight diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 1b732676e4..a59b763910 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -92,7 +92,7 @@ class ViewerManifest(LLManifest): # ... and the entire windlight directory self.path("windlight") # ... and the pre-installed spell checking dictionaries - self.path("dictionaries") + self.path("../../packages/dictionaries", dst="dictionaries") self.end_prefix("app_settings") if self.prefix(src="character"): -- cgit v1.2.3 From 6d050cad618493b7881ea6d0073e64ba732b6352 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 10 Feb 2012 16:25:55 +0100 Subject: - fixed : Hunspell linking issues --- indra/newview/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0ec3e0e08a..fed9ea6790 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -13,6 +13,7 @@ include(EXPAT) include(FMOD) include(OPENAL) include(FindOpenGL) +include(Hunspell) include(JsonCpp) include(LLAudio) include(LLCharacter) -- cgit v1.2.3 From f28ee5bd4f6c82e8113c4cb413f163594c047fee Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 13 Apr 2012 16:23:22 -0400 Subject: try a different path for the dictionaries package? --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index a59b763910..5c9c7395c8 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -92,7 +92,7 @@ class ViewerManifest(LLManifest): # ... and the entire windlight directory self.path("windlight") # ... and the pre-installed spell checking dictionaries - self.path("../../packages/dictionaries", dst="dictionaries") + self.path("../packages/dictionaries", dst="dictionaries") self.end_prefix("app_settings") if self.prefix(src="character"): -- cgit v1.2.3 From 83717183c57121167b671f7bdcc4ab3122b95846 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 13 Apr 2012 17:25:52 -0400 Subject: yet another path for the dictionaries package... --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 5c9c7395c8..f6245fedfb 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -92,7 +92,7 @@ class ViewerManifest(LLManifest): # ... and the entire windlight directory self.path("windlight") # ... and the pre-installed spell checking dictionaries - self.path("../packages/dictionaries", dst="dictionaries") + self.path("../../../packages/dictionaries", dst="dictionaries") self.end_prefix("app_settings") if self.prefix(src="character"): -- cgit v1.2.3 From 1055edb9ea67d645325fc5bbc01a9ec1e0238ed0 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 18 Apr 2012 19:25:25 -0700 Subject: add logging to diagnose path problem --- indra/newview/viewer_manifest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index f6245fedfb..d2cd644175 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -92,7 +92,10 @@ class ViewerManifest(LLManifest): # ... and the entire windlight directory self.path("windlight") # ... and the pre-installed spell checking dictionaries - self.path("../../../packages/dictionaries", dst="dictionaries") + dictdir = os.path.join(os.pardir, os.pardir, self.args['configuration'], 'packages/dictionaries') + print "Trying dictionary relative to %s with %s" % (get_build_prefix(), dictdir); + self.path(src=dictdir, + dst="dictionaries") self.end_prefix("app_settings") if self.prefix(src="character"): -- cgit v1.2.3 From df38250c3c6bae08b36fac7b12a8238a805e46a3 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 18 Apr 2012 20:17:07 -0700 Subject: fix logging to diagnose path problem --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index d2cd644175..c88dbd97b1 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -93,7 +93,7 @@ class ViewerManifest(LLManifest): self.path("windlight") # ... and the pre-installed spell checking dictionaries dictdir = os.path.join(os.pardir, os.pardir, self.args['configuration'], 'packages/dictionaries') - print "Trying dictionary relative to %s with %s" % (get_build_prefix(), dictdir); + print "Trying dictionary relative to %s with %s" % (self.get_build_prefix(), dictdir); self.path(src=dictdir, dst="dictionaries") self.end_prefix("app_settings") -- cgit v1.2.3 From a167b551843d64e9765075100fb278c2a5e8809c Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 18 Apr 2012 22:32:35 -0700 Subject: rearrange dictionary copying --- indra/newview/viewer_manifest.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index c88dbd97b1..5f687f3ac7 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -51,6 +51,11 @@ class ViewerManifest(LLManifest): self.exclude("*.svn*") self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg") self.path(src="../../etc/message.xml", dst="app_settings/message.xml") + # add the pre-installed spell checking dictionaries + dictdir = os.path.join(os.pardir, 'packages', 'dictionaries') + print "Trying dictionary relative to %s with %s" % (self.get_src_prefix(), dictdir); + self.path(src=dictdir, + dst=os.path.join("app_settings","dictionaries") if self.is_packaging_viewer(): if self.prefix(src="app_settings"): @@ -91,11 +96,6 @@ class ViewerManifest(LLManifest): # ... and the entire windlight directory self.path("windlight") - # ... and the pre-installed spell checking dictionaries - dictdir = os.path.join(os.pardir, os.pardir, self.args['configuration'], 'packages/dictionaries') - print "Trying dictionary relative to %s with %s" % (self.get_build_prefix(), dictdir); - self.path(src=dictdir, - dst="dictionaries") self.end_prefix("app_settings") if self.prefix(src="character"): -- cgit v1.2.3 From b02132f927c29187e1031f38ef8884f86f115132 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 19 Apr 2012 05:08:19 -0700 Subject: missing paren in dictionary copying --- indra/newview/viewer_manifest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 5f687f3ac7..7c0358311b 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -51,11 +51,11 @@ class ViewerManifest(LLManifest): self.exclude("*.svn*") self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg") self.path(src="../../etc/message.xml", dst="app_settings/message.xml") + # add the pre-installed spell checking dictionaries dictdir = os.path.join(os.pardir, 'packages', 'dictionaries') - print "Trying dictionary relative to %s with %s" % (self.get_src_prefix(), dictdir); - self.path(src=dictdir, - dst=os.path.join("app_settings","dictionaries") + print "Trying dictionaries relative to %s with %s" % (self.get_src_prefix(), dictdir) + self.path(src=dictdir, dst=os.path.join("app_settings","dictionaries")) if self.is_packaging_viewer(): if self.prefix(src="app_settings"): -- cgit v1.2.3 From 9e477c595c893b4bfe1f84cf0f5ef426eb751555 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 19 Apr 2012 05:55:00 -0700 Subject: try forcing use of build prefix to copy dictionaries --- indra/newview/viewer_manifest.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 7c0358311b..cc55e1512b 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -52,11 +52,6 @@ class ViewerManifest(LLManifest): self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg") self.path(src="../../etc/message.xml", dst="app_settings/message.xml") - # add the pre-installed spell checking dictionaries - dictdir = os.path.join(os.pardir, 'packages', 'dictionaries') - print "Trying dictionaries relative to %s with %s" % (self.get_src_prefix(), dictdir) - self.path(src=dictdir, dst=os.path.join("app_settings","dictionaries")) - if self.is_packaging_viewer(): if self.prefix(src="app_settings"): self.exclude("logcontrol.xml") @@ -96,6 +91,14 @@ class ViewerManifest(LLManifest): # ... and the entire windlight directory self.path("windlight") + + # ... and the pre-installed spell checking dictionaries + pkgdir = os.path.join(self.get_build_prefix(), 'packages') + print "Trying to change src to %s" % (pkgdir); + if self.prefix(src=pkgdir,dst=""): + print "Trying dictionaries relative to %s with %s" % (self.get_src_prefix(), "dictionaries"); + self.path("dictionaries") + self.end_prefix(pkgdir) self.end_prefix("app_settings") if self.prefix(src="character"): -- cgit v1.2.3 From c6e095a32630aa2554f7e63cc9688bb063f9461a Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 19 Apr 2012 06:53:26 -0700 Subject: use build directory argument directly --- indra/newview/viewer_manifest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index cc55e1512b..86d542029a 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -92,8 +92,8 @@ class ViewerManifest(LLManifest): # ... and the entire windlight directory self.path("windlight") - # ... and the pre-installed spell checking dictionaries - pkgdir = os.path.join(self.get_build_prefix(), 'packages') + # ... and the included spell checking dictionaries + pkgdir = os.path.join(self.args['build'], 'packages') print "Trying to change src to %s" % (pkgdir); if self.prefix(src=pkgdir,dst=""): print "Trying dictionaries relative to %s with %s" % (self.get_src_prefix(), "dictionaries"); -- cgit v1.2.3 From 2862efc36791855d002d75039905c83a8e0b7236 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 19 Apr 2012 07:55:39 -0700 Subject: reference packages relative to newview --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 86d542029a..fb1c88340f 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -93,7 +93,7 @@ class ViewerManifest(LLManifest): self.path("windlight") # ... and the included spell checking dictionaries - pkgdir = os.path.join(self.args['build'], 'packages') + pkgdir = os.path.join(self.args['build'], os.pardir(), 'packages') print "Trying to change src to %s" % (pkgdir); if self.prefix(src=pkgdir,dst=""): print "Trying dictionaries relative to %s with %s" % (self.get_src_prefix(), "dictionaries"); -- cgit v1.2.3 From 3dfa725c5bdf16da75d3820422d2ce5263df19a8 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 19 Apr 2012 08:31:09 -0700 Subject: grumble relative grumble python grumble --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index fb1c88340f..7a3619ccd8 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -93,7 +93,7 @@ class ViewerManifest(LLManifest): self.path("windlight") # ... and the included spell checking dictionaries - pkgdir = os.path.join(self.args['build'], os.pardir(), 'packages') + pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') print "Trying to change src to %s" % (pkgdir); if self.prefix(src=pkgdir,dst=""): print "Trying dictionaries relative to %s with %s" % (self.get_src_prefix(), "dictionaries"); -- cgit v1.2.3 From 01cd6614484a38b974c2bbd692ccd3e0b1b2fc58 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 23 Apr 2012 15:52:15 -0400 Subject: remove debugging prints around packaging the dictionaries --- indra/newview/viewer_manifest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 7a3619ccd8..56933bbd21 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -94,11 +94,10 @@ class ViewerManifest(LLManifest): # ... and the included spell checking dictionaries pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') - print "Trying to change src to %s" % (pkgdir); if self.prefix(src=pkgdir,dst=""): - print "Trying dictionaries relative to %s with %s" % (self.get_src_prefix(), "dictionaries"); self.path("dictionaries") self.end_prefix(pkgdir) + self.end_prefix("app_settings") if self.prefix(src="character"): -- cgit v1.2.3 From b93c9d8ba0792b6f63776301dc60a2ac8a4453ca Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 23 Apr 2012 16:01:45 -0400 Subject: correct mac hunspell lib name, try simpler reference to dictionaries --- indra/newview/viewer_manifest.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 56933bbd21..8fe39bafdd 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -93,10 +93,11 @@ class ViewerManifest(LLManifest): self.path("windlight") # ... and the included spell checking dictionaries - pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') - if self.prefix(src=pkgdir,dst=""): - self.path("dictionaries") - self.end_prefix(pkgdir) + #pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') + #if self.prefix(src=pkgdir,dst=""): + # self.path("dictionaries") + # self.end_prefix(pkgdir) + self.path(src="../packages/dictionaries", dst="dictionaries") self.end_prefix("app_settings") @@ -669,7 +670,7 @@ class DarwinManifest(ViewerManifest): # copy additional libs in /Contents/MacOS/ self.path("../packages/lib/release/libndofdev.dylib", dst="Resources/libndofdev.dylib") - self.path("../packages/lib/release/libhunspell-1.3.dylib", dst="Resources/libhunspell-1.3.dylib") + self.path("../packages/lib/release/libhunspell-1.3.0.dylib", dst="Resources/libhunspell-1.3.0.dylib") self.path("../viewer_components/updater/scripts/darwin/update_install", "MacOS/update_install") -- cgit v1.2.3 From 22d84a68335528d00ce61ec84583eb55f32a3545 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 23 Apr 2012 16:39:09 -0400 Subject: go back to the more elaborate way to find dictionaries (the way that works) --- indra/newview/viewer_manifest.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 8fe39bafdd..58522c091d 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -93,11 +93,10 @@ class ViewerManifest(LLManifest): self.path("windlight") # ... and the included spell checking dictionaries - #pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') - #if self.prefix(src=pkgdir,dst=""): - # self.path("dictionaries") - # self.end_prefix(pkgdir) - self.path(src="../packages/dictionaries", dst="dictionaries") + pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') + if self.prefix(src=pkgdir,dst=""): + self.path("dictionaries") + self.end_prefix(pkgdir) self.end_prefix("app_settings") -- cgit v1.2.3 From 53222ef517b97249df1e1a6db2e29c0d86b2e773 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 31 May 2012 02:56:42 +0200 Subject: STORM-276 Match preferences look to that of the auto-replace functionality in STORM-1738 --- indra/newview/CMakeLists.txt | 2 + indra/newview/llfloaterpreference.cpp | 131 +-------------- indra/newview/llfloaterpreference.h | 3 +- indra/newview/llfloaterspellchecksettings.cpp | 179 +++++++++++++++++++++ indra/newview/llfloaterspellchecksettings.h | 48 ++++++ indra/newview/llviewerfloaterreg.cpp | 2 + .../skins/default/xui/en/floater_preferences.xml | 6 - .../skins/default/xui/en/floater_spellcheck.xml | 175 ++++++++++++++++++++ .../default/xui/en/panel_preferences_chat.xml | 11 ++ .../xui/en/panel_preferences_spellcheck.xml | 136 ---------------- 10 files changed, 424 insertions(+), 269 deletions(-) create mode 100644 indra/newview/llfloaterspellchecksettings.cpp create mode 100644 indra/newview/llfloaterspellchecksettings.h create mode 100644 indra/newview/skins/default/xui/en/floater_spellcheck.xml delete mode 100644 indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 8a6c88222b..b83f32c28e 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -236,6 +236,7 @@ set(viewer_SOURCE_FILES llfloatersidepanelcontainer.cpp llfloatersnapshot.cpp llfloatersounddevices.cpp + llfloaterspellchecksettings.cpp llfloatertelehub.cpp llfloatertestinspectors.cpp llfloatertestlistview.cpp @@ -792,6 +793,7 @@ set(viewer_HEADER_FILES llfloatersidepanelcontainer.h llfloatersnapshot.h llfloatersounddevices.h + llfloaterspellchecksettings.h llfloatertelehub.h llfloatertestinspectors.h llfloatertestlistview.h diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index c096537de6..ae9a4a9876 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -66,7 +66,6 @@ #include "llsky.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" -#include "llspellcheck.h" #include "llsliderctrl.h" #include "lltabcontainer.h" #include "lltrans.h" @@ -111,8 +110,6 @@ #include "lllogininstance.h" // to check if logged in yet #include "llsdserialize.h" -#include - const F32 MAX_USER_FAR_CLIP = 512.f; const F32 MIN_USER_FAR_CLIP = 64.f; const F32 BANDWIDTH_UPDATER_TIMEOUT = 0.5f; @@ -349,6 +346,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.BlockList", boost::bind(&LLFloaterPreference::onClickBlockList, this)); mCommitCallbackRegistrar.add("Pref.Proxy", boost::bind(&LLFloaterPreference::onClickProxySettings, this)); mCommitCallbackRegistrar.add("Pref.TranslationSettings", boost::bind(&LLFloaterPreference::onClickTranslationSettings, this)); + mCommitCallbackRegistrar.add("Pref.SpellChecker", boost::bind(&LLFloaterPreference::onClickSpellChecker, this)); sSkin = gSavedSettings.getString("SkinCurrent"); @@ -448,11 +446,6 @@ BOOL LLFloaterPreference::postBuild() getChild("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this)); - gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&LLFloaterPreference::refreshDictLists, this, false)); - getChild("combo_spellcheck_dict")->setCommitCallback(boost::bind(&LLFloaterPreference::refreshDictLists, this, false)); - getChild("btn_spellcheck_moveleft")->setCommitCallback(boost::bind(&LLFloaterPreference::onClickDictMove, this, "list_spellcheck_active", "list_spellcheck_available")); - getChild("btn_spellcheck_moveright")->setCommitCallback(boost::bind(&LLFloaterPreference::onClickDictMove, this, "list_spellcheck_available", "list_spellcheck_active")); - // if floater is opened before login set default localized busy message if (LLStartUp::getStartupState() < STATE_STARTED) { @@ -585,24 +578,6 @@ void LLFloaterPreference::apply() } } - if (hasChild("check_spellcheck"), TRUE) - { - std::list list_dict; - - LLComboBox* dict_combo = findChild("combo_spellcheck_dict"); - const std::string dict_name = dict_combo->getSelectedItemLabel(); - if (!dict_name.empty()) - { - list_dict.push_back(dict_name); - - LLScrollListCtrl* list_ctrl = findChild("list_spellcheck_active"); - std::vector list_items = list_ctrl->getAllData(); - for (std::vector::const_iterator item_it = list_items.begin(); item_it != list_items.end(); ++item_it) - list_dict.push_back((*item_it)->getColumn(0)->getValue().asString()); - } - gSavedSettings.setString("SpellCheckDictionary", boost::join(list_dict, ",")); - } - saveAvatarProperties(); if (mClickActionDirty) @@ -713,8 +688,6 @@ void LLFloaterPreference::onOpen(const LLSD& key) // Load (double-)click to walk/teleport settings. updateClickActionControls(); - refreshDictLists(true); - // Enabled/disabled popups, might have been changed by user actions // while preferences floater was closed. buildPopupLists(); @@ -894,25 +867,6 @@ void LLFloaterPreference::onNameTagOpacityChange(const LLSD& newvalue) } } -void LLFloaterPreference::onClickDictMove(const std::string& from, const std::string& to) -{ - LLScrollListCtrl* from_ctrl = findChild(from); - LLScrollListCtrl* to_ctrl = findChild(to); - - LLSD row; - row["columns"][0]["column"] = "name"; - row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; - row["columns"][0]["font"]["style"] = "NORMAL"; - - std::vector sel_items = from_ctrl->getAllSelected(); - for (std::vector::const_iterator sel_it = sel_items.begin(); sel_it != sel_items.end(); ++sel_it) - { - row["columns"][0]["value"] = (*sel_it)->getColumn(0)->getValue(); - to_ctrl->addElement(row); - } - from_ctrl->deleteSelectedItems(); -} - void LLFloaterPreference::onClickSetCache() { std::string cur_name(gSavedSettings.getString("CacheLocation")); @@ -978,84 +932,6 @@ void LLFloaterPreference::refreshSkin(void* data) self->getChild("skin_selection", true)->setValue(sSkin); } -void LLFloaterPreference::refreshDictLists(bool from_settings) -{ - bool enabled = gSavedSettings.getBOOL("SpellCheck"); - getChild("btn_spellcheck_moveleft")->setEnabled(enabled); - getChild("btn_spellcheck_moveright")->setEnabled(enabled); - - // Populate the dictionary combobox - LLComboBox* dict_combo = findChild("combo_spellcheck_dict"); - std::string dict_cur = dict_combo->getSelectedItemLabel(); - if ((dict_cur.empty() || from_settings) && (LLSpellChecker::getUseSpellCheck())) - dict_cur = LLSpellChecker::instance().getActiveDictionary(); - dict_combo->clearRows(); - dict_combo->setEnabled(enabled); - - const LLSD& dict_map = LLSpellChecker::getDictionaryMap(); - if (dict_map.size()) - { - for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) - { - const LLSD& dict = *dict_it; - if ( (dict["installed"].asBoolean()) && (dict["is_primary"].asBoolean()) && (dict.has("language")) ) - dict_combo->add(dict["language"].asString()); - } - if (!dict_combo->selectByValue(dict_cur)) - dict_combo->clear(); - } - - // Populate the available and active dictionary list - LLScrollListCtrl* avail_ctrl = findChild("list_spellcheck_available"); - LLScrollListCtrl* active_ctrl = findChild("list_spellcheck_active"); - - LLSpellChecker::dict_list_t active_list; - if ( ((!avail_ctrl->getItemCount()) && (!active_ctrl->getItemCount())) || (from_settings) ) - { - if (LLSpellChecker::getUseSpellCheck()) - active_list = LLSpellChecker::instance().getSecondaryDictionaries(); - } - else - { - std::vector active_items = active_ctrl->getAllData(); - for (std::vector::const_iterator item_it = active_items.begin(); item_it != active_items.end(); ++item_it) - { - std::string dict = (*item_it)->getColumn(0)->getValue().asString(); - if (dict_cur != dict) - active_list.push_back(dict); - } - } - - LLSD row; - row["columns"][0]["column"] = "name"; - row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; - row["columns"][0]["font"]["style"] = "NORMAL"; - - active_ctrl->clearRows(); - active_ctrl->setEnabled(enabled); - active_ctrl->sortByColumnIndex(0, true); - for (LLSpellChecker::dict_list_t::const_iterator it = active_list.begin(); it != active_list.end(); ++it) - { - row["columns"][0]["value"] = *it; - active_ctrl->addElement(row); - } - active_list.push_back(dict_cur); - - avail_ctrl->clearRows(); - avail_ctrl->setEnabled(enabled); - avail_ctrl->sortByColumnIndex(0, true); - for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) - { - const LLSD& dict = *dict_it; - if ( (dict["installed"].asBoolean()) && (dict.has("language")) && - (active_list.end() == std::find(active_list.begin(), active_list.end(), dict["language"].asString())) ) - { - row["columns"][0]["value"] = dict["language"].asString(); - avail_ctrl->addElement(row); - } - } -} - void LLFloaterPreference::buildPopupLists() { LLScrollListCtrl& disabled_popups = @@ -1639,6 +1515,11 @@ void LLFloaterPreference::onClickTranslationSettings() LLFloaterReg::showInstance("prefs_translation"); } +void LLFloaterPreference::onClickSpellChecker() +{ + LLFloaterReg::showInstance("prefs_spellchecker"); +} + void LLFloaterPreference::onClickActionChange() { mClickActionDirty = true; diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index af10af7f48..669099ad7b 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -121,7 +121,6 @@ public: void setCacheLocation(const LLStringExplicit& location); - void onClickDictMove(const std::string& from, const std::string& to); void onClickSetCache(); void onClickResetCache(); void onClickSkin(LLUICtrl* ctrl,const LLSD& userdata); @@ -158,11 +157,11 @@ public: void onClickBlockList(); void onClickProxySettings(); void onClickTranslationSettings(); + void onClickSpellChecker(); void applyUIColor(LLUICtrl* ctrl, const LLSD& param); void getUIColor(LLUICtrl* ctrl, const LLSD& param); void buildPopupLists(); - void refreshDictLists(bool from_settings); static void refreshSkin(void* data); private: static std::string sSkin; diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp new file mode 100644 index 0000000000..ff5afc8169 --- /dev/null +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -0,0 +1,179 @@ +/** + * @file llfloaterspellchecksettings.h + * @brief Spell checker settings floater + * +* $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llcombobox.h" +#include "llfloaterspellchecksettings.h" +#include "llscrolllistctrl.h" +#include "llspellcheck.h" +#include "llviewercontrol.h" + +#include + +LLFloaterSpellCheckerSettings::LLFloaterSpellCheckerSettings(const LLSD& key) + : LLFloater(key) +{ +} + +BOOL LLFloaterSpellCheckerSettings::postBuild(void) +{ + gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&LLFloaterSpellCheckerSettings::refreshDictionaryLists, this, false)); + getChild("spellcheck_main_combo")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::refreshDictionaryLists, this, false)); + getChild("spellcheck_moveleft_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onClickDictMove, this, "spellcheck_active_list", "spellcheck_available_list")); + getChild("spellcheck_moveright_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onClickDictMove, this, "spellcheck_available_list", "spellcheck_active_list")); + getChild("spellcheck_ok")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onOK, this)); + getChild("spellcheck_cancel")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onCancel, this)); + + return true; +} + +void LLFloaterSpellCheckerSettings::onCancel() +{ + closeFloater(false); +} + +void LLFloaterSpellCheckerSettings::onClickDictMove(const std::string& from, const std::string& to) +{ + LLScrollListCtrl* from_ctrl = findChild(from); + LLScrollListCtrl* to_ctrl = findChild(to); + + LLSD row; + row["columns"][0]["column"] = "name"; + row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; + row["columns"][0]["font"]["style"] = "NORMAL"; + + std::vector sel_items = from_ctrl->getAllSelected(); + for (std::vector::const_iterator sel_it = sel_items.begin(); sel_it != sel_items.end(); ++sel_it) + { + row["columns"][0]["value"] = (*sel_it)->getColumn(0)->getValue(); + to_ctrl->addElement(row); + } + from_ctrl->deleteSelectedItems(); +} + +void LLFloaterSpellCheckerSettings::onOK() +{ + std::list list_dict; + + LLComboBox* dict_combo = findChild("spellcheck_main_combo"); + const std::string dict_name = dict_combo->getSelectedItemLabel(); + if (!dict_name.empty()) + { + list_dict.push_back(dict_name); + + LLScrollListCtrl* list_ctrl = findChild("spellcheck_active_list"); + std::vector list_items = list_ctrl->getAllData(); + for (std::vector::const_iterator item_it = list_items.begin(); item_it != list_items.end(); ++item_it) + list_dict.push_back((*item_it)->getColumn(0)->getValue().asString()); + } + gSavedSettings.setString("SpellCheckDictionary", boost::join(list_dict, ",")); + + closeFloater(false); +} + +void LLFloaterSpellCheckerSettings::onOpen(const LLSD& key) +{ + refreshDictionaryLists(true); +} + +void LLFloaterSpellCheckerSettings::refreshDictionaryLists(bool from_settings) +{ + bool enabled = gSavedSettings.getBOOL("SpellCheck"); + getChild("spellcheck_moveleft_btn")->setEnabled(enabled); + getChild("spellcheck_moveright_btn")->setEnabled(enabled); + + // Populate the dictionary combobox + LLComboBox* dict_combo = findChild("spellcheck_main_combo"); + std::string dict_cur = dict_combo->getSelectedItemLabel(); + if ((dict_cur.empty() || from_settings) && (LLSpellChecker::getUseSpellCheck())) + dict_cur = LLSpellChecker::instance().getActiveDictionary(); + dict_combo->clearRows(); + dict_combo->setEnabled(enabled); + + const LLSD& dict_map = LLSpellChecker::getDictionaryMap(); + if (dict_map.size()) + { + for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) + { + const LLSD& dict = *dict_it; + if ( (dict["installed"].asBoolean()) && (dict["is_primary"].asBoolean()) && (dict.has("language")) ) + dict_combo->add(dict["language"].asString()); + } + if (!dict_combo->selectByValue(dict_cur)) + dict_combo->clear(); + } + + // Populate the available and active dictionary list + LLScrollListCtrl* avail_ctrl = findChild("spellcheck_available_list"); + LLScrollListCtrl* active_ctrl = findChild("spellcheck_active_list"); + + LLSpellChecker::dict_list_t active_list; + if ( ((!avail_ctrl->getItemCount()) && (!active_ctrl->getItemCount())) || (from_settings) ) + { + if (LLSpellChecker::getUseSpellCheck()) + active_list = LLSpellChecker::instance().getSecondaryDictionaries(); + } + else + { + std::vector active_items = active_ctrl->getAllData(); + for (std::vector::const_iterator item_it = active_items.begin(); item_it != active_items.end(); ++item_it) + { + std::string dict = (*item_it)->getColumn(0)->getValue().asString(); + if (dict_cur != dict) + active_list.push_back(dict); + } + } + + LLSD row; + row["columns"][0]["column"] = "name"; + row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; + row["columns"][0]["font"]["style"] = "NORMAL"; + + active_ctrl->clearRows(); + active_ctrl->setEnabled(enabled); + active_ctrl->sortByColumnIndex(0, true); + for (LLSpellChecker::dict_list_t::const_iterator it = active_list.begin(); it != active_list.end(); ++it) + { + row["columns"][0]["value"] = *it; + active_ctrl->addElement(row); + } + active_list.push_back(dict_cur); + + avail_ctrl->clearRows(); + avail_ctrl->setEnabled(enabled); + avail_ctrl->sortByColumnIndex(0, true); + for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) + { + const LLSD& dict = *dict_it; + if ( (dict["installed"].asBoolean()) && (dict.has("language")) && + (active_list.end() == std::find(active_list.begin(), active_list.end(), dict["language"].asString())) ) + { + row["columns"][0]["value"] = dict["language"].asString(); + avail_ctrl->addElement(row); + } + } +} diff --git a/indra/newview/llfloaterspellchecksettings.h b/indra/newview/llfloaterspellchecksettings.h new file mode 100644 index 0000000000..33c376fff6 --- /dev/null +++ b/indra/newview/llfloaterspellchecksettings.h @@ -0,0 +1,48 @@ +/** + * @file llfloaterspellchecksettings.h + * @brief Spell checker settings floater + * +* $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLFLOATERAUTOREPLACESETTINGS_H +#define LLFLOATERAUTOREPLACESETTINGS_H + +#include "llfloater.h" + +class LLFloaterSpellCheckerSettings : public LLFloater +{ +public: + LLFloaterSpellCheckerSettings(const LLSD& key); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onOpen(const LLSD& key); + +protected: + void onCancel(); + void onClickDictMove(const std::string& from, const std::string& to); + void onOK(); + void onSave(); + void refreshDictionaryLists(bool from_settings); +}; + +#endif // LLFLOATERAUTOREPLACESETTINGS_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 7fdaac68c8..e9ce04fd3f 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -100,6 +100,7 @@ #include "llfloatersidepanelcontainer.h" #include "llfloatersnapshot.h" #include "llfloatersounddevices.h" +#include "llfloaterspellchecksettings.h" #include "llfloatertelehub.h" #include "llfloatertestinspectors.h" #include "llfloatertestlistview.h" @@ -248,6 +249,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_proxy", "floater_preferences_proxy.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_hardware_settings", "floater_hardware_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("prefs_spellchecker", "floater_spellcheck.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_translation", "floater_translation_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("perm_prefs", "floater_perm_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("picks", "floater_picks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 9433866c4d..bd6faf4ed8 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -120,12 +120,6 @@ layout="topleft" help_topic="preferences_advanced1_tab" name="advanced1" /> - diff --git a/indra/newview/skins/default/xui/en/floater_spellcheck.xml b/indra/newview/skins/default/xui/en/floater_spellcheck.xml new file mode 100644 index 0000000000..bd3f60cf4a --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_spellcheck.xml @@ -0,0 +1,175 @@ + + + + + + Main dictionary : + + + + Additional dictionaries : + + + Available + + + Active + + + + + + + + \ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml b/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml deleted file mode 100644 index f1b16c5d0d..0000000000 --- a/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - Main dictionary : - - - - - Additional dictionaries : - - - Available - - - Active - - - - - - - -- cgit v1.2.3