From d9bb05037d517b3f26d03629200410b534d88d42 Mon Sep 17 00:00:00 2001 From: NiranV Date: Thu, 31 Jul 2014 07:25:28 +0200 Subject: STORM-2050: Fixed: Postcard tab buttons can get 'out of sync'. --- indra/newview/llpanelsnapshotpostcard.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelsnapshotpostcard.cpp') diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index 95c443b826..703ac25f97 100755 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -232,9 +232,9 @@ void LLPanelSnapshotPostcard::onTabButtonPress(S32 btn_idx) getChild("postcard_panel_container"); container->selectTab(clicked_btn->getToggleState() ? btn_idx : !btn_idx); - //clicked_btn->setEnabled(FALSE); + clicked_btn->setEnabled(FALSE); other_btn->toggleState(); - //other_btn->setEnabled(TRUE); + other_btn->setEnabled(TRUE); LL_DEBUGS() << "Button #" << btn_idx << " (" << clicked_btn->getName() << ") clicked" << LL_ENDL; } -- cgit v1.2.3 From 501da5c20a73e99887c3e7c330aeaca6cfe1cc7f Mon Sep 17 00:00:00 2001 From: NiranV Date: Fri, 1 Aug 2014 18:49:42 +0200 Subject: STORM-2051: Changed: Converted button panels to real tabs, removed the buttons and moved the Send and Cancel buttons to the main postcard panel. --- indra/newview/llpanelsnapshotpostcard.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'indra/newview/llpanelsnapshotpostcard.cpp') diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index 703ac25f97..8e37b1418c 100755 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -72,7 +72,6 @@ private: void onMsgFormFocusRecieved(); void onFormatComboCommit(LLUICtrl* ctrl); void onQualitySliderCommit(LLUICtrl* ctrl); - void onTabButtonPress(S32 btn_idx); void onSend(); bool mHasFirstMsgFocus; @@ -86,8 +85,6 @@ LLPanelSnapshotPostcard::LLPanelSnapshotPostcard() { mCommitCallbackRegistrar.add("Postcard.Send", boost::bind(&LLPanelSnapshotPostcard::onSend, this)); mCommitCallbackRegistrar.add("Postcard.Cancel", boost::bind(&LLPanelSnapshotPostcard::cancel, this)); - mCommitCallbackRegistrar.add("Postcard.Message", boost::bind(&LLPanelSnapshotPostcard::onTabButtonPress, this, 0)); - mCommitCallbackRegistrar.add("Postcard.Settings", boost::bind(&LLPanelSnapshotPostcard::onTabButtonPress, this, 1)); } @@ -108,8 +105,6 @@ BOOL LLPanelSnapshotPostcard::postBuild() getChild("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onQualitySliderCommit, this, _1)); - getChild("message_btn")->setToggleState(TRUE); - return LLPanelSnapshot::postBuild(); } @@ -218,27 +213,6 @@ void LLPanelSnapshotPostcard::onQualitySliderCommit(LLUICtrl* ctrl) LLFloaterSnapshot::getInstance()->notify(info); // updates the "SnapshotQuality" setting } -void LLPanelSnapshotPostcard::onTabButtonPress(S32 btn_idx) -{ - LLButton* buttons[2] = { - getChild("message_btn"), - getChild("settings_btn"), - }; - - // Switch between Message and Settings tabs. - LLButton* clicked_btn = buttons[btn_idx]; - LLButton* other_btn = buttons[!btn_idx]; - LLSideTrayPanelContainer* container = - getChild("postcard_panel_container"); - - container->selectTab(clicked_btn->getToggleState() ? btn_idx : !btn_idx); - clicked_btn->setEnabled(FALSE); - other_btn->toggleState(); - other_btn->setEnabled(TRUE); - - LL_DEBUGS() << "Button #" << btn_idx << " (" << clicked_btn->getName() << ") clicked" << LL_ENDL; -} - void LLPanelSnapshotPostcard::onSend() { // Validate input. -- cgit v1.2.3