summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2013-11-11 23:13:01 +0000
committerCho <cho@lindenlab.com>2013-11-11 23:13:01 +0000
commitdbab46ae786166ac5d6c929e2c444d8f490edd58 (patch)
tree6b25276e8caa30639d33935c3679caea9974067a /indra/newview
parent15434d53ea1f1bca37b7b9d6d569b3cb61d09bbe (diff)
made floater_snapshot links open the photo tab on the corresponding floater for ACME-1168
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterflickr.cpp13
-rw-r--r--indra/newview/llfloaterflickr.h2
-rw-r--r--indra/newview/llfloatersocial.cpp13
-rw-r--r--indra/newview/llfloatersocial.h2
-rw-r--r--indra/newview/llfloatertwitter.cpp13
-rw-r--r--indra/newview/llfloatertwitter.h2
-rwxr-xr-xindra/newview/llpanelsnapshotoptions.cpp21
7 files changed, 66 insertions, 0 deletions
diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp
index 1edc61fcf6..7140b527b9 100644
--- a/indra/newview/llfloaterflickr.cpp
+++ b/indra/newview/llfloaterflickr.cpp
@@ -46,6 +46,7 @@
#include "llviewerregion.h"
#include "llviewercontrol.h"
#include "llviewermedia.h"
+#include "lltabcontainer.h"
static LLRegisterPanelClassWrapper<LLFlickrPhotoPanel> t_panel_photo("llflickrphotopanel");
static LLRegisterPanelClassWrapper<LLFlickrAccountPanel> t_panel_account("llflickraccountpanel");
@@ -588,6 +589,18 @@ BOOL LLFloaterFlickr::postBuild()
return LLFloater::postBuild();
}
+void LLFloaterFlickr::showPhotoPanel()
+{
+ LLTabContainer* parent = dynamic_cast<LLTabContainer*>(mSocialPhotoPanel->getParent());
+ if (!parent)
+ {
+ llwarns << "Cannot find panel container" << llendl;
+ return;
+ }
+
+ parent->selectTabPanel(mSocialPhotoPanel);
+}
+
// static
void LLFloaterFlickr::preUpdate()
{
diff --git a/indra/newview/llfloaterflickr.h b/indra/newview/llfloaterflickr.h
index 8cf2cd2dd6..e9005444d8 100644
--- a/indra/newview/llfloaterflickr.h
+++ b/indra/newview/llfloaterflickr.h
@@ -110,6 +110,8 @@ public:
BOOL postBuild();
void draw();
void onCancel();
+
+ void showPhotoPanel();
static void preUpdate();
static void postUpdate();
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp
index 2a74c8e3ea..31404da7d3 100644
--- a/indra/newview/llfloatersocial.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -46,6 +46,7 @@
#include "llviewerregion.h"
#include "llviewercontrol.h"
#include "llviewermedia.h"
+#include "lltabcontainer.h"
static LLRegisterPanelClassWrapper<LLSocialStatusPanel> t_panel_status("llsocialstatuspanel");
static LLRegisterPanelClassWrapper<LLSocialPhotoPanel> t_panel_photo("llsocialphotopanel");
@@ -823,6 +824,18 @@ BOOL LLFloaterSocial::postBuild()
return LLFloater::postBuild();
}
+void LLFloaterSocial::showPhotoPanel()
+{
+ LLTabContainer* parent = dynamic_cast<LLTabContainer*>(mSocialPhotoPanel->getParent());
+ if (!parent)
+ {
+ llwarns << "Cannot find panel container" << llendl;
+ return;
+ }
+
+ parent->selectTabPanel(mSocialPhotoPanel);
+}
+
// static
void LLFloaterSocial::preUpdate()
{
diff --git a/indra/newview/llfloatersocial.h b/indra/newview/llfloatersocial.h
index bbe07c9704..041ae8a268 100644
--- a/indra/newview/llfloatersocial.h
+++ b/indra/newview/llfloatersocial.h
@@ -150,6 +150,8 @@ public:
BOOL postBuild();
void draw();
void onCancel();
+
+ void showPhotoPanel();
static void preUpdate();
static void postUpdate();
diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp
index 1324bd5fd8..0da0d64426 100644
--- a/indra/newview/llfloatertwitter.cpp
+++ b/indra/newview/llfloatertwitter.cpp
@@ -46,6 +46,7 @@
#include "llviewerregion.h"
#include "llviewercontrol.h"
#include "llviewermedia.h"
+#include "lltabcontainer.h"
static LLRegisterPanelClassWrapper<LLTwitterPhotoPanel> t_panel_photo("lltwitterphotopanel");
static LLRegisterPanelClassWrapper<LLTwitterAccountPanel> t_panel_account("lltwitteraccountpanel");
@@ -565,6 +566,18 @@ BOOL LLFloaterTwitter::postBuild()
return LLFloater::postBuild();
}
+void LLFloaterTwitter::showPhotoPanel()
+{
+ LLTabContainer* parent = dynamic_cast<LLTabContainer*>(mSocialPhotoPanel->getParent());
+ if (!parent)
+ {
+ llwarns << "Cannot find panel container" << llendl;
+ return;
+ }
+
+ parent->selectTabPanel(mSocialPhotoPanel);
+}
+
// static
void LLFloaterTwitter::preUpdate()
{
diff --git a/indra/newview/llfloatertwitter.h b/indra/newview/llfloatertwitter.h
index 090e01872a..12e1d41210 100644
--- a/indra/newview/llfloatertwitter.h
+++ b/indra/newview/llfloatertwitter.h
@@ -108,6 +108,8 @@ public:
void draw();
void onCancel();
+ void showPhotoPanel();
+
static void preUpdate();
static void postUpdate();
diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp
index 1967c50a29..4cadd837d1 100755
--- a/indra/newview/llpanelsnapshotoptions.cpp
+++ b/indra/newview/llpanelsnapshotoptions.cpp
@@ -32,6 +32,9 @@
#include "llfloatersnapshot.h" // FIXME: create a snapshot model
#include "llfloaterreg.h"
+#include "llfloatersocial.h"
+#include "llfloaterflickr.h"
+#include "llfloatertwitter.h"
/**
* Provides several ways to save a snapshot.
@@ -140,17 +143,35 @@ void LLPanelSnapshotOptions::onSaveToComputer()
void LLPanelSnapshotOptions::onSendToFacebook()
{
LLFloaterReg::hideInstance("snapshot");
+
+ LLFloaterSocial* social_floater = dynamic_cast<LLFloaterSocial*>(LLFloaterReg::getInstance("social"));
+ if (social_floater)
+ {
+ social_floater->showPhotoPanel();
+ }
LLFloaterReg::showInstance("social");
}
void LLPanelSnapshotOptions::onSendToTwitter()
{
LLFloaterReg::hideInstance("snapshot");
+
+ LLFloaterTwitter* twitter_floater = dynamic_cast<LLFloaterTwitter*>(LLFloaterReg::getInstance("twitter"));
+ if (twitter_floater)
+ {
+ twitter_floater->showPhotoPanel();
+ }
LLFloaterReg::showInstance("twitter");
}
void LLPanelSnapshotOptions::onSendToFlickr()
{
LLFloaterReg::hideInstance("snapshot");
+
+ LLFloaterFlickr* flickr_floater = dynamic_cast<LLFloaterFlickr*>(LLFloaterReg::getInstance("flickr"));
+ if (flickr_floater)
+ {
+ flickr_floater->showPhotoPanel();
+ }
LLFloaterReg::showInstance("flickr");
}