diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2011-05-23 16:11:50 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2011-05-23 16:11:50 -0700 |
commit | 95b8020d21b1ad60f82c767df7d7aac019ad8353 (patch) | |
tree | b482fa78e3be6ee853afacf161cac4a33864d79e | |
parent | 03dca7cb7e578d20ec07298cecc47e0ae67aaaf5 (diff) |
adding marketplace inbox and outbox
reviewed by Leslie
-rw-r--r-- | indra/newview/CMakeLists.txt | 6 | ||||
-rw-r--r-- | indra/newview/llpanelmarketplaceinbox.cpp (renamed from indra/newview/llpanelmarketplaceinventory.cpp) | 15 | ||||
-rw-r--r-- | indra/newview/llpanelmarketplaceinbox.h (renamed from indra/newview/llpanelmarketplaceinventory.h) | 18 | ||||
-rw-r--r-- | indra/newview/llpanelmarketplaceoutbox.cpp | 47 | ||||
-rw-r--r-- | indra/newview/llpanelmarketplaceoutbox.h | 46 | ||||
-rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 49 | ||||
-rw-r--r-- | indra/newview/llsidepanelinventory.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/textures/textures.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/textures/widgets/MarketplaceBtn_Off.png | bin | 0 -> 711 bytes | |||
-rw-r--r-- | indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png | bin | 0 -> 702 bytes | |||
-rw-r--r-- | indra/newview/skins/default/xui/en/sidepanel_inventory.xml | 139 |
11 files changed, 250 insertions, 75 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 8fde605cb0..67f9fede45 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -348,7 +348,8 @@ set(viewer_SOURCE_FILES llpanellogin.cpp llpanelloginlistener.cpp llpanelmaininventory.cpp - llpanelmarketplaceinventory.cpp + llpanelmarketplaceinbox.cpp + llpanelmarketplaceoutbox.cpp llpanelmediasettingsgeneral.cpp llpanelmediasettingspermissions.cpp llpanelmediasettingssecurity.cpp @@ -888,7 +889,8 @@ set(viewer_HEADER_FILES llpanellogin.h llpanelloginlistener.h llpanelmaininventory.h - llpanelmarketplaceinventory.h + llpanelmarketplaceinbox.h + llpanelmarketplaceoutbox.h llpanelmediasettingsgeneral.h llpanelmediasettingspermissions.h llpanelmediasettingssecurity.h diff --git a/indra/newview/llpanelmarketplaceinventory.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index 2a56a9959a..b3afaea20e 100644 --- a/indra/newview/llpanelmarketplaceinventory.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -1,6 +1,6 @@ /** - * @file llpanelmarketplaceinventory.cpp - * @brief Panel for marketplace inbox and outbox + * @file llpanelmarketplaceinbox.cpp + * @brief Panel for marketplace inbox * * $LicenseInfo:firstyear=2011&license=viewerlgpl$ * Second Life Viewer Source Code @@ -23,24 +23,25 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ + #include "llviewerprecompiledheaders.h" -#include "llpanelmarketplaceinventory.h" +#include "llpanelmarketplaceinbox.h" -static LLRegisterPanelClassWrapper<LLPanelMarketplaceInventory> t_panel_marketplace_inventory("panel_marketplace_inventory"); +static LLRegisterPanelClassWrapper<LLPanelMarketplaceInbox> t_panel_marketplace_inbox("panel_marketplace_inbox"); // protected -LLPanelMarketplaceInventory::LLPanelMarketplaceInventory() +LLPanelMarketplaceInbox::LLPanelMarketplaceInbox() : LLPanel() { } -LLPanelMarketplaceInventory::~LLPanelMarketplaceInventory() +LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox() { } // virtual -BOOL LLPanelMarketplaceInventory::postBuild() +BOOL LLPanelMarketplaceInbox::postBuild() { return TRUE; } diff --git a/indra/newview/llpanelmarketplaceinventory.h b/indra/newview/llpanelmarketplaceinbox.h index 367656ad38..519b213081 100644 --- a/indra/newview/llpanelmarketplaceinventory.h +++ b/indra/newview/llpanelmarketplaceinbox.h @@ -1,6 +1,6 @@ /** - * @file llpanelmarketplaceinventory.h - * @brief Panel for marketplace inbox and outbox + * @file llpanelmarketplaceinbox.h + * @brief Panel for marketplace inbox * * $LicenseInfo:firstyear=2011&license=viewerlgpl$ * Second Life Viewer Source Code @@ -24,23 +24,23 @@ * $/LicenseInfo$ */ -#ifndef LL_LLPANELMARKETPLACEINVENTORY_H -#define LL_LLPANELMARKETPLACEINVENTORY_H +#ifndef LL_LLPANELMARKETPLACEINBOX_H +#define LL_LLPANELMARKETPLACEINBOX_H #include "llpanel.h" -class LLPanelMarketplaceInventory : public LLPanel +class LLPanelMarketplaceInbox : public LLPanel { public: - LOG_CLASS(LLPanelMarketplaceInventory); + LOG_CLASS(LLPanelMarketplaceInbox); - LLPanelMarketplaceInventory(); - ~LLPanelMarketplaceInventory(); + LLPanelMarketplaceInbox(); + ~LLPanelMarketplaceInbox(); /*virtual*/ BOOL postBuild(); }; -#endif //LL_LLPANELMARKETPLACEINVENTORY_H +#endif //LL_LLPANELMARKETPLACEINBOX_H diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp new file mode 100644 index 0000000000..1f58fb33a4 --- /dev/null +++ b/indra/newview/llpanelmarketplaceoutbox.cpp @@ -0,0 +1,47 @@ +/** + * @file llpanelmarketplaceoutbox.cpp + * @brief Panel for marketplace outbox + * +* $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 "llpanelmarketplaceoutbox.h" + +static LLRegisterPanelClassWrapper<LLPanelMarketplaceOutbox> t_panel_marketplace_outbox("panel_marketplace_outbox"); + +// protected +LLPanelMarketplaceOutbox::LLPanelMarketplaceOutbox() +: LLPanel() +{ +} + +LLPanelMarketplaceOutbox::~LLPanelMarketplaceOutbox() +{ +} + +// virtual +BOOL LLPanelMarketplaceOutbox::postBuild() +{ + return TRUE; +} diff --git a/indra/newview/llpanelmarketplaceoutbox.h b/indra/newview/llpanelmarketplaceoutbox.h new file mode 100644 index 0000000000..a6a28e0a83 --- /dev/null +++ b/indra/newview/llpanelmarketplaceoutbox.h @@ -0,0 +1,46 @@ +/** + * @file llpanelmarketplaceoutbox.h + * @brief Panel for marketplace outbox + * +* $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 LL_LLPANELMARKETPLACEOUTBOX_H +#define LL_LLPANELMARKETPLACEOUTBOX_H + +#include "llpanel.h" + +class LLPanelMarketplaceOutbox : public LLPanel +{ +public: + + LOG_CLASS(LLPanelMarketplaceOutbox); + + LLPanelMarketplaceOutbox(); + ~LLPanelMarketplaceOutbox(); + + /*virtual*/ BOOL postBuild(); +}; + + +#endif //LL_LLPANELMARKETPLACEOUTBOX_H + diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 31ea542743..7f5a2e64bf 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -42,6 +42,7 @@ #include "lltabcontainer.h" #include "llselectmgr.h" #include "llweb.h" +#include "lllayoutstack.h" static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_inventory"); @@ -118,10 +119,56 @@ BOOL LLSidepanelInventory::postBuild() back_btn->setClickedCallback(boost::bind(&LLSidepanelInventory::onBackButtonClicked, this)); } } - + + getChild<LLButton>("inbox_btn")->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this)); + getChild<LLButton>("outbox_btn")->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleOutboxBtn, this)); + + LLLayoutStack* stack = getChild<LLLayoutStack>("inventory_layout_stack"); + + stack->collapsePanel(getChild<LLLayoutPanel>("inbox_layout_panel"), true); + stack->collapsePanel(getChild<LLLayoutPanel>("outbox_layout_panel"), true); + getChild<LLButton>("outbox_btn")->setToggleState(false); + getChild<LLButton>("inbox_btn")->setToggleState(false); + return TRUE; } + +void LLSidepanelInventory::onToggleInboxBtn() +{ + LLLayoutStack* stack = getChild<LLLayoutStack>("inventory_layout_stack"); + bool collapse = !getChild<LLButton>("inbox_btn")->getToggleState(); + + if (stack) + { + stack->collapsePanel(getChild<LLLayoutPanel>("inbox_layout_panel"), collapse); + } + if (!collapse) + { + stack->collapsePanel(getChild<LLLayoutPanel>("outbox_layout_panel"), true); + getChild<LLButton>("outbox_btn")->setToggleState(false); + } +} + +void LLSidepanelInventory::onToggleOutboxBtn() +{ + LLLayoutStack* stack = getChild<LLLayoutStack>("inventory_layout_stack"); + bool collapse = !getChild<LLButton>("outbox_btn")->getToggleState(); + + if (stack) + { + stack->collapsePanel(getChild<LLLayoutPanel>("outbox_layout_panel"), collapse); + } + + if (!collapse) + { + stack->collapsePanel(getChild<LLLayoutPanel>("inbox_layout_panel"), true); + getChild<LLButton>("inbox_btn")->setToggleState(false); + } + +} + + void LLSidepanelInventory::onOpen(const LLSD& key) { LLFirstUse::newInventory(false); diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 32c98bc034..a4e8d0e8e8 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -56,6 +56,9 @@ public: // checks can share selected item(s) bool canShare(); + void onToggleInboxBtn(); + void onToggleOutboxBtn(); + protected: // Tracks highlighted (selected) item in inventory panel. LLInventoryItem *getSelectedItem(); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 1ca48b01a8..4f19dd9a6d 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -249,6 +249,8 @@ with the same filename but different name <texture name="Locked_Icon" file_name="icons/Locked_Icon.png" preload="false" /> + <texture name="MarketplaceBtn_Off" file_name="widgets/MarketplaceBtn_Off.png" preload="true" scale.left="30" scale.top="19" scale.right="35" scale.bottom="4" /> + <texture name="MarketplaceBtn_Selected" file_name="widgets/MarketplaceBtn_Selected.png" preload="true" scale.left="22" scale.top="16" scale.right="26" scale.bottom="7" /> <texture name="Microphone_On" file_name="icons/Microphone_On.png" preload="false" /> diff --git a/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Off.png b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Off.png Binary files differnew file mode 100644 index 0000000000..e291a1c508 --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Off.png diff --git a/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png Binary files differnew file mode 100644 index 0000000000..33527f852b --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 41b9283edc..a0caf80256 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -26,12 +26,12 @@ top="0" orientation="vertical" name="inventory_layout_stack" - height="545" + height="540" width="330"> <layout_panel width="330" follows="bottom|left|right" - height="445"> + height="480"> <panel class="panel_main_inventory" filename="panel_main_inventory.xml" @@ -41,92 +41,119 @@ name="panel_main_inventory" top="0" label="" - height="445" + height="480" width="330" /> </layout_panel> <layout_panel width="330" + auto_resize="true" follows="bottom|left|right" - height="100"> + min_dim="35" + name="inbox_layout_panel" + max_dim="125" + height="35"> <panel - class="panel_marketplace_inventory" - follows="all" + follows="top|left|right" layout="topleft" left="0" - name="panel_marketplace" + name="marketplace_inbox" + class="panel_marketplace_inbox" top="0" label="" - height="100" + height="125" width="330"> - <accordion - follows="all" - fit_parent="true" - height="100" - left="10" - single_expansion="true" - top="0" - name="accordion" - background_visible="true" - bg_alpha_color="DkGray2" - width="311"> - <accordion_tab - name="tab_clothing" - height="35" - min_height="150" - fit_panel="false" - title="MARKETPLACE INBOX"> + <button + label="MARKETPLACE INBOX" + name="inbox_btn" + height="35" + width="308" + image_unselected="MarketplaceBtn_Off" + image_selected="MarketplaceBtn_Selected" + halign="left" + follows="top|left|right" + is_toggle="true" + tab_stop="false" + pad_left="35" + top="0" + left="10" + ></button> <panel follows="all" left="0" - height="40" + height="90" width="250" - top="0" + top="30" > <text left ="40" top="15" + align="left" height="14" width="100" >Just a panel</text> </panel> - <panel - follows="all" - left="0" - height="40" - visible="false" - width="250" - top="0" + + </panel> + </layout_panel> + <layout_panel + width="330" + auto_resize="true" + follows="bottom|left|right" + name="outbox_layout_panel" + min_dim="35" + max_dim="125" + height="35"> + <panel + follows="top|left|right" + layout="topleft" + left="10" + name="marketplace_outbox" + class="panel_marketplace_outbox" + top="0" + label="" + height="125" + width="310"> + <button + label="MARKETPLACE OUTBOX" + is_toggle="true" + name="outbox_btn" + follows="top|left|right" + image_unselected="MarketplaceBtn_Off" + image_selected="MarketplaceBtn_Selected" + height="35" + tab_stop="false" + width="308" + halign="left" + pad_left="35" + top="0" + left="0" + ></button> + <panel + follows="all" + left="0" + height="90" + width="250" + top="30" > - <text - left ="40" - top="15" - height="14" - width="100" - >Just a panel 2</text> - </panel> - </accordion_tab> - <accordion_tab - name="tab_attachments" - fit_panel="false" - title="MARKETPLACE OUTBOX"> - <view - follows="all" - height="35" - left="0" - top="0" - /> - </accordion_tab> - </accordion> + <text + left ="40" + top="15" + align="left" + height="14" + width="100" + >Just a panel</text> + </panel> + </panel> </layout_panel> </layout_stack> <panel follows="bottom|left|right" - height="25" + height="30" layout="topleft" name="button_panel" left="9" - top_pad="-2" + top_pad="2" width="308"> <layout_stack follows="bottom|left|right" |