diff --git a/indra/newview/aoremotectrl.cpp b/indra/newview/aoremotectrl.cpp index 8cafdd98e..d9b782fca 100644 --- a/indra/newview/aoremotectrl.cpp +++ b/indra/newview/aoremotectrl.cpp @@ -84,8 +84,11 @@ BOOL AORemoteCtrl::postBuild() { childSetAction("ao_btn", onClickToggleAO, this); - childSetAction("ao_sit_btn", onClickToggleAOSit, this); - childSetAction("ao_show_btn", onClickShowAO, this); + if (gSavedSettings.getBOOL("ShowAOSitPopup")) + { + childSetAction("ao_sit_btn", onClickToggleAOSit, this); + //childSetAction("ao_show_btn", onClickShowAO, this); + } childSetAction("popup_btn", onClickPopupBtn, this); return TRUE; diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp index ba835d7ac..68d4a1f03 100644 --- a/indra/newview/ascentprefssys.cpp +++ b/indra/newview/ascentprefssys.cpp @@ -394,22 +394,22 @@ void LLPrefsAscentSys::refresh() childSetValue("SinguCmdLineAway", mCmdLineAway); //Build ------------------------------------------------------------------------------- - childSetValue("EmeraldBuildPrefs_Alpha", mAlpha); - getChild("EmeraldBuildPrefs_Color")->setOriginal(mColor); - childSetValue("EmeraldBuildPrefs_FullBright", mFullBright); - childSetValue("EmeraldBuildPrefs_Glow", mGlow); - childSetValue("BuildPrefs_Material", mMaterial); - childSetValue("NextOwnerCopy", mNextCopy); - childSetValue("NextOwnerModify", mNextMod); - childSetValue("NextOwnerTransfer", mNextTrans); - childSetValue("EmeraldBuildPrefs_Phantom", mPhantom); - childSetValue("EmeraldBuildPrefs_Physical", mPhysical); - childSetValue("EmeraldBuildPrefs_Shiny", mShiny); - childSetValue("EmeraldBuildPrefs_Temporary", mTemporary); - childSetValue("EmeraldBuildPrefs_Texture", mTexture); - childSetValue("BuildPrefs_Xsize", mXsize); - childSetValue("BuildPrefs_Ysize", mYsize); - childSetValue("BuildPrefs_Zsize", mZsize); + childSetValue("alpha", mAlpha); + getChild("colorswatch")->setOriginal(mColor); + childSetValue("EmFBToggle", mFullBright); + childSetValue("glow", mGlow); + childSetValue("material", mMaterial); + childSetValue("next_owner_copy", mNextCopy); + childSetValue("next_owner_modify", mNextMod); + childSetValue("next_owner_transfer", mNextTrans); + childSetValue("EmPhantomToggle", mPhantom); + childSetValue("EmPhysicalToggle", mPhysical); + childSetValue("combobox shininess", mShiny); + childSetValue("EmTemporaryToggle", mTemporary); + childSetValue("texture control", mTexture); + childSetValue("X size", mXsize); + childSetValue("Y size", mYsize); + childSetValue("Z size", mZsize); } void LLPrefsAscentSys::cancel() diff --git a/indra/newview/ascentprefsvan.cpp b/indra/newview/ascentprefsvan.cpp index 449745d5a..8294d14d6 100644 --- a/indra/newview/ascentprefsvan.cpp +++ b/indra/newview/ascentprefsvan.cpp @@ -57,7 +57,7 @@ LLPrefsAscentVan::LLPrefsAscentVan() { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_vanity.xml"); - childSetVisible("announce_streaming_metadata", gAudiop && gAudiop->getStreamingAudioImpl() && gAudiop->getStreamingAudioImpl()->supportsMetaData()); + childSetVisible("announce_stream_metadata", gAudiop && gAudiop->getStreamingAudioImpl() && gAudiop->getStreamingAudioImpl()->supportsMetaData()); childSetCommitCallback("tag_spoofing_combobox", onCommitClientTag, this); diff --git a/indra/newview/floaterao.cpp b/indra/newview/floaterao.cpp index 59f922cca..b7ab4994e 100644 --- a/indra/newview/floaterao.cpp +++ b/indra/newview/floaterao.cpp @@ -356,9 +356,9 @@ BOOL LLFloaterAO::postBuild() childSetAction("newcard",onClickNewCard,this); childSetAction("prevstand",onClickPrevStand,this); childSetAction("nextstand",onClickNextStand,this); - getChild("AOEnabled")->setCommitCallback(boost::bind(&LLFloaterAO::onClickToggleAO)); - getChild("AOSitsEnabled")->setCommitCallback(boost::bind(&LLFloaterAO::onClickToggleSits)); - getChild("standtime")->setCommitCallback(boost::bind(&LLFloaterAO::onSpinnerCommit,_1)); + getChild("AOEnabled")->setCommitCallback(boost::bind(&LLFloaterAO::onClickToggleAO)); + getChild("AOSitsEnabled")->setCommitCallback(boost::bind(&LLFloaterAO::onClickToggleSits)); + getChild("standtime")->setCommitCallback(boost::bind(&LLFloaterAO::onSpinnerCommit,_1)); mcomboBox_stands = getChild("stands"); mcomboBox_walks = getChild("walks"); mcomboBox_runs = getChild("runs"); @@ -593,7 +593,6 @@ void LLFloaterAO::updateLayout(LLFloaterAO* floater) floater->childSetVisible("sits", advanced); floater->childSetVisible("gsits", advanced); floater->childSetVisible("crouchs", advanced); - floater->childSetVisible("crouchwalks", advanced); floater->childSetVisible("falls", advanced); floater->childSetVisible("hovers", advanced); floater->childSetVisible("flys", advanced); diff --git a/indra/newview/hippopanelgrids.cpp b/indra/newview/hippopanelgrids.cpp index 6af943c5b..61ebcdde2 100644 --- a/indra/newview/hippopanelgrids.cpp +++ b/indra/newview/hippopanelgrids.cpp @@ -133,7 +133,7 @@ BOOL HippoPanelGridsImpl::postBuild() requires("btn_add"); requires("btn_copy"); requires("btn_default"); - requires("btn_gridinfo"); + //requires("btn_gridinfo"); requires("btn_help_render_compat"); if (!checkRequirements()) return false; @@ -146,7 +146,7 @@ BOOL HippoPanelGridsImpl::postBuild() childSetAction("btn_add", onClickAdd, this); childSetAction("btn_copy", onClickCopy, this); childSetAction("btn_default", onClickDefault, this); - childSetAction("btn_gridinfo", onClickGridInfo, this); + //childSetAction("btn_gridinfo", onClickGridInfo, this); childSetAction("btn_help_render_compat", onClickHelpRenderCompat, this); childSetAction("btn_advanced", onClickAdvanced, this); diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 12e26b1c4..1aa85644e 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -87,7 +87,7 @@ const F32 AGENT_TYPING_TIMEOUT = 5.f; // seconds LLChatBar *gChatBar = NULL; // legacy calllback glue -void toggleChatHistory(void* user_data); +void toggleChatHistory(LLUICtrl*, const LLSD&); //void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-0.2.2a void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel); @@ -137,19 +137,16 @@ LLChatBar::~LLChatBar() BOOL LLChatBar::postBuild() { - childSetAction("History", toggleChatHistory, this); - getChild("Say")->setCommitCallback(boost::bind(&LLChatBar::onClickSay, this, _1)); + if (LLUICtrl* history_ctrl = findChild("History")) + history_ctrl->setCommitCallback(toggleChatHistory); + if (LLUICtrl* say_ctrl = getChild("Say")) + say_ctrl->setCommitCallback(boost::bind(&LLChatBar::onClickSay, this, _1)); // attempt to bind to an existing combo box named gesture - setGestureCombo(getChild( "Gesture")); + if (LLComboBox* gesture_combo = findChild("Gesture")) + setGestureCombo(gesture_combo); - LLButton * sayp = getChild("Say"); - if(sayp) - { - setDefaultBtn(sayp); - } - - mInputEditor = getChild("Chat Editor"); + mInputEditor = findChild("Chat Editor"); if (mInputEditor) { mInputEditor->setCallbackUserData(this); @@ -165,9 +162,6 @@ BOOL LLChatBar::postBuild() mInputEditor->setEnableLineHistory(TRUE); } - mHistoryBtn.connect(this,"History"); - mSayBtn.connect(this,"Say"); - mIsBuilt = TRUE; return TRUE; @@ -231,9 +225,11 @@ void LLChatBar::refresh() gAgent.stopTyping(); } - mHistoryBtn->setValue(LLFloaterChat::instanceVisible(LLSD())); + if (LLUICtrl* history_ctrl = findChild("History")) + history_ctrl->setValue(LLFloaterChat::instanceVisible()); - mSayBtn->setEnabled(mInputEditor->getText().size() > 0); + if (LLUICtrl* say_ctrl = getChild("Say")) + say_ctrl->setEnabled(mInputEditor->getText().size() > 0); //childSetEnabled("Shout", mInputEditor->getText().size() > 0); createDummyWidget Making Dummy -HgB } @@ -897,7 +893,7 @@ void LLChatBar::onCommitGesture(LLUICtrl* ctrl) } } -void toggleChatHistory(void* user_data) +void toggleChatHistory(LLUICtrl* ctrl, const LLSD&) { LLFloaterChat::toggleInstance(LLSD()); } diff --git a/indra/newview/llchatbar.h b/indra/newview/llchatbar.h index 5e0391d08..c4fed67d9 100644 --- a/indra/newview/llchatbar.h +++ b/indra/newview/llchatbar.h @@ -110,9 +110,6 @@ protected: LLComboBox* mGestureCombo; LLChatBarGestureObserver* mObserver; - - CachedUICtrl mHistoryBtn; - CachedUICtrl mSayBtn; }; extern LLChatBar *gChatBar; diff --git a/indra/newview/llfloateractivespeakers.cpp b/indra/newview/llfloateractivespeakers.cpp index 88e6ceab0..0b4843de2 100644 --- a/indra/newview/llfloateractivespeakers.cpp +++ b/indra/newview/llfloateractivespeakers.cpp @@ -324,29 +324,33 @@ BOOL LLPanelActiveSpeakers::postBuild() mSpeakerList->setSortChangedCallback(boost::bind(&LLPanelActiveSpeakers::onSortChanged,this)); mSpeakerList->setCallbackUserData(this); - mMuteTextCtrl = getChild("mute_text_btn"); - childSetCommitCallback("mute_text_btn", onClickMuteTextCommit, this); + if ((mMuteTextCtrl = findChild("mute_text_btn"))) + childSetCommitCallback("mute_text_btn", onClickMuteTextCommit, this); mMuteVoiceCtrl = getChild("mute_btn"); childSetCommitCallback("mute_btn", onClickMuteVoiceCommit, this); childSetCommitCallback("speaker_volume", onVolumeChange, this); - mNameText = getChild("resident_name"); + mNameText = findChild("resident_name"); - mProfileBtn = getChild("profile_btn"); - childSetAction("profile_btn", onClickProfile, this); + if ((mProfileBtn = findChild("profile_btn"))) + childSetAction("profile_btn", onClickProfile, this); - childSetCommitCallback("moderator_allow_voice", onModeratorMuteVoice, this); - childSetCommitCallback("moderator_allow_text", onModeratorMuteText, this); - childSetCommitCallback("moderation_mode", onChangeModerationMode, this); + if (findChild("moderator_allow_voice")) + { + childSetCommitCallback("moderator_allow_voice", onModeratorMuteVoice, this); + mModeratorAllowVoiceCheckbox.connect(this,"moderator_allow_voice"); + } + if (findChild("moderator_allow_text")) + { + childSetCommitCallback("moderator_allow_text", onModeratorMuteText, this); + mModeratorAllowTextCheckbox.connect(this,"moderator_allow_text"); + } + if (findChild("moderator_mode")) + childSetCommitCallback("moderation_mode", onChangeModerationMode, this); mVolumeSlider.connect(this,"speaker_volume"); - mModeratorCtrlLbl.connect(this,"moderator_controls_label"); - mModeratorAllowVoiceCheckbox.connect(this,"moderator_allow_voice"); - mModeratorAllowTextCheckbox.connect(this,"moderator_allow_text"); - mModeratorModePanel.connect(this,"moderation_mode_panel"); - mModeratorControlsPanel.connect(this,"moderator_controls"); // update speaker UI handleSpeakerSelect(); @@ -628,7 +632,8 @@ void LLPanelActiveSpeakers::refreshSpeakers() && selected_id != gAgent.getID() && (selected_speakerp.notNull() && (selected_speakerp->mType == LLSpeaker::SPEAKER_AGENT || selected_speakerp->mType == LLSpeaker::SPEAKER_EXTERNAL))); - mModeratorCtrlLbl->setEnabled(selected_id.notNull()); + if (LLView* view = findChild("moderator_controls_label")) + view->setEnabled(selected_id.notNull()); mModeratorAllowVoiceCheckbox->setEnabled( selected_id.notNull() @@ -660,8 +665,10 @@ void LLPanelActiveSpeakers::refreshSpeakers() LLPointer self_speakerp = mSpeakerMgr->findSpeaker(gAgent.getID()); if(self_speakerp) { - mModeratorModePanel->setVisible(self_speakerp->mIsModerator && mSpeakerMgr->isVoiceActive()); - mModeratorControlsPanel->setVisible(self_speakerp->mIsModerator); + if (LLView* view = findChild("moderation_mode_panel")) + view->setVisible(self_speakerp->mIsModerator && mSpeakerMgr->isVoiceActive()); + if (LLView* view = findChild("moderator_controls")) + view->setVisible(self_speakerp->mIsModerator); } // keep scroll value stable diff --git a/indra/newview/llfloateractivespeakers.h b/indra/newview/llfloateractivespeakers.h index efad321cb..3c3d586bf 100644 --- a/indra/newview/llfloateractivespeakers.h +++ b/indra/newview/llfloateractivespeakers.h @@ -299,11 +299,8 @@ protected: LLPointer mSpeakerClearListener; CachedUICtrl mVolumeSlider; - CachedUICtrl mModeratorCtrlLbl; CachedUICtrl mModeratorAllowVoiceCheckbox; CachedUICtrl mModeratorAllowTextCheckbox; - CachedUICtrl mModeratorModePanel; - CachedUICtrl mModeratorControlsPanel; }; diff --git a/indra/newview/llfloaterblacklist.cpp b/indra/newview/llfloaterblacklist.cpp index dd3443019..44e03ed16 100644 --- a/indra/newview/llfloaterblacklist.cpp +++ b/indra/newview/llfloaterblacklist.cpp @@ -51,7 +51,7 @@ BOOL LLFloaterBlacklist::postBuild() childSetAction("remove_btn", onClickRemove, this); childSetAction("save_btn", onClickSave, this); childSetAction("load_btn", onClickLoad, this); - childSetAction("rerender_btn", onClickRerender, this); + //childSetAction("rerender_btn", onClickRerender, this); childSetVisible("copy_uuid_btn",false); LLComboBox* box = getChild("asset_combo"); box->add("Texture",LLSD(0)); diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 4f0c470e9..7e1cfcd73 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -110,12 +110,11 @@ LLFloaterChat::LLFloaterChat(const LLSD& seed) LLUICtrlFactory::getInstance()->buildFloater(this, "floater_chat_history.xml", &getFactoryMap(), /*no_open =*/false); childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes - childSetCommitCallback("translate chat",onClickToggleTranslateChat,this); - childSetValue("translate chat", gSavedSettings.getBOOL("TranslateChat")); + //childSetCommitCallback("translate chat",onClickToggleTranslateChat,this); + //childSetValue("translate chat", gSavedSettings.getBOOL("TranslateChat")); childSetVisible("Chat History Editor with mute",FALSE); childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this); childSetAction("chat_history_open", onClickChatHistoryOpen, this); - setDefaultBtn("Chat"); } LLFloaterChat::~LLFloaterChat() diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp index e4bebeec3..9a56acfec 100644 --- a/indra/newview/llfloaterchatterbox.cpp +++ b/indra/newview/llfloaterchatterbox.cpp @@ -272,7 +272,7 @@ void LLFloaterChatterBox::addFloater(LLFloater* floaterp, { mTabContainer->unlockTabs(); // add chat history as second tab if contact window is present, first tab otherwise - if (getChildView("floater_my_friends")) + if (findChild("floater_my_friends")) { // assuming contacts window is first tab, select it mTabContainer->selectFirstTab(); diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index 1eb0ca856..20138b063 100644 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -123,7 +123,6 @@ void LLFloaterDisplayName::onOpen() getChild("lockout_text")->setTextArg("[TIME]", next_update_string_time); getChild("lockout_text")->setVisible(true); - getChild("no_lockout_text")->setVisible(false); getChild("save_btn")->setEnabled(false); getChild("display_name_editor")->setEnabled(false); getChild("display_name_confirm")->setEnabled(false); @@ -133,7 +132,6 @@ void LLFloaterDisplayName::onOpen() else { getChild("lockout_text")->setVisible(false); - getChild("no_lockout_text")->setVisible(true); getChild("save_btn")->setEnabled(true); getChild("display_name_editor")->setEnabled(true); getChild("display_name_confirm")->setEnabled(true); diff --git a/indra/newview/llfloaterenvsettings.cpp b/indra/newview/llfloaterenvsettings.cpp index 905ad3b68..9e59cf046 100644 --- a/indra/newview/llfloaterenvsettings.cpp +++ b/indra/newview/llfloaterenvsettings.cpp @@ -88,7 +88,6 @@ void LLFloaterEnvSettings::initCallbacks(void) // WL Top childSetAction("EnvAdvancedSkyButton", onOpenAdvancedSky, NULL); childSetAction("EnvAdvancedWaterButton", onOpenAdvancedWater, NULL); - childSetAction("EnvSubmitWindlight", onSubmitWindlight, NULL); childSetAction("EnvUseEstateTimeButton", onUseEstateTime, NULL); childSetAction("EnvSettingsHelpButton", onClickHelp, this); } @@ -285,21 +284,6 @@ void LLFloaterEnvSettings::onOpenAdvancedWater(void* userData) LLFloaterWater::show(); } -void LLFloaterEnvSettings::onSubmitWindlight(void* userData) -{ - Meta7WindlightPacket * wl = new Meta7WindlightPacket(); - - LLWaterParamManager * param_mgr = LLWaterParamManager::getInstance(); - wl->reflectionWaveletScale.X = param_mgr->mNormalScale.mX; - wl->reflectionWaveletScale.Y = param_mgr->mNormalScale.mY; - wl->reflectionWaveletScale.Z = param_mgr->mNormalScale.mZ; - - - std::vector strings; - strings.push_back((char*)wl); - send_generic_message("Windlight", strings); -} - void LLFloaterEnvSettings::onUseEstateTime(void* userData) { if(LLFloaterWindLight::isOpen()) diff --git a/indra/newview/llfloaterenvsettings.h b/indra/newview/llfloaterenvsettings.h index 49bf4fd0d..4cdf6036c 100644 --- a/indra/newview/llfloaterenvsettings.h +++ b/indra/newview/llfloaterenvsettings.h @@ -78,9 +78,6 @@ public: /// open the advanced water settings menu static void onOpenAdvancedWater(void* userData); - /// submit windlight settings to the estate - static void onSubmitWindlight(void* userData); - /// sync time with the server static void onUseEstateTime(void* userData); diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 66c41cd7b..f7b27c18b 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -114,11 +114,11 @@ BOOL LLFloaterGesture::postBuild() setTitle(label); - LLScrollListCtrl* gesture_list = getChild("avatar_list"); + LLScrollListCtrl* gesture_list = getChild("gesture_list"); gesture_list->setCommitCallback(boost::bind(&LLFloaterGesture::onCommitList,this)); gesture_list->setDoubleClickCallback(boost::bind(&LLFloaterGesture::onClickPlay,this)); - childSetAction("inventory_btn", onClickInventory, this); + //childSetAction("inventory_btn", onClickInventory, this); childSetAction("edit_btn", onClickEdit, this); @@ -323,6 +323,7 @@ void LLFloaterGesture::buildGestureList() } } +/* // static void LLFloaterGesture::onClickInventory(void* data) { @@ -336,6 +337,7 @@ void LLFloaterGesture::onClickInventory(void* data) if (!inv) return; inv->getPanel()->setSelection(item_id, TRUE); } +*/ // static void LLFloaterGesture::onClickPlay(void* data) diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 0c8e7914e..34a51e018 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -62,9 +62,6 @@ #include "hippogridmanager.h" -// -#include "llclipboard.h" -// // [RLVa:KB] #include "rlvhandler.h" @@ -166,9 +163,6 @@ LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect& mItemID(item_id), mObjectID(object_id), mDirty(TRUE) - // - , mExpanded(FALSE) - // { LLUICtrlFactory::getInstance()->buildFloater(this,"floater_inventory_item_properties.xml"); @@ -212,13 +206,6 @@ LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect& childSetCommitCallback("RadioSaleType",&onCommitSaleType, this); // "Price" label for edit childSetCommitCallback("EditPrice",&onCommitSaleInfo, this); - // - childSetAction("more_btn", &onClickMore, this); - childSetAction("less_btn", &onClickLess, this); - childSetAction("copy_btn", &onClickCopy, this); - childSetAction("update_btn", &onClickUpdate, this); - setExpanded(mExpanded); - // // The UI has been built, now fill in all the values refresh(); } @@ -308,28 +295,6 @@ void LLFloaterProperties::draw() void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) { - // - childSetText("EditItemID", item->getUUID().asString()); - childSetText("EditFolderID", item->getParentUUID().asString()); - childSetText("EditGroup", item->getPermissions().getGroup().asString()); - childSetText("EditAssetID", item->getAssetUUID().asString()); - - std::string type_str = LLAssetType::lookup(item->getType()); - if(type_str.c_str() == NULL) type_str = llformat("%d", item->getType()); - childSetText("EditType", type_str); - - std::string invtype_str = LLInventoryType::lookup(item->getInventoryType()); - if(invtype_str.c_str() == NULL) invtype_str = llformat("%d", item->getInventoryType()); - childSetText("EditInvType", invtype_str); - childSetText("EditFlags", llformat("%d", item->getFlags())); - - std::ostringstream strm; - item->exportLegacyStream(strm, TRUE); - std::string str(strm.str()); - LLStringUtil::replaceTabsWithSpaces(str, 4); - childSetText("item_text", str); - // - //////////////////////// // PERMISSIONS LOOKUP // //////////////////////// @@ -1010,163 +975,14 @@ void LLFloaterProperties::closeByID(const LLUUID& item_id, const LLUUID &object_ } } -// -void LLFloaterProperties::onClickMore(void* user_data) -{ - LLFloaterProperties* floaterp = (LLFloaterProperties*)user_data; - if(floaterp) - { - LLMultiProperties* host = (LLMultiProperties*)floaterp->getHost(); - if(host) - host->setExpanded(TRUE); - else - floaterp->setExpanded(TRUE); - } -} - -void LLFloaterProperties::onClickLess(void* user_data) -{ - LLFloaterProperties* floaterp = (LLFloaterProperties*)user_data; - if(floaterp) - { - LLMultiProperties* host = (LLMultiProperties*)floaterp->getHost(); - if(host) - host->setExpanded(FALSE); - else - floaterp->setExpanded(FALSE); - } -} - -void LLFloaterProperties::setExpanded(BOOL expanded) -{ - mExpanded = expanded; - LLRect rect = getRect(); - if(expanded) - rect.setOriginAndSize(rect.mLeft, rect.mBottom, 800, rect.getHeight()); - else - rect.setOriginAndSize(rect.mLeft, rect.mBottom, 350, rect.getHeight()); - setRect(rect); - childSetVisible("more_btn", !mExpanded); - childSetVisible("less_btn", mExpanded); - childSetVisible("item_text", mExpanded); - childSetVisible("copy_btn", mExpanded); - childSetVisible("update_btn", mExpanded); - if(getHost()) - setCanTearOff(!expanded); // idk why it comes out ugly if expanded -} - -// static -void LLFloaterProperties::onClickCopy(void* user_data) -{ - LLFloaterProperties* floaterp = (LLFloaterProperties*)user_data; - if(floaterp) - { - LLViewerInventoryItem* item = (LLViewerInventoryItem*)floaterp->findItem(); - if(item) - { - std::string str(floaterp->childGetValue("item_text").asString()); - std::string::size_type pos; - while((pos = str.find(" ")) != std::string::npos) - { - str.replace(pos, 4, "\t"); - } - - std::istringstream strm(str); - LLViewerInventoryItem* temp = new LLViewerInventoryItem(); - temp->importLegacyStream(strm); - std::ostringstream strm2; - temp->exportLegacyStream(strm2, TRUE); - LLWString wstr(utf8str_to_wstring(strm2.str())); - - gClipboard.copyFromSubstring(wstr, 0, wstr.length()); - - //delete temp; - } - } -} - -// static -void LLFloaterProperties::onClickUpdate(void* user_data) -{ - LLFloaterProperties* floaterp = (LLFloaterProperties*)user_data; - if(floaterp) - { - LLViewerInventoryItem* item = (LLViewerInventoryItem*)floaterp->findItem(); - if(item) - { - std::string str(floaterp->childGetValue("item_text").asString()); - std::string::size_type pos; - while((pos = str.find(" ")) != std::string::npos) - { - str.replace(pos, 4, "\t"); - } - - std::istringstream strm(str); - item->importLegacyStream(strm); - - if(floaterp->mObjectID.isNull()) - { - // This is in the agent's inventory. - item->updateServer(FALSE); - gInventory.updateItem(item); - gInventory.notifyObservers(); - - item->setComplete(FALSE); - item->fetchFromServer(); - } - else - { - // This is in an object's contents. - LLViewerObject* object = gObjectList.findObject(floaterp->mObjectID); - if(object) - { - object->updateInventory( - item, - TASK_INVENTORY_ITEM_KEY, - false); - object->fetchInventoryFromServer(); - } - } - } - } -} -// - ///---------------------------------------------------------------------------- /// LLMultiProperties ///---------------------------------------------------------------------------- LLMultiProperties::LLMultiProperties(const LLRect &rect) : LLMultiFloater(std::string("Properties"), rect) -// -, mExpanded(FALSE) -// { } -void LLMultiProperties::setExpanded(BOOL expanded) -{ - mExpanded = expanded; - LLRect rect = getRect(); - LLRect tab_rect = mTabContainer->getRect(); - if(expanded) - { - rect.setOriginAndSize(rect.mLeft, rect.mBottom, 800, rect.getHeight()); - tab_rect.setOriginAndSize(tab_rect.mLeft, tab_rect.mBottom, 800, tab_rect.getHeight()); - } - else - { - rect.setOriginAndSize(rect.mLeft, rect.mBottom, 350, rect.getHeight()); - tab_rect.setOriginAndSize(tab_rect.mLeft, tab_rect.mBottom, 350, tab_rect.getHeight()); - } - setRect(rect); - mTabContainer->setRect(tab_rect); - for (S32 i = 0; i < mTabContainer->getTabCount(); i++) - { - LLFloaterProperties* floaterp = (LLFloaterProperties*)mTabContainer->getPanelByIndex(i); - floaterp->setExpanded(expanded); - } -} - ///---------------------------------------------------------------------------- /// Local function definitions ///---------------------------------------------------------------------------- diff --git a/indra/newview/llfloaterproperties.h b/indra/newview/llfloaterproperties.h index cf72ddecc..fe54bcd0e 100644 --- a/indra/newview/llfloaterproperties.h +++ b/indra/newview/llfloaterproperties.h @@ -61,14 +61,6 @@ public: static void closeByID(const LLUUID& item_id, const LLUUID& object_id); - // - static void onClickMore(void* user_data); - static void onClickLess(void* user_data); - static void onClickCopy(void* user_data); - static void onClickUpdate(void* user_data); - void setExpanded(BOOL expanded); - // - LLFloaterProperties(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_id, const LLUUID& object_id); virtual ~LLFloaterProperties(); @@ -102,9 +94,6 @@ protected: LLUUID mObjectID; BOOL mDirty; - // - BOOL mExpanded; - // typedef std::map instance_map; static instance_map sInstances; @@ -116,11 +105,6 @@ class LLMultiProperties : public LLMultiFloater { public: LLMultiProperties(const LLRect& rect); - // - void setExpanded(BOOL expanded); -protected: - BOOL mExpanded; - // }; #endif // LL_LLFLOATERPROPERTIES_H diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 7c49e5184..9e60be11a 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -270,11 +270,6 @@ void LLFloaterReporter::draw() void LLFloaterReporter::enableControls(BOOL enable) { childSetEnabled("category_combo", enable); - // bug reports never include the chat history - if (mReportType != BUG_REPORT) - { - childSetEnabled("chat_check", enable); - } childSetEnabled("screen_check", enable); childDisable("screenshot"); childSetEnabled("pick_btn", enable); diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 5bd332024..1360b8b12 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -105,7 +105,6 @@ BOOL LLFloaterSettingsDebug::postBuild() getChild("val_spinner_4")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); getChild("val_text")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); getChild("boolean_combo")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); - getChild("color_swatch")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); getChild("copy_btn")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCopyToClipboard, this)); getChild("default_btn")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onClickDefault, this)); getChild("search_settings_input")->setSearchCallback(onUpdateFilter, this); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index f52b0960c..1cbaac1a7 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -294,8 +294,8 @@ BOOL LLFloaterTools::postBuild() llwarns << "Tool button not found! DOA Pending." << llendl; } } - mComboTreesGrass = getChild("trees_grass"); - childSetCommitCallback("trees_grass", onSelectTreesGrass, (void*)0); + if ((mComboTreesGrass = findChild("trees_grass"))) + childSetCommitCallback("trees_grass", onSelectTreesGrass, (void*)0); mCheckCopySelection = getChild("checkbox copy selection"); childSetValue("checkbox copy selection",(BOOL)gSavedSettings.getBOOL("CreateToolCopySelection")); mCheckSticky = getChild("checkbox sticky"); @@ -722,9 +722,10 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) // Create buttons BOOL create_visible = (tool == LLToolCompCreate::getInstance()); - mBtnCreate ->setToggleState( tool == LLToolCompCreate::getInstance() ); + mBtnCreate ->setToggleState(create_visible); - updateTreeGrassCombo(create_visible); + if (mComboTreesGrass) + updateTreeGrassCombo(create_visible); if (mCheckCopySelection && mCheckCopySelection->get()) diff --git a/indra/newview/llfloaterwater.cpp b/indra/newview/llfloaterwater.cpp index 0a72fdadf..c893efc58 100644 --- a/indra/newview/llfloaterwater.cpp +++ b/indra/newview/llfloaterwater.cpp @@ -108,7 +108,7 @@ void LLFloaterWater::initCallbacks(void) { initHelpBtn("WaterFogColorHelp", "HelpWaterFogColor"); initHelpBtn("WaterFogDensityHelp", "HelpWaterFogDensity"); initHelpBtn("WaterUnderWaterFogModHelp", "HelpUnderWaterFogMod"); - initHelpBtn("WaterGlowHelp", "HelpWaterGlow"); + //initHelpBtn("WaterGlowHelp", "HelpWaterGlow"); initHelpBtn("WaterNormalScaleHelp", "HelpWaterNormalScale"); initHelpBtn("WaterFresnelScaleHelp", "HelpWaterFresnelScale"); initHelpBtn("WaterFresnelOffsetHelp", "HelpWaterFresnelOffset"); @@ -126,7 +126,7 @@ void LLFloaterWater::initCallbacks(void) { childSetCommitCallback("WaterFogColor", onWaterFogColorMoved, ¶m_mgr->mFogColor); // - childSetCommitCallback("WaterGlow", onColorControlAMoved, ¶m_mgr->mFogColor); + //childSetCommitCallback("WaterGlow", onColorControlAMoved, ¶m_mgr->mFogColor); // fog density childSetCommitCallback("WaterFogDensity", onExpFloatControlMoved, ¶m_mgr->mFogDensity); @@ -165,8 +165,8 @@ void LLFloaterWater::initCallbacks(void) { childSetCommitCallback("WaterNormalMap", onNormalMapPicked, NULL); // next/prev buttons - childSetAction("next", onClickNext, this); - childSetAction("prev", onClickPrev, this); + //childSetAction("next", onClickNext, this); + //childSetAction("prev", onClickPrev, this); } void LLFloaterWater::onClickHelp(void* data) @@ -237,7 +237,7 @@ void LLFloaterWater::syncMenu() param_mgr->mFogColor = current_params.getVector4(param_mgr->mFogColor.mName, err); LLColor4 col = param_mgr->getFogColor(); - childSetValue("WaterGlow", col.mV[3]); + //childSetValue("WaterGlow", col.mV[3]); col.mV[3] = 1.0f; LLColorSwatchCtrl* colCtrl = sWaterMenu->getChild("WaterFogColor"); diff --git a/indra/newview/llfloaterwindlight.cpp b/indra/newview/llfloaterwindlight.cpp index d84eaf2a2..a907baee3 100644 --- a/indra/newview/llfloaterwindlight.cpp +++ b/indra/newview/llfloaterwindlight.cpp @@ -222,8 +222,8 @@ void LLFloaterWindLight::initCallbacks(void) { childSetCommitCallback("WLStarAlpha", onStarAlphaMoved, NULL); // next/prev buttons - childSetAction("next", onClickNext, this); - childSetAction("prev", onClickPrev, this); + //childSetAction("next", onClickNext, this); + //childSetAction("prev", onClickPrev, this); } void LLFloaterWindLight::onClickHelp(void* data) @@ -322,7 +322,7 @@ void LLFloaterWindLight::syncMenu() // blue horizon param_mgr->mBlueHorizon = cur_params.getVector(param_mgr->mBlueHorizon.mName, err); - setColorSwatch("WLBlueHorizon", param_mgr->mBlueHorizon, WL_BLUE_HORIZON_DENSITY_SCALE); + //setColorSwatch("WLBlueHorizon", param_mgr->mBlueHorizon, WL_BLUE_HORIZON_DENSITY_SCALE); // haze density, horizon, mult, and altitude param_mgr->mHazeDensity = cur_params.getFloat(param_mgr->mHazeDensity.mName, err); @@ -336,13 +336,13 @@ void LLFloaterWindLight::syncMenu() // blue density param_mgr->mBlueDensity = cur_params.getVector(param_mgr->mBlueDensity.mName, err); - setColorSwatch("WLBlueDensity", param_mgr->mBlueDensity, WL_BLUE_HORIZON_DENSITY_SCALE); + //setColorSwatch("WLBlueDensity", param_mgr->mBlueDensity, WL_BLUE_HORIZON_DENSITY_SCALE); // Lighting // sunlight param_mgr->mSunlight = cur_params.getVector(param_mgr->mSunlight.mName, err); - setColorSwatch("WLSunlight", param_mgr->mSunlight, WL_SUN_AMBIENT_SLIDER_SCALE); + //setColorSwatch("WLSunlight", param_mgr->mSunlight, WL_SUN_AMBIENT_SLIDER_SCALE); // glow param_mgr->mGlow = cur_params.getVector(param_mgr->mGlow.mName, err); @@ -351,7 +351,7 @@ void LLFloaterWindLight::syncMenu() // ambient param_mgr->mAmbient = cur_params.getVector(param_mgr->mAmbient.mName, err); - setColorSwatch("WLAmbient", param_mgr->mAmbient, WL_SUN_AMBIENT_SLIDER_SCALE); + //setColorSwatch("WLAmbient", param_mgr->mAmbient, WL_SUN_AMBIENT_SLIDER_SCALE); childSetValue("WLSunAngle", param_mgr->mCurParams.getFloat("sun_angle",err) / F_TWO_PI); childSetValue("WLEastAngle", param_mgr->mCurParams.getFloat("east_angle",err) / F_TWO_PI); @@ -360,7 +360,7 @@ void LLFloaterWindLight::syncMenu() // Cloud Color param_mgr->mCloudColor = cur_params.getVector(param_mgr->mCloudColor.mName, err); - setColorSwatch("WLCloudColor", param_mgr->mCloudColor, WL_CLOUD_SLIDER_SCALE); + //setColorSwatch("WLCloudColor", param_mgr->mCloudColor, WL_CLOUD_SLIDER_SCALE); // Cloud param_mgr->mCloudMain = cur_params.getVector(param_mgr->mCloudMain.mName, err); diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 0cd3906fb..c164d6cf9 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -1644,11 +1644,9 @@ void LLFloaterWorldMap::onChangeMaturity() bool can_access_adult = gAgent.canAccessAdult(); childSetVisible("events_mature_icon", can_access_mature); - childSetVisible("events_mature_label", can_access_mature); childSetVisible("event_mature_chk", can_access_mature); childSetVisible("events_adult_icon", can_access_adult); - childSetVisible("events_adult_label", can_access_adult); childSetVisible("event_adult_chk", can_access_adult); // disable mature / adult events. diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 2e366dac0..3891e090c 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1356,18 +1356,25 @@ BOOL LLFloaterIMPanel::postBuild() mInputEditor->setRevertOnEsc( FALSE ); mInputEditor->setReplaceNewlinesWithSpaces( FALSE ); - childSetAction("profile_callee_btn", onClickProfile, this); - childSetAction("profile_tele_btn", onClickTeleport, this); - childSetAction("group_info_btn", onClickGroupInfo, this); + if (LLButton* btn = findChild("profile_callee_btn")) + { + btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickProfile, this)); + if (!mProfileButtonEnabled) btn->setEnabled(false); + } + if (LLButton* btn = findChild("profile_tele_btn")) + btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickTeleport, this)); + if (LLButton* btn = findChild("group_info_btn")) + btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickGroupInfo, this)); childSetAction("history_btn", onClickHistory, this); - childSetCommitCallback("rp_mode", onRPMode, this); + if (LLUICtrl* ctrl = findChild("rp_mode")) + ctrl->setCommitCallback(boost::bind(&LLFloaterIMPanel::onRPMode, this, _2)); childSetAction("start_call_btn", onClickStartCall, this); childSetAction("end_call_btn", onClickEndCall, this); childSetAction("send_btn", onClickSend, this); - childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this); + if (LLButton* btn = findChild("toggle_active_speakers_btn")) + btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickToggleActiveSpeakers, this, _2)); - childSetAction("moderator_kick_speaker", onKickSpeaker, this); //LLButton* close_btn = getChild("close_btn"); //close_btn->setClickedCallback(&LLFloaterIMPanel::onClickClose, this); @@ -1380,11 +1387,6 @@ BOOL LLFloaterIMPanel::postBuild() childSetEnabled("profile_btn", FALSE); } - if(!mProfileButtonEnabled) - { - childSetEnabled("profile_callee_btn", FALSE); - } - sTitleString = getString("title_string"); sTypingStartString = getString("typing_start_string"); sSessionStartString = getString("session_start_string"); @@ -1402,8 +1404,6 @@ BOOL LLFloaterIMPanel::postBuild() setDefaultBtn("send_btn"); - mActiveSpeakersPanel.connect(this,"active_speakers_panel"); - mToggleActiveSpeakersBtn.connect(this,"toggle_active_speakers_btn"); mVolumeSlider.connect(this,"speaker_volume"); mEndCallBtn.connect(this,"end_call_btn"); mStartCallBtn.connect(this,"start_call_btn"); @@ -1496,10 +1496,11 @@ void LLFloaterIMPanel::draw() // show speakers window when voice first connects if (mShowSpeakersOnConnect && mVoiceChannel->isActive()) { - mActiveSpeakersPanel->setVisible(true); + childSetVisible("active_speakers_panel", true); mShowSpeakersOnConnect = FALSE; } - mToggleActiveSpeakersBtn->setValue(mActiveSpeakersPanel->getVisible()); + if (LLUICtrl* ctrl = findChild("toggle_active_speakers_btn")) + ctrl->setValue(getChildView("active_speakers_panel")->getVisible()); if (mTyping) { @@ -1884,37 +1885,28 @@ void LLFloaterIMPanel::onTabClick(void* userdata) } -// static -void LLFloaterIMPanel::onClickProfile( void* userdata ) +void LLFloaterIMPanel::onClickProfile() { // Bring up the Profile window - LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata; - - if (self->mOtherParticipantUUID.notNull()) + if (mOtherParticipantUUID.notNull()) { - LLFloaterAvatarInfo::showFromDirectory(self->getOtherParticipantID()); + LLFloaterAvatarInfo::showFromDirectory(mOtherParticipantUUID); } } -//static -void LLFloaterIMPanel::onClickTeleport( void* userdata ) +void LLFloaterIMPanel::onClickTeleport() { - // Bring up the Profile window - LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata; - - if (self->mOtherParticipantUUID.notNull()) + if (mOtherParticipantUUID.notNull()) { - handle_lure(self->getOtherParticipantID()); + handle_lure(mOtherParticipantUUID); //do a teleport to other part id - //LLFloaterAvatarInfo::showFromDirectory(self->getOtherParticipantID()); + //LLFloaterAvatarInfo::showFromDirectory(mOtherParticipantID); } } -// static -void LLFloaterIMPanel::onRPMode(LLUICtrl* source, void* user_data) +void LLFloaterIMPanel::onRPMode(const LLSD& value) { - LLFloaterIMPanel* self = (LLFloaterIMPanel*) user_data; - self->mRPMode = source->getValue().asBoolean(); + mRPMode = value.asBoolean(); } // static @@ -1936,13 +1928,10 @@ void LLFloaterIMPanel::onClickHistory( void* userdata ) } } -// static -void LLFloaterIMPanel::onClickGroupInfo( void* userdata ) +void LLFloaterIMPanel::onClickGroupInfo() { // Bring up the Profile window - LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata; - - LLFloaterGroupInfo::showFromUUID(self->mSessionUUID); + LLFloaterGroupInfo::showFromUUID(mSessionUUID); } // static @@ -1978,12 +1967,9 @@ void LLFloaterIMPanel::onClickSend(void* userdata) self->sendMsg(); } -// static -void LLFloaterIMPanel::onClickToggleActiveSpeakers(void* userdata) +void LLFloaterIMPanel::onClickToggleActiveSpeakers(const LLSD& value) { - LLFloaterIMPanel* self = (LLFloaterIMPanel*)userdata; - - self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel")); + childSetVisible("active_speakers_panel", value); } // static @@ -2596,12 +2582,6 @@ void LLFloaterIMPanel::showSessionForceClose( } -//static -void LLFloaterIMPanel::onKickSpeaker(void* user_data) -{ - -} - bool LLFloaterIMPanel::onConfirmForceCloseError(const LLSD& notification, const LLSD& response) { //only 1 option really diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h index 5cccd78b4..54a12c9d0 100644 --- a/indra/newview/llimpanel.h +++ b/indra/newview/llimpanel.h @@ -237,18 +237,17 @@ public: static void onCommitChat(LLUICtrl* caller, void* userdata); static void onTabClick( void* userdata ); - static void onClickProfile( void* userdata ); + void onClickProfile(); static void onClickHistory( void* userdata ); - static void onRPMode(LLUICtrl* source, void* user_data); - static void onClickTeleport( void* userdata ); - static void onClickGroupInfo( void* userdata ); + void onRPMode(const LLSD& value); + void onClickTeleport(); + void onClickGroupInfo(); static void onClickClose( void* userdata ); static void onClickStartCall( void* userdata ); static void onClickEndCall( void* userdata ); static void onClickSend( void* userdata ); - static void onClickToggleActiveSpeakers( void* userdata ); + void onClickToggleActiveSpeakers(const LLSD& value); static void* createSpeakersPanel(void* data); - static void onKickSpeaker(void* user_data); //callbacks for P2P muting and volume control static void onClickMuteVoice(void* user_data); @@ -385,8 +384,6 @@ private: boost::signals2::connection mFocusLostSignal; - CachedUICtrl mActiveSpeakersPanel; - CachedUICtrl mToggleActiveSpeakersBtn; CachedUICtrl mVolumeSlider; CachedUICtrl mEndCallBtn; CachedUICtrl mStartCallBtn; diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 8c8fc5305..9842691da 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -1571,17 +1571,17 @@ void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status) if(gAgent.isGodlike()) { childSetEnabled("Offer Teleport...", TRUE); - childSetToolTip("Offer Teleport...", childGetValue("TeleportGod").asString()); + childSetToolTip("Offer Teleport...", getString("TeleportGod")); } else if (in_prelude) { childSetEnabled("Offer Teleport...",FALSE); - childSetToolTip("Offer Teleport...",childGetValue("TeleportPrelude").asString()); + childSetToolTip("Offer Teleport...", getString("TeleportPrelude")); } else { childSetEnabled("Offer Teleport...", TRUE /*(online_status == ONLINE_STATUS_YES)*/); - childSetToolTip("Offer Teleport...", childGetValue("TeleportNormal").asString()); + childSetToolTip("Offer Teleport...", getString("TeleportNormal")); } } @@ -1759,15 +1759,15 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name childSetEnabled("Find on Map",enable_track); if (!mIsFriend) { - childSetToolTip("Find on Map",childGetValue("ShowOnMapNonFriend").asString()); + childSetToolTip("Find on Map", getString("ShowOnMapNonFriend")); } else if (ONLINE_STATUS_YES != online_status) { - childSetToolTip("Find on Map",childGetValue("ShowOnMapFriendOffline").asString()); + childSetToolTip("Find on Map", getString("ShowOnMapFriendOffline")); } else { - childSetToolTip("Find on Map",childGetValue("ShowOnMapFriendOnline").asString()); + childSetToolTip("Find on Map", getString("ShowOnMapFriendOnline")); } childSetVisible("Add Friend...", true); childSetEnabled("Add Friend...", !avatar_is_friend); diff --git a/indra/newview/llpaneldisplay.cpp b/indra/newview/llpaneldisplay.cpp index 362675292..269a1f479 100644 --- a/indra/newview/llpaneldisplay.cpp +++ b/indra/newview/llpaneldisplay.cpp @@ -107,9 +107,6 @@ BOOL LLPanelDisplay::postBuild() // return to default values childSetAction("Defaults", setHardwareDefaults, NULL); - // Help button - childSetAction("GraphicsPreferencesHelpButton", onOpenHelp, this); - //============================================================================ // Resolution @@ -120,7 +117,6 @@ BOOL LLPanelDisplay::postBuild() mCtrlWindowed->setCallbackUserData(this); mAspectRatioLabel1 = getChild("AspectRatioLabel1"); - mFullScreenInfo = getChild("FullScreenInfo"); mDisplayResLabel = getChild("DisplayResLabel"); S32 num_resolutions = 0; @@ -218,7 +214,7 @@ BOOL LLPanelDisplay::postBuild() mCtrlCustomSettings->setCommitCallback(onChangeCustom); mCtrlCustomSettings->setCallbackUserData(this); - mGraphicsBorder = getChild("GraphicsBorder"); + //mGraphicsBorder = getChild("GraphicsBorder"); // Enable Transparent Water mCtrlTransparentWater = getChild("TransparentWater"); @@ -350,7 +346,6 @@ BOOL LLPanelDisplay::postBuild() mReflectionText = getChild("ReflectionDetailText"); mAvatarText = getChild("AvatarRenderingText"); mTerrainText = getChild("TerrainDetailText"); - mLightingText = getChild("LightingDetailText"); mMeshDetailText = getChild("MeshDetailText"); mShadowDetailText = getChild("ShadowDetailText"); mTerrainScaleText = getChild("TerrainScaleText"); @@ -486,7 +481,6 @@ void LLPanelDisplay::refreshEnabledState() mCtrlAspectRatio->setVisible(isFullScreen); mAspectRatioLabel1->setVisible(isFullScreen); mCtrlAutoDetectAspect->setVisible(isFullScreen); - mFullScreenInfo->setVisible(!isFullScreen); mWindowSizeLabel->setVisible(!isFullScreen); mCtrlWindowSize->setVisible(!isFullScreen); @@ -713,7 +707,7 @@ void LLPanelDisplay::disableUnavailableSettings() void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) { // quick check - llassert(mGraphicsBorder != NULL); + //llassert(mGraphicsBorder != NULL); llassert(mCtrlDrawDistance != NULL); llassert(mCtrlLODFactor != NULL); @@ -753,13 +747,12 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) llassert(mReflectionText != NULL); llassert(mTerrainScaleText != NULL); llassert(mAvatarText != NULL); - llassert(mLightingText != NULL); llassert(mTerrainText != NULL); llassert(mDrawDistanceMeterText1 != NULL); llassert(mDrawDistanceMeterText2 != NULL); // enable/disable the states - mGraphicsBorder->setVisible(!isHidden); + //mGraphicsBorder->setVisible(!isHidden); /* LLColor4 light(.45098f, .51765f, .6078f, 1.0f); LLColor4 dark(.10196f, .10196f, .10196f, 1.0f); @@ -809,7 +802,6 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) mShaderText->setVisible(!isHidden); mReflectionText->setVisible(!isHidden); mAvatarText->setVisible(!isHidden); - mLightingText->setVisible(!isHidden); mTerrainText->setVisible(!isHidden); mDrawDistanceMeterText1->setVisible(!isHidden); mDrawDistanceMeterText2->setVisible(!isHidden); @@ -930,15 +922,6 @@ void LLPanelDisplay::onChangeCustom(LLUICtrl *ctrl, void *data) LLFloaterPreference::refreshEnabledGraphics(); } -void LLPanelDisplay::onOpenHelp(void* user_data) -{ - LLPanelDisplay* self = static_cast(user_data); - - const char* xml_alert = "GraphicsPreferencesHelp"; - LLFloater* parent_floater = gFloaterView->getParentFloater(self); - LLNotifications::instance().add(parent_floater->contextualNotification(xml_alert)); -} - void LLPanelDisplay::onApplyResolution(LLUICtrl* src, void* user_data) { ((LLPanelDisplay*) src)->applyResolution(); diff --git a/indra/newview/llpaneldisplay.h b/indra/newview/llpaneldisplay.h index 185263f9f..304c674a4 100644 --- a/indra/newview/llpaneldisplay.h +++ b/indra/newview/llpaneldisplay.h @@ -93,7 +93,7 @@ protected: LLCheckBoxCtrl *mCtrlCustomSettings; // performance sliders and boxes - LLViewBorder *mGraphicsBorder; + //LLViewBorder *mGraphicsBorder; LLSliderCtrl *mCtrlDrawDistance; // the draw distance slider LLSliderCtrl *mCtrlLODFactor; // LOD for volume objects @@ -125,14 +125,12 @@ protected: LLTextBox *mAspectRatioLabel1; LLTextBox *mDisplayResLabel; - LLTextEditor *mFullScreenInfo; LLTextBox *mWindowSizeLabel; LLTextBox *mShaderText; LLTextBox *mReflectionText; LLTextBox *mAvatarText; LLTextBox *mTerrainText; - LLTextBox *mLightingText; LLTextBox *mDrawDistanceMeterText1; LLTextBox *mDrawDistanceMeterText2; @@ -203,7 +201,6 @@ protected: // if the custom settings box is clicked static void onChangeCustom(LLUICtrl *ctrl, void *data); - static void onOpenHelp(void *data); static void onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data); static void onKeystrokeAspectRatio(LLLineEditor* caller, void* user_data); static void onSelectAspectRatio(LLUICtrl*, void*); diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 6af8129ff..821ebd4a0 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -145,7 +145,7 @@ BOOL LLPanelObject::postBuild() //-------------------------------------------------------- // Build constant tipsheet - childSetAction("build_math_constants",onClickBuildConstants,this); + //childSetAction("build_math_constants",onClickBuildConstants,this); // Lock checkbox mCheckLock = getChild("checkbox locked"); @@ -471,7 +471,6 @@ void LLPanelObject::getState( ) BOOL enable_scale = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && objectp->permModify(); BOOL enable_rotate = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts")); - childSetEnabled("build_math_constants",true); S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )) && (selected_count == 1); @@ -2295,8 +2294,6 @@ void LLPanelObject::clearCtrls() childSetEnabled("advanced_cut", FALSE); childSetEnabled("advanced_dimple", FALSE); childSetVisible("advanced_slice", FALSE); - - childSetEnabled("build_math_constants",false); } // diff --git a/indra/newview/llprefschat.cpp b/indra/newview/llprefschat.cpp index 7290c3fb9..559ad2ba9 100644 --- a/indra/newview/llprefschat.cpp +++ b/indra/newview/llprefschat.cpp @@ -73,8 +73,6 @@ private: BOOL mScriptErrorAsChat; F32 mConsoleOpacity; F32 mBubbleOpacity; - std::string mTranslateLanguage; - BOOL mTranslateChat; }; @@ -109,8 +107,6 @@ LLPrefsChatImpl::LLPrefsChatImpl() childSetValue("play_typing_animation", gSavedSettings.getBOOL("PlayTypingAnim")); childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity")); childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity")); - childSetValue("translate_language_combobox", gSavedSettings.getString("TranslateLanguage")); - childSetValue("translate_chat", gSavedSettings.getBOOL("TranslateChat")); } void LLPrefsChatImpl::refreshValues() @@ -137,8 +133,6 @@ void LLPrefsChatImpl::refreshValues() mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim"); mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity"); mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity"); - mTranslateLanguage = gSavedSettings.getString("TranslateLanguage"); - mTranslateChat = gSavedSettings.getBOOL("TranslateChat"); } void LLPrefsChatImpl::cancel() @@ -164,8 +158,6 @@ void LLPrefsChatImpl::cancel() gSavedSettings.setBOOL("PlayTypingAnim", mPlayTypingAnim); gSavedSettings.setF32("ConsoleBackgroundOpacity", mConsoleOpacity); gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity); - gSavedSettings.setString("TranslateLanguage", mTranslateLanguage); - gSavedSettings.setBOOL("TranslateChat", mTranslateChat); } void LLPrefsChatImpl::apply() @@ -197,9 +189,6 @@ void LLPrefsChatImpl::apply() gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal()); gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal()); - gSavedSettings.setString("TranslateLanguage", childGetValue("translate_language_combobox")); - gSavedSettings.setBOOL("TranslateChat", childGetValue("translate_chat")); - refreshValues(); // member values become the official values and cancel becomes a no-op. } diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 9f74be7ff..47e2d4d5e 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -197,9 +197,7 @@ mSquareMetersCommitted(0) mSGBandwidth = new LLStatGraph("BandwidthGraph", r); mSGBandwidth->setFollows(FOLLOWS_BOTTOM | FOLLOWS_RIGHT); mSGBandwidth->setStat(&LLViewerStats::getInstance()->mKBitStat); - std::string text = childGetText("bandwidth_tooltip") + " "; - LLUIString bandwidth_tooltip = text; // get the text from XML until this widget is XML driven - mSGBandwidth->setLabel(bandwidth_tooltip.getString()); + mSGBandwidth->setLabel(getString("bandwidth_tooltip") + " "); mSGBandwidth->setUnits("Kbps"); mSGBandwidth->setPrecision(0); mSGBandwidth->setMouseOpaque(FALSE); @@ -210,9 +208,7 @@ mSquareMetersCommitted(0) mSGPacketLoss = new LLStatGraph("PacketLossPercent", r); mSGPacketLoss->setFollows(FOLLOWS_BOTTOM | FOLLOWS_RIGHT); mSGPacketLoss->setStat(&LLViewerStats::getInstance()->mPacketsLostPercentStat); - text = childGetText("packet_loss_tooltip") + " "; - LLUIString packet_loss_tooltip = text; // get the text from XML until this widget is XML driven - mSGPacketLoss->setLabel(packet_loss_tooltip.getString()); + mSGPacketLoss->setLabel(getString("packet_loss_tooltip") + " "); mSGPacketLoss->setUnits("%"); mSGPacketLoss->setMin(0.f); mSGPacketLoss->setMax(5.f); diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index 01d2e26d6..a72c8be5b 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -132,8 +132,8 @@ BOOL LLToolBar::postBuild() childSetAction("chat_btn", onClickChat, this); childSetControlName("chat_btn", "ChatVisible"); - childSetAction("appearance_btn", onClickAppearance, this); - childSetControlName("appearance_btn", ""); + //childSetAction("appearance_btn", onClickAppearance, this); + //childSetControlName("appearance_btn", ""); childSetAction("radar_list_btn", onClickRadarList, this); childSetControlName("radar_list_btn", "ShowRadar"); @@ -141,8 +141,8 @@ BOOL LLToolBar::postBuild() childSetAction("fly_btn", onClickFly, this); childSetControlName("fly_btn", "FlyBtnState"); - childSetAction("sit_btn", onClickSit, this); - childSetControlName("sit_btn", "SitBtnState"); + //childSetAction("sit_btn", onClickSit, this); + //childSetControlName("sit_btn", "SitBtnState"); childSetAction("snapshot_btn", onClickSnapshot, this); childSetControlName("snapshot_btn", "SnapshotBtnState"); @@ -167,7 +167,7 @@ BOOL LLToolBar::postBuild() mBuildBtn.connect(this, "build_btn"); mMapBtn.connect(this, "map_btn"); mRadarBtn.connect(this, "radar_btn"); - mInventoryBtn.connect(this, "inventory_button"); + mInventoryBtn.connect(this, "inventory_btn"); for (child_list_const_iter_t child_iter = getChildList()->begin(); child_iter != getChildList()->end(); ++child_iter) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 87f8a324e..89d0db41d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -800,11 +800,8 @@ void init_menus() gMenuHolder->childSetLabelArg("Upload Sound", "[UPLOADFEE]", fee); gMenuHolder->childSetLabelArg("Upload Animation", "[UPLOADFEE]", fee); gMenuHolder->childSetLabelArg("Bulk Upload", "[UPLOADFEE]", fee); - gMenuHolder->childSetLabelArg("ImportUpload", "[UPLOADFEE]", fee); gMenuHolder->childSetLabelArg("Buy and Sell L$...", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); - gMenuHolder->childSetLabelArg("Reload Balance", "[CURRENCY]", - gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); gAFKMenu = gMenuBarView->getChild("Set Away", TRUE); gBusyMenu = gMenuBarView->getChild("Set Busy", TRUE); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index dbe73b8bc..a721f1b45 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6477,7 +6477,6 @@ void process_economy_data(LLMessageSystem *msg, void** /*user_data*/) gMenuHolder->childSetLabelArg("Upload Sound", "[UPLOADFEE]", fee); gMenuHolder->childSetLabelArg("Upload Animation", "[UPLOADFEE]", fee); gMenuHolder->childSetLabelArg("Bulk Upload", "[UPLOADFEE]", fee); - gMenuHolder->childSetLabelArg("ImportUpload", "[UPLOADFEE]", fee); gMenuHolder->childSetLabelArg("Buy and Sell L$...", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); } diff --git a/indra/newview/llvoiceremotectrl.cpp b/indra/newview/llvoiceremotectrl.cpp index f8d402a61..725402b7a 100644 --- a/indra/newview/llvoiceremotectrl.cpp +++ b/indra/newview/llvoiceremotectrl.cpp @@ -80,21 +80,19 @@ BOOL LLVoiceRemoteCtrl::postBuild() mSpeakersBtn->setClickedCallback(boost::bind(&LLVoiceRemoteCtrl::onClickSpeakers)); childSetAction("show_channel", onClickPopupBtn, this); - childSetAction("end_call_btn", onClickEndCall, this); + if (LLButton* end_call_btn = findChild("end_call_btn")) + end_call_btn->setClickedCallback(boost::bind(&LLVoiceRemoteCtrl::onClickEndCall)); - LLTextBox* text = getChild("channel_label"); + LLTextBox* text = findChild("channel_label"); if (text) { text->setUseEllipses(TRUE); } - childSetAction("voice_channel_bg", onClickVoiceChannel, this); + if (LLButton* voice_channel_bg = findChild("voice_channel_bg")) + voice_channel_bg->setClickedCallback(boost::bind(&LLVoiceRemoteCtrl::onClickVoiceChannel)); - mEndCallBtn.connect(this,"end_call_btn"); mVoiceVolIcon.connect(this,"voice_volume"); - mVoiceChanIcon.connect(this,"voice_channel_icon"); - mVoiceChanBgBtn.connect(this,"voice_channel_bg"); - mChanLabelTextBox.connect(this,"channel_label"); mShowChanBtn.connect(this,"show_channel"); return TRUE; } @@ -168,23 +166,25 @@ void LLVoiceRemoteCtrl::draw() } LLVoiceChannel* current_channel = LLVoiceChannel::getCurrentVoiceChannel(); - mEndCallBtn->setEnabled(LLVoiceClient::voiceEnabled() + if (LLButton* end_call_btn = findChild("end_call_btn")) + end_call_btn->setEnabled(LLVoiceClient::voiceEnabled() && current_channel && current_channel->isActive() && current_channel != LLVoiceChannelProximal::getInstance()); - mChanLabelTextBox->setValue(active_channel_name); - mVoiceChanBgBtn->setToolTip(active_channel_name); + if (LLTextBox* text = findChild("channel_label")) + text->setValue(active_channel_name); + LLButton* voice_channel_bg = findChild("voice_channel_bg"); + if (voice_channel_bg) voice_channel_bg->setToolTip(active_channel_name); if (current_channel) { - LLIconCtrl* voice_channel_icon = mVoiceChanIcon; + LLIconCtrl* voice_channel_icon = findChild("voice_channel_icon"); if (voice_channel_icon && voice_floater) { voice_channel_icon->setImage(voice_floater->getString("voice_icon")); } - LLButton* voice_channel_bg = mVoiceChanBgBtn; if (voice_channel_bg) { LLColor4 bg_color; @@ -272,7 +272,7 @@ void LLVoiceRemoteCtrl::onClickPopupBtn(void* user_data) } //static -void LLVoiceRemoteCtrl::onClickEndCall(void* user_data) +void LLVoiceRemoteCtrl::onClickEndCall() { LLVoiceChannel* current_channel = LLVoiceChannel::getCurrentVoiceChannel(); @@ -289,7 +289,7 @@ void LLVoiceRemoteCtrl::onClickSpeakers() } //static -void LLVoiceRemoteCtrl::onClickVoiceChannel(void* user_data) +void LLVoiceRemoteCtrl::onClickVoiceChannel() { LLFloaterChatterBox::showInstance(); } diff --git a/indra/newview/llvoiceremotectrl.h b/indra/newview/llvoiceremotectrl.h index 86504fe38..69ea20ae1 100644 --- a/indra/newview/llvoiceremotectrl.h +++ b/indra/newview/llvoiceremotectrl.h @@ -54,18 +54,14 @@ public: static void onBtnTalkClicked(); static void onClickSpeakers(); static void onClickPopupBtn(void* user_data); - static void onClickVoiceChannel(void* user_data); - static void onClickEndCall(void* user_data); + static void onClickVoiceChannel(); + static void onClickEndCall(); protected: LLButton* mTalkBtn; LLButton* mTalkLockBtn; LLButton* mSpeakersBtn; - CachedUICtrl mEndCallBtn; CachedUICtrl mVoiceVolIcon; - CachedUICtrl mVoiceChanIcon; - CachedUICtrl mVoiceChanBgBtn; - CachedUICtrl mChanLabelTextBox; CachedUICtrl mShowChanBtn; }; diff --git a/indra/newview/skins/default/xui/en-us/floater_customize.xml b/indra/newview/skins/default/xui/en-us/floater_customize.xml index 939aff135..eeb0e8bd4 100644 --- a/indra/newview/skins/default/xui/en-us/floater_customize.xml +++ b/indra/newview/skins/default/xui/en-us/floater_customize.xml @@ -133,6 +133,7 @@ scratch and wear it.