summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-05-15 12:31:49 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-05-15 12:31:49 +0300
commitde8a61f71a16f950cbf64b5704b9952cb733403e (patch)
tree49a9fc80be225a6faabc47e0d4be619d11ae889d /indra/newview
parent26ee1cc148223b26ee1bdef61f4840410c4ab22f (diff)
SL-15312 Shortcut to notes
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelprofile.cpp25
-rw-r--r--indra/newview/llpanelprofile.h1
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_secondlife.xml10
3 files changed, 33 insertions, 3 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 542ecf8b42..fb5d2d2051 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -842,6 +842,8 @@ BOOL LLPanelProfileSecondLife::postBuild()
mSeeOnMapToggle->setMouseUpCallback([this](LLUICtrl*, const LLSD&) { onShowAgentPermissionsDialog(); });
mEditObjectsToggle->setMouseUpCallback([this](LLUICtrl*, const LLSD&) { onShowAgentPermissionsDialog(); });
+ getChild<LLButton>("open_notes")->setCommitCallback([this](LLUICtrl*, void*) { onOpenNotes(); }, nullptr);
+
return TRUE;
}
@@ -1614,6 +1616,23 @@ void LLPanelProfileSecondLife::onShowAgentPermissionsDialog()
}
}
+void LLPanelProfileSecondLife::onOpenNotes()
+{
+ LLFloater* parent_floater = gFloaterView->getParentFloater(this);
+ if (!parent_floater)
+ {
+ return;
+ }
+
+ LLTabContainer* tab_container = parent_floater->findChild<LLTabContainer>("panel_profile_tabs", TRUE);
+ if (!tab_container)
+ {
+ return;
+ }
+
+ tab_container->selectTabByName(PANEL_NOTES);
+}
+
//////////////////////////////////////////////////////////////////////////
// LLPanelProfileWeb
@@ -1991,13 +2010,13 @@ void LLPanelProfileNotes::onSaveNotesChanges()
boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), LLSD().with("notes", mCurrentNotes)));
- LLFloater* floater_profile = LLFloaterReg::findInstance("profile", LLSD().with("id", getAvatarId()));
- if (!floater_profile)
+ LLFloater* parent_floater = gFloaterView->getParentFloater(this);
+ if (!parent_floater)
{
return;
}
- LLPanel* panel = floater_profile->findChild<LLPanel>(PANEL_SECONDLIFE, TRUE);
+ LLPanel* panel = parent_floater->findChild<LLPanel>(PANEL_SECONDLIFE, TRUE);
LLPanelProfileSecondLife *panel_sl = dynamic_cast<LLPanelProfileSecondLife*>(panel);
if (panel_sl)
{
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index 8b2893905d..0237a537de 100644
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -177,6 +177,7 @@ private:
void onSaveDescriptionChanges();
void onDiscardDescriptionChanges();
void onShowAgentPermissionsDialog();
+ void onOpenNotes();
private:
typedef std::map<std::string, LLUUID> group_map_t;
diff --git a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
index e23da2b7fe..3745706a5a 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
@@ -403,6 +403,16 @@ Account: [ACCTTYPE]
word_wrap="true"
use_ellipses="true"
allow_scroll="false"/>
+ <button
+ follows="right|bottom"
+ layout="topleft"
+ name="open_notes"
+ tooltip="Show notes"
+ image_overlay="ForwardArrow_Off"
+ height="18"
+ bottom="-5"
+ right="-5"
+ width="20" />
</layout_panel>
<layout_panel