summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2011-05-31 16:00:22 -0700
committerLeyla Farazha <leyla@lindenlab.com>2011-05-31 16:00:22 -0700
commit4b43c8b18a82d9aa8af6798706867c4a5ebc4334 (patch)
treebe12c5b9a289632b36f22b0e3ab63bc485744cbd
parentee1ba4d85c9e36e1563de5019c6ececa1f1c2d54 (diff)
parent651a9587f82a143764856a4c2603d89c5d392cb6 (diff)
merge
-rw-r--r--indra/newview/llpanelmarketplaceoutbox.cpp93
-rw-r--r--indra/newview/llpanelmarketplaceoutbox.h19
-rw-r--r--indra/newview/llsidepanelinventory.cpp24
-rw-r--r--indra/newview/skins/default/colors.xml5
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Gift.pngbin0 -> 1335 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Disabled.pngbin0 -> 1187 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Enabled.pngbin0 -> 1168 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_1.pngbin0 -> 1149 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_2.pngbin0 -> 1147 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_3.pngbin0 -> 1211 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_4.pngbin0 -> 1205 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_5.pngbin0 -> 1137 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Sync_Progress_6.pngbin0 -> 1164 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml15
-rw-r--r--indra/newview/skins/default/textures/widgets/Badge.pngbin958 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Badge_Background.pngbin0 -> 1352 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Badge_Border.pngbin0 -> 1565 bytes
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_inventory.xml36
-rw-r--r--indra/newview/skins/default/xui/en/widgets/badge.xml2
19 files changed, 175 insertions, 19 deletions
diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp
index 1f58fb33a4..0151276f99 100644
--- a/indra/newview/llpanelmarketplaceoutbox.cpp
+++ b/indra/newview/llpanelmarketplaceoutbox.cpp
@@ -24,15 +24,26 @@
* $/LicenseInfo$
*/
-#include "llviewerprecompiledheaders.h"
+#include <boost/coroutine/coroutine.hpp>
+#include <boost/coroutine/future.hpp>
#include "llpanelmarketplaceoutbox.h"
+#include "llbutton.h"
+#include "llcoros.h"
+#include "lleventcoro.h"
+#include "llloadingindicator.h"
+#include "lltimer.h"
+
+
static LLRegisterPanelClassWrapper<LLPanelMarketplaceOutbox> t_panel_marketplace_outbox("panel_marketplace_outbox");
// protected
LLPanelMarketplaceOutbox::LLPanelMarketplaceOutbox()
-: LLPanel()
+ : LLPanel()
+ , mSyncButton(NULL)
+ , mSyncIndicator(NULL)
+ , mSyncInProgress(false)
{
}
@@ -43,5 +54,83 @@ LLPanelMarketplaceOutbox::~LLPanelMarketplaceOutbox()
// virtual
BOOL LLPanelMarketplaceOutbox::postBuild()
{
+ mSyncButton = getChild<LLButton>("outbox_sync_btn");
+ mSyncButton->setCommitCallback(boost::bind(&LLPanelMarketplaceOutbox::onSyncButtonClicked, this));
+
+ mSyncIndicator = getChild<LLLoadingIndicator>("outbox_sync_indicator");
+
+ mSyncButton->setEnabled(!isOutboxEmpty());
+
return TRUE;
}
+
+bool LLPanelMarketplaceOutbox::isOutboxEmpty() const
+{
+ // TODO: Check for contents of outbox
+
+ return false;
+}
+
+bool LLPanelMarketplaceOutbox::isSyncInProgress() const
+{
+ return mSyncInProgress;
+}
+
+
+std::string gTimeDelayDebugFunc = "";
+
+void timeDelay(LLCoros::self& self, LLPanelMarketplaceOutbox* outboxPanel)
+{
+ waitForEventOn(self, "mainloop");
+
+ LLTimer delayTimer;
+ delayTimer.reset();
+ delayTimer.setTimerExpirySec(5.0f);
+
+ while (!delayTimer.hasExpired())
+ {
+ waitForEventOn(self, "mainloop");
+ }
+
+ outboxPanel->onSyncComplete();
+
+ gTimeDelayDebugFunc = "";
+}
+
+void LLPanelMarketplaceOutbox::onSyncButtonClicked()
+{
+ // TODO: Actually trigger sync to marketplace
+
+ mSyncInProgress = true;
+ updateSyncButtonStatus();
+
+ // Set a timer (for testing only)
+
+ gTimeDelayDebugFunc = LLCoros::instance().launch("LLPanelMarketplaceOutbox timeDelay", boost::bind(&timeDelay, _1, this));
+}
+
+void LLPanelMarketplaceOutbox::onSyncComplete()
+{
+ mSyncInProgress = false;
+
+ updateSyncButtonStatus();
+}
+
+void LLPanelMarketplaceOutbox::updateSyncButtonStatus()
+{
+ if (isSyncInProgress())
+ {
+ mSyncButton->setVisible(false);
+
+ mSyncIndicator->setVisible(true);
+ mSyncIndicator->start();
+ }
+ else
+ {
+ mSyncIndicator->stop();
+ mSyncIndicator->setVisible(false);
+
+ mSyncButton->setVisible(true);
+ mSyncButton->setEnabled(!isOutboxEmpty());
+ }
+}
diff --git a/indra/newview/llpanelmarketplaceoutbox.h b/indra/newview/llpanelmarketplaceoutbox.h
index a6a28e0a83..2fbe819762 100644
--- a/indra/newview/llpanelmarketplaceoutbox.h
+++ b/indra/newview/llpanelmarketplaceoutbox.h
@@ -29,6 +29,11 @@
#include "llpanel.h"
+
+class LLButton;
+class LLLoadingIndicator;
+
+
class LLPanelMarketplaceOutbox : public LLPanel
{
public:
@@ -39,6 +44,20 @@ public:
~LLPanelMarketplaceOutbox();
/*virtual*/ BOOL postBuild();
+
+ bool isOutboxEmpty() const;
+ bool isSyncInProgress() const;
+
+ void onSyncComplete();
+
+protected:
+ void onSyncButtonClicked();
+ void updateSyncButtonStatus();
+
+private:
+ LLButton * mSyncButton;
+ LLLoadingIndicator * mSyncIndicator;
+ bool mSyncInProgress;
};
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 9247611257..301322d24b 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -120,15 +120,22 @@ BOOL LLSidepanelInventory::postBuild()
}
}
- getChild<LLButton>("inbox_btn")->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this));
- getChild<LLButton>("outbox_btn")->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleOutboxBtn, this));
+ // Marketplace inbox/outbox setup
+ {
+ LLButton * inboxButton = getChild<LLButton>("inbox_btn");
+ LLButton * outboxButton = getChild<LLButton>("outbox_btn");
- LLLayoutStack* stack = getChild<LLLayoutStack>("inventory_layout_stack");
+ inboxButton->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this));
+ outboxButton->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);
+ stack->collapsePanel(getChild<LLLayoutPanel>("inbox_layout_panel"), true);
+ stack->collapsePanel(getChild<LLLayoutPanel>("outbox_layout_panel"), true);
+
+ inboxButton->setToggleState(false);
+ outboxButton->setToggleState(false);
+ }
return TRUE;
}
@@ -151,6 +158,9 @@ void manageInboxOutboxPanels(LLLayoutStack * stack,
}
stack->collapsePanel(pressedPanel, !expand);
+
+ // Enable user_resize on main inventory panel when at least one marketplace box is expanded
+ stack->setPanelUserResize("main_inventory_layout_panel", expand);
}
void LLSidepanelInventory::onToggleInboxBtn()
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index 0795e38366..a548849d60 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -134,7 +134,10 @@
reference="AvatarListItemIconOfflineColor" />
<color
name="BadgeImageColor"
- value="0.25 0.85 0.25 1.0" />
+ value="0.44 0.69 0.56 1.0" />
+ <color
+ name="BadgeImageBorderColor"
+ value="0.9 0.9 0.9 1.0" />
<color
name="BadgeLabelColor"
reference="White" />
diff --git a/indra/newview/skins/default/textures/icons/Inv_Gift.png b/indra/newview/skins/default/textures/icons/Inv_Gift.png
new file mode 100644
index 0000000000..5afe85d72d
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_Gift.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Disabled.png b/indra/newview/skins/default/textures/icons/Sync_Disabled.png
new file mode 100644
index 0000000000..ca2e8def97
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Enabled.png b/indra/newview/skins/default/textures/icons/Sync_Enabled.png
new file mode 100644
index 0000000000..bc236c8b98
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Enabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Progress_1.png b/indra/newview/skins/default/textures/icons/Sync_Progress_1.png
new file mode 100644
index 0000000000..624e556376
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Progress_1.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Progress_2.png b/indra/newview/skins/default/textures/icons/Sync_Progress_2.png
new file mode 100644
index 0000000000..5769803b3f
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Progress_2.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Progress_3.png b/indra/newview/skins/default/textures/icons/Sync_Progress_3.png
new file mode 100644
index 0000000000..92d4bfb020
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Progress_3.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Progress_4.png b/indra/newview/skins/default/textures/icons/Sync_Progress_4.png
new file mode 100644
index 0000000000..6d43eb3a9f
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Progress_4.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Progress_5.png b/indra/newview/skins/default/textures/icons/Sync_Progress_5.png
new file mode 100644
index 0000000000..766d063c99
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Progress_5.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Sync_Progress_6.png b/indra/newview/skins/default/textures/icons/Sync_Progress_6.png
new file mode 100644
index 0000000000..dfe7f68b72
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Sync_Progress_6.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index f0a1893502..a6e71cc38e 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -72,11 +72,11 @@ with the same filename but different name
<texture name="BackButton_Over" file_name="icons/back_arrow_over.png" preload="false" scale.left="22" scale.top="12" scale.right="25" scale.bottom="12" />
<texture name="BackButton_Press" file_name="icons/back_arrow_press.png" preload="false" scale.left="22" scale.top="12" scale.right="25" scale.bottom="12" />
- <texture name="Badge" file_name="widgets/Badge.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
+ <texture name="Badge_Background" file_name="widgets/Badge_Background.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
+ <texture name="Badge_Border" file_name="widgets/Badge_Border.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
<texture name="Blank" file_name="Blank.png" preload="false" />
-
<texture name="BuyArrow_Over" file_name="navbar/BuyArrow_Over.png" preload="true" scale.left="0" scale.top="1" scale.right="0" scale.bottom="0" />
<texture name="BuyArrow_Press" file_name="navbar/BuyArrow_Press.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" />
@@ -479,7 +479,16 @@ with the same filename but different name
<texture name="StopReload_Off" file_name="icons/StopReload_Off.png" preload="false" />
<texture name="StopReload_Over" file_name="icons/StopReload_Over.png" preload="false" />
- <texture name="TabIcon_Appearance_Off" file_name="taskpanel/TabIcon_Appearance_Off.png" preload="false" />
+ <texture name="Sync_Disabled" file_name="icons/Sync_Disabled.png" preload="true" />
+ <texture name="Sync_Enabled" file_name="icons/Sync_Enabled.png" preload="true" />
+ <texture name="Sync_Progress_1" file_name="icons/Sync_Progress_1.png" preload="true" />
+ <texture name="Sync_Progress_2" file_name="icons/Sync_Progress_2.png" preload="true" />
+ <texture name="Sync_Progress_3" file_name="icons/Sync_Progress_3.png" preload="true" />
+ <texture name="Sync_Progress_4" file_name="icons/Sync_Progress_4.png" preload="true" />
+ <texture name="Sync_Progress_5" file_name="icons/Sync_Progress_5.png" preload="true" />
+ <texture name="Sync_Progress_6" file_name="icons/Sync_Progress_6.png" preload="true" />
+
+ <texture name="TabIcon_Appearance_Off" file_name="taskpanel/TabIcon_Appearance_Off.png" preload="false" />
<texture name="TabIcon_Appearance_Selected" file_name="taskpanel/TabIcon_Appearance_Selected.png" preload="false" />
<texture name="TabIcon_Close_Off" file_name="taskpanel/TabIcon_Close_Off.png" preload="false" />
<texture name="TabIcon_Home_Off" file_name="taskpanel/TabIcon_Home_Off.png" preload="false" />
diff --git a/indra/newview/skins/default/textures/widgets/Badge.png b/indra/newview/skins/default/textures/widgets/Badge.png
deleted file mode 100644
index 862b13d219..0000000000
--- a/indra/newview/skins/default/textures/widgets/Badge.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Badge_Background.png b/indra/newview/skins/default/textures/widgets/Badge_Background.png
new file mode 100644
index 0000000000..5089c30312
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Badge_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Badge_Border.png b/indra/newview/skins/default/textures/widgets/Badge_Border.png
new file mode 100644
index 0000000000..4b086a63fb
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Badge_Border.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
index 5f90a74e74..49c45233d8 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
@@ -29,8 +29,11 @@
height="535"
width="330">
<layout_panel
+ name="main_inventory_layout_panel"
+ min_dim="150"
width="330"
follows="bottom|left|right"
+ user_resize="false"
height="480">
<panel
class="panel_main_inventory"
@@ -138,17 +141,40 @@
top="0"
left="0" />
<button
- label="SYNC"
+ image_disabled="Sync_Disabled"
+ image_disabled_selected="Sync_Disabled"
+ image_unselected="Sync_Enabled"
+ image_selected="Sync_Enabled"
+ label=""
is_toggle="false"
name="outbox_sync_btn"
follows="top|right"
- height="25"
+ height="16"
tab_stop="false"
- width="45"
+ width="16"
halign="center"
- top="5"
- left="-50"
+ top="10"
+ left="-40"
enabled="false" />
+ <loading_indicator
+ follows="top|right"
+ name="outbox_sync_indicator"
+ top="10"
+ left="-40"
+ height="16"
+ width="16"
+ images_per_sec="1.0"
+ tab_stop="false"
+ visible="false">
+ <images>
+ <image name="Sync_Progress_1"/>
+ <image name="Sync_Progress_2"/>
+ <image name="Sync_Progress_3"/>
+ <image name="Sync_Progress_4"/>
+ <image name="Sync_Progress_5"/>
+ <image name="Sync_Progress_6"/>
+ </images>
+ </loading_indicator>
<panel
follows="all"
left="0"
diff --git a/indra/newview/skins/default/xui/en/widgets/badge.xml b/indra/newview/skins/default/xui/en/widgets/badge.xml
index 4eb633ac0c..ceec09d1e4 100644
--- a/indra/newview/skins/default/xui/en/widgets/badge.xml
+++ b/indra/newview/skins/default/xui/en/widgets/badge.xml
@@ -2,7 +2,7 @@
<!-- Additional attributes:
-->
<badge font="SansSerifSmall"
- image="Badge"
+ image="Badge_Background"
image_color="BadgeImageColor"
label_color="BadgeLabelColor"
location="top_left"