summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloateroutbox.cpp34
-rw-r--r--indra/newview/llfloateroutbox.h3
-rw-r--r--indra/newview/skins/default/xui/en/floater_merchant_outbox.xml241
3 files changed, 167 insertions, 111 deletions
diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp
index 597602d5ab..297736f3bd 100644
--- a/indra/newview/llfloateroutbox.cpp
+++ b/indra/newview/llfloateroutbox.cpp
@@ -111,6 +111,7 @@ LLFloaterOutbox::LLFloaterOutbox(const LLSD& key)
, mOutboxId(LLUUID::null)
, mOutboxInventoryPanel(NULL)
, mOutboxItemCount(0)
+ , mOutboxTopLevelDropZone(NULL)
, mWindowShade(NULL)
{
}
@@ -140,7 +141,9 @@ BOOL LLFloaterOutbox::postBuild()
mImportButton = getChild<LLButton>("outbox_import_btn");
mImportButton->setCommitCallback(boost::bind(&LLFloaterOutbox::onImportButtonClicked, this));
-
+
+ mOutboxTopLevelDropZone = getChild<LLPanel>("outbox_generic_drag_target");
+
LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLFloaterOutbox::onFocusReceived, this));
return TRUE;
@@ -353,6 +356,11 @@ void LLFloaterOutbox::updateView()
}
}
+bool isAccepted(EAcceptance accept)
+{
+ return (accept >= ACCEPT_YES_COPY_SINGLE);
+}
+
BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EDragAndDropType cargo_type,
void* cargo_data,
@@ -370,7 +378,7 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
BOOL handled = (handled_view != NULL);
// Pass all drag and drop for this floater to the outbox inventory control
- if (!handled || (*accept == ACCEPT_NO))
+ if (!handled || !isAccepted(*accept))
{
// Always assume we are going to move the drag and drop operation to the outbox root folder
bool move_to_root = true;
@@ -394,11 +402,33 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
handled = root_folder->handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
}
+
+ if (mOutboxTopLevelDropZone)
+ {
+ mOutboxTopLevelDropZone->setBackgroundVisible(handled && !drop && isAccepted(*accept));
+ }
+ }
+ else
+ {
+ if (mOutboxTopLevelDropZone)
+ {
+ mOutboxTopLevelDropZone->setBackgroundVisible(FALSE);
+ }
}
return handled;
}
+void LLFloaterOutbox::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+ if (mOutboxTopLevelDropZone)
+ {
+ mOutboxTopLevelDropZone->setBackgroundVisible(FALSE);
+ }
+
+ LLFloater::onMouseLeave(x, y, mask);
+}
+
void LLFloaterOutbox::onImportButtonClicked()
{
mOutboxInventoryPanel->clearSelection();
diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h
index 58b7d6ec98..796c533059 100644
--- a/indra/newview/llfloateroutbox.h
+++ b/indra/newview/llfloateroutbox.h
@@ -66,6 +66,8 @@ public:
void showNotification(const LLSD& notify);
+ void onMouseLeave(S32 x, S32 y, MASK mask);
+
protected:
void fetchOutboxContents();
@@ -103,6 +105,7 @@ private:
LLUUID mOutboxId;
LLInventoryPanel * mOutboxInventoryPanel;
U32 mOutboxItemCount;
+ LLPanel * mOutboxTopLevelDropZone;
LLWindowShade * mWindowShade;
};
diff --git a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml
index c0f26413cb..498a9b6ce0 100644
--- a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml
+++ b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<floater
- open_positioning="cascading"
- can_close="true"
- can_resize="true"
- height="440"
- help_topic="floater_merchant_outbox"
- min_width="300"
- min_height="200"
- name="floater_merchant_outbox"
- save_rect="true"
- save_visibility="false"
- reuse_instance="true"
- title="MERCHANT OUTBOX"
- width="333" >
- <string name="OutboxFolderCount0"></string>
- <string name="OutboxFolderCount1">1 folder</string>
- <string name="OutboxFolderCountN">[NUM] folders</string>
- <string name="OutboxImporting">Sending folders...</string>
- <string name="OutboxInitializing">Initializing...</string>
- <panel
+ open_positioning="cascading"
+ can_close="true"
+ can_resize="true"
+ height="440"
+ help_topic="floater_merchant_outbox"
+ min_width="300"
+ min_height="200"
+ name="floater_merchant_outbox"
+ save_rect="true"
+ save_visibility="false"
+ reuse_instance="true"
+ title="MERCHANT OUTBOX"
+ width="333">
+ <string name="OutboxFolderCount0"></string>
+ <string name="OutboxFolderCount1">1 folder</string>
+ <string name="OutboxFolderCountN">[NUM] folders</string>
+ <string name="OutboxImporting">Sending folders...</string>
+ <string name="OutboxInitializing">Initializing...</string>
+ <panel
follows="all"
layout="topleft"
left="0"
@@ -26,104 +26,127 @@
label=""
height="440"
width="333">
- <panel
+ <panel
follows="all"
left="10"
- bottom="400"
+ bottom="370"
width="313"
top="0"
- bg_opaque_color="InventoryBackgroundColor"
- >
- <panel
- name="outbox_inventory_placeholder_panel"
- follows="all"
- layout="topleft"
- top="0"
- left="0"
- width="308"
- height="400"
- bg_opaque_color="InventoryBackgroundColor"
- >
- <text
- name="outbox_inventory_placeholder_title"
- type="string"
- follows="top|left|right"
- layout="topleft"
- top="10"
- left="0"
- width="308"
- height="25"
- wrap="true"
- halign="center"
- font="SansSerifBold">
- Loading...
- </text>
- <text
- name="outbox_inventory_placeholder_text"
- type="string"
- follows="top|left|right"
- layout="topleft"
- top="35"
- left="0"
- width="308"
- height="130"
- wrap="true"
- halign="left" />
- </panel>
+ bg_opaque_color="InventoryBackgroundColor">
+ <panel
+ name="outbox_inventory_placeholder_panel"
+ follows="all"
+ layout="topleft"
+ top="0"
+ left="0"
+ width="308"
+ height="370"
+ bg_opaque_color="InventoryBackgroundColor">
+ <text
+ name="outbox_inventory_placeholder_title"
+ type="string"
+ follows="top|left|right"
+ layout="topleft"
+ top="10"
+ left="0"
+ width="308"
+ height="25"
+ wrap="true"
+ halign="center"
+ font="SansSerifBold">
+ Loading...
+ </text>
+ <text
+ name="outbox_inventory_placeholder_text"
+ type="string"
+ follows="top|left|right"
+ layout="topleft"
+ top="35"
+ left="0"
+ width="308"
+ height="130"
+ wrap="true"
+ halign="left" />
+ </panel>
</panel>
- <panel
+ <panel
follows="bottom|left|right"
left="10"
bottom="435"
width="313"
- top="405"
- bg_opaque_color="InventoryBackgroundColor"
- >
- <text
- name="outbox_folder_count"
- type="string"
- follows="all"
- layout="topleft"
- top="10"
- left="5"
- width="150"
- height="20"
- wrap="true"
- halign="left"
- valign="bottom"
- font="SansSerif" />
- <button
- label="Send to Marketplace"
- tool_tip="Push to my Marketplace Storefront"
- is_toggle="false"
- name="outbox_import_btn"
- follows="bottom|right"
- tab_stop="false"
- halign="center"
- top="3"
- left="160"
- height="25"
- width="150"
- enabled="false" />
+ top="370">
+ <panel
+ name="outbox_generic_drag_target"
+ mouse_opaque="false"
+ follows="all"
+ top="5"
+ left="5"
+ width="303"
+ height="25"
+ background_visible="false"
+ bg_alpha_color="EmphasisColor_35"
+ border="true"
+ bevel_style="in"
+ visible="true">
+ <text
+ type="string"
+ follows="all"
+ layout="topleft"
+ top="6"
+ height="20"
+ left="5"
+ width="293"
+ halign="center"
+ font="SansSerifMedium"
+ font_shadow="hard"
+ valign="bottom">
+ Drag items here to create folders
+ </text>
+ </panel>
+ <text
+ name="outbox_folder_count"
+ type="string"
+ follows="all"
+ layout="topleft"
+ top="40"
+ left="5"
+ width="150"
+ height="20"
+ wrap="true"
+ halign="left"
+ valign="bottom"
+ font="SansSerif" />
+ <button
+ label="Send to Marketplace"
+ tool_tip="Push to my Marketplace Storefront"
+ is_toggle="false"
+ name="outbox_import_btn"
+ follows="bottom|right"
+ tab_stop="false"
+ halign="center"
+ top="37"
+ left="160"
+ height="25"
+ width="150"
+ enabled="false" />
</panel>
- <layout_stack name="import_progress_indicator" orientation="vertical" left="0" height="440" top="0" width="333" follows="all" visible="false">
- <layout_panel />
- <layout_panel height="45" auto_resize="false">
- <layout_stack orientation="horizontal" left="0" height="45" top="0" width="333" follows="all">
- <layout_panel width="0" />
- <layout_panel width="45" auto_resize="false">
- <loading_indicator
- height="45"
- layout="topleft"
- left="0"
- top="0"
- width="45"
- />
- </layout_panel>
- <layout_panel width="0" />
- </layout_stack>
- </layout_panel>
- <layout_panel />
- </layout_stack>
- </panel>
+ <layout_stack name="import_progress_indicator" orientation="vertical" left="0" height="440" top="0" width="333" follows="all" visible="false">
+ <layout_panel />
+ <layout_panel height="45" auto_resize="false">
+ <layout_stack orientation="horizontal" left="0" height="45" top="0" width="333" follows="all">
+ <layout_panel width="0" />
+ <layout_panel width="45" auto_resize="false">
+ <loading_indicator
+ height="45"
+ layout="topleft"
+ left="0"
+ top="0"
+ width="45" />
+ </layout_panel>
+ <layout_panel width="0" />
+ </layout_stack>
+ </layout_panel>
+ <layout_panel />
+ </layout_stack>
+ </panel>
</floater>