summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfloatertwitter.cpp23
-rw-r--r--indra/newview/llfloatertwitter.h1
2 files changed, 7 insertions, 17 deletions
diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp
index 78e9259919..868d623d57 100644
--- a/indra/newview/llfloatertwitter.cpp
+++ b/indra/newview/llfloatertwitter.cpp
@@ -64,7 +64,6 @@ const std::string DEFAULT_STATUS_TEXT = " #SecondLife";
///////////////////////////
LLTwitterPhotoPanel::LLTwitterPhotoPanel() :
-mSnapshotPanel(NULL),
mResolutionComboBox(NULL),
mRefreshBtn(NULL),
mBtnPreview(NULL),
@@ -94,7 +93,6 @@ BOOL LLTwitterPhotoPanel::postBuild()
{
setVisibleCallback(boost::bind(&LLTwitterPhotoPanel::onVisibilityChange, this, _2));
- mSnapshotPanel = getChild<LLUICtrl>("snapshot_panel");
mResolutionComboBox = getChild<LLUICtrl>("resolution_combobox");
mResolutionComboBox->setValue("[i800,i600]"); // hardcoded defaults ftw!
mResolutionComboBox->setCommitCallback(boost::bind(&LLTwitterPhotoPanel::updateResolution, this, TRUE));
@@ -194,15 +192,8 @@ void LLTwitterPhotoPanel::draw()
// calc preview offset within the preview rect
const S32 local_offset_x = (thumbnail_rect.getWidth() - thumbnail_w) / 2 ;
const S32 local_offset_y = (thumbnail_rect.getHeight() - thumbnail_h) / 2 ;
-
- // calc preview offset within the floater rect
- // Hack : To get the full offset, we need to take into account each and every offset of each widgets up to the floater.
- // This is almost as arbitrary as using a fixed offset so that's what we do here for the sake of simplicity.
- // *TODO : Get the offset looking through the hierarchy of widgets, should be done in postBuild() so to avoid traversing the hierarchy each time.
- S32 offset_x = thumbnail_rect.mLeft + local_offset_x - 1;
- S32 offset_y = thumbnail_rect.mBottom + local_offset_y - 39;
-
- mSnapshotPanel->localPointToOtherView(offset_x, offset_y, &offset_x, &offset_y, getParentByType<LLFloater>());
+ S32 offset_x = thumbnail_rect.mLeft + local_offset_x;
+ S32 offset_y = thumbnail_rect.mBottom + local_offset_y;
gGL.matrixMode(LLRender::MM_MODELVIEW);
// Apply floater transparency to the texture unless the floater is focused.
@@ -238,7 +229,7 @@ void LLTwitterPhotoPanel::onVisibilityChange(BOOL visible)
LLSnapshotLivePreview* preview = getPreviewView();
if(preview)
{
- lldebugs << "opened, updating snapshot" << llendl;
+ LL_DEBUGS() << "opened, updating snapshot" << LL_ENDL;
preview->updateSnapshot(TRUE);
}
}
@@ -455,7 +446,7 @@ void LLTwitterPhotoPanel::updateControls()
BOOL got_snap = previewp && previewp->getSnapshotUpToDate();
// *TODO: Separate maximum size for Web images from postcards
- lldebugs << "Is snapshot up-to-date? " << got_snap << llendl;
+ LL_DEBUGS() << "Is snapshot up-to-date? " << got_snap << LL_ENDL;
updateResolution(FALSE);
}
@@ -485,13 +476,13 @@ void LLTwitterPhotoPanel::updateResolution(BOOL do_update)
if (width == 0 || height == 0)
{
// take resolution from current window size
- lldebugs << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << llendl;
+ LL_DEBUGS() << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << LL_ENDL;
previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw());
}
else
{
// use the resolution from the selected pre-canned drop-down choice
- lldebugs << "Setting preview res selected from combo: " << width << "x" << height << llendl;
+ LL_DEBUGS() << "Setting preview res selected from combo: " << width << "x" << height << LL_ENDL;
previewp->setSize(width, height);
}
@@ -755,7 +746,7 @@ void LLFloaterTwitter::showPhotoPanel()
LLTabContainer* parent = dynamic_cast<LLTabContainer*>(mTwitterPhotoPanel->getParent());
if (!parent)
{
- llwarns << "Cannot find panel container" << llendl;
+ LL_WARNS() << "Cannot find panel container" << LL_ENDL;
return;
}
diff --git a/indra/newview/llfloatertwitter.h b/indra/newview/llfloatertwitter.h
index f07ec2ca2f..d586799d18 100644
--- a/indra/newview/llfloatertwitter.h
+++ b/indra/newview/llfloatertwitter.h
@@ -70,7 +70,6 @@ private:
LLHandle<LLView> mPreviewHandle;
- LLUICtrl * mSnapshotPanel;
LLUICtrl * mResolutionComboBox;
LLUICtrl * mFilterComboBox;
LLUICtrl * mRefreshBtn;