From a10eb7b240675b009430f6718d410399d8045581 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 5 Nov 2013 19:30:38 -0800 Subject: further fix of inventory keyboard focus and tab order calculations --- indra/newview/llfloateravatarpicker.cpp | 2 +- indra/newview/llfloatermodelpreview.cpp | 32 +- indra/newview/llpanelgroup.cpp | 10 +- indra/newview/llpaneloutfitsinventory.cpp | 14 +- indra/newview/llviewermenu.cpp | 8 +- .../skins/default/xui/da/sidepanel_inventory.xml | 2 +- .../skins/default/xui/de/sidepanel_inventory.xml | 2 +- .../xui/en/floater_conversation_preview.xml | 1 - .../skins/default/xui/en/floater_im_session.xml | 2 - .../skins/default/xui/en/floater_toybox.xml | 1 - .../skins/default/xui/en/panel_bottomtray_lite.xml | 1 - .../skins/default/xui/en/panel_nearby_chat_bar.xml | 1 - .../skins/default/xui/en/panel_outfit_edit.xml | 963 ++++++++++----------- .../newview/skins/default/xui/en/panel_people.xml | 2 - .../skins/default/xui/es/sidepanel_inventory.xml | 2 +- .../skins/default/xui/fr/sidepanel_inventory.xml | 2 +- .../skins/default/xui/it/sidepanel_inventory.xml | 2 +- .../skins/default/xui/ja/sidepanel_inventory.xml | 2 +- .../skins/default/xui/pl/sidepanel_inventory.xml | 2 +- .../skins/default/xui/pt/sidepanel_inventory.xml | 2 +- .../skins/default/xui/ru/sidepanel_inventory.xml | 2 +- .../skins/default/xui/tr/sidepanel_inventory.xml | 2 +- .../skins/default/xui/zh/sidepanel_inventory.xml | 2 +- 23 files changed, 519 insertions(+), 540 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 7d091a79c5..c1e6673406 100755 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -736,7 +736,7 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD& if (search_results->isEmpty()) { LLStringUtil::format_map_t map; - map["[TEXT]"] = childGetText("Edit"); + map["[TEXT]"] = getChild("Edit")->getValue().asString(); LLSD item; item["id"] = LLUUID::null; item["columns"][0]["column"] = "name"; diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 05c08b038c..424fa293da 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -591,7 +591,7 @@ bool LLFloaterModelPreview::isViewOptionChecked(const LLSD& userdata) bool LLFloaterModelPreview::isViewOptionEnabled(const LLSD& userdata) { - return childIsEnabled(userdata.asString()); + return getChildView(userdata.asString())->getEnabled(); } void LLFloaterModelPreview::setViewOptionEnabled(const std::string& option, bool enabled) @@ -3587,11 +3587,11 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable if (lod == mPreviewLOD) { - mFMP->childSetText("lod_file_" + lod_name[lod], mLODFile[lod]); + mFMP->childSetValue("lod_file_" + lod_name[lod], mLODFile[lod]); } else if (lod == LLModel::LOD_PHYSICS) { - mFMP->childSetText("physics_file", mLODFile[lod]); + mFMP->childSetValue("physics_file", mLODFile[lod]); } mFMP->openFloater(); @@ -3606,7 +3606,7 @@ void LLModelPreview::setPhysicsFromLOD(S32 lod) mModel[LLModel::LOD_PHYSICS] = mModel[lod]; mScene[LLModel::LOD_PHYSICS] = mScene[lod]; mLODFile[LLModel::LOD_PHYSICS].clear(); - mFMP->childSetText("physics_file", mLODFile[LLModel::LOD_PHYSICS]); + mFMP->childSetValue("physics_file", mLODFile[LLModel::LOD_PHYSICS]); mVertexBuffer[LLModel::LOD_PHYSICS].clear(); rebuildUploadData(); refresh(); @@ -4322,8 +4322,8 @@ void LLModelPreview::updateStatusMessages() if (total_tris[lod] > 0) { - mFMP->childSetText(lod_triangles_name[lod], llformat("%d", total_tris[lod])); - mFMP->childSetText(lod_vertices_name[lod], llformat("%d", total_verts[lod])); + mFMP->childSetValue(lod_triangles_name[lod], llformat("%d", total_tris[lod])); + mFMP->childSetValue(lod_vertices_name[lod], llformat("%d", total_verts[lod])); } else { @@ -4344,8 +4344,8 @@ void LLModelPreview::updateStatusMessages() } } - mFMP->childSetText(lod_triangles_name[lod], mesh_status_na); - mFMP->childSetText(lod_vertices_name[lod], mesh_status_na); + mFMP->childSetValue(lod_triangles_name[lod], mesh_status_na); + mFMP->childSetValue(lod_vertices_name[lod], mesh_status_na); } const U32 lod_high = LLModel::LOD_HIGH; @@ -4394,7 +4394,7 @@ void LLModelPreview::updateStatusMessages() if (lod == mPreviewLOD) { - mFMP->childSetText("lod_status_message_text", mFMP->getString(message)); + mFMP->childSetValue("lod_status_message_text", mFMP->getString(message)); icon = mFMP->getChild("lod_status_message_icon"); icon->setImage(img); } @@ -4645,12 +4645,12 @@ void LLModelPreview::updateLodControls(S32 lod) fmp->mLODMode[lod] = 0; for (U32 i = 0; i < num_file_controls; ++i) { - mFMP->childShow(file_controls[i] + lod_name[lod]); + mFMP->childSetVisible(file_controls[i] + lod_name[lod], true); } for (U32 i = 0; i < num_lod_controls; ++i) { - mFMP->childHide(lod_controls[i] + lod_name[lod]); + mFMP->childSetVisible(lod_controls[i] + lod_name[lod], true); } } else if (lod_mode == USE_LOD_ABOVE) // use LoD above @@ -4658,12 +4658,12 @@ void LLModelPreview::updateLodControls(S32 lod) fmp->mLODMode[lod] = 2; for (U32 i = 0; i < num_file_controls; ++i) { - mFMP->childHide(file_controls[i] + lod_name[lod]); + mFMP->childSetVisible(file_controls[i] + lod_name[lod], false); } for (U32 i = 0; i < num_lod_controls; ++i) { - mFMP->childHide(lod_controls[i] + lod_name[lod]); + mFMP->childSetVisible(lod_controls[i] + lod_name[lod], false); } if (lod < LLModel::LOD_HIGH) @@ -4688,12 +4688,12 @@ void LLModelPreview::updateLodControls(S32 lod) for (U32 i = 0; i < num_file_controls; ++i) { - mFMP->childHide(file_controls[i] + lod_name[lod]); + mFMP->getChildView(file_controls[i] + lod_name[lod])->setVisible(false); } for (U32 i = 0; i < num_lod_controls; ++i) { - mFMP->childShow(lod_controls[i] + lod_name[lod]); + mFMP->getChildView(lod_controls[i] + lod_name[lod])->setVisible(true); } @@ -5644,7 +5644,7 @@ void LLModelPreview::setPreviewLOD(S32 lod) LLComboBox* combo_box = mFMP->getChild("preview_lod_combo"); combo_box->setCurrentByIndex((NUM_LOD-1)-mPreviewLOD); // combo box list of lods is in reverse order - mFMP->childSetText("lod_file_" + lod_name[mPreviewLOD], mLODFile[mPreviewLOD]); + mFMP->childSetValue("lod_file_" + lod_name[mPreviewLOD], mLODFile[mPreviewLOD]); LLComboBox* combo_box2 = mFMP->getChild("preview_lod_combo2"); combo_box2->setCurrentByIndex((NUM_LOD-1)-mPreviewLOD); // combo box list of lods is in reverse order diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index c9a066864c..30bbc5dba0 100755 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -329,8 +329,9 @@ void LLPanelGroup::update(LLGroupChange gc) if(gdatap) { std::string group_name = gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName; - childSetValue("group_name", group_name); - childSetToolTip("group_name",group_name); + LLUICtrl* group_name_ctrl = getChild("group_name"); + group_name_ctrl->setValue(group_name); + group_name_ctrl->setToolTip(group_name); LLGroupData agent_gdatap; bool is_member = gAgent.getGroupData(mID,agent_gdatap) || gAgent.isGodlike(); @@ -376,8 +377,9 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) if(gdatap) { std::string group_name = gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName; - childSetValue("group_name", group_name); - childSetToolTip("group_name",group_name); + LLUICtrl* group_name_ctrl = getChild("group_name"); + group_name_ctrl->setValue(group_name); + group_name_ctrl->setToolTip(group_name); } LLButton* button_apply = findChild("btn_apply"); diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index f90236f6f2..3e106c8d69 100755 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -242,18 +242,12 @@ void LLPanelOutfitsInventory::updateListCommands() bool wear_visible = !isCOFPanelActive(); bool make_outfit_enabled = isActionEnabled("save_outfit"); + LLButton* wear_btn = mListCommands->getChild("wear_btn"); mMyOutfitsPanel->childSetEnabled("trash_btn", trash_enabled); - mListCommands->childSetEnabled("wear_btn", wear_enabled); - mListCommands->childSetVisible("wear_btn", wear_visible); + wear_btn->setEnabled(wear_enabled); + wear_btn->setVisible(wear_visible); mSaveComboBtn->setMenuItemEnabled("save_outfit", make_outfit_enabled); - if (mMyOutfitsPanel->hasItemSelected()) - { - mListCommands->childSetToolTip("wear_btn", getString("wear_items_tooltip")); - } - else - { - mListCommands->childSetToolTip("wear_btn", getString("wear_outfit_tooltip")); - } + wear_btn->setToolTip(getString(mMyOutfitsPanel->hasItemSelected() ? "wear_items_tooltip" : "wear_outfit_tooltip")); } void LLPanelOutfitsInventory::onTrashButtonClick() diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 05b1236df5..981e0e3fdb 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2537,11 +2537,11 @@ bool enable_object_touch(LLUICtrl* ctrl) LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); if (node && node->mValid && !node->mTouchName.empty()) { - gMenuHolder->childSetText(item_name, node->mTouchName); + gMenuHolder->childSetValue(item_name, node->mTouchName); } else { - gMenuHolder->childSetText(item_name, get_default_item_label(item_name)); + gMenuHolder->childSetValue(item_name, get_default_item_label(item_name)); } return new_value; @@ -5951,11 +5951,11 @@ bool enable_object_sit(LLUICtrl* ctrl) LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); if (node && node->mValid && !node->mSitName.empty()) { - gMenuHolder->childSetText(item_name, node->mSitName); + gMenuHolder->childSetValue(item_name, node->mSitName); } else { - gMenuHolder->childSetText(item_name, get_default_item_label(item_name)); + gMenuHolder->childSetValue(item_name, get_default_item_label(item_name)); } } return !sitting_on_sel && is_object_sittable(); diff --git a/indra/newview/skins/default/xui/da/sidepanel_inventory.xml b/indra/newview/skins/default/xui/da/sidepanel_inventory.xml index b3293b981e..b4b494cafa 100755 --- a/indra/newview/skins/default/xui/da/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/da/sidepanel_inventory.xml @@ -1,6 +1,6 @@ - + diff --git a/indra/newview/skins/default/xui/de/sidepanel_inventory.xml b/indra/newview/skins/default/xui/de/sidepanel_inventory.xml index 18aad64f96..2585c5dc90 100755 --- a/indra/newview/skins/default/xui/de/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/de/sidepanel_inventory.xml @@ -1,6 +1,6 @@ - + diff --git a/indra/newview/skins/default/xui/en/floater_conversation_preview.xml b/indra/newview/skins/default/xui/en/floater_conversation_preview.xml index 764b9d8385..99ad59a7a3 100755 --- a/indra/newview/skins/default/xui/en/floater_conversation_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_conversation_preview.xml @@ -2,7 +2,6 @@ - - - - - - - - + + + + + + + + (N\A) @@ -47,475 +47,466 @@ (unknown) - - - - - - + + + + + + + + - - -