Make Outbox and Favorites like other new inventory windows

Yay search~
This commit is contained in:
Lirusaito
2019-05-04 03:24:28 -04:00
parent 22f314d158
commit 140f5d3b0a
11 changed files with 82 additions and 56 deletions

View File

@@ -7493,22 +7493,6 @@ This should be as low as possible, but too low may break functionality</string>
<integer>0</integer>
</array>
</map>
<key>FloaterFavoritesRect</key>
<map>
<key>Comment</key>
<string>Rectangle for favorites window</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Rect</string>
<key>Value</key>
<array>
<integer>0</integer>
<integer>400</integer>
<integer>250</integer>
<integer>0</integer>
</array>
</map>
<key>FloaterFindRect2</key>
<map>
<key>Comment</key>
@@ -8174,22 +8158,6 @@ This should be as low as possible, but too low may break functionality</string>
<integer>0</integer>
</array>
</map>
<key>FloaterMyOutfitsRect</key>
<map>
<key>Comment</key>
<string>Rectangle for My Outfits window</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Rect</string>
<key>Value</key>
<array>
<integer>0</integer>
<integer>400</integer>
<integer>250</integer>
<integer>0</integer>
</array>
</map>
<key>FloaterObjectIMInfo</key>
<map>
<key>Comment</key>

View File

@@ -101,6 +101,7 @@ F32 LLToolBar::sInventoryAutoOpenTime = 1.f;
// Functions
//
void show_floater(const std::string& floater_name);
void show_inv_floater(const LLSD& userdata, const std::string& field);
LLToolBar::LLToolBar()
: LLLayoutPanel()
@@ -108,6 +109,9 @@ LLToolBar::LLToolBar()
setIsChrome(TRUE);
setFocusRoot(TRUE);
mCommitCallbackRegistrar.add("ShowFloater", boost::bind(show_floater, _2));
mCommitCallbackRegistrar.add("ShowInvFloater.ID", boost::bind(show_inv_floater, _2, "id"));
mCommitCallbackRegistrar.add("ShowInvFloater.Name", boost::bind(show_inv_floater, _2, "name"));
mCommitCallbackRegistrar.add("ShowInvFloater.Type", boost::bind(show_inv_floater, _2, "type"));
}

View File

@@ -48,6 +48,7 @@
#include "statemachine/aifilepicker.h"
// newview includes
#include "lffloaterinvpanel.h"
#include "lfsimfeaturehandler.h"
#include "llagent.h"
#include "llagentcamera.h"
@@ -8935,6 +8936,70 @@ class SinguUrlAction : public view_listener_t
}
};
void show_inv_floater(const LLSD& userdata, const std::string& field)
{
LFFloaterInvPanel::show(LLSD().with(field, userdata));
}
static void visible_inv_floater(const LLSD& userdata, const std::string& field)
{
gMenuHolder->findControl(userdata["control"].asString())->setValue(!!LFFloaterInvPanel::getInstance(LLSD().with(field, userdata["data"])));
}
class ShowInvFloaterID : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
show_inv_floater(userdata, "id");
return true;
}
};
class VisibleInvFloaterID : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
visible_inv_floater(userdata, "id");
return true;
}
};
class ShowInvFloaterName : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
show_inv_floater(userdata, "name");
return true;
}
};
class VisibleInvFloaterName : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
visible_inv_floater(userdata, "name");
return true;
}
};
class ShowInvFloaterType : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
show_inv_floater(userdata, "type");
return true;
}
};
class VisibleInvFloaterType : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
visible_inv_floater(userdata, "type");
return true;
}
};
class VisibleSecondLife : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -9667,6 +9732,13 @@ void initialize_menus()
addMenu(new SinguUrlAction(), "URLAction");
addMenu(new LLSyncAnimations(), "Tools.ResyncAnimations");
addMenu(new ShowInvFloaterID, "ShowInvFloater.ID");
addMenu(new ShowInvFloaterName, "ShowInvFloater.Name");
addMenu(new ShowInvFloaterType, "ShowInvFloater.Type");
addMenu(new VisibleInvFloaterID, "InvFloaterVisible.ID");
addMenu(new VisibleInvFloaterName, "InvFloaterVisible.Name");
addMenu(new VisibleInvFloaterType, "InvFloaterVisible.Type");
// [RLVa:KB] - Checked: 2010-01-18 (RLVa-1.1.0m) | Added: RLVa-1.1.0m | OK
if (rlv_handler_t::isEnabled())
{

View File

@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="floater_inventory_favs.xml" title="Favoriten"/>

View File

@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="floater_my_outfits.xml" title="Meine Outfits"/>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater name="floater_inventory_favs.xml" title="Favorites" width="250" height="400" min_width="100" min_height="100" rect_control="FloaterFavoritesRect" can_close="true" can_minimize="true" can_resize="true">
<inventory_panel name="inventory_favs" start_folder.name="Favorites" follows="all" left="5" right="-5" top="-20" bottom="5" show_item_link_overlays="true"/>
</floater>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater name="floater_my_outfits.xml" title="My Outfits" width="250" height="400" min_width="100" min_height="100" rect_control="FloaterMyOutfitsRect" can_close="true" can_minimize="true" can_resize="true">
<inventory_panel name="my_outfits" start_folder.name="My Outfits" follows="all" left="5" right="-5" top="-20" bottom="5" show_item_link_overlays="true"/>
</floater>

View File

@@ -618,10 +618,12 @@
<menu_item_separator bottom="-213" enabled="true" height="8" label="-----------" left="0"
mouse_opaque="true" name="separator5" width="185" />
<menu_item_call bottom="-29" height="19" label="My Outfits" left="0" name="My Outfits" width="166">
<on_click function="ShowFloater" userdata="floater_my_outfits.xml" />
<on_click function="ShowInvFloater.Name" userdata="My Outfits"/>
<on_check function="InvFloaterVisible.Name" userdata="My Outfits"/>
</menu_item_call>
<menu_item_call bottom="-29" height="19" label="Favorites" left="0" name="Favorites" width="166">
<on_click function="ShowFloater" userdata="floater_inventory_favs.xml" />
<on_click function="ShowInvFloater.Name" userdata="Favorites"/>
<on_check function="InvFloaterVisible.Name" userdata="Favorites"/>
</menu_item_call>
<menu_item_check label="Default Avatars" name="Avatar Picker">
<on_click function="ShowFloater" userdata="avatar"/>

View File

@@ -399,12 +399,12 @@
</layout_panel>
<layout_panel name="paneloutfits" height="24" width="50" user_resize="false" visibility_control="ToolbarVisibleInventoryOutfits">
<button bottom="0" height="24" label="Outfits" image_overlay="icn_toolbar_outfits.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" name="outfits_btn" width="50" follows="left|right">
<button.commit_callback function="ShowFloater" parameter="floater_my_outfits.xml"/>
<button.commit_callback function="ShowInvFloater.Name" parameter="My Outfits"/>
</button>
</layout_panel>
<layout_panel name="panelfavs" height="24" width="50" user_resize="false" visibility_control="ToolbarVisibleInventoryFavs">
<button bottom="0" height="24" label="Favorites" image_overlay="icn_toolbar_favorites.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" name="favs_btn" width="50" follows="left|right">
<button.commit_callback function="ShowFloater" parameter="floater_inventory_favs.xml"/>
<button.commit_callback function="ShowInvFloater.Name" parameter="Favorites"/>
</button>
</layout_panel>
<layout_panel name="panelmarketplacelistings" height="24" width="50" user_resize="false" visibility_control="ToolbarVisibleMarketplaceListings">

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater name="floater_inventory_favs.xml" title="Favoritos">
<inventory_panel name="inventory_favs"/>
</floater>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater name="floater_my_outfits.xml" title="Mis Vestuarios">
<inventory_panel name="my_outfits"/>
</floater>