Kitty Barnett / Catznip floating profile windows.

Warning: known crashes, will pick up extra fixes shortly from catznip tip
master
Arrehn 2011-01-05 01:26:17 -05:00
parent 524f143e4f
commit 1bcf034c84
9 changed files with 1004 additions and 884 deletions

View File

@ -29,3 +29,4 @@ GUI_IMTabConfig LGPL
Small_CamControl LGPL
Small_MoveControl LGPL
Floating_Topbar LGPL
Profile_Floaters LGPL

View File

@ -17,8 +17,7 @@
<key>ChatTabDirection</key>
<map>
<key>Comment</key>
<string>Toggles the direction of chat tabs between horisontal and vertica
l</string>
<string>Toggles the direction of chat tabs between horisontal and vertical</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@ -9233,7 +9232,18 @@ l</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>ShowScriptErrors</key>
<key>ShowProfileFloaters</key>
<map>
<key>Comment</key>
<string>Shows resident profiles in a floater rather than the side tray</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>ShowScriptErrors</key>
<map>
<key>Comment</key>
<string>Show script errors</string>

View File

@ -59,7 +59,9 @@
#include "llrecentpeople.h"
#include "llsidetray.h"
#include "lltrans.h"
#include "llviewerobjectlist.h"
// [SL:KB] - Patch : UI-ProfileGroupFloater | Checked: 2010-09-08 (Catznip-2.1.2c) | Added: Catznip-2.1.2c
#include "llviewercontrol.h"
// [/SL:KB]#include "llviewerobjectlist.h"
#include "llviewermessage.h" // for handle_lure
#include "llviewerregion.h"
#include "llimfloater.h"
@ -302,20 +304,31 @@ void LLAvatarActions::showProfile(const LLUUID& id)
{
if (id.notNull())
{
LLSD params;
params["id"] = id;
params["open_tab_name"] = "panel_profile";
// [SL:KB] - Patch : UI-ProfileGroupFloater |
if ( (!gSavedSettings.getBOOL("ShowProfileFloaters")) || ((gAgent.getID() == id)) )
{
// [/SL:KB]
LLSD params;
params["id"] = id;
params["open_tab_name"] = "panel_profile";
//Show own profile
if(gAgent.getID() == id)
{
LLSideTray::getInstance()->showPanel("panel_me", params);
}
//Show other user profile
else
{
LLSideTray::getInstance()->showPanel("panel_profile_view", params);
}
//Show own profile
if(gAgent.getID() == id)
{
LLSideTray::getInstance()->showPanel("panel_me", params);
}
//Show other user profile
else
{
LLSideTray::getInstance()->showPanel("panel_profile_view", params);
}
// [SL:KB] - Patch : UI-ProfileGroupFloater
}
else
{
LLFloaterReg::showInstance("floater_profile_view", LLSD().with("id", id));
}
// [/SL:KB]
}
}

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,9 @@
#include "llavatarpropertiesprocessor.h"
#include "llcallingcard.h"
// [SL:KB] - Patch : UI-ProfileGroupFloater
#include "llfloater.h"
// [/SL:KB]
#include "llpanelavatar.h"
#include "llpanelpicks.h"
#include "llpanelprofile.h"
@ -129,8 +132,37 @@ BOOL LLPanelProfileView::postBuild()
mStatusText = getChild<LLTextBox>("status");
mStatusText->setVisible(false);
childSetCommitCallback("back",boost::bind(&LLPanelProfileView::onBackBtnClick,this),NULL);
// childSetCommitCallback("back",boost::bind(&LLPanelProfileView::onBackBtnClick,this),NULL);
childSetCommitCallback("copy_to_clipboard",boost::bind(&LLPanelProfileView::onCopyToClipboard,this),NULL);
// [SL:KB] - Patch : UI-ProfileGroupFloater
LLFloater* pParentView = dynamic_cast<LLFloater*>(getParent());
if (!pParentView)
{
childSetCommitCallback("back", boost::bind(&LLPanelProfileView::onBackBtnClick,this),NULL);
}
else
{
pParentView->setTitle(getLabel());
childSetVisible("back", false);
// -TT - we might want to remove this. Maybe.
// HACK-Catznip: we got rid of the back button so we want to line up the name controls with the rest
LLUICtrl* pCtrls[] =
{
getChild<LLUICtrl>("user_name", FALSE),
getChild<LLUICtrl>("display_name_label", FALSE),
getChild<LLUICtrl>("solo_username_label", FALSE),
getChild<LLUICtrl>("user_name_small", FALSE),
getChild<LLUICtrl>("user_label", FALSE),
getChild<LLUICtrl>("user_slid", FALSE)
};
int dX = (NULL != pCtrls[0]) ? 10 - pCtrls[0]->getRect().mLeft : 0;
for (int idxCtrl = 0; idxCtrl < sizeof(pCtrls) / sizeof(LLUICtrl*); idxCtrl++)
{
if (pCtrls[idxCtrl])
pCtrls[idxCtrl]->translate(dX, 0);
}
}
// [/SL:KB]
return TRUE;
}
@ -242,6 +274,11 @@ void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id,
getChild<LLUICtrl>("copy_to_clipboard")->setEnabled( false );
getChild<LLUICtrl>("solo_username_label")->setVisible( true );
}
// [SL:KB] - Patch : UI-ProfileGroupFloater
LLFloater* pParentView = dynamic_cast<LLFloater*>(getParent());
if (pParentView)
pParentView->setTitle(av_name.getCompleteName() + " - " + getLabel());
// [/SL:KB]
}
// EOF

View File

@ -32,6 +32,9 @@
#include "llavatarpropertiesprocessor.h"
#include "llagent.h"
#include "lltooldraganddrop.h"
// [SL:KB] - Patch : UI-ProfileGroupFloater | Checked: 2010-09-08 (Catznip-2.1.2c) | Added: Catznip-2.1.2c
#include "llfloater.h"
// [/SL:KB]
class LLAvatarName;
class LLPanelProfile;
@ -64,8 +67,11 @@ public:
void *cargo_data, EAcceptance *accept,
std::string& tooltip_msg)
{
LLToolDragAndDrop::handleGiveDragAndDrop(getAvatarId(), gAgent.getSessionID(), drop,
cargo_type, cargo_data, accept);
// LLToolDragAndDrop::handleGiveDragAndDrop(getAvatarId(), gAgent.getSessionID(), drop,
// cargo_type, cargo_data, accept);
// [SL:KB] - Patch : UI-ProfileGroupFloater
LLToolDragAndDrop::handleGiveDragAndDrop(getAvatarId(), LLUUID::null, drop, cargo_type, cargo_data, accept);
// [/SL:KB]
return TRUE;
}
@ -105,4 +111,20 @@ private:
AvatarStatusObserver* mAvatarStatusObserver;
};
// [SL:KB] - Patch : UI-ProfileGroupFloater
class LLFloaterProfileView : public LLFloater
{
public:
LLFloaterProfileView(const LLSD& seed) : LLFloater(seed) {}
~LLFloaterProfileView() {}
void onOpen(const LLSD& key)
{
LLPanel* panel = findChild<LLPanel>("panel_profile_view");
if(panel)
panel->onOpen(key);
}
};
// [/SL:KB]
#endif //LL_LLPANELPROFILEVIEW_H

View File

@ -112,6 +112,9 @@
#include "llnearbychat.h"
#include "llpanelblockedlist.h"
#include "llpanelclassified.h"
// [SL:KB] - Patch : UI-ProfileGroupFloater
#include "llpanelprofileview.h"
// [/SL:KB]
#include "llpreviewanim.h"
#include "llpreviewgesture.h"
#include "llpreviewnotecard.h"
@ -158,7 +161,10 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("env_windlight", "floater_windlight_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWindLight>);
LLFloaterReg::add("event", "floater_event.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEvent>);
// [SL:KB] - Patch : UI-ProfileGroupFloater | Checked: 2010-09-08 (Catznip-2.1.2c) | Added: Catznip-2.1.2c
LLFloaterReg::add("floater_profile_view", "floater_profile_view.xml",&LLFloaterReg::build<LLFloaterProfileView>);
// [/SL:KB]
LLFloaterReg::add("font_test", "floater_font_test.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterFontTest>);
LLFloaterReg::add("gestures", "floater_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGesture>);

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<floater
height="600"
layout="topleft"
min_height="350"
width="343"
can_close="true"
can_resize="true">
<panel
background_visible="false"
top="5"
height="590"
left="5"
class="panel_profile_view"
name="panel_profile_view"
filename="panel_profile_view.xml"
/>
</floater>

View File

@ -6,6 +6,7 @@
layout="topleft"
min_height="350"
name="panel_target_profile"
label="Profile View"
left="0"
width="333">
<string