Merge branch 'develop' of https://github.com/secondlife/viewer
# Conflicts: # .github/ISSUE_TEMPLATE/10-bug.yaml # indra/llui/lldockcontrol.cpp # indra/llui/llscrolllistctrl.cpp # indra/llui/llviewereventrecorder.cpp # indra/newview/llfloaterland.cpp # indra/newview/llfloaterregioninfo.cpp # indra/newview/llfloaterworldmap.cpp # indra/newview/llmeshrepository.cpp # indra/newview/llpanelgroup.cpp # indra/newview/llpanelgrouproles.cpp # indra/newview/llpanelland.cpp # indra/newview/llphysicsmotion.cpp # indra/newview/lltexturectrl.h # indra/newview/lltoolpie.cpp # indra/newview/llviewermenu.cppmaster
commit
450d02ad39
|
|
@ -395,7 +395,7 @@ jobs:
|
|||
password: ${{ env.BUGSPLAT_PASS }}
|
||||
database: "SecondLife_Viewer_2018"
|
||||
channel: ${{ needs.build.outputs.viewer_channel }}
|
||||
version: ${{ needs.build.outputs.viewer_version }}
|
||||
version: ${{ needs.build.outputs.viewer_version }} (${{ needs.build.outputs.viewer_version }})
|
||||
|
||||
release:
|
||||
needs: [setvar, build, sign-and-package-windows, sign-and-package-mac]
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ LLDockControl::LLDockControl(LLView* dockWidget, LLFloater* dockableFloater,
|
|||
mDockWidgetHandle = dockWidget->getHandle();
|
||||
}
|
||||
|
||||
mNonToolbarPanelHandle = mDockableFloater->getRootView()->getChild<LLView>("non_toolbar_panel")->getHandle();
|
||||
|
||||
if (dockableFloater->isDocked())
|
||||
{
|
||||
on();
|
||||
|
|
@ -97,11 +99,10 @@ void LLDockControl::setDock(LLView* dockWidget)
|
|||
|
||||
void LLDockControl::getAllowedRect(LLRect& rect)
|
||||
{
|
||||
// <FS:Zi> Cache LLView pointer to non_toolbar_panel to speed up llDialog() instances and other dockable floaters
|
||||
//rect = mDockableFloater->getRootView()->getChild<LLView>("non_toolbar_panel")->getRect();
|
||||
static LLView* nonToolbarPanel=mDockableFloater->getRootView()->getChild<LLView>("non_toolbar_panel");
|
||||
rect = nonToolbarPanel->getRect();
|
||||
// </FS:Zi>
|
||||
if(!mNonToolbarPanelHandle.isDead())
|
||||
{
|
||||
rect = mNonToolbarPanelHandle.get()->getRect();
|
||||
}
|
||||
}
|
||||
|
||||
void LLDockControl::repositionDockable()
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ private:
|
|||
bool mDockWidgetVisible;
|
||||
DocAt mDockAt;
|
||||
LLHandle<LLView> mDockWidgetHandle;
|
||||
LLHandle<LLView> mNonToolbarPanelHandle;
|
||||
LLRect mPrevDockRect;
|
||||
LLRect mRootRect;
|
||||
LLRect mFloaterRect;
|
||||
|
|
|
|||
|
|
@ -113,7 +113,8 @@ LLScrollbar::LLScrollbar(const Params & p)
|
|||
up_btn.tab_stop(false);
|
||||
up_btn.follows.flags = (mOrientation == VERTICAL ? (FOLLOWS_RIGHT | FOLLOWS_TOP) : (FOLLOWS_LEFT | FOLLOWS_BOTTOM));
|
||||
|
||||
addChild(LLUICtrlFactory::create<LLButton>(up_btn));
|
||||
mLineUpBtn = LLUICtrlFactory::create<LLButton>(up_btn);
|
||||
addChild(mLineUpBtn);
|
||||
|
||||
LLButton::Params down_btn(mOrientation == VERTICAL ? p.down_button : p.right_button);
|
||||
down_btn.name(std::string("Line Down"));
|
||||
|
|
@ -123,7 +124,8 @@ LLScrollbar::LLScrollbar(const Params & p)
|
|||
down_btn.mouse_held_callback.function(boost::bind(&LLScrollbar::onLineDownBtnPressed, this, _2));
|
||||
down_btn.tab_stop(false);
|
||||
|
||||
addChild(LLUICtrlFactory::create<LLButton>(down_btn));
|
||||
mLineDownBtn = LLUICtrlFactory::create<LLButton>(down_btn);
|
||||
addChild(mLineDownBtn);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -468,22 +470,20 @@ void LLScrollbar::reshape(S32 width, S32 height, bool called_from_parent)
|
|||
{
|
||||
if (width == getRect().getWidth() && height == getRect().getHeight()) return;
|
||||
LLView::reshape( width, height, called_from_parent );
|
||||
LLButton* up_button = getChild<LLButton>("Line Up");
|
||||
LLButton* down_button = getChild<LLButton>("Line Down");
|
||||
|
||||
if (mOrientation == VERTICAL)
|
||||
{
|
||||
up_button->reshape(up_button->getRect().getWidth(), llmin(getRect().getHeight() / 2, mThickness));
|
||||
down_button->reshape(down_button->getRect().getWidth(), llmin(getRect().getHeight() / 2, mThickness));
|
||||
up_button->setOrigin(0, getRect().getHeight() - up_button->getRect().getHeight());
|
||||
down_button->setOrigin(0, 0);
|
||||
mLineUpBtn->reshape(mLineUpBtn->getRect().getWidth(), llmin(getRect().getHeight() / 2, mThickness));
|
||||
mLineDownBtn->reshape(mLineDownBtn->getRect().getWidth(), llmin(getRect().getHeight() / 2, mThickness));
|
||||
mLineUpBtn->setOrigin(0, getRect().getHeight() - mLineUpBtn->getRect().getHeight());
|
||||
mLineDownBtn->setOrigin(0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
up_button->reshape(llmin(getRect().getWidth() / 2, mThickness), up_button->getRect().getHeight());
|
||||
down_button->reshape(llmin(getRect().getWidth() / 2, mThickness), down_button->getRect().getHeight());
|
||||
up_button->setOrigin(0, 0);
|
||||
down_button->setOrigin(getRect().getWidth() - down_button->getRect().getWidth(), 0);
|
||||
mLineUpBtn->reshape(llmin(getRect().getWidth() / 2, mThickness), mLineUpBtn->getRect().getHeight());
|
||||
mLineDownBtn->reshape(llmin(getRect().getWidth() / 2, mThickness), mLineDownBtn->getRect().getHeight());
|
||||
mLineUpBtn->setOrigin(0, 0);
|
||||
mLineDownBtn->setOrigin(getRect().getWidth() - mLineDownBtn->getRect().getWidth(), 0);
|
||||
}
|
||||
updateThumbRect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,6 +161,9 @@ private:
|
|||
LLUIImagePtr mTrackImageH;
|
||||
|
||||
S32 mThickness;
|
||||
|
||||
LLButton* mLineUpBtn = nullptr;
|
||||
LLButton* mLineDownBtn = nullptr;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -201,7 +201,6 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
|
|||
mHighlightedItem(-1),
|
||||
mBorder(NULL),
|
||||
mSortCallback(NULL),
|
||||
mCommentTextView(NULL),
|
||||
mNumDynamicWidthColumns(0),
|
||||
mTotalStaticColumnWidth(0),
|
||||
mTotalColumnPadding(0),
|
||||
|
|
@ -302,7 +301,8 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
|
|||
// show scroll bar when applicable -Sei
|
||||
text_p.allow_scroll(true);
|
||||
text_p.track_end(true);
|
||||
addChild(LLUICtrlFactory::create<LLTextBox>(text_p));
|
||||
mCommentText = LLUICtrlFactory::create<LLTextBox>(text_p);
|
||||
addChild(mCommentText);
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS:Ansariel> Can only set sort column after we created the actual columns
|
||||
|
|
@ -329,13 +329,6 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
|
|||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
for (LLInitParam::ParamIterator<LLScrollListItem::Params>::const_iterator row_it = p.contents.rows.begin();
|
||||
row_it != p.contents.rows.end();
|
||||
++row_it)
|
||||
{
|
||||
addRow(*row_it);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Moved up
|
||||
//LLTextBox::Params text_p;
|
||||
//text_p.name("comment_text");
|
||||
|
|
@ -348,6 +341,13 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
|
|||
//text_p.text_color = mFgUnselectedColor;
|
||||
//addChild(LLUICtrlFactory::create<LLTextBox>(text_p));
|
||||
// </FS:Ansariel>
|
||||
|
||||
for (LLInitParam::ParamIterator<LLScrollListItem::Params>::const_iterator row_it = p.contents.rows.begin();
|
||||
row_it != p.contents.rows.end();
|
||||
++row_it)
|
||||
{
|
||||
addRow(*row_it);
|
||||
}
|
||||
}
|
||||
|
||||
S32 LLScrollListCtrl::getSearchColumn()
|
||||
|
|
@ -631,12 +631,7 @@ void LLScrollListCtrl::updateLayout()
|
|||
getRect().getWidth() - 2 * mBorderThickness,
|
||||
getRect().getHeight() - (2 * mBorderThickness ) - heading_size );
|
||||
|
||||
if (mCommentTextView == NULL)
|
||||
{
|
||||
mCommentTextView = getChildView("comment_text");
|
||||
}
|
||||
|
||||
mCommentTextView->setShape(mItemListRect);
|
||||
mCommentText->setShape(mItemListRect);
|
||||
|
||||
// how many lines of content in a single "page"
|
||||
S32 page_lines = getLinesPerPage();
|
||||
|
|
@ -1352,7 +1347,7 @@ void LLScrollListCtrl::deselectAllItems(bool no_commit_on_change)
|
|||
|
||||
void LLScrollListCtrl::setCommentText(const std::string& comment_text)
|
||||
{
|
||||
getChild<LLTextBox>("comment_text")->setValue(comment_text);
|
||||
mCommentText->setValue(comment_text);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Allow appending of comment text
|
||||
|
|
@ -1632,10 +1627,9 @@ const std::string LLScrollListCtrl::getSelectedItemLabel(S32 column) const
|
|||
item = getFirstSelected();
|
||||
if (item)
|
||||
{
|
||||
auto col = item->getColumn(column);
|
||||
if(col)
|
||||
if (LLScrollListCell* cell = item->getColumn(column))
|
||||
{
|
||||
return col->getValue().asString();
|
||||
return cell->getValue().asString();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1924,10 +1918,7 @@ void LLScrollListCtrl::draw()
|
|||
|
||||
updateColumns();
|
||||
|
||||
if (mCommentTextView)
|
||||
{
|
||||
mCommentTextView->setVisible(mItemList.empty());
|
||||
}
|
||||
mCommentText->setVisible(mItemList.empty());
|
||||
|
||||
drawItems();
|
||||
|
||||
|
|
@ -1949,9 +1940,9 @@ void LLScrollListCtrl::setEnabled(bool enabled)
|
|||
bool LLScrollListCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
||||
{
|
||||
// <FS> FIRE-10172: Let the LLTextbox handle the mouse scroll if it's visible
|
||||
if (mCommentTextView && mCommentTextView->getVisible())
|
||||
if (mCommentText->getVisible())
|
||||
{
|
||||
return mCommentTextView->handleScrollWheel(x, y, clicks);
|
||||
return mCommentText->handleScrollWheel(x, y, clicks);
|
||||
}
|
||||
// </FS>
|
||||
|
||||
|
|
@ -3121,7 +3112,8 @@ struct SameSortColumn
|
|||
bool LLScrollListCtrl::setSort(S32 column_idx, bool ascending)
|
||||
{
|
||||
LLScrollListColumn* sort_column = getColumn(column_idx);
|
||||
if (!sort_column) return false;
|
||||
if (!sort_column)
|
||||
return false;
|
||||
|
||||
sort_column->mSortDirection = ascending ? LLScrollListColumn::ASCENDING : LLScrollListColumn::DESCENDING;
|
||||
|
||||
|
|
@ -3141,32 +3133,28 @@ bool LLScrollListCtrl::setSort(S32 column_idx, bool ascending)
|
|||
mSortColumns.push_back(new_sort_column);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// grab current sort column
|
||||
sort_column_t cur_sort_column = mSortColumns.back();
|
||||
|
||||
// remove any existing sort criterion referencing this column
|
||||
// and add the new one
|
||||
mSortColumns.erase(remove_if(mSortColumns.begin(), mSortColumns.end(), SameSortColumn(column_idx)), mSortColumns.end());
|
||||
mSortColumns.push_back(new_sort_column);
|
||||
// grab current sort column
|
||||
sort_column_t cur_sort_column = mSortColumns.back();
|
||||
|
||||
// did the sort criteria change?
|
||||
return (cur_sort_column != new_sort_column);
|
||||
}
|
||||
// remove any existing sort criterion referencing this column
|
||||
// and add the new one
|
||||
mSortColumns.erase(remove_if(mSortColumns.begin(), mSortColumns.end(), SameSortColumn(column_idx)), mSortColumns.end());
|
||||
mSortColumns.push_back(new_sort_column);
|
||||
|
||||
// did the sort criteria change?
|
||||
return cur_sort_column != new_sort_column;
|
||||
}
|
||||
|
||||
S32 LLScrollListCtrl::getLinesPerPage()
|
||||
{
|
||||
//if mPageLines is NOT provided display all item
|
||||
if (mPageLines)
|
||||
{
|
||||
return mPageLines;
|
||||
}
|
||||
else
|
||||
{
|
||||
return mLineHeight ? mItemListRect.getHeight() / mLineHeight : getItemCount();
|
||||
}
|
||||
|
||||
// If mPageLines is NOT provided then display all items
|
||||
return mLineHeight ? mItemListRect.getHeight() / mLineHeight : getItemCount();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -3182,7 +3170,7 @@ void LLScrollListCtrl::sortByColumn(const std::string& name, bool ascending)
|
|||
column_map_t::iterator itor = mColumns.find(name);
|
||||
if (itor != mColumns.end())
|
||||
{
|
||||
sortByColumnIndex((*itor).second->mIndex, ascending);
|
||||
sortByColumnIndex(itor->second->mIndex, ascending);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3559,8 +3547,7 @@ std::string LLScrollListCtrl::getSortColumnName()
|
|||
{
|
||||
LLScrollListColumn* column = mSortColumns.empty() ? NULL : mColumnsIndexed[mSortColumns.back().first];
|
||||
|
||||
if (column) return column->mName;
|
||||
else return "";
|
||||
return column ? column->mName : LLStringUtil::null;
|
||||
}
|
||||
|
||||
bool LLScrollListCtrl::hasSortOrder() const
|
||||
|
|
|
|||
|
|
@ -567,7 +567,7 @@ private:
|
|||
class LLViewBorder* mBorder;
|
||||
LLHandle<LLContextMenu> mPopupMenuHandle;
|
||||
|
||||
LLView *mCommentTextView;
|
||||
LLTextBox* mCommentText = nullptr;
|
||||
|
||||
LLWString mSearchString;
|
||||
LLFrameTimer mSearchTimer;
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ void LLViewerEventRecorder::setMouseGlobalCoords(S32 x, S32 y) {
|
|||
}
|
||||
|
||||
void LLViewerEventRecorder::updateMouseEventInfo(S32 local_x, S32 local_y, S32 global_x, S32 global_y, std::string mName) {
|
||||
if (! logEvents) return; //<FS:ND/> Do nothing if off
|
||||
if (!logEvents) return;
|
||||
|
||||
LLView * target_view = LLUI::getInstance()->resolvePath(LLUI::getInstance()->getRootView(), xui);
|
||||
if (! target_view) {
|
||||
|
|
@ -140,6 +140,8 @@ void LLViewerEventRecorder::updateMouseEventInfo(S32 local_x, S32 local_y, S32 g
|
|||
void LLViewerEventRecorder::logVisibilityChange(std::string xui, std::string name, bool visibility, std::string event_subtype) {
|
||||
if (! logEvents) return; //<FS:ND/> Do nothing if off
|
||||
|
||||
if (!logEvents) return;
|
||||
|
||||
LLSD event=LLSD::emptyMap();
|
||||
|
||||
event.insert("event",LLSD(std::string("visibility")));
|
||||
|
|
@ -181,7 +183,7 @@ void LLViewerEventRecorder::update_xui(std::string xui) {
|
|||
|
||||
void LLViewerEventRecorder::logKeyEvent(KEY key, MASK mask) {
|
||||
|
||||
if (! logEvents) return; //<FS:ND/> Do nothing if off
|
||||
if (!logEvents) return;
|
||||
// NOTE: Event recording only logs keydown events - the viewer itself hides keyup events at a fairly low level in the code and does not appear to care about them anywhere
|
||||
|
||||
LLSD event = LLSD::emptyMap();
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params)
|
|||
panel_p.background_visible = true;
|
||||
panel_p.bg_alpha_image = params.bg_image;
|
||||
panel_p.auto_resize = false;
|
||||
LLLayoutPanel* notification_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
|
||||
stackp->addChild(notification_panel);
|
||||
mNotificationsArea = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
|
||||
stackp->addChild(mNotificationsArea);
|
||||
|
||||
panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>();
|
||||
panel_p.auto_resize = true;
|
||||
|
|
@ -92,15 +92,15 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params)
|
|||
panel_p.mouse_opaque = false;
|
||||
panel_p.background_visible = false;
|
||||
panel_p.bg_alpha_color = params.shade_color;
|
||||
LLLayoutPanel* dummy_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
|
||||
stackp->addChild(dummy_panel);
|
||||
mBackgroundArea = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
|
||||
stackp->addChild(mBackgroundArea);
|
||||
|
||||
layout_p = LLUICtrlFactory::getDefaultParams<LLLayoutStack>();
|
||||
layout_p.rect = LLRect(0, 30, 800, 0);
|
||||
layout_p.follows.flags = FOLLOWS_ALL;
|
||||
layout_p.orientation = LLLayoutStack::HORIZONTAL;
|
||||
stackp = LLUICtrlFactory::create<LLLayoutStack>(layout_p);
|
||||
notification_panel->addChild(stackp);
|
||||
mNotificationsArea->addChild(stackp);
|
||||
|
||||
panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>();
|
||||
panel_p.rect.height = 30;
|
||||
|
|
@ -121,7 +121,8 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params)
|
|||
text_p.name = "notification_text";
|
||||
text_p.use_ellipses = true;
|
||||
text_p.wrap = true;
|
||||
panel->addChild(LLUICtrlFactory::create<LLTextBox>(text_p));
|
||||
mNotificationsText = LLUICtrlFactory::create<LLTextBox>(text_p);
|
||||
panel->addChild(mNotificationsText);
|
||||
|
||||
panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>();
|
||||
panel_p.auto_resize = false;
|
||||
|
|
@ -154,11 +155,9 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params)
|
|||
|
||||
void LLWindowShade::draw()
|
||||
{
|
||||
LLRect message_rect = getChild<LLTextBox>("notification_text")->getTextBoundingRect();
|
||||
LLRect message_rect = mNotificationsText->getTextBoundingRect();
|
||||
|
||||
LLLayoutPanel* notification_area = getChild<LLLayoutPanel>("notification_area");
|
||||
|
||||
notification_area->reshape(notification_area->getRect().getWidth(),
|
||||
mNotificationsArea->reshape(mNotificationsArea->getRect().getWidth(),
|
||||
llclamp(message_rect.getHeight() + 15,
|
||||
llmax(mFormHeight, MIN_NOTIFICATION_AREA_HEIGHT),
|
||||
MAX_NOTIFICATION_AREA_HEIGHT));
|
||||
|
|
@ -176,21 +175,21 @@ void LLWindowShade::draw()
|
|||
{
|
||||
hide();
|
||||
}
|
||||
else if (notification_area->getVisibleAmount() < 0.01f)
|
||||
else if (mNotificationsArea->getVisibleAmount() < 0.01f)
|
||||
{
|
||||
displayLatestNotification();
|
||||
}
|
||||
|
||||
if (!notification_area->getVisible() && (notification_area->getVisibleAmount() < 0.001f))
|
||||
if (!mNotificationsArea->getVisible() && (mNotificationsArea->getVisibleAmount() < 0.001f))
|
||||
{
|
||||
getChildRef<LLLayoutPanel>("background_area").setBackgroundVisible(false);
|
||||
mBackgroundArea->setBackgroundVisible(false);
|
||||
setMouseOpaque(false);
|
||||
}
|
||||
}
|
||||
|
||||
void LLWindowShade::hide()
|
||||
{
|
||||
getChildRef<LLLayoutPanel>("notification_area").setVisible(false);
|
||||
mNotificationsArea->setVisible(false);
|
||||
}
|
||||
|
||||
void LLWindowShade::onCloseNotification()
|
||||
|
|
@ -244,13 +243,12 @@ void LLWindowShade::displayLatestNotification()
|
|||
LLSD payload = notification->getPayload();
|
||||
|
||||
LLNotificationFormPtr formp = notification->getForm();
|
||||
LLLayoutPanel& notification_area = getChildRef<LLLayoutPanel>("notification_area");
|
||||
notification_area.getChild<LLUICtrl>("notification_icon")->setValue(notification->getIcon());
|
||||
notification_area.getChild<LLUICtrl>("notification_text")->setValue(notification->getMessage());
|
||||
notification_area.getChild<LLUICtrl>("notification_text")->setToolTip(notification->getMessage());
|
||||
mNotificationsArea->getChild<LLUICtrl>("notification_icon")->setValue(notification->getIcon());
|
||||
mNotificationsText->setValue(notification->getMessage());
|
||||
mNotificationsText->setToolTip(notification->getMessage());
|
||||
|
||||
LLNotificationForm::EIgnoreType ignore_type = formp->getIgnoreType();
|
||||
LLLayoutPanel& form_elements = notification_area.getChildRef<LLLayoutPanel>("form_elements");
|
||||
LLLayoutPanel& form_elements = mNotificationsArea->getChildRef<LLLayoutPanel>("form_elements");
|
||||
form_elements.deleteAllChildren();
|
||||
form_elements.reshape(form_elements.getRect().getWidth(), MIN_NOTIFICATION_AREA_HEIGHT);
|
||||
|
||||
|
|
@ -355,25 +353,25 @@ void LLWindowShade::displayLatestNotification()
|
|||
(*it)->translate(0, delta_y);
|
||||
}
|
||||
|
||||
getChildRef<LLLayoutPanel>("notification_area").setVisible(true);
|
||||
getChildRef<LLLayoutPanel>("background_area").setBackgroundVisible(mModal);
|
||||
mNotificationsArea->setVisible(true);
|
||||
mBackgroundArea->setBackgroundVisible(mModal);
|
||||
|
||||
setMouseOpaque(mModal);
|
||||
}
|
||||
|
||||
void LLWindowShade::setBackgroundImage(LLUIImage* image)
|
||||
{
|
||||
getChild<LLLayoutPanel>("notification_area")->setTransparentImage(image);
|
||||
mNotificationsArea->setTransparentImage(image);
|
||||
}
|
||||
|
||||
void LLWindowShade::setTextColor(LLColor4 color)
|
||||
{
|
||||
getChild<LLTextBox>("notification_text")->setColor(color);
|
||||
mNotificationsText->setColor(color);
|
||||
}
|
||||
|
||||
bool LLWindowShade::isShown() const
|
||||
{
|
||||
return getChildRef<LLLayoutPanel>("notification_area").getVisible();
|
||||
return mNotificationsArea->getVisible();
|
||||
}
|
||||
|
||||
void LLWindowShade::setCanClose(bool can_close)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@
|
|||
#include "llnotifications.h"
|
||||
#include "lluiimage.h"
|
||||
|
||||
class LLLayoutPanel;
|
||||
class LLTextBox;
|
||||
|
||||
class LLWindowShade : public LLUICtrl
|
||||
{
|
||||
public:
|
||||
|
|
@ -68,6 +71,10 @@ private:
|
|||
void onEnterNotificationText(LLUICtrl* ctrl, const std::string& name);
|
||||
void onClickIgnore(LLUICtrl* ctrl);
|
||||
|
||||
LLLayoutPanel* mBackgroundArea = nullptr;
|
||||
LLLayoutPanel* mNotificationsArea = nullptr;
|
||||
LLTextBox* mNotificationsText = nullptr;
|
||||
|
||||
std::vector<LLNotificationPtr> mNotifications;
|
||||
LLSD mNotificationResponse;
|
||||
bool mModal;
|
||||
|
|
|
|||
|
|
@ -392,6 +392,7 @@ set(viewer_SOURCE_FILES
|
|||
llfloaterregioninfo.cpp
|
||||
llfloaterreporter.cpp
|
||||
llfloaterregionrestarting.cpp
|
||||
llfloaterregionrestartschedule.cpp
|
||||
llfloatersavecamerapreset.cpp
|
||||
llfloatersaveprefpreset.cpp
|
||||
llfloatersceneloadstats.cpp
|
||||
|
|
@ -1201,6 +1202,7 @@ set(viewer_HEADER_FILES
|
|||
llfloaterregioninfo.h
|
||||
llfloaterreporter.h
|
||||
llfloaterregionrestarting.h
|
||||
llfloaterregionrestartschedule.h
|
||||
llfloatersavecamerapreset.h
|
||||
llfloatersaveprefpreset.h
|
||||
llfloatersceneloadstats.h
|
||||
|
|
|
|||
|
|
@ -16816,6 +16816,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>Use24HourClock</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>12 vs 24. At the moment only for region restart schedule floater</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>EnvironmentPersistAcrossLogin</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -264,6 +264,7 @@ bool LLFloaterIMSessionTab::postBuild()
|
|||
{
|
||||
bool result;
|
||||
|
||||
mContentsView = getChild<LLView>("contents_view");
|
||||
mBodyStack = getChild<LLLayoutStack>("main_stack");
|
||||
mParticipantListAndHistoryStack = getChild<LLLayoutStack>("im_panels");
|
||||
|
||||
|
|
@ -863,7 +864,6 @@ void LLFloaterIMSessionTab::hideOrShowTitle()
|
|||
{
|
||||
const LLFloater::Params& default_params = LLFloater::getDefaultParams();
|
||||
S32 floater_header_size = default_params.header_height;
|
||||
LLView* floater_contents = getChild<LLView>("contents_view");
|
||||
|
||||
LLRect floater_rect = getLocalRect();
|
||||
S32 top_border_of_contents = floater_rect.mTop - (isTornOff()? floater_header_size : 0);
|
||||
|
|
@ -871,7 +871,7 @@ void LLFloaterIMSessionTab::hideOrShowTitle()
|
|||
LLRect contents_rect (0, top_border_of_contents, floater_rect.mRight, floater_rect.mBottom);
|
||||
mDragHandle->setShape(handle_rect);
|
||||
mDragHandle->setVisible(isTornOff());
|
||||
floater_contents->setShape(contents_rect);
|
||||
mContentsView->setShape(contents_rect);
|
||||
}
|
||||
|
||||
void LLFloaterIMSessionTab::updateSessionName(const std::string& name)
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@ protected:
|
|||
LLConversationViewParticipant* createConversationViewParticipant(LLConversationItem* item);
|
||||
|
||||
LLUUID mSessionID;
|
||||
LLView* mContentsView;
|
||||
LLLayoutStack* mBodyStack;
|
||||
LLLayoutStack* mParticipantListAndHistoryStack;
|
||||
LLLayoutPanel* mParticipantListPanel; // add the widgets to that see mConversationsListPanel
|
||||
|
|
|
|||
|
|
@ -2651,19 +2651,34 @@ LLPanelLandAccess::LLPanelLandAccess(LLParcelSelectionHandle& parcel)
|
|||
|
||||
bool LLPanelLandAccess::postBuild()
|
||||
{
|
||||
childSetCommitCallback("public_access", onCommitPublicAccess, this);
|
||||
childSetCommitCallback("limit_payment", onCommitAny, this);
|
||||
childSetCommitCallback("limit_age_verified", onCommitAny, this);
|
||||
childSetCommitCallback("GroupCheck", onCommitGroupCheck, this);
|
||||
childSetCommitCallback("PassCheck", onCommitAny, this);
|
||||
childSetCommitCallback("pass_combo", onCommitAny, this);
|
||||
childSetCommitCallback("PriceSpin", onCommitAny, this);
|
||||
childSetCommitCallback("HoursSpin", onCommitAny, this);
|
||||
mPaymentInfoCheck = getChild<LLUICtrl>("limit_payment");
|
||||
mPaymentInfoCheck->setCommitCallback(onCommitAny, this);
|
||||
mAgeVerifiedCheck = getChild<LLUICtrl>("limit_age_verified");
|
||||
mAgeVerifiedCheck->setCommitCallback(onCommitAny, this);
|
||||
mTemporaryPassCheck = getChild<LLUICtrl>("PassCheck");
|
||||
mTemporaryPassCheck->setCommitCallback(onCommitAny, this);
|
||||
mPublicAccessCheck = getChild<LLUICtrl>("public_access");
|
||||
mPublicAccessCheck->setCommitCallback(onCommitPublicAccess, this);
|
||||
mGroupAccessCheck = getChild<LLUICtrl>("GroupCheck");
|
||||
mGroupAccessCheck->setCommitCallback(onCommitGroupCheck, this);
|
||||
mTemporaryPassCombo = getChild<LLComboBox>("pass_combo");
|
||||
mGroupAccessCheck->setCommitCallback(onCommitAny, this);
|
||||
mTemporaryPassPriceSpin = getChild<LLUICtrl>("PriceSpin");
|
||||
mGroupAccessCheck->setCommitCallback(onCommitAny, this);
|
||||
mTemporaryPassHourSpin = getChild<LLUICtrl>("HoursSpin");
|
||||
mGroupAccessCheck->setCommitCallback(onCommitAny, this);
|
||||
|
||||
childSetAction("add_allowed", boost::bind(&LLPanelLandAccess::onClickAddAccess, this));
|
||||
childSetAction("remove_allowed", onClickRemoveAccess, this);
|
||||
childSetAction("add_banned", boost::bind(&LLPanelLandAccess::onClickAddBanned, this));
|
||||
childSetAction("remove_banned", onClickRemoveBanned, this);
|
||||
mAllowText = getChild<LLUICtrl>("AllowedText");
|
||||
mBanText = getChild<LLUICtrl>("BanCheck");
|
||||
|
||||
mBtnAddAllowed = getChild<LLButton>("add_allowed");
|
||||
mBtnAddAllowed->setCommitCallback(boost::bind(&LLPanelLandAccess::onClickAddAccess, this));
|
||||
mBtnRemoveAllowed = getChild<LLButton>("remove_allowed");
|
||||
mBtnRemoveAllowed->setCommitCallback(boost::bind(&LLPanelLandAccess::onClickRemoveAccess, this));
|
||||
mBtnAddBanned = getChild<LLButton>("add_banned");
|
||||
mBtnAddBanned->setCommitCallback(boost::bind(&LLPanelLandAccess::onClickAddBanned, this));
|
||||
mBtnRemoveBanned = getChild<LLButton>("remove_banned");
|
||||
mBtnRemoveBanned->setCommitCallback(boost::bind(&LLPanelLandAccess::onClickRemoveBanned, this));
|
||||
|
||||
mListAccess = getChild<LLNameListCtrl>("AccessList");
|
||||
if (mListAccess)
|
||||
|
|
@ -2708,17 +2723,17 @@ void LLPanelLandAccess::refresh()
|
|||
|
||||
if (parcel->getRegionAllowAccessOverride())
|
||||
{
|
||||
getChild<LLUICtrl>("public_access")->setValue(public_access);
|
||||
getChild<LLUICtrl>("GroupCheck")->setValue(use_group);
|
||||
mPublicAccessCheck->setValue(public_access);
|
||||
mGroupAccessCheck->setValue(use_group);
|
||||
}
|
||||
else
|
||||
{
|
||||
getChild<LLUICtrl>("public_access")->setValue(true);
|
||||
getChild<LLUICtrl>("GroupCheck")->setValue(false);
|
||||
mPublicAccessCheck->setValue(true);
|
||||
mGroupAccessCheck->setValue(false);
|
||||
}
|
||||
std::string group_name;
|
||||
gCacheName->getGroupName(parcel->getGroupID(), group_name);
|
||||
getChild<LLUICtrl>("GroupCheck")->setLabelArg("[GROUP]", group_name );
|
||||
mGroupAccessCheck->setLabelArg("[GROUP]", group_name );
|
||||
|
||||
// Allow list
|
||||
if (mListAccess)
|
||||
|
|
@ -2727,11 +2742,11 @@ void LLPanelLandAccess::refresh()
|
|||
mListAccess->clearSortOrder();
|
||||
mListAccess->deleteAllItems();
|
||||
auto count = parcel->mAccessList.size();
|
||||
getChild<LLUICtrl>("AllowedText")->setTextArg("[COUNT]", llformat("%d",count));
|
||||
getChild<LLUICtrl>("AllowedText")->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
|
||||
mAllowText->setTextArg("[COUNT]", llformat("%d", count));
|
||||
mAllowText->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
|
||||
|
||||
getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
|
||||
getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
|
||||
mListAccess->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
|
||||
mListAccess->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
|
||||
|
||||
for (LLAccessEntry::map::const_iterator cit = parcel->mAccessList.begin();
|
||||
cit != parcel->mAccessList.end(); ++cit)
|
||||
|
|
@ -2775,11 +2790,11 @@ void LLPanelLandAccess::refresh()
|
|||
mListBanned->clearSortOrder();
|
||||
mListBanned->deleteAllItems();
|
||||
auto count = parcel->mBanList.size();
|
||||
getChild<LLUICtrl>("BanCheck")->setTextArg("[COUNT]", llformat("%d",count));
|
||||
getChild<LLUICtrl>("BanCheck")->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
|
||||
mBanText->setTextArg("[COUNT]", llformat("%d",count));
|
||||
mBanText->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
|
||||
|
||||
getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
|
||||
getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
|
||||
mListBanned->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
|
||||
mListBanned->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
|
||||
|
||||
for (LLAccessEntry::map::const_iterator cit = parcel->mBanList.begin();
|
||||
cit != parcel->mBanList.end(); ++cit)
|
||||
|
|
@ -2836,81 +2851,80 @@ void LLPanelLandAccess::refresh()
|
|||
|
||||
if(parcel->getRegionDenyAnonymousOverride())
|
||||
{
|
||||
getChild<LLUICtrl>("limit_payment")->setValue(true);
|
||||
getChild<LLUICtrl>("limit_payment")->setLabelArg("[ESTATE_PAYMENT_LIMIT]", getString("access_estate_defined") );
|
||||
mPaymentInfoCheck->setValue(true);
|
||||
mPaymentInfoCheck->setLabelArg("[ESTATE_PAYMENT_LIMIT]", getString("access_estate_defined") );
|
||||
}
|
||||
else
|
||||
{
|
||||
getChild<LLUICtrl>("limit_payment")->setValue((parcel->getParcelFlag(PF_DENY_ANONYMOUS)));
|
||||
getChild<LLUICtrl>("limit_payment")->setLabelArg("[ESTATE_PAYMENT_LIMIT]", std::string() );
|
||||
mPaymentInfoCheck->setValue((parcel->getParcelFlag(PF_DENY_ANONYMOUS)));
|
||||
mPaymentInfoCheck->setLabelArg("[ESTATE_PAYMENT_LIMIT]", std::string() );
|
||||
}
|
||||
if(parcel->getRegionDenyAgeUnverifiedOverride())
|
||||
{
|
||||
getChild<LLUICtrl>("limit_age_verified")->setValue(true);
|
||||
getChild<LLUICtrl>("limit_age_verified")->setLabelArg("[ESTATE_AGE_LIMIT]", getString("access_estate_defined") );
|
||||
mAgeVerifiedCheck->setValue(true);
|
||||
mAgeVerifiedCheck->setLabelArg("[ESTATE_AGE_LIMIT]", getString("access_estate_defined") );
|
||||
}
|
||||
else
|
||||
{
|
||||
getChild<LLUICtrl>("limit_age_verified")->setValue((parcel->getParcelFlag(PF_DENY_AGEUNVERIFIED)));
|
||||
getChild<LLUICtrl>("limit_age_verified")->setLabelArg("[ESTATE_AGE_LIMIT]", std::string() );
|
||||
mAgeVerifiedCheck->setValue((parcel->getParcelFlag(PF_DENY_AGEUNVERIFIED)));
|
||||
mAgeVerifiedCheck->setLabelArg("[ESTATE_AGE_LIMIT]", std::string() );
|
||||
}
|
||||
|
||||
bool use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST);
|
||||
getChild<LLUICtrl>("PassCheck")->setValue(use_pass);
|
||||
LLCtrlSelectionInterface* passcombo = childGetSelectionInterface("pass_combo");
|
||||
if (passcombo)
|
||||
mTemporaryPassCheck->setValue(use_pass);
|
||||
if (mTemporaryPassCombo)
|
||||
{
|
||||
if (public_access || !use_pass)
|
||||
{
|
||||
passcombo->selectByValue("anyone");
|
||||
mTemporaryPassCombo->selectByValue("anyone");
|
||||
}
|
||||
}
|
||||
|
||||
S32 pass_price = parcel->getPassPrice();
|
||||
getChild<LLUICtrl>("PriceSpin")->setValue((F32)pass_price );
|
||||
mTemporaryPassPriceSpin->setValue((F32)pass_price);
|
||||
|
||||
F32 pass_hours = parcel->getPassHours();
|
||||
getChild<LLUICtrl>("HoursSpin")->setValue(pass_hours );
|
||||
mTemporaryPassHourSpin->setValue(pass_hours);
|
||||
}
|
||||
else
|
||||
{
|
||||
getChild<LLUICtrl>("public_access")->setValue(false);
|
||||
getChild<LLUICtrl>("limit_payment")->setValue(false);
|
||||
getChild<LLUICtrl>("limit_age_verified")->setValue(false);
|
||||
getChild<LLUICtrl>("GroupCheck")->setValue(false);
|
||||
getChild<LLUICtrl>("GroupCheck")->setLabelArg("[GROUP]", LLStringUtil::null );
|
||||
getChild<LLUICtrl>("PassCheck")->setValue(false);
|
||||
getChild<LLUICtrl>("PriceSpin")->setValue((F32)PARCEL_PASS_PRICE_DEFAULT);
|
||||
getChild<LLUICtrl>("HoursSpin")->setValue(PARCEL_PASS_HOURS_DEFAULT );
|
||||
getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
|
||||
getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",0));
|
||||
getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
|
||||
getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",0));
|
||||
mPublicAccessCheck->setValue(false);
|
||||
mPaymentInfoCheck->setValue(false);
|
||||
mAgeVerifiedCheck->setValue(false);
|
||||
mGroupAccessCheck->setValue(false);
|
||||
mGroupAccessCheck->setLabelArg("[GROUP]", LLStringUtil::null );
|
||||
mTemporaryPassCheck->setValue(false);
|
||||
mTemporaryPassPriceSpin->setValue((F32)PARCEL_PASS_PRICE_DEFAULT);
|
||||
mTemporaryPassHourSpin->setValue(PARCEL_PASS_HOURS_DEFAULT );
|
||||
mListAccess->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
|
||||
mListAccess->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",0));
|
||||
mListBanned->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
|
||||
mListBanned->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",0));
|
||||
// <FS:Ansariel> FIRE-9211: Add counter to parcel ban and access lists
|
||||
getChild<LLUICtrl>("AllowedText")->setTextArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
|
||||
getChild<LLUICtrl>("AllowedText")->setTextArg(LLStringExplicit("[MAX]"), llformat("%d",0));
|
||||
getChild<LLUICtrl>("BanCheck")->setTextArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
|
||||
getChild<LLUICtrl>("BanCheck")->setTextArg(LLStringExplicit("[MAX]"), llformat("%d",0));
|
||||
mAllowText->setTextArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
|
||||
mAllowText->setTextArg(LLStringExplicit("[MAX]"), llformat("%d",0));
|
||||
mBanText->setTextArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
|
||||
mBanText->setTextArg(LLStringExplicit("[MAX]"), llformat("%d",0));
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelLandAccess::refresh_ui()
|
||||
{
|
||||
getChildView("public_access")->setEnabled(false);
|
||||
getChildView("limit_payment")->setEnabled(false);
|
||||
getChildView("limit_age_verified")->setEnabled(false);
|
||||
getChildView("GroupCheck")->setEnabled(false);
|
||||
getChildView("PassCheck")->setEnabled(false);
|
||||
getChildView("pass_combo")->setEnabled(false);
|
||||
getChildView("PriceSpin")->setEnabled(false);
|
||||
getChildView("HoursSpin")->setEnabled(false);
|
||||
getChildView("AccessList")->setEnabled(false);
|
||||
getChildView("BannedList")->setEnabled(false);
|
||||
getChildView("add_allowed")->setEnabled(false);
|
||||
getChildView("remove_allowed")->setEnabled(false);
|
||||
getChildView("add_banned")->setEnabled(false);
|
||||
getChildView("remove_banned")->setEnabled(false);
|
||||
mPublicAccessCheck->setEnabled(false);
|
||||
mPaymentInfoCheck->setEnabled(false);
|
||||
mAgeVerifiedCheck->setEnabled(false);
|
||||
mGroupAccessCheck->setEnabled(false);
|
||||
mTemporaryPassCheck->setEnabled(false);
|
||||
mTemporaryPassCombo->setEnabled(false);
|
||||
mTemporaryPassPriceSpin->setEnabled(false);
|
||||
mTemporaryPassHourSpin->setEnabled(false);
|
||||
mListAccess->setEnabled(false);
|
||||
mListBanned->setEnabled(false);
|
||||
mBtnAddAllowed->setEnabled(false);
|
||||
mBtnRemoveAllowed->setEnabled(false);
|
||||
mBtnAddBanned->setEnabled(false);
|
||||
mBtnRemoveBanned->setEnabled(false);
|
||||
|
||||
LLParcel *parcel = mParcel->getParcel();
|
||||
if (parcel && !gDisconnected)
|
||||
|
|
@ -2923,75 +2937,64 @@ void LLPanelLandAccess::refresh_ui()
|
|||
can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED);
|
||||
}
|
||||
|
||||
getChildView("public_access")->setEnabled(can_manage_allowed);
|
||||
bool public_access = getChild<LLUICtrl>("public_access")->getValue().asBoolean();
|
||||
mPublicAccessCheck->setEnabled(can_manage_allowed);
|
||||
bool public_access = mPublicAccessCheck->getValue().asBoolean();
|
||||
if (public_access)
|
||||
{
|
||||
// bool override = false; // <FS:Beq/> set but never used clang appeasement
|
||||
if(parcel->getRegionDenyAnonymousOverride())
|
||||
{
|
||||
// override = true; // <FS:Beq/> set but never used clang appeasement
|
||||
getChildView("limit_payment")->setEnabled(false);
|
||||
mPaymentInfoCheck->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
getChildView("limit_payment")->setEnabled(can_manage_allowed);
|
||||
mPaymentInfoCheck->setEnabled(can_manage_allowed);
|
||||
}
|
||||
if(parcel->getRegionDenyAgeUnverifiedOverride())
|
||||
{
|
||||
// override = true; // <FS:Beq/> set but never used clang appeasement
|
||||
getChildView("limit_age_verified")->setEnabled(false);
|
||||
mAgeVerifiedCheck->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
getChildView("limit_age_verified")->setEnabled(can_manage_allowed);
|
||||
mAgeVerifiedCheck->setEnabled(can_manage_allowed);
|
||||
}
|
||||
// <FS:Ansariel> Does not exist as of 16-06-2017
|
||||
//if (override)
|
||||
//{
|
||||
// getChildView("Only Allow")->setToolTip(getString("estate_override"));
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// getChildView("Only Allow")->setToolTip(std::string());
|
||||
//}
|
||||
// </FS:Ansariel>
|
||||
getChildView("PassCheck")->setEnabled(false);
|
||||
getChildView("pass_combo")->setEnabled(false);
|
||||
getChildView("AccessList")->setEnabled(false);
|
||||
mTemporaryPassCheck->setEnabled(false);
|
||||
mTemporaryPassCombo->setEnabled(false);
|
||||
mListAccess->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
getChildView("limit_payment")->setEnabled(false);
|
||||
getChildView("limit_age_verified")->setEnabled(false);
|
||||
mPaymentInfoCheck->setEnabled(false);
|
||||
mAgeVerifiedCheck->setEnabled(false);
|
||||
|
||||
|
||||
bool sell_passes = getChild<LLUICtrl>("PassCheck")->getValue().asBoolean();
|
||||
getChildView("PassCheck")->setEnabled(can_manage_allowed);
|
||||
bool sell_passes = mTemporaryPassCheck->getValue().asBoolean();
|
||||
mTemporaryPassCheck->setEnabled(can_manage_allowed);
|
||||
if (sell_passes)
|
||||
{
|
||||
getChildView("pass_combo")->setEnabled(can_manage_allowed);
|
||||
getChildView("PriceSpin")->setEnabled(can_manage_allowed);
|
||||
getChildView("HoursSpin")->setEnabled(can_manage_allowed);
|
||||
mTemporaryPassCombo->setEnabled(can_manage_allowed);
|
||||
mTemporaryPassPriceSpin->setEnabled(can_manage_allowed);
|
||||
mTemporaryPassHourSpin->setEnabled(can_manage_allowed);
|
||||
}
|
||||
}
|
||||
std::string group_name;
|
||||
if (gCacheName->getGroupName(parcel->getGroupID(), group_name))
|
||||
{
|
||||
bool can_allow_groups = !public_access || (public_access && (getChild<LLUICtrl>("limit_payment")->getValue().asBoolean() ^ getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean()));
|
||||
getChildView("GroupCheck")->setEnabled(can_manage_allowed && can_allow_groups);
|
||||
bool can_allow_groups = !public_access || (public_access && (mPaymentInfoCheck->getValue().asBoolean() ^ mAgeVerifiedCheck->getValue().asBoolean()));
|
||||
mGroupAccessCheck->setEnabled(can_manage_allowed && can_allow_groups);
|
||||
}
|
||||
getChildView("AccessList")->setEnabled(can_manage_allowed);
|
||||
mListAccess->setEnabled(can_manage_allowed);
|
||||
auto allowed_list_count = parcel->mAccessList.size();
|
||||
getChildView("add_allowed")->setEnabled(can_manage_allowed && allowed_list_count < PARCEL_MAX_ACCESS_LIST);
|
||||
mBtnAddAllowed->setEnabled(can_manage_allowed && allowed_list_count < PARCEL_MAX_ACCESS_LIST);
|
||||
bool has_selected = (mListAccess && mListAccess->getSelectionInterface()->getFirstSelectedIndex() >= 0);
|
||||
getChildView("remove_allowed")->setEnabled(can_manage_allowed && has_selected);
|
||||
mBtnRemoveAllowed->setEnabled(can_manage_allowed && has_selected);
|
||||
|
||||
getChildView("BannedList")->setEnabled(can_manage_banned);
|
||||
mListBanned->setEnabled(can_manage_banned);
|
||||
auto banned_list_count = parcel->mBanList.size();
|
||||
getChildView("add_banned")->setEnabled(can_manage_banned && banned_list_count < PARCEL_MAX_ACCESS_LIST);
|
||||
mBtnAddBanned->setEnabled(can_manage_banned && banned_list_count < PARCEL_MAX_ACCESS_LIST);
|
||||
has_selected = (mListBanned && mListBanned->getSelectionInterface()->getFirstSelectedIndex() >= 0);
|
||||
getChildView("remove_banned")->setEnabled(can_manage_banned && has_selected);
|
||||
mBtnRemoveBanned->setEnabled(can_manage_banned && has_selected);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3005,7 +3008,7 @@ void LLPanelLandAccess::refreshNames()
|
|||
{
|
||||
gCacheName->getGroupName(parcel->getGroupID(), group_name);
|
||||
}
|
||||
getChild<LLUICtrl>("GroupCheck")->setLabelArg("[GROUP]", group_name);
|
||||
mGroupAccessCheck->setLabelArg("[GROUP]", group_name);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -3052,9 +3055,9 @@ void LLPanelLandAccess::onCommitGroupCheck(LLUICtrl *ctrl, void *userdata)
|
|||
return;
|
||||
}
|
||||
|
||||
bool use_pass_list = !self->getChild<LLUICtrl>("public_access")->getValue().asBoolean();
|
||||
bool use_access_group = self->getChild<LLUICtrl>("GroupCheck")->getValue().asBoolean();
|
||||
LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo");
|
||||
bool use_pass_list = !self->mPublicAccessCheck->getValue().asBoolean();
|
||||
bool use_access_group = self->mGroupAccessCheck->getValue().asBoolean();
|
||||
LLCtrlSelectionInterface* passcombo = self->mTemporaryPassCombo;
|
||||
if (passcombo)
|
||||
{
|
||||
if (use_access_group && use_pass_list)
|
||||
|
|
@ -3081,8 +3084,8 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
|
|||
}
|
||||
|
||||
// Extract data from UI
|
||||
bool public_access = self->getChild<LLUICtrl>("public_access")->getValue().asBoolean();
|
||||
bool use_access_group = self->getChild<LLUICtrl>("GroupCheck")->getValue().asBoolean();
|
||||
bool public_access = self->mPublicAccessCheck->getValue().asBoolean();
|
||||
bool use_access_group = self->mGroupAccessCheck->getValue().asBoolean();
|
||||
if (use_access_group)
|
||||
{
|
||||
std::string group_name;
|
||||
|
|
@ -3099,14 +3102,14 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
|
|||
if (public_access)
|
||||
{
|
||||
use_access_list = false;
|
||||
limit_payment = self->getChild<LLUICtrl>("limit_payment")->getValue().asBoolean();
|
||||
limit_age_verified = self->getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean();
|
||||
limit_payment = self->mPaymentInfoCheck->getValue().asBoolean();
|
||||
limit_age_verified = self->mAgeVerifiedCheck->getValue().asBoolean();
|
||||
}
|
||||
else
|
||||
{
|
||||
use_access_list = true;
|
||||
use_pass_list = self->getChild<LLUICtrl>("PassCheck")->getValue().asBoolean();
|
||||
LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo");
|
||||
use_pass_list = self->mTemporaryPassCheck->getValue().asBoolean();
|
||||
LLCtrlSelectionInterface* passcombo = self->mTemporaryPassCombo;
|
||||
if (passcombo)
|
||||
{
|
||||
if (use_access_group && use_pass_list)
|
||||
|
|
@ -3119,8 +3122,8 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
|
|||
}
|
||||
}
|
||||
|
||||
S32 pass_price = llfloor((F32)self->getChild<LLUICtrl>("PriceSpin")->getValue().asReal());
|
||||
F32 pass_hours = (F32)self->getChild<LLUICtrl>("HoursSpin")->getValue().asReal();
|
||||
S32 pass_price = llfloor((F32)self->mTemporaryPassPriceSpin->getValue().asReal());
|
||||
F32 pass_hours = (F32)self->mTemporaryPassHourSpin->getValue().asReal();
|
||||
|
||||
// Push data into current parcel
|
||||
parcel->setParcelFlag(PF_USE_ACCESS_GROUP, use_access_group);
|
||||
|
|
@ -3142,10 +3145,9 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
|
|||
|
||||
void LLPanelLandAccess::onClickAddAccess()
|
||||
{
|
||||
LLView * button = findChild<LLButton>("add_allowed");
|
||||
LLFloater * root_floater = gFloaterView->getParentFloater(this);
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
|
||||
boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1), false, false, false, root_floater->getName(), button);
|
||||
boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1), false, false, false, root_floater->getName(), mBtnAddAllowed);
|
||||
if (picker)
|
||||
{
|
||||
root_floater->addDependentFloater(picker);
|
||||
|
|
@ -3173,16 +3175,14 @@ void LLPanelLandAccess::callbackAvatarCBAccess(const uuid_vec_t& ids)
|
|||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelLandAccess::onClickRemoveAccess(void* data)
|
||||
void LLPanelLandAccess::onClickRemoveAccess()
|
||||
{
|
||||
LLPanelLandAccess* panelp = (LLPanelLandAccess*)data;
|
||||
if (panelp && panelp->mListAccess)
|
||||
if (mListAccess)
|
||||
{
|
||||
LLParcel* parcel = panelp->mParcel->getParcel();
|
||||
LLParcel* parcel = mParcel->getParcel();
|
||||
if (parcel)
|
||||
{
|
||||
std::vector<LLScrollListItem*> names = panelp->mListAccess->getAllSelected();
|
||||
std::vector<LLScrollListItem*> names = mListAccess->getAllSelected();
|
||||
for (std::vector<LLScrollListItem*>::iterator iter = names.begin();
|
||||
iter != names.end(); )
|
||||
{
|
||||
|
|
@ -3191,18 +3191,16 @@ void LLPanelLandAccess::onClickRemoveAccess(void* data)
|
|||
parcel->removeFromAccessList(agent_id);
|
||||
}
|
||||
LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_ACCESS);
|
||||
panelp->refresh();
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelLandAccess::onClickAddBanned()
|
||||
{
|
||||
LLView * button = findChild<LLButton>("add_banned");
|
||||
LLFloater * root_floater = gFloaterView->getParentFloater(this);
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
|
||||
boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1), true, false, false, root_floater->getName(), button);
|
||||
boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1), true, false, false, root_floater->getName(), mBtnAddBanned);
|
||||
if (picker)
|
||||
{
|
||||
root_floater->addDependentFloater(picker);
|
||||
|
|
@ -3249,16 +3247,14 @@ void LLPanelLandAccess::callbackAvatarCBBanned2(const uuid_vec_t& ids, S32 durat
|
|||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelLandAccess::onClickRemoveBanned(void* data)
|
||||
void LLPanelLandAccess::onClickRemoveBanned()
|
||||
{
|
||||
LLPanelLandAccess* panelp = (LLPanelLandAccess*)data;
|
||||
if (panelp && panelp->mListBanned)
|
||||
if (mListBanned)
|
||||
{
|
||||
LLParcel* parcel = panelp->mParcel->getParcel();
|
||||
LLParcel* parcel = mParcel->getParcel();
|
||||
if (parcel)
|
||||
{
|
||||
std::vector<LLScrollListItem*> names = panelp->mListBanned->getAllSelected();
|
||||
std::vector<LLScrollListItem*> names = mListBanned->getAllSelected();
|
||||
for (std::vector<LLScrollListItem*>::iterator iter = names.begin();
|
||||
iter != names.end(); )
|
||||
{
|
||||
|
|
@ -3267,7 +3263,7 @@ void LLPanelLandAccess::onClickRemoveBanned(void* data)
|
|||
parcel->removeFromBanList(agent_id);
|
||||
}
|
||||
LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_BAN);
|
||||
panelp->refresh();
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3566,10 +3562,10 @@ bool LLPanelLandEnvironment::postBuild()
|
|||
if (!LLPanelEnvironmentInfo::postBuild())
|
||||
return false;
|
||||
|
||||
getChild<LLUICtrl>(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEREGION));
|
||||
getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(false);
|
||||
getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(false);
|
||||
getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(true);
|
||||
mBtnUseDefault->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEREGION));
|
||||
mCheckAllowOverride->setVisible(false);
|
||||
mPanelEnvRegionMsg->setVisible(false);
|
||||
mPanelEnvAltitudes->setVisible(true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -393,13 +393,13 @@ public:
|
|||
static void onCommitPublicAccess(LLUICtrl* ctrl, void *userdata);
|
||||
static void onCommitAny(LLUICtrl* ctrl, void *userdata);
|
||||
static void onCommitGroupCheck(LLUICtrl* ctrl, void *userdata);
|
||||
static void onClickRemoveAccess(void*);
|
||||
static void onClickRemoveBanned(void*);
|
||||
|
||||
virtual bool postBuild();
|
||||
|
||||
void onClickAddAccess();
|
||||
void onClickAddBanned();
|
||||
void onClickRemoveAccess();
|
||||
void onClickRemoveBanned();
|
||||
void callbackAvatarCBBanned(const uuid_vec_t& ids);
|
||||
void callbackAvatarCBBanned2(const uuid_vec_t& ids, S32 duration);
|
||||
void callbackAvatarCBAccess(const uuid_vec_t& ids);
|
||||
|
|
@ -407,6 +407,20 @@ public:
|
|||
protected:
|
||||
LLNameListCtrl* mListAccess;
|
||||
LLNameListCtrl* mListBanned;
|
||||
LLUICtrl* mAllowText = nullptr;
|
||||
LLUICtrl* mBanText = nullptr;
|
||||
LLUICtrl* mPublicAccessCheck = nullptr;
|
||||
LLUICtrl* mGroupAccessCheck = nullptr;
|
||||
LLUICtrl* mPaymentInfoCheck = nullptr;
|
||||
LLUICtrl* mAgeVerifiedCheck = nullptr;
|
||||
LLUICtrl* mTemporaryPassCheck = nullptr;
|
||||
LLComboBox* mTemporaryPassCombo = nullptr;
|
||||
LLUICtrl* mTemporaryPassPriceSpin = nullptr;
|
||||
LLUICtrl* mTemporaryPassHourSpin = nullptr;
|
||||
LLButton* mBtnAddAllowed = nullptr;
|
||||
LLButton* mBtnRemoveAllowed = nullptr;
|
||||
LLButton* mBtnAddBanned = nullptr;
|
||||
LLButton* mBtnRemoveBanned = nullptr;
|
||||
|
||||
LLSafeHandle<LLParcelSelection>& mParcel;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -152,6 +152,13 @@ bool LLFloaterPerformance::postBuild()
|
|||
mStartAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::startAutotune, this));
|
||||
mStopAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::stopAutotune, this));
|
||||
|
||||
mCheckTuneContinous = mAutoadjustmentsPanel->getChild<LLCheckBoxCtrl>("AutoTuneContinuous");
|
||||
mTextWIPDesc = mAutoadjustmentsPanel->getChild<LLTextBox>("wip_desc");
|
||||
mTextDisplayDesc = mAutoadjustmentsPanel->getChild<LLTextBox>("display_desc");
|
||||
|
||||
mTextFPSLabel = getChild<LLTextBox>("fps_lbl");
|
||||
mTextFPSValue = getChild<LLTextBox>("fps_value");
|
||||
|
||||
gSavedPerAccountSettings.declareBOOL("HadEnabledAutoFPS", false, "User had enabled AutoFPS at least once", LLControlVariable::PERSIST_ALWAYS);
|
||||
|
||||
return true;
|
||||
|
|
@ -512,7 +519,7 @@ void LLFloaterPerformance::setFPSText()
|
|||
{
|
||||
const S32 NUM_PERIODS = 50;
|
||||
S32 current_fps = (S32)llround(LLTrace::get_frame_recording().getPeriodMedianPerSec(LLStatViewer::FPS, NUM_PERIODS));
|
||||
getChild<LLTextBox>("fps_value")->setValue(current_fps);
|
||||
mTextFPSValue->setValue(current_fps);
|
||||
|
||||
std::string fps_text = getString("fps_text");
|
||||
static LLCachedControl<bool> vsync_enabled(gSavedSettings, "RenderVSyncEnable", true);
|
||||
|
|
@ -521,7 +528,7 @@ void LLFloaterPerformance::setFPSText()
|
|||
{
|
||||
fps_text += getString("max_text");
|
||||
}
|
||||
getChild<LLTextBox>("fps_lbl")->setValue(fps_text);
|
||||
mTextFPSLabel->setValue(fps_text);
|
||||
}
|
||||
|
||||
void LLFloaterPerformance::detachItem(const LLUUID& item_id)
|
||||
|
|
@ -722,10 +729,10 @@ void LLFloaterPerformance::updateAutotuneCtrls(bool autotune_enabled)
|
|||
static LLCachedControl<bool> auto_tune_locked(gSavedSettings, "AutoTuneLock");
|
||||
mStartAutotuneBtn->setEnabled(!autotune_enabled && !auto_tune_locked);
|
||||
mStopAutotuneBtn->setEnabled(autotune_enabled && !auto_tune_locked);
|
||||
getChild<LLCheckBoxCtrl>("AutoTuneContinuous")->setEnabled(!autotune_enabled || (autotune_enabled && auto_tune_locked));
|
||||
mCheckTuneContinous->setEnabled(!autotune_enabled || (autotune_enabled && auto_tune_locked));
|
||||
|
||||
getChild<LLTextBox>("wip_desc")->setVisible(autotune_enabled && !auto_tune_locked);
|
||||
getChild<LLTextBox>("display_desc")->setVisible(LLPerfStats::tunables.vsyncEnabled);
|
||||
mTextWIPDesc->setVisible(autotune_enabled && !auto_tune_locked);
|
||||
mTextDisplayDesc->setVisible(LLPerfStats::tunables.vsyncEnabled);
|
||||
}
|
||||
|
||||
void LLFloaterPerformance::enableAutotuneWarning()
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@
|
|||
#include "lllistcontextmenu.h"
|
||||
|
||||
class LLCharacter;
|
||||
class LLCheckBoxCtrl;
|
||||
class LLNameListCtrl;
|
||||
class LLTextBox;
|
||||
|
||||
class LLFloaterPerformance : public LLFloater
|
||||
{
|
||||
|
|
@ -90,6 +92,13 @@ private:
|
|||
LLButton* mStartAutotuneBtn;
|
||||
LLButton* mStopAutotuneBtn;
|
||||
|
||||
LLTextBox* mTextWIPDesc = nullptr;
|
||||
LLTextBox* mTextDisplayDesc = nullptr;
|
||||
LLTextBox* mTextFPSLabel = nullptr;
|
||||
LLTextBox* mTextFPSValue = nullptr;
|
||||
|
||||
LLCheckBoxCtrl* mCheckTuneContinous = nullptr;
|
||||
|
||||
LLListContextMenu* mContextMenu;
|
||||
|
||||
LLTimer* mUpdateTimer;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@
|
|||
#include "llfloatergroups.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llfloaterregiondebugconsole.h"
|
||||
#include "llfloaterregionrestartschedule.h"
|
||||
#include "llfloatertelehub.h"
|
||||
#include "llgltfmateriallist.h"
|
||||
#include "llinventorymodel.h"
|
||||
|
|
@ -266,6 +267,7 @@ bool LLFloaterRegionInfo::postBuild()
|
|||
panel = new LLPanelRegionGeneralInfo;
|
||||
mInfoPanels.push_back(panel);
|
||||
panel->getCommitCallbackRegistrar().add("RegionInfo.ManageTelehub", boost::bind(&LLPanelRegionInfo::onClickManageTelehub, panel));
|
||||
panel->getCommitCallbackRegistrar().add("RegionInfo.ManageRestart", boost::bind(&LLPanelRegionInfo::onClickManageRestartSchedule, panel));
|
||||
panel->buildFromFile("panel_region_general.xml");
|
||||
mTab->addTabPanel(panel);
|
||||
|
||||
|
|
@ -922,6 +924,25 @@ void LLPanelRegionInfo::onClickManageTelehub()
|
|||
LLFloaterReg::showInstance("telehubs");
|
||||
}
|
||||
|
||||
void LLPanelRegionInfo::onClickManageRestartSchedule()
|
||||
{
|
||||
LLFloater* floaterp = mFloaterRestartScheduleHandle.get();
|
||||
// Show the dialog
|
||||
if (!floaterp)
|
||||
{
|
||||
floaterp = new LLFloaterRegionRestartSchedule(this);
|
||||
}
|
||||
|
||||
if (floaterp->getVisible())
|
||||
{
|
||||
floaterp->closeFloater();
|
||||
}
|
||||
else
|
||||
{
|
||||
floaterp->openFloater();
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// LLPanelRegionGeneralInfo
|
||||
//
|
||||
|
|
@ -937,6 +958,8 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region)
|
|||
getChildView("kick_all_btn")->setEnabled(allow_modify);
|
||||
getChildView("im_btn")->setEnabled(allow_modify);
|
||||
getChildView("manage_telehub_btn")->setEnabled(allow_modify);
|
||||
getChildView("manage_restart_btn")->setEnabled(allow_modify);
|
||||
getChildView("manage_restart_btn")->setVisible(LLFloaterRegionRestartSchedule::canUse());
|
||||
|
||||
// Data gets filled in by processRegionInfo
|
||||
|
||||
|
|
@ -2566,8 +2589,6 @@ void LLPanelEstateInfo::refresh()
|
|||
// Disable access restriction controls if they make no sense.
|
||||
bool public_access = ("estate_public_access" == getChild<LLUICtrl>("externally_visible_radio")->getValue().asString());
|
||||
|
||||
// <FS:Ansariel> Does not exist as of 16-06-2017
|
||||
// getChildView("Only Allow")->setEnabled(public_access);
|
||||
getChildView("limit_payment")->setEnabled(public_access);
|
||||
getChildView("limit_age_verified")->setEnabled(public_access);
|
||||
getChildView("limit_bots")->setEnabled(public_access);
|
||||
|
|
@ -4437,11 +4458,11 @@ bool LLPanelRegionEnvironment::postBuild()
|
|||
if (!LLPanelEnvironmentInfo::postBuild())
|
||||
return false;
|
||||
|
||||
getChild<LLUICtrl>(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEDEFAULT));
|
||||
getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(true);
|
||||
getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(true);
|
||||
mBtnUseDefault->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEDEFAULT));
|
||||
mCheckAllowOverride->setVisible(true);
|
||||
mPanelEnvAltitudes->setVisible(true);
|
||||
|
||||
getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setCommitCallback([this](LLUICtrl *, const LLSD &value){ onChkAllowOverride(value.asBoolean()); });
|
||||
mCheckAllowOverride->setCommitCallback([this](LLUICtrl *, const LLSD &value){ onChkAllowOverride(value.asBoolean()); });
|
||||
|
||||
mCommitConnect = estate_info.setCommitCallback(boost::bind(&LLPanelRegionEnvironment::refreshFromEstate, this));
|
||||
return true;
|
||||
|
|
@ -4463,7 +4484,7 @@ void LLPanelRegionEnvironment::refresh()
|
|||
|
||||
LLPanelEnvironmentInfo::refresh();
|
||||
|
||||
getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setValue(mAllowOverride);
|
||||
mCheckAllowOverride->setValue(mAllowOverride);
|
||||
}
|
||||
|
||||
bool LLPanelRegionEnvironment::refreshFromRegion(LLViewerRegion* region)
|
||||
|
|
@ -4529,7 +4550,7 @@ bool LLPanelRegionEnvironment::confirmUpdateEstateEnvironment(const LLSD& notifi
|
|||
|
||||
case 1:
|
||||
mAllowOverride = mAllowOverrideRestore;
|
||||
getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setValue(mAllowOverride);
|
||||
mCheckAllowOverride->setValue(mAllowOverride);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ public:
|
|||
void disableButton(const std::string& btn_name);
|
||||
|
||||
void onClickManageTelehub();
|
||||
void onClickManageRestartSchedule();
|
||||
|
||||
protected:
|
||||
void initCtrl(const std::string& name);
|
||||
|
|
@ -180,6 +181,7 @@ protected:
|
|||
|
||||
// member data
|
||||
LLHost mHost;
|
||||
LLHandle<LLFloater> mFloaterRestartScheduleHandle;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -0,0 +1,386 @@
|
|||
/**
|
||||
* @file llfloaterregionrestartschedule.cpp
|
||||
* @author Andrii Kleshchev
|
||||
* @brief LLFloaterRegionRestartSchedule class
|
||||
*
|
||||
* $LicenseInfo:firstyear=2024&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2024, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llfloaterregionrestartschedule.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
|
||||
// match with values used by capability
|
||||
constexpr char CHECKBOX_PREFIXES[] =
|
||||
{
|
||||
's',
|
||||
'm',
|
||||
't',
|
||||
'w',
|
||||
'r',
|
||||
'f',
|
||||
'a',
|
||||
};
|
||||
|
||||
const std::string CHECKBOX_NAME = "_chk";
|
||||
|
||||
LLFloaterRegionRestartSchedule::LLFloaterRegionRestartSchedule(
|
||||
LLView* owner)
|
||||
: LLFloater(LLSD())
|
||||
, mOwnerHandle(owner->getHandle())
|
||||
{
|
||||
buildFromFile("floater_region_restart_schedule.xml");
|
||||
}
|
||||
|
||||
LLFloaterRegionRestartSchedule::~LLFloaterRegionRestartSchedule()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool LLFloaterRegionRestartSchedule::postBuild()
|
||||
{
|
||||
mPMAMButton = getChild<LLButton>("am_pm_btn");
|
||||
mPMAMButton->setClickedCallback([this](LLUICtrl*, const LLSD&) { onPMAMButtonClicked(); });
|
||||
|
||||
// By default mPMAMButton is supposed to be visible.
|
||||
// If localized xml set mPMAMButton to be invisible, assume
|
||||
// 24h format and prealligned "UTC" label
|
||||
if (mPMAMButton->getVisible())
|
||||
{
|
||||
bool use_24h_format = gSavedSettings.getBOOL("Use24HourClock");
|
||||
if (use_24h_format)
|
||||
{
|
||||
mPMAMButton->setVisible(false);
|
||||
LLUICtrl* lbl = getChild<LLUICtrl>("utc_label");
|
||||
lbl->translate(-mPMAMButton->getRect().getWidth(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
mSaveButton = getChild<LLButton>("save_btn");
|
||||
mSaveButton->setClickedCallback([this](LLUICtrl*, const LLSD&) { onSaveButtonClicked(); });
|
||||
|
||||
mCancelButton = getChild<LLButton>("cancel_btn");
|
||||
mCancelButton->setClickedCallback([this](LLUICtrl*, const LLSD&) { closeFloater(false); });
|
||||
|
||||
|
||||
mHoursLineEditor = getChild<LLLineEditor>("hours_edt");
|
||||
mHoursLineEditor->setPrevalidate(LLTextValidate::validateNonNegativeS32);
|
||||
mHoursLineEditor->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& value) { onCommitHours(value); });
|
||||
|
||||
mMinutesLineEditor = getChild<LLLineEditor>("minutes_edt");
|
||||
mMinutesLineEditor->setPrevalidate(LLTextValidate::validateNonNegativeS32);
|
||||
mMinutesLineEditor->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& value) { onCommitMinutes(value); });
|
||||
|
||||
for (char c : CHECKBOX_PREFIXES)
|
||||
{
|
||||
std::string name = c + CHECKBOX_NAME;
|
||||
LLCheckBoxCtrl* chk = getChild<LLCheckBoxCtrl>(name);
|
||||
chk->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& value) { mSaveButton->setEnabled(true); });
|
||||
}
|
||||
|
||||
resetUI(false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLFloaterRegionRestartSchedule::onOpen(const LLSD& key)
|
||||
{
|
||||
std::string url = gAgent.getRegionCapability("RegionSchedule");
|
||||
if (!url.empty())
|
||||
{
|
||||
LLCoros::instance().launch("LLFloaterRegionRestartSchedule::requestRegionShcheduleCoro",
|
||||
boost::bind(&LLFloaterRegionRestartSchedule::requestRegionShcheduleCoro, url, getHandle()));
|
||||
|
||||
mSaveButton->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("Region") << "Started region schedule floater, but RegionSchedule capability is not available" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterRegionRestartSchedule::draw()
|
||||
{
|
||||
LLView* owner = mOwnerHandle.get();
|
||||
if (owner)
|
||||
{
|
||||
static LLCachedControl<F32> max_opacity(gSavedSettings, "PickerContextOpacity", 0.4f);
|
||||
drawConeToOwner(mContextConeOpacity, max_opacity, owner);
|
||||
}
|
||||
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
||||
void LLFloaterRegionRestartSchedule::onPMAMButtonClicked()
|
||||
{
|
||||
mSaveButton->setEnabled(true);
|
||||
mTimeAM = !mTimeAM;
|
||||
updateAMPM();
|
||||
}
|
||||
|
||||
void LLFloaterRegionRestartSchedule::onSaveButtonClicked()
|
||||
{
|
||||
std::string url = gAgent.getRegionCapability("RegionSchedule");
|
||||
if (!url.empty())
|
||||
{
|
||||
std::string days;
|
||||
for (char c : CHECKBOX_PREFIXES)
|
||||
{
|
||||
std::string name = c + CHECKBOX_NAME;
|
||||
LLCheckBoxCtrl* chk = getChild<LLCheckBoxCtrl>(name);
|
||||
if (chk->getValue())
|
||||
{
|
||||
days += c;
|
||||
}
|
||||
}
|
||||
LLSD restart;
|
||||
if (days.size() < 7)
|
||||
{
|
||||
LLStringUtil::toUpper(days);
|
||||
restart["type"] = "W";
|
||||
// if days are empty, will reset schedule
|
||||
restart["days"] = days;
|
||||
}
|
||||
else
|
||||
{
|
||||
restart["type"] = "D";
|
||||
}
|
||||
S32 hours = mHoursLineEditor->getValue().asInteger();
|
||||
if (mPMAMButton->getVisible())
|
||||
{
|
||||
if (hours == 12)
|
||||
{
|
||||
hours = 0; // 12:00 AM equals 0:00, while 12:00 PM equals 12:00
|
||||
}
|
||||
if (!mTimeAM)
|
||||
{
|
||||
hours += 12;
|
||||
}
|
||||
}
|
||||
restart["time"] = hours * 3600 + mMinutesLineEditor->getValue().asInteger() * 60;
|
||||
|
||||
LLSD body;
|
||||
body["restart"] = restart; // event name, at the moment only "restart" is supported
|
||||
LLCoros::instance().launch("LLFloaterRegionRestartSchedule::setRegionShcheduleCoro",
|
||||
boost::bind(&LLFloaterRegionRestartSchedule::setRegionShcheduleCoro, url, body, getHandle()));
|
||||
|
||||
mSaveButton->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("Region") << "Saving region schedule, but RegionSchedule capability is not available" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterRegionRestartSchedule::onCommitHours(const LLSD& value)
|
||||
{
|
||||
S32 hours = value.asInteger();
|
||||
if (mPMAMButton->getVisible())
|
||||
{
|
||||
// 0:00 equals 12:00 AM 1:00 equals 1:00 AM, 12am < 1am < 2am < 3am...
|
||||
if (hours == 0) hours = 12;
|
||||
llclamp(hours, 1, 12);
|
||||
}
|
||||
else
|
||||
{
|
||||
llclamp(hours, 0, 23);
|
||||
}
|
||||
mHoursLineEditor->setText(llformat("%02d", hours));
|
||||
mSaveButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void LLFloaterRegionRestartSchedule::onCommitMinutes(const LLSD& value)
|
||||
{
|
||||
S32 minutes = value.asInteger();
|
||||
llclamp(minutes, 0, 59);
|
||||
mMinutesLineEditor->setText(llformat("%02d", minutes));
|
||||
mSaveButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void LLFloaterRegionRestartSchedule::resetUI(bool enable_ui)
|
||||
{
|
||||
for (char c : CHECKBOX_PREFIXES)
|
||||
{
|
||||
std::string name = c + CHECKBOX_NAME;
|
||||
LLCheckBoxCtrl* chk = getChild<LLCheckBoxCtrl>(name);
|
||||
chk->setValue(false);
|
||||
chk->setEnabled(enable_ui);
|
||||
}
|
||||
if (mPMAMButton->getVisible())
|
||||
{
|
||||
mHoursLineEditor->setValue("12");
|
||||
mPMAMButton->setEnabled(enable_ui);
|
||||
}
|
||||
else
|
||||
{
|
||||
mHoursLineEditor->setValue("00");
|
||||
}
|
||||
mMinutesLineEditor->setValue("00");
|
||||
mMinutesLineEditor->setEnabled(enable_ui);
|
||||
mHoursLineEditor->setEnabled(enable_ui);
|
||||
mTimeAM = true;
|
||||
updateAMPM();
|
||||
}
|
||||
|
||||
void LLFloaterRegionRestartSchedule::updateAMPM()
|
||||
{
|
||||
std::string value;
|
||||
if (mTimeAM)
|
||||
{
|
||||
value = getString("am_string");
|
||||
}
|
||||
else
|
||||
{
|
||||
value = getString("pm_string");
|
||||
}
|
||||
mPMAMButton->setLabel(value);
|
||||
}
|
||||
|
||||
bool LLFloaterRegionRestartSchedule::canUse()
|
||||
{
|
||||
std::string url = gAgent.getRegionCapability("RegionSchedule");
|
||||
return !url.empty();
|
||||
}
|
||||
|
||||
void LLFloaterRegionRestartSchedule::requestRegionShcheduleCoro(std::string url, LLHandle<LLFloater> handle)
|
||||
{
|
||||
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
|
||||
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
|
||||
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RegionShcheduleRequest", httpPolicy));
|
||||
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
|
||||
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
|
||||
|
||||
httpOpts->setWantHeaders(true);
|
||||
|
||||
LLSD result = httpAdapter->getAndSuspend(httpRequest, url, httpOpts);
|
||||
|
||||
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
|
||||
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
|
||||
|
||||
LLFloaterRegionRestartSchedule* floater = dynamic_cast<LLFloaterRegionRestartSchedule*>(handle.get());
|
||||
if (!floater)
|
||||
{
|
||||
LL_DEBUGS("Region") << "Region Restart Schedule floater is already dead" << LL_ENDL;
|
||||
}
|
||||
else if (!status)
|
||||
{
|
||||
LL_WARNS("Region") << "Failed to get region schedule: " << status.toString() << LL_ENDL;
|
||||
floater->resetUI(false);
|
||||
}
|
||||
else if (!result.has("restart"))
|
||||
{
|
||||
floater->resetUI(true); // no restart schedule yet
|
||||
}
|
||||
else
|
||||
{
|
||||
// example: 'restart':{'days':'TR','time':i7200,'type':'W'}
|
||||
LLSD &restart = result["restart"];
|
||||
std::string type = restart["type"];
|
||||
std::string days = restart["days"];
|
||||
if (type == "W") // weekly || restart.has("days")
|
||||
{
|
||||
LLStringUtil::toLower(days);
|
||||
for (char c : CHECKBOX_PREFIXES)
|
||||
{
|
||||
bool enabled = days.find(c) != std::string::npos;
|
||||
std::string name = c + CHECKBOX_NAME;
|
||||
LLCheckBoxCtrl *chk = floater->getChild<LLCheckBoxCtrl>(name);
|
||||
chk->setValue(enabled);
|
||||
chk->setEnabled(true);
|
||||
}
|
||||
}
|
||||
else // dayly
|
||||
{
|
||||
for (char c : CHECKBOX_PREFIXES)
|
||||
{
|
||||
std::string name = c + CHECKBOX_NAME;
|
||||
LLCheckBoxCtrl* chk = floater->getChild<LLCheckBoxCtrl>(name);
|
||||
chk->setValue(true);
|
||||
chk->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
S32 seconds_after_midnight = restart["time"].asInteger();
|
||||
S32 hours = seconds_after_midnight / 3600;
|
||||
S32 minutes = (seconds_after_midnight % 3600) / 60;
|
||||
|
||||
if (floater->mPMAMButton->getVisible())
|
||||
{
|
||||
if (hours >= 12)
|
||||
{
|
||||
hours -= 12;
|
||||
floater->mTimeAM = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
floater->mTimeAM = true;
|
||||
}
|
||||
if (hours == 0)
|
||||
{
|
||||
hours = 12; // 0:00 equals 12:00 AM , 1:00 equals 1:00 AM
|
||||
}
|
||||
floater->mPMAMButton->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
floater->mTimeAM = true;
|
||||
}
|
||||
floater->updateAMPM();
|
||||
floater->mHoursLineEditor->setText(llformat("%02d", hours));
|
||||
floater->mHoursLineEditor->setEnabled(true);
|
||||
floater->mMinutesLineEditor->setText(llformat("%02d", minutes));
|
||||
floater->mMinutesLineEditor->setEnabled(true);
|
||||
|
||||
LL_DEBUGS("Region") << "Region restart schedule type: " << type
|
||||
<< " Days: " << days
|
||||
<< " Time:" << hours << ":" << minutes << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterRegionRestartSchedule::setRegionShcheduleCoro(std::string url, LLSD body, LLHandle<LLFloater> handle)
|
||||
{
|
||||
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
|
||||
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
|
||||
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RegionShcheduleSetter", httpPolicy));
|
||||
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
|
||||
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
|
||||
|
||||
httpOpts->setWantHeaders(true);
|
||||
|
||||
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, body, httpOpts);
|
||||
|
||||
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
|
||||
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
|
||||
|
||||
LLFloaterRegionRestartSchedule* floater = dynamic_cast<LLFloaterRegionRestartSchedule*>(handle.get());
|
||||
if (floater)
|
||||
{
|
||||
floater->closeFloater();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
/**
|
||||
* @file llfloaterregionrestartschedule.h
|
||||
* @author Andrii Kleshchev
|
||||
* @brief LLFloaterRegionRestartSchedule class header file
|
||||
*
|
||||
* $LicenseInfo:firstyear=2024&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2024, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLFLOATERREGIONRESTARTSCHEDULE_H
|
||||
#define LL_LLFLOATERREGIONRESTARTSCHEDULE_H
|
||||
|
||||
#include "llfloater.h"
|
||||
|
||||
class LLLineEditor;
|
||||
class LLButton;
|
||||
|
||||
class LLFloaterRegionRestartSchedule : public LLFloater
|
||||
{
|
||||
public:
|
||||
LLFloaterRegionRestartSchedule(LLView* owner);
|
||||
|
||||
virtual ~LLFloaterRegionRestartSchedule();
|
||||
|
||||
bool postBuild() override;
|
||||
void onOpen(const LLSD& key) override;
|
||||
void draw() override;
|
||||
|
||||
void onPMAMButtonClicked();
|
||||
void onSaveButtonClicked();
|
||||
|
||||
void onCommitHours(const LLSD& value);
|
||||
void onCommitMinutes(const LLSD& value);
|
||||
|
||||
void resetUI(bool enable_ui);
|
||||
void updateAMPM();
|
||||
|
||||
static bool canUse();
|
||||
|
||||
protected:
|
||||
static void requestRegionShcheduleCoro(std::string url, LLHandle<LLFloater> handle);
|
||||
static void setRegionShcheduleCoro(std::string url, LLSD body, LLHandle<LLFloater> handle);
|
||||
|
||||
LLHandle<LLView> mOwnerHandle;
|
||||
F32 mContextConeOpacity{ 0.f };
|
||||
|
||||
LLLineEditor* mHoursLineEditor{nullptr};
|
||||
LLLineEditor* mMinutesLineEditor{ nullptr };
|
||||
LLButton* mPMAMButton{ nullptr };
|
||||
LLButton* mSaveButton{ nullptr };
|
||||
LLButton* mCancelButton{ nullptr };
|
||||
|
||||
bool mTimeAM{ true };
|
||||
};
|
||||
|
||||
#endif // LL_LLFLOATERREGIONRESTARTSCHEDULE_H
|
||||
|
|
@ -258,7 +258,7 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate
|
|||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
bool use_freeze_frame = floaterp->getChild<LLUICtrl>("freeze_frame_check")->getValue().asBoolean();
|
||||
bool use_freeze_frame = floaterp->mFreezeFrameCheck && floaterp->mFreezeFrameCheck->getValue().asBoolean();
|
||||
|
||||
if (use_freeze_frame)
|
||||
{
|
||||
|
|
@ -841,7 +841,7 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, bool
|
|||
new_width = spanel->getTypedPreviewWidth();
|
||||
new_height = spanel->getTypedPreviewHeight();
|
||||
|
||||
// Limit custom size for inventory snapshots to 512x512 px.
|
||||
// Limit custom size for inventory snapshots to 2048x2048 px.
|
||||
if (getActiveSnapshotType(view) == LLSnapshotModel::SNAPSHOT_TEXTURE)
|
||||
{
|
||||
new_width = llmin(new_width, MAX_TEXTURE_SIZE);
|
||||
|
|
@ -1139,8 +1139,9 @@ bool LLFloaterSnapshot::postBuild()
|
|||
getChild<LLUICtrl>("layer_types")->setValue("colors");
|
||||
getChildView("layer_types")->setEnabled(false);
|
||||
|
||||
getChild<LLUICtrl>("freeze_frame_check")->setValue(gSavedSettings.getBOOL("UseFreezeFrame"));
|
||||
childSetCommitCallback("freeze_frame_check", ImplBase::onCommitFreezeFrame, this);
|
||||
mFreezeFrameCheck = getChild<LLUICtrl>("freeze_frame_check");
|
||||
mFreezeFrameCheck->setValue(gSavedSettings.getBOOL("UseFreezeFrame"));
|
||||
mFreezeFrameCheck->setCommitCallback(&ImplBase::onCommitFreezeFrame, this);
|
||||
|
||||
getChild<LLUICtrl>("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot"));
|
||||
childSetCommitCallback("auto_snapshot_check", ImplBase::onClickAutoSnap, this);
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ protected:
|
|||
LLUICtrl* mThumbnailPlaceholder;
|
||||
LLUICtrl *mRefreshBtn, *mRefreshLabel;
|
||||
LLUICtrl *mSucceessLblPanel, *mFailureLblPanel;
|
||||
LLUICtrl* mFreezeFrameCheck = nullptr;
|
||||
};
|
||||
|
||||
class LLFloaterSnapshotBase::ImplBase
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@
|
|||
#include "llbutton.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llsliderctrl.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llcommandhandler.h"
|
||||
#include "lldraghandle.h"
|
||||
|
|
@ -378,15 +380,36 @@ bool LLFloaterWorldMap::postBuild()
|
|||
mMapView = dynamic_cast<LLWorldMapView*>(getChild<LLPanel>("objects_mapview"));
|
||||
mMapView->setPan(0, 0, true);
|
||||
|
||||
mTeleportButton = getChild<LLButton>("Teleport");
|
||||
mShowDestinationButton = getChild<LLButton>("Show Destination");
|
||||
mCopySlurlButton = getChild<LLButton>("copy_slurl");
|
||||
mGoHomeButton = getChild<LLButton>("Go Home");
|
||||
|
||||
mPeopleCheck = getChild<LLCheckBoxCtrl>("people_chk");
|
||||
mInfohubCheck = getChild<LLCheckBoxCtrl>("infohub_chk");
|
||||
mTelehubCheck = getChild<LLCheckBoxCtrl>("telehub_chk");
|
||||
mLandSaleCheck = getChild<LLCheckBoxCtrl>("land_for_sale_chk");
|
||||
mEventsCheck = getChild<LLCheckBoxCtrl>("event_chk");
|
||||
mEventsMatureCheck = getChild<LLCheckBoxCtrl>("events_mature_chk");
|
||||
mEventsAdultCheck = getChild<LLCheckBoxCtrl>("events_adult_chk");
|
||||
|
||||
mAvatarIcon = getChild<LLUICtrl>("avatar_icon");
|
||||
mLandmarkIcon = getChild<LLUICtrl>("landmark_icon");
|
||||
mLocationIcon = getChild<LLUICtrl>("location_icon");
|
||||
|
||||
mTeleportCoordSpinX = getChild<LLUICtrl>("teleport_coordinate_x");
|
||||
mTeleportCoordSpinY = getChild<LLUICtrl>("teleport_coordinate_y");
|
||||
mTeleportCoordSpinZ = getChild<LLUICtrl>("teleport_coordinate_z");
|
||||
|
||||
LLComboBox *avatar_combo = getChild<LLComboBox>("friend combo");
|
||||
avatar_combo->selectFirstItem();
|
||||
avatar_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onAvatarComboPrearrange, this) );
|
||||
avatar_combo->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
|
||||
mListFriendCombo = dynamic_cast<LLCtrlListInterface *>(avatar_combo);
|
||||
|
||||
LLSearchEditor *location_editor = getChild<LLSearchEditor>("location");
|
||||
location_editor->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1));
|
||||
location_editor->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this));
|
||||
mLocationEditor = getChild<LLSearchEditor>("location");
|
||||
mLocationEditor->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1));
|
||||
mLocationEditor->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this));
|
||||
|
||||
getChild<LLScrollListCtrl>("search_results")->setDoubleClickCallback( boost::bind(&LLFloaterWorldMap::onClickTeleportBtn, this));
|
||||
mListSearchResults = childGetListInterface("search_results");
|
||||
|
|
@ -397,8 +420,9 @@ bool LLFloaterWorldMap::postBuild()
|
|||
landmark_combo->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
|
||||
mListLandmarkCombo = dynamic_cast<LLCtrlListInterface *>(landmark_combo);
|
||||
|
||||
mZoomSlider = getChild<LLSliderCtrl>("zoom slider");
|
||||
F32 slider_zoom = mMapView->getZoom();
|
||||
getChild<LLUICtrl>("zoom slider")->setValue(slider_zoom);
|
||||
mZoomSlider->setValue(slider_zoom);
|
||||
|
||||
// <FS:Ansariel> Use own expand/collapse function
|
||||
//getChild<LLPanel>("expand_btn_panel")->setMouseDownCallback(boost::bind(&LLFloaterWorldMap::onExpandCollapseBtn, this));
|
||||
|
|
@ -483,7 +507,7 @@ void LLFloaterWorldMap::onOpen(const LLSD& key)
|
|||
const LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK);
|
||||
LLInventoryModelBackgroundFetch::instance().start(landmark_folder_id);
|
||||
|
||||
getChild<LLUICtrl>("location")->setFocus( true);
|
||||
mLocationEditor->setFocus( true);
|
||||
gFocusMgr.triggerFocusFlash();
|
||||
|
||||
buildAvatarIDList();
|
||||
|
|
@ -521,9 +545,9 @@ bool LLFloaterWorldMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
|||
S32 map_y = y - mMapView->getRect().mBottom;
|
||||
if (mMapView->pointInView(map_x, map_y))
|
||||
{
|
||||
F32 old_slider_zoom = (F32) getChild<LLUICtrl>("zoom slider")->getValue().asReal();
|
||||
F32 old_slider_zoom = (F32) mZoomSlider->getValue().asReal();
|
||||
F32 slider_zoom = old_slider_zoom + ((F32) clicks * -0.3333f);
|
||||
getChild<LLUICtrl>("zoom slider")->setValue(LLSD(slider_zoom));
|
||||
mZoomSlider->setValue(LLSD(slider_zoom));
|
||||
mMapView->zoomWithPivot(slider_zoom, map_x, map_y);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -544,21 +568,8 @@ void LLFloaterWorldMap::reshape( S32 width, S32 height, bool called_from_parent
|
|||
void LLFloaterWorldMap::draw()
|
||||
{
|
||||
// <FS:Ansariel> Performance improvement
|
||||
static LLUICtrl* avatar_icon = getChild<LLUICtrl>("friends_icon"); // <FS:Ansariel> Used to be avatar_icon
|
||||
static LLUICtrl* landmark_icon = getChild<LLUICtrl>("landmark_icon");
|
||||
static LLUICtrl* location_icon = getChild<LLUICtrl>("location_icon");
|
||||
static LLView* teleport_btn = getChildView("Teleport");
|
||||
//static LLView* clear_btn = getChildView("Clear");
|
||||
static LLView* show_destination_btn = getChildView("Show Destination");
|
||||
static LLView* copy_slurl_btn = getChildView("copy_slurl");
|
||||
static LLView* go_home_btn = getChildView("Go Home");
|
||||
static LLUICtrl* zoom_slider = getChild<LLUICtrl>("zoom slider");
|
||||
static LLView* people_chk = getChildView("people_chk");
|
||||
static LLView* infohub_chk = getChildView("infohub_chk");
|
||||
static LLView* land_for_sale_chk = getChildView("land_for_sale_chk");
|
||||
static LLView* event_chk = getChildView("event_chk");
|
||||
static LLView* events_mature_chk = getChildView("events_mature_chk");
|
||||
static LLView* events_adult_chk = getChildView("events_adult_chk");
|
||||
// </FS:Ansariel> Performance improvement
|
||||
|
||||
static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white);
|
||||
|
|
@ -570,50 +581,32 @@ void LLFloaterWorldMap::draw()
|
|||
LLViewerRegion* regionp = gAgent.getRegion();
|
||||
bool agent_on_prelude = (regionp && regionp->isPrelude());
|
||||
bool enable_go_home = gAgent.isGodlike() || !agent_on_prelude;
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//getChildView("Go Home")->setEnabled(enable_go_home);
|
||||
go_home_btn->setEnabled(enable_go_home);
|
||||
// </FS:Ansariel> Performance improvement
|
||||
mGoHomeButton->setEnabled(enable_go_home);
|
||||
|
||||
updateLocation();
|
||||
|
||||
LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus();
|
||||
if (LLTracker::TRACKING_AVATAR == tracking_status)
|
||||
{
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//getChild<LLUICtrl>("avatar_icon")->setColor( map_track_color);
|
||||
avatar_icon->setColor( map_track_color);
|
||||
// </FS:Ansariel> Performance improvement
|
||||
mAvatarIcon->setColor( map_track_color);
|
||||
}
|
||||
else
|
||||
{
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//getChild<LLUICtrl>("avatar_icon")->setColor( map_track_disabled_color);
|
||||
avatar_icon->setColor( map_track_disabled_color);
|
||||
// </FS:Ansariel> Performance improvement
|
||||
mAvatarIcon->setColor( map_track_disabled_color);
|
||||
}
|
||||
|
||||
if (LLTracker::TRACKING_LANDMARK == tracking_status)
|
||||
{
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//getChild<LLUICtrl>("landmark_icon")->setColor( map_track_color);
|
||||
landmark_icon->setColor( map_track_color);
|
||||
// </FS:Ansariel> Performance improvement
|
||||
mLandmarkIcon->setColor( map_track_color);
|
||||
}
|
||||
else
|
||||
{
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//getChild<LLUICtrl>("landmark_icon")->setColor( map_track_disabled_color);
|
||||
landmark_icon->setColor( map_track_disabled_color);
|
||||
// </FS:Ansariel> Performance improvement
|
||||
mLandmarkIcon->setColor( map_track_disabled_color);
|
||||
}
|
||||
|
||||
if (LLTracker::TRACKING_LOCATION == tracking_status)
|
||||
{
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//getChild<LLUICtrl>("location_icon")->setColor( map_track_color);
|
||||
location_icon->setColor( map_track_color);
|
||||
// </FS:Ansariel> Performance improvement
|
||||
mLocationIcon->setColor( map_track_color);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -623,17 +616,11 @@ void LLFloaterWorldMap::draw()
|
|||
double value = fmod(seconds, 2);
|
||||
value = 0.5 + 0.5*cos(value * F_PI);
|
||||
LLColor4 loading_color(0.0, F32(value/2), F32(value), 1.0);
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//getChild<LLUICtrl>("location_icon")->setColor( loading_color);
|
||||
location_icon->setColor( loading_color);
|
||||
// </FS:Ansariel> Performance improvement
|
||||
mLocationIcon->setColor( loading_color);
|
||||
}
|
||||
else
|
||||
{
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//getChild<LLUICtrl>("location_icon")->setColor( map_track_disabled_color);
|
||||
location_icon->setColor( map_track_disabled_color);
|
||||
// </FS:Ansariel> Performance improvement
|
||||
mLocationIcon->setColor( map_track_disabled_color);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -652,11 +639,11 @@ void LLFloaterWorldMap::draw()
|
|||
// childSetEnabled("Go Home",
|
||||
// (!rlv_handler_t::isEnabled()) || !(gRlvHandler.hasBehaviour(RLV_BHVR_TPLM) && gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)));
|
||||
//// [/RLVa:KB]
|
||||
teleport_btn->setEnabled((bool)tracking_status);
|
||||
mTeleportButton->setEnabled((bool)tracking_status);
|
||||
//clear_btn->setEnabled((bool)tracking_status);
|
||||
show_destination_btn->setEnabled((bool)tracking_status || LLWorldMap::getInstance()->isTracking());
|
||||
copy_slurl_btn->setEnabled((mSLURL.isValid()) );
|
||||
go_home_btn->setEnabled((!rlv_handler_t::isEnabled()) || !(gRlvHandler.hasBehaviour(RLV_BHVR_TPLM) && gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)));
|
||||
mShowDestinationButton->setEnabled((bool)tracking_status || LLWorldMap::getInstance()->isTracking());
|
||||
mCopySlurlButton->setEnabled((mSLURL.isValid()) );
|
||||
mGoHomeButton->setEnabled((!rlv_handler_t::isEnabled()) || !(gRlvHandler.hasBehaviour(RLV_BHVR_TPLM) && gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)));
|
||||
// </FS:Ansariel> Performance improvement
|
||||
// <FS:Ansariel> Alchemy region tracker
|
||||
getChild<LLButton>("track_region")->setEnabled((bool) tracking_status || LLWorldMap::getInstance()->isTracking());
|
||||
|
|
@ -664,27 +651,19 @@ void LLFloaterWorldMap::draw()
|
|||
setMouseOpaque(true);
|
||||
getDragHandle()->setMouseOpaque(true);
|
||||
|
||||
mMapView->zoom((F32)getChild<LLUICtrl>("zoom slider")->getValue().asReal());
|
||||
mMapView->zoom((F32)mZoomSlider->getValue().asReal());
|
||||
|
||||
// Enable/disable checkboxes depending on the zoom level
|
||||
// If above threshold level (i.e. low res) -> Disable all checkboxes
|
||||
// If under threshold level (i.e. high res) -> Enable all checkboxes
|
||||
bool enable = mMapView->showRegionInfo();
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//getChildView("people_chk")->setEnabled(enable);
|
||||
//getChildView("infohub_chk")->setEnabled(enable);
|
||||
//getChildView("telehub_chk")->setEnabled(enable); // <FS:Ansariel> Does not exist as of 12-02-2014!
|
||||
//getChildView("land_for_sale_chk")->setEnabled(enable);
|
||||
//getChildView("event_chk")->setEnabled(enable);
|
||||
//getChildView("events_mature_chk")->setEnabled(enable);
|
||||
//getChildView("events_adult_chk")->setEnabled(enable);
|
||||
people_chk->setEnabled(enable);
|
||||
infohub_chk->setEnabled(enable);
|
||||
land_for_sale_chk->setEnabled(enable);
|
||||
event_chk->setEnabled(enable);
|
||||
events_mature_chk->setEnabled(enable);
|
||||
events_adult_chk->setEnabled(enable);
|
||||
// </FS:Ansariel> Performance improvement
|
||||
mPeopleCheck->setEnabled(enable);
|
||||
mInfohubCheck->setEnabled(enable);
|
||||
mTelehubCheck->setEnabled(enable);
|
||||
mLandSaleCheck->setEnabled(enable);
|
||||
mEventsCheck->setEnabled(enable);
|
||||
mEventsMatureCheck->setEnabled(enable);
|
||||
mEventsAdultCheck->setEnabled(enable);
|
||||
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
|
@ -779,7 +758,7 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string&
|
|||
// convenience.
|
||||
if(gAgent.isGodlike())
|
||||
{
|
||||
getChild<LLUICtrl>("teleport_coordinate_z")->setValue(LLSD(200.f));
|
||||
mTeleportCoordSpinZ->setValue(LLSD(200.f));
|
||||
}
|
||||
// Don't re-request info if we already have it or we won't have it in time to teleport
|
||||
if (mTrackedStatus != LLTracker::TRACKING_AVATAR || avatar_id != mTrackedAvatarID)
|
||||
|
|
@ -943,21 +922,18 @@ void LLFloaterWorldMap::enableTeleportCoordsDisplay( bool enabled )
|
|||
LLUICtrl* pCtrl = getChild<LLUICtrl>("events_label");
|
||||
pCtrl->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
|
||||
|
||||
pCtrl = getChild<LLUICtrl>("teleport_coordinate_x");
|
||||
pCtrl->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
|
||||
pCtrl->setEnabled(enabled);
|
||||
mTeleportCoordSpinX->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
|
||||
mTeleportCoordSpinX->setEnabled(enabled);
|
||||
|
||||
pCtrl = getChild<LLUICtrl>("teleport_coordinate_y");
|
||||
pCtrl->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
|
||||
pCtrl->setEnabled(enabled);
|
||||
mTeleportCoordSpinY->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
|
||||
mTeleportCoordSpinY->setEnabled(enabled);
|
||||
|
||||
pCtrl = getChild<LLUICtrl>("teleport_coordinate_z");
|
||||
pCtrl->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
|
||||
pCtrl->setEnabled(enabled);
|
||||
mTeleportCoordSpinZ->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
|
||||
mTeleportCoordSpinZ->setEnabled(enabled);
|
||||
// [/RLVa:KB]
|
||||
// childSetEnabled("teleport_coordinate_x", enabled );
|
||||
// childSetEnabled("teleport_coordinate_y", enabled );
|
||||
// childSetEnabled("teleport_coordinate_z", enabled );
|
||||
// mTeleportCoordSpinX->setEnabled(enabled);
|
||||
// mTeleportCoordSpinY->setEnabled(enabled);
|
||||
// mTeleportCoordSpinZ->setEnabled(enabled);
|
||||
}
|
||||
|
||||
// update display of teleport destination coordinates - pos is in global coordinates
|
||||
|
|
@ -981,9 +957,9 @@ void LLFloaterWorldMap::updateTeleportCoordsDisplay( const LLVector3d& pos )
|
|||
F32 region_local_z = (F32)pos.mdV[VZ];
|
||||
|
||||
// write in the values
|
||||
childSetValue("teleport_coordinate_x", region_local_x );
|
||||
childSetValue("teleport_coordinate_y", region_local_y );
|
||||
childSetValue("teleport_coordinate_z", region_local_z );
|
||||
mTeleportCoordSpinX->setValue(region_local_x);
|
||||
mTeleportCoordSpinY->setValue(region_local_y);
|
||||
mTeleportCoordSpinZ->setValue(region_local_z);
|
||||
}
|
||||
// </FS:CR>
|
||||
}
|
||||
|
|
@ -1027,7 +1003,7 @@ void LLFloaterWorldMap::updateLocation()
|
|||
mSetToUserPosition = false;
|
||||
|
||||
// Fill out the location field
|
||||
getChild<LLUICtrl>("location")->setValue(agent_sim_name);
|
||||
mLocationEditor->setValue(agent_sim_name);
|
||||
|
||||
// update the coordinate display with location of avatar in region
|
||||
updateTeleportCoordsDisplay( agentPos );
|
||||
|
|
@ -1068,7 +1044,7 @@ void LLFloaterWorldMap::updateLocation()
|
|||
}
|
||||
}
|
||||
|
||||
getChild<LLUICtrl>("location")->setValue(sim_name);
|
||||
mLocationEditor->setValue(sim_name);
|
||||
|
||||
// refresh coordinate display to reflect where user clicked.
|
||||
LLVector3d coord_pos = LLTracker::getTrackedPositionGlobal();
|
||||
|
|
@ -1126,17 +1102,17 @@ void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S3
|
|||
else
|
||||
{
|
||||
// fill in UI based on URL
|
||||
gFloaterWorldMap->getChild<LLUICtrl>("location")->setValue(region_name);
|
||||
mLocationEditor->setValue(region_name);
|
||||
|
||||
// Save local coords to highlight position after region global
|
||||
// position is returned.
|
||||
gFloaterWorldMap->mCompletingRegionPos.set(
|
||||
mCompletingRegionPos.set(
|
||||
(F32)x_coord, (F32)y_coord, (F32)z_coord);
|
||||
|
||||
// pass sim name to combo box
|
||||
gFloaterWorldMap->mCompletingRegionName = region_name;
|
||||
mCompletingRegionName = region_name;
|
||||
LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name);
|
||||
LLStringUtil::toLower(gFloaterWorldMap->mCompletingRegionName);
|
||||
LLStringUtil::toLower(mCompletingRegionName);
|
||||
LLWorldMap::getInstance()->setTrackingCommit();
|
||||
}
|
||||
}
|
||||
|
|
@ -1395,7 +1371,7 @@ void LLFloaterWorldMap::adjustZoomSliderBounds()
|
|||
|
||||
F32 min_power = log(pixels_per_region/256.f)/log(2.f);
|
||||
|
||||
getChild<LLSliderCtrl>("zoom slider")->setMinValue(min_power);
|
||||
mZoomSlider->setMinValue(min_power);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1557,7 +1533,7 @@ void LLFloaterWorldMap::onLocationFocusChanged( LLFocusableElement* focus )
|
|||
void LLFloaterWorldMap::updateSearchEnabled()
|
||||
{
|
||||
if (childHasKeyboardFocus("location") &&
|
||||
getChild<LLUICtrl>("location")->getValue().asString().length() > 0)
|
||||
mLocationEditor->getValue().asString().length() > 0)
|
||||
{
|
||||
setDefaultBtn("DoSearch");
|
||||
}
|
||||
|
|
@ -1578,14 +1554,14 @@ void LLFloaterWorldMap::onLocationCommit()
|
|||
mCompletingRegionName = "";
|
||||
mLastRegionName = "";
|
||||
|
||||
std::string str = getChild<LLUICtrl>("location")->getValue().asString();
|
||||
std::string str = mLocationEditor->getValue().asString();
|
||||
|
||||
// Trim any leading and trailing spaces in the search target
|
||||
std::string saved_str = str;
|
||||
LLStringUtil::trim( str );
|
||||
if ( str != saved_str )
|
||||
{ // Set the value in the UI if any spaces were removed
|
||||
getChild<LLUICtrl>("location")->setValue(str);
|
||||
mLocationEditor->setValue(str);
|
||||
}
|
||||
|
||||
// Don't try completing empty name (STORM-1427).
|
||||
|
|
@ -1615,11 +1591,11 @@ void LLFloaterWorldMap::onCoordinatesCommit()
|
|||
return;
|
||||
}
|
||||
|
||||
S32 x_coord = (S32)childGetValue("teleport_coordinate_x").asReal();
|
||||
S32 y_coord = (S32)childGetValue("teleport_coordinate_y").asReal();
|
||||
S32 z_coord = (S32)childGetValue("teleport_coordinate_z").asReal();
|
||||
S32 x_coord = (S32)mTeleportCoordSpinX->getValue().asReal();
|
||||
S32 y_coord = (S32)mTeleportCoordSpinY->getValue().asReal();
|
||||
S32 z_coord = (S32)mTeleportCoordSpinZ->getValue().asReal();
|
||||
|
||||
const std::string region_name = childGetValue("location").asString();
|
||||
const std::string region_name = mLocationEditor->getValue().asString();
|
||||
|
||||
trackURL( region_name, x_coord, y_coord, z_coord );
|
||||
}
|
||||
|
|
@ -1782,7 +1758,7 @@ void LLFloaterWorldMap::teleport()
|
|||
&& av_tracker.haveTrackingInfo() )
|
||||
{
|
||||
pos_global = av_tracker.getGlobalPos();
|
||||
pos_global.mdV[VZ] = getChild<LLUICtrl>("teleport_coordinate_z")->getValue();
|
||||
pos_global.mdV[VZ] = mTeleportCoordSpinZ->getValue();
|
||||
}
|
||||
else if ( LLTracker::TRACKING_LANDMARK == tracking_status)
|
||||
{
|
||||
|
|
@ -2021,7 +1997,7 @@ void LLFloaterWorldMap::onCommitSearchResult()
|
|||
pos_global.mdV[VY] += (F64)pos_local.mV[VY];
|
||||
pos_global.mdV[VZ] = (F64)pos_local.mV[VZ];
|
||||
|
||||
getChild<LLUICtrl>("location")->setValue(sim_name);
|
||||
mLocationEditor->setValue(sim_name);
|
||||
trackLocation(pos_global);
|
||||
setDefaultBtn("Teleport");
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,11 @@ class LLItemInfo;
|
|||
class LLLineEditor;
|
||||
class LLTabContainer;
|
||||
class LLWorldMapView;
|
||||
class LLButton;
|
||||
class LLCheckBoxCtrl;
|
||||
class LLSliderCtrl;
|
||||
class LLSpinCtrl;
|
||||
class LLSearchEditor;
|
||||
|
||||
// <FS:Ansariel> Parcel details on map
|
||||
class FSWorldMapParcelInfoObserver : public LLRemoteParcelInfoObserver
|
||||
|
|
@ -168,7 +173,6 @@ protected:
|
|||
void buildLandmarkIDLists();
|
||||
void flyToLandmark();
|
||||
void teleportToLandmark();
|
||||
void setLandmarkVisited();
|
||||
|
||||
void buildAvatarIDList();
|
||||
void flyToAvatar();
|
||||
|
|
@ -228,6 +232,30 @@ private:
|
|||
LLCtrlListInterface * mListLandmarkCombo;
|
||||
LLCtrlListInterface * mListSearchResults;
|
||||
|
||||
LLButton* mTeleportButton = nullptr;
|
||||
LLButton* mShowDestinationButton = nullptr;
|
||||
LLButton* mCopySlurlButton = nullptr;
|
||||
LLButton* mGoHomeButton = nullptr;
|
||||
|
||||
LLCheckBoxCtrl* mPeopleCheck = nullptr;
|
||||
LLCheckBoxCtrl* mInfohubCheck = nullptr;
|
||||
LLCheckBoxCtrl* mTelehubCheck = nullptr;
|
||||
LLCheckBoxCtrl* mLandSaleCheck = nullptr;
|
||||
LLCheckBoxCtrl* mEventsCheck = nullptr;
|
||||
LLCheckBoxCtrl* mEventsMatureCheck = nullptr;
|
||||
LLCheckBoxCtrl* mEventsAdultCheck = nullptr;
|
||||
|
||||
LLUICtrl* mAvatarIcon = nullptr;
|
||||
LLUICtrl* mLandmarkIcon = nullptr;
|
||||
LLUICtrl* mLocationIcon = nullptr;
|
||||
|
||||
LLSearchEditor* mLocationEditor = nullptr;
|
||||
LLUICtrl* mTeleportCoordSpinX = nullptr;
|
||||
LLUICtrl* mTeleportCoordSpinY = nullptr;
|
||||
LLUICtrl* mTeleportCoordSpinZ = nullptr;
|
||||
|
||||
LLSliderCtrl* mZoomSlider = nullptr;
|
||||
|
||||
boost::signals2::connection mTeleportFinishConnection;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -824,7 +824,7 @@ void LLGroupMgrGroupData::banMemberById(const LLUUID& participant_uuid)
|
|||
|
||||
mPendingBanRequest = false;
|
||||
|
||||
LLGroupMemberData* member_data = (*mi).second;
|
||||
LLGroupMemberData* member_data = mi->second;
|
||||
if (member_data && member_data->isInRole(mOwnerRole))
|
||||
{
|
||||
return; // can't ban group owner
|
||||
|
|
@ -850,8 +850,7 @@ void LLGroupMgrGroupData::banMemberById(const LLUUID& participant_uuid)
|
|||
// LLGroupMgr
|
||||
//
|
||||
|
||||
LLGroupMgr::LLGroupMgr():
|
||||
mMemberRequestInFlight(false)
|
||||
LLGroupMgr::LLGroupMgr()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -986,11 +985,11 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
|
|||
LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id);
|
||||
if (!group_datap || (group_datap->mMemberRequestID != request_id))
|
||||
{
|
||||
LL_WARNS() << "processGroupMembersReply: Received incorrect (stale?) group or request id" << LL_ENDL;
|
||||
LL_WARNS() << "Received incorrect (stale?) group or request id" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
msg->getS32(_PREHASH_GroupData, "MemberCount", group_datap->mMemberCount );
|
||||
msg->getS32Fast(_PREHASH_GroupData, _PREHASH_MemberCount, group_datap->mMemberCount);
|
||||
|
||||
if (group_datap->mMemberCount > 0)
|
||||
{
|
||||
|
|
@ -1005,12 +1004,12 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
|
|||
{
|
||||
LLUUID member_id;
|
||||
|
||||
msg->getUUIDFast(_PREHASH_MemberData, _PREHASH_AgentID, member_id, i );
|
||||
msg->getS32(_PREHASH_MemberData, _PREHASH_Contribution, contribution, i);
|
||||
msg->getU64(_PREHASH_MemberData, "AgentPowers", agent_powers, i);
|
||||
msg->getUUIDFast(_PREHASH_MemberData, _PREHASH_AgentID, member_id, i);
|
||||
msg->getS32Fast(_PREHASH_MemberData, _PREHASH_Contribution, contribution, i);
|
||||
msg->getU64Fast(_PREHASH_MemberData, _PREHASH_AgentPowers, agent_powers, i);
|
||||
msg->getStringFast(_PREHASH_MemberData, _PREHASH_OnlineStatus, online_status, i);
|
||||
msg->getString(_PREHASH_MemberData, "Title", title, i);
|
||||
msg->getBOOL(_PREHASH_MemberData,"IsOwner",is_owner,i);
|
||||
msg->getStringFast(_PREHASH_MemberData, _PREHASH_Title, title, i);
|
||||
msg->getBOOLFast(_PREHASH_MemberData, _PREHASH_IsOwner, is_owner, i);
|
||||
|
||||
if (member_id.notNull())
|
||||
{
|
||||
|
|
@ -1055,7 +1054,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
|
|||
|
||||
group_datap->mMemberVersion.generate();
|
||||
|
||||
if (group_datap->mMembers.size() == (U32)group_datap->mMemberCount)
|
||||
if (group_datap->mMembers.size() == (U32)group_datap->mMemberCount)
|
||||
{
|
||||
group_datap->mMemberDataComplete = true;
|
||||
group_datap->mMemberRequestID.setNull();
|
||||
|
|
@ -1700,13 +1699,12 @@ void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id)
|
|||
if (group_datap->mRoleMembersRequestID.isNull())
|
||||
{
|
||||
// Don't send the request if we don't have all the member or role data
|
||||
if (!group_datap->isMemberDataComplete()
|
||||
|| !group_datap->isRoleDataComplete())
|
||||
if (!group_datap->isMemberDataComplete() || !group_datap->isRoleDataComplete())
|
||||
{
|
||||
// *TODO: KLW FIXME: Should we start a member or role data request?
|
||||
LL_INFOS("GrpMgr") << " Pending: " << (group_datap->mPendingRoleMemberRequest ? "Y" : "N")
|
||||
<< " MemberDataComplete: " << (group_datap->mMemberDataComplete ? "Y" : "N")
|
||||
<< " RoleDataComplete: " << (group_datap->mRoleDataComplete ? "Y" : "N") << LL_ENDL;
|
||||
<< ", MemberDataComplete: " << (group_datap->mMemberDataComplete ? "Y" : "N")
|
||||
<< ", RoleDataComplete: " << (group_datap->mRoleDataComplete ? "Y" : "N") << LL_ENDL;
|
||||
group_datap->mPendingRoleMemberRequest = true;
|
||||
return;
|
||||
}
|
||||
|
|
@ -2027,14 +2025,14 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
|
|||
group_datap->mMemberVersion.generate();
|
||||
}
|
||||
|
||||
void LLGroupMgr::getGroupBanRequestCoro(std::string url, LLUUID groupId)
|
||||
void LLGroupMgr::getGroupBanRequestCoro(std::string url, LLUUID group_id)
|
||||
{
|
||||
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
|
||||
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
|
||||
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy));
|
||||
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
|
||||
|
||||
std::string finalUrl = url + "?group_id=" + groupId.asString();
|
||||
std::string finalUrl = url + "?group_id=" + group_id.asString();
|
||||
|
||||
LLSD result = httpAdapter->getAndSuspend(httpRequest, finalUrl);
|
||||
|
||||
|
|
@ -2055,8 +2053,8 @@ void LLGroupMgr::getGroupBanRequestCoro(std::string url, LLUUID groupId)
|
|||
}
|
||||
}
|
||||
|
||||
void LLGroupMgr::postGroupBanRequestCoro(std::string url, LLUUID groupId,
|
||||
U32 action, uuid_vec_t banList, bool update)
|
||||
void LLGroupMgr::postGroupBanRequestCoro(std::string url, LLUUID group_id,
|
||||
U32 action, uuid_vec_t ban_list, bool update)
|
||||
{
|
||||
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
|
||||
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
|
||||
|
|
@ -2069,20 +2067,16 @@ void LLGroupMgr::postGroupBanRequestCoro(std::string url, LLUUID groupId,
|
|||
|
||||
httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML);
|
||||
|
||||
|
||||
std::string finalUrl = url + "?group_id=" + groupId.asString();
|
||||
std::string finalUrl = url + "?group_id=" + group_id.asString();
|
||||
|
||||
LLSD postData = LLSD::emptyMap();
|
||||
postData["ban_action"] = (LLSD::Integer)action;
|
||||
// Add our list of potential banned residents to the list
|
||||
postData["ban_ids"] = LLSD::emptyArray();
|
||||
LLSD banEntry;
|
||||
|
||||
uuid_vec_t::const_iterator it = banList.begin();
|
||||
for (; it != banList.end(); ++it)
|
||||
for (const LLUUID& ban_id : ban_list)
|
||||
{
|
||||
banEntry = (*it);
|
||||
postData["ban_ids"].append(banEntry);
|
||||
postData["ban_ids"].append(ban_id);
|
||||
}
|
||||
|
||||
LL_WARNS() << "post: " << ll_pretty_print_sd(postData) << LL_ENDL;
|
||||
|
|
@ -2107,7 +2101,7 @@ void LLGroupMgr::postGroupBanRequestCoro(std::string url, LLUUID groupId,
|
|||
|
||||
if (update)
|
||||
{
|
||||
getGroupBanRequestCoro(url, groupId);
|
||||
getGroupBanRequestCoro(url, group_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2194,55 +2188,66 @@ void LLGroupMgr::processGroupBanRequest(const LLSD& content)
|
|||
LLGroupMgr::getInstance()->notifyObservers(GC_BANLIST);
|
||||
}
|
||||
|
||||
void LLGroupMgr::groupMembersRequestCoro(std::string url, LLUUID groupId)
|
||||
void LLGroupMgr::groupMembersRequestCoro(std::string url, LLUUID group_id, U32 page_size, U32 page_start, std::string sort_column)
|
||||
{
|
||||
LL_INFOS("GrpMgr") << "group_id: '" << group_id << "', sort_column: '" << sort_column << "', page_size: " << page_size << ", page_start: " << page_start << LL_ENDL;
|
||||
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
|
||||
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
|
||||
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy));
|
||||
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
|
||||
LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
|
||||
|
||||
mMemberRequestInFlight = true;
|
||||
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
|
||||
|
||||
LLSD postData = LLSD::emptyMap();
|
||||
postData["group_id"] = groupId;
|
||||
postData["group_id"] = group_id;
|
||||
if (page_size)
|
||||
{
|
||||
postData["page_size"] = LLSD::Integer(page_size);
|
||||
if (page_start)
|
||||
{
|
||||
postData["page_start"] = LLSD::Integer(page_start);
|
||||
}
|
||||
if (!sort_column.empty())
|
||||
{
|
||||
postData["sort_column"] = sort_column;
|
||||
}
|
||||
}
|
||||
|
||||
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, postData, httpOpts);
|
||||
LLSD response = httpAdapter->postAndSuspend(httpRequest, url, postData, httpOpts);
|
||||
|
||||
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
|
||||
mMemberRequestInFlight = false;
|
||||
|
||||
LLSD httpResults = response.get(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
|
||||
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
|
||||
|
||||
if (!status)
|
||||
{
|
||||
LL_WARNS("GrpMgr") << "Error receiving group member data " << LL_ENDL;
|
||||
mMemberRequestInFlight = false;
|
||||
return;
|
||||
}
|
||||
|
||||
result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
|
||||
LLGroupMgr::processCapGroupMembersRequest(result);
|
||||
mMemberRequestInFlight = false;
|
||||
response.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
|
||||
processCapGroupMembersResponse(response, page_size, page_start, sort_column);
|
||||
}
|
||||
|
||||
void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id)
|
||||
void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id, U32 page_size, U32 page_start, const std::string& sort_column)
|
||||
{
|
||||
static U32 lastGroupMemberRequestFrame = 0;
|
||||
|
||||
// Have we requested the information already this frame?
|
||||
// Todo: make this per group, we can invite to one group and simultaneously be checking another one
|
||||
if ((lastGroupMemberRequestFrame == gFrameCount) || (mMemberRequestInFlight))
|
||||
if ((lastGroupMemberRequestFrame == gFrameCount) || mMemberRequestInFlight)
|
||||
return;
|
||||
|
||||
LLViewerRegion* currentRegion = gAgent.getRegion();
|
||||
// Thank you FS:Ansariel!
|
||||
if(!currentRegion)
|
||||
if (!currentRegion)
|
||||
{
|
||||
LL_WARNS("GrpMgr") << "Agent does not have a current region. Uh-oh!" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
// Check to make sure we have our capabilities
|
||||
if(!currentRegion->capabilitiesReceived())
|
||||
if (!currentRegion->capabilitiesReceived())
|
||||
{
|
||||
LL_WARNS("GrpMgr") << " Capabilities not received!" << LL_ENDL;
|
||||
return;
|
||||
|
|
@ -2252,9 +2257,9 @@ void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id)
|
|||
std::string cap_url = currentRegion->getCapability("GroupMemberData");
|
||||
|
||||
// Thank you FS:Ansariel!
|
||||
if(cap_url.empty())
|
||||
if (cap_url.empty())
|
||||
{
|
||||
LL_INFOS("GrpMgr") << "Region has no GroupMemberData capability. Falling back to UDP fetch." << LL_ENDL;
|
||||
LL_INFOS("GrpMgr") << "Region has no GroupMemberData capability. Falling back to UDP fetch." << LL_ENDL;
|
||||
sendGroupMembersRequest(group_id);
|
||||
return;
|
||||
}
|
||||
|
|
@ -2264,120 +2269,123 @@ void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id)
|
|||
|
||||
lastGroupMemberRequestFrame = gFrameCount;
|
||||
|
||||
LLCoros::instance().launch("LLGroupMgr::groupMembersRequestCoro",
|
||||
boost::bind(&LLGroupMgr::groupMembersRequestCoro, this, cap_url, group_id));
|
||||
mMemberRequestInFlight = true;
|
||||
|
||||
LLCoros::instance().launch("LLGroupMgr::groupMembersRequestCoro", [&]()
|
||||
{
|
||||
groupMembersRequestCoro(cap_url, group_id, page_size, page_start, sort_column);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
|
||||
void LLGroupMgr::processCapGroupMembersResponse(const LLSD& response, U32 page_size, U32 page_start, const std::string& sort_column)
|
||||
{
|
||||
LLUUID group_id = response["group_id"].asUUID();
|
||||
LL_INFOS("GrpMgr") << "group_id: '" << group_id << "', sort_column: '" << sort_column << "', page_size: " << page_size << ", page_start: " << page_start << LL_ENDL;
|
||||
|
||||
// Did we get anything in content?
|
||||
if(!content.size())
|
||||
if (!response.size())
|
||||
{
|
||||
LL_DEBUGS("GrpMgr") << "No group member data received." << LL_ENDL;
|
||||
LL_INFOS("GrpMgr") << "No group member data received." << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
LLUUID group_id = content["group_id"].asUUID();
|
||||
|
||||
LLGroupMgrGroupData* group_datap = getGroupData(group_id);
|
||||
if(!group_datap)
|
||||
if (!group_datap)
|
||||
{
|
||||
LL_WARNS("GrpMgr") << "Received incorrect, possibly stale, group or request id" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
// If we have no members, there's no reason to do anything else
|
||||
S32 num_members = content["member_count"];
|
||||
if (num_members < 1)
|
||||
{
|
||||
LL_INFOS("GrpMgr") << "Received empty group members list for group id: " << group_id.asString() << LL_ENDL;
|
||||
// Set mMemberDataComplete for correct handling of empty responses. See MAINT-5237
|
||||
group_datap->mMemberDataComplete = true;
|
||||
group_datap->mChanged = true;
|
||||
LLGroupMgr::getInstance()->notifyObservers(GC_MEMBER_DATA);
|
||||
return;
|
||||
}
|
||||
LLSD members = response["members"];
|
||||
LLSD titles = response["titles"];
|
||||
LLSD defaults = response["defaults"];
|
||||
|
||||
group_datap->mMemberCount = num_members;
|
||||
|
||||
LLSD member_list = content["members"];
|
||||
LLSD titles = content["titles"];
|
||||
LLSD defaults = content["defaults"];
|
||||
|
||||
std::string online_status;
|
||||
std::string title;
|
||||
S32 contribution;
|
||||
U64 member_powers;
|
||||
// If this is changed to a bool, make sure to change the LLGroupMemberData constructor
|
||||
bool is_owner;
|
||||
size_t members_before = group_datap->mMembers.size();
|
||||
size_t members_loaded = members.size();
|
||||
|
||||
// Compute this once, rather than every time.
|
||||
U64 default_powers = llstrtou64(defaults["default_powers"].asString().c_str(), NULL, 16);
|
||||
std::string default_title = titles.size() ? titles[0].asString() : LLStringUtil::null;
|
||||
U64 default_powers = llstrtou64(defaults["default_powers"].asString().c_str(), NULL, 16);
|
||||
|
||||
LLSD::map_const_iterator member_iter_start = member_list.beginMap();
|
||||
LLSD::map_const_iterator member_iter_end = member_list.endMap();
|
||||
for( ; member_iter_start != member_iter_end; ++member_iter_start)
|
||||
auto members_end = members.endMap();
|
||||
for (auto it = members.beginMap(); it != members_end; ++it)
|
||||
{
|
||||
// Reset defaults
|
||||
online_status = "unknown";
|
||||
title = titles[0].asString();
|
||||
contribution = 0;
|
||||
member_powers = default_powers;
|
||||
is_owner = false;
|
||||
std::string online_status = "unknown";
|
||||
std::string title = default_title;
|
||||
U64 member_powers = default_powers;
|
||||
S32 donated_square_meters = 0;
|
||||
bool is_owner = false;
|
||||
|
||||
const LLUUID member_id(member_iter_start->first);
|
||||
LLSD member_info = member_iter_start->second;
|
||||
const LLUUID member_id(it->first);
|
||||
LLSD member_info = it->second;
|
||||
|
||||
if(member_info.has("last_login"))
|
||||
if (member_info.has("last_login"))
|
||||
{
|
||||
online_status = member_info["last_login"].asString();
|
||||
if(online_status == "Online")
|
||||
online_status = LLTrans::getString("group_member_status_online");
|
||||
else
|
||||
formatDateString(online_status);
|
||||
}
|
||||
|
||||
if(member_info.has("title"))
|
||||
title = titles[member_info["title"].asInteger()].asString();
|
||||
|
||||
if(member_info.has("powers"))
|
||||
member_powers = llstrtou64(member_info["powers"].asString().c_str(), NULL, 16);
|
||||
|
||||
if(member_info.has("donated_square_meters"))
|
||||
contribution = member_info["donated_square_meters"];
|
||||
|
||||
if(member_info.has("owner"))
|
||||
is_owner = true;
|
||||
|
||||
LLGroupMemberData* data = new LLGroupMemberData(member_id,
|
||||
contribution,
|
||||
member_powers,
|
||||
title,
|
||||
online_status,
|
||||
is_owner);
|
||||
|
||||
LLGroupMemberData* member_old = group_datap->mMembers[member_id];
|
||||
if (member_old && group_datap->mRoleMemberDataComplete)
|
||||
{
|
||||
LLGroupMemberData::role_list_t::iterator rit = member_old->roleBegin();
|
||||
LLGroupMemberData::role_list_t::iterator end = member_old->roleEnd();
|
||||
|
||||
for ( ; rit != end; ++rit)
|
||||
if (online_status == "Online")
|
||||
{
|
||||
data->addRole((*rit).first,(*rit).second);
|
||||
online_status = LLTrans::getString("group_member_status_online");
|
||||
}
|
||||
else
|
||||
{
|
||||
formatDateString(online_status);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if (member_info.has("title"))
|
||||
{
|
||||
group_datap->mRoleMemberDataComplete = false;
|
||||
title = titles[member_info["title"].asInteger()].asString();
|
||||
}
|
||||
|
||||
if (member_info.has("powers"))
|
||||
{
|
||||
member_powers = llstrtou64(member_info["powers"].asString().c_str(), NULL, 16);
|
||||
}
|
||||
|
||||
if (member_info.has("donated_square_meters"))
|
||||
{
|
||||
donated_square_meters = member_info["donated_square_meters"];
|
||||
}
|
||||
|
||||
if (member_info.has("owner"))
|
||||
{
|
||||
is_owner = true;
|
||||
}
|
||||
|
||||
LLGroupMemberData* data = new LLGroupMemberData(member_id,
|
||||
donated_square_meters, member_powers, title, online_status, is_owner);
|
||||
|
||||
if (group_datap->mRoleMemberDataComplete)
|
||||
{
|
||||
if (LLGroupMemberData* member_old = group_datap->mMembers[member_id])
|
||||
{
|
||||
auto role_end = member_old->roleEnd();
|
||||
for (auto role_it = member_old->roleBegin(); role_it != role_end; ++role_it)
|
||||
{
|
||||
data->addRole(role_it->first, role_it->second);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
group_datap->mRoleMemberDataComplete = false;
|
||||
}
|
||||
}
|
||||
|
||||
group_datap->mMembers[member_id] = data;
|
||||
}
|
||||
|
||||
U32 member_count = (U32)group_datap->mMembers.size();
|
||||
|
||||
group_datap->mMemberCount = (S32)member_count;
|
||||
group_datap->mMemberDataComplete = true;
|
||||
group_datap->mMemberRequestID.setNull();
|
||||
group_datap->mMemberVersion.generate();
|
||||
|
||||
LL_INFOS("GrpMgr") << "members before: " << members_before
|
||||
<< ", members loaded: " << members_loaded
|
||||
<< ", members now: " << member_count << LL_ENDL;
|
||||
|
||||
// Technically, we have this data, but to prevent completely overhauling
|
||||
// this entire system (it would be nice, but I don't have the time),
|
||||
// I'm going to be dumb and just call services I most likely don't need
|
||||
|
|
@ -2385,12 +2393,16 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
|
|||
//
|
||||
// TODO:
|
||||
// Refactor to reduce multiple calls for data we already have.
|
||||
if(group_datap->mTitles.size() < 1)
|
||||
if (group_datap->mTitles.size() < 1)
|
||||
{
|
||||
sendGroupTitlesRequest(group_id);
|
||||
}
|
||||
|
||||
if (page_size && members_loaded >= page_size && member_count > members_before)
|
||||
{
|
||||
sendCapGroupMembersRequest(group_id, page_size, member_count, sort_column);
|
||||
}
|
||||
|
||||
group_datap->mMemberDataComplete = true;
|
||||
group_datap->mMemberRequestID.setNull();
|
||||
// Make the role-member data request
|
||||
if (group_datap->mPendingRoleMemberRequest || !group_datap->mRoleMemberDataComplete)
|
||||
{
|
||||
|
|
@ -2400,10 +2412,8 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
|
|||
|
||||
group_datap->mChanged = true;
|
||||
notifyObservers(GC_MEMBER_DATA);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id)
|
||||
{
|
||||
LL_DEBUGS("GrpMgr") << "LLGroupMgr::sendGroupRoleChanges" << LL_ENDL;
|
||||
|
|
@ -2422,9 +2432,11 @@ void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id)
|
|||
void LLGroupMgr::cancelGroupRoleChanges(const LLUUID& group_id)
|
||||
{
|
||||
LL_DEBUGS("GrpMgr") << "LLGroupMgr::cancelGroupRoleChanges" << LL_ENDL;
|
||||
LLGroupMgrGroupData* group_datap = getGroupData(group_id);
|
||||
|
||||
if (group_datap) group_datap->cancelRoleChanges();
|
||||
if (LLGroupMgrGroupData* group_datap = getGroupData(group_id))
|
||||
{
|
||||
group_datap->cancelRoleChanges();
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
@ -2546,5 +2558,3 @@ void LLGroupMgr::debugClearAllGroups(void*)
|
|||
LLGroupMgr::getInstance()->clearGroups();
|
||||
LLGroupMgr::parseRoleActions("role_actions.xml");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ public:
|
|||
bool mature_publish);
|
||||
|
||||
static void sendGroupMemberJoin(const LLUUID& group_id);
|
||||
static void sendGroupMemberInvites(const LLUUID& group_id, std::map<LLUUID,LLUUID>& role_member_pairs);
|
||||
static void sendGroupMemberInvites(const LLUUID& group_id, std::map<LLUUID, LLUUID>& role_member_pairs);
|
||||
static void sendGroupMemberEjects(const LLUUID& group_id,
|
||||
uuid_vec_t& member_ids);
|
||||
|
||||
|
|
@ -423,7 +423,8 @@ public:
|
|||
const uuid_vec_t &ban_list = uuid_vec_t());
|
||||
|
||||
|
||||
void sendCapGroupMembersRequest(const LLUUID& group_id);
|
||||
void sendCapGroupMembersRequest(const LLUUID& group_id,
|
||||
U32 page_size = 0, U32 page_start = 0, const std::string& sort_column = LLStringUtil::null);
|
||||
|
||||
void cancelGroupRoleChanges(const LLUUID& group_id);
|
||||
|
||||
|
|
@ -446,16 +447,15 @@ public:
|
|||
void clearGroupData(const LLUUID& group_id);
|
||||
|
||||
private:
|
||||
void groupMembersRequestCoro(std::string url, LLUUID groupId);
|
||||
void processCapGroupMembersRequest(const LLSD& content);
|
||||
void groupMembersRequestCoro(std::string url, LLUUID group_id, U32 page_size, U32 page_start, std::string sort_column);
|
||||
void processCapGroupMembersResponse(const LLSD& response, U32 page_size, U32 page_start, const std::string& sort_column);
|
||||
|
||||
void getGroupBanRequestCoro(std::string url, LLUUID groupId);
|
||||
void postGroupBanRequestCoro(std::string url, LLUUID groupId, U32 action, uuid_vec_t banList, bool update);
|
||||
void getGroupBanRequestCoro(std::string url, LLUUID group_id);
|
||||
void postGroupBanRequestCoro(std::string url, LLUUID group_id, U32 action, uuid_vec_t ban_list, bool update);
|
||||
|
||||
static void processGroupBanRequest(const LLSD& content);
|
||||
|
||||
void notifyObservers(LLGroupChange gc);
|
||||
void notifyObserver(const LLUUID& group_id, LLGroupChange gc);
|
||||
void addGroup(LLGroupMgrGroupData* group_datap);
|
||||
LLGroupMgrGroupData* createGroupData(const LLUUID &id);
|
||||
bool hasPendingPropertyRequest(const LLUUID& id);
|
||||
|
|
@ -475,7 +475,7 @@ private:
|
|||
typedef std::map<LLUUID,observer_set_t> observer_map_t;
|
||||
observer_map_t mParticularObservers;
|
||||
|
||||
bool mMemberRequestInFlight;
|
||||
bool mMemberRequestInFlight { false };
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -433,7 +433,8 @@ void LLHUDText::updateVisibility()
|
|||
|
||||
LLVector3 pos_agent_center = gAgent.getPosAgentFromGlobal(mPositionGlobal) - dir_from_camera;
|
||||
F32 last_distance_center = (pos_agent_center - LLViewerCamera::getInstance()->getOrigin()).magVec();
|
||||
F32 max_draw_distance = gSavedSettings.getF32("PrimTextMaxDrawDistance");
|
||||
static LLCachedControl<F32> prim_text_max_dist(gSavedSettings, "PrimTextMaxDrawDistance");
|
||||
F32 max_draw_distance = prim_text_max_dist;
|
||||
|
||||
if(max_draw_distance < 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2653,14 +2653,14 @@ void LLInventorySingleFolderPanel::clearNavigationHistory()
|
|||
mBackwardFolders.clear();
|
||||
}
|
||||
|
||||
bool LLInventorySingleFolderPanel::isBackwardAvailable()
|
||||
bool LLInventorySingleFolderPanel::isBackwardAvailable() const
|
||||
{
|
||||
return (!mBackwardFolders.empty() && (mFolderID != mBackwardFolders.back()));
|
||||
return !mBackwardFolders.empty() && (mFolderID != mBackwardFolders.back());
|
||||
}
|
||||
|
||||
bool LLInventorySingleFolderPanel::isForwardAvailable()
|
||||
bool LLInventorySingleFolderPanel::isForwardAvailable() const
|
||||
{
|
||||
return (!mForwardFolders.empty() && (mFolderID != mForwardFolders.back()));
|
||||
return !mForwardFolders.empty() && (mFolderID != mForwardFolders.back());
|
||||
}
|
||||
|
||||
boost::signals2::connection LLInventorySingleFolderPanel::setRootChangedCallback(root_changed_callback_t cb)
|
||||
|
|
@ -2725,9 +2725,14 @@ void LLInventorySingleFolderPanel::updateSingleFolderRoot()
|
|||
}
|
||||
}
|
||||
|
||||
bool LLInventorySingleFolderPanel::hasVisibleItems()
|
||||
bool LLInventorySingleFolderPanel::hasVisibleItems() const
|
||||
{
|
||||
return mFolderRoot.get()->hasVisibleChildren();
|
||||
if (const LLFolderView* root = mFolderRoot.get())
|
||||
{
|
||||
return root->hasVisibleChildren();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLInventorySingleFolderPanel::doCreate(const LLSD& userdata)
|
||||
|
|
|
|||
|
|
@ -437,10 +437,10 @@ public:
|
|||
void doToSelected(const LLSD& userdata);
|
||||
void doShare();
|
||||
|
||||
bool isBackwardAvailable();
|
||||
bool isForwardAvailable();
|
||||
bool isBackwardAvailable() const;
|
||||
bool isForwardAvailable() const;
|
||||
|
||||
bool hasVisibleItems();
|
||||
bool hasVisibleItems() const;
|
||||
|
||||
void setNavBackwardList(std::list<LLUUID> backward_list) { mBackwardFolders = backward_list; }
|
||||
void setNavForwardList(std::list<LLUUID> forward_list) { mForwardFolders = forward_list; }
|
||||
|
|
|
|||
|
|
@ -3850,7 +3850,8 @@ void LLMeshRepository::notifyLoadedMeshes()
|
|||
// ? (2 * LLAppCoreHttp::PIPELINING_DEPTH)
|
||||
// : 5);
|
||||
|
||||
//LLMeshRepoThread::sMaxConcurrentRequests = gSavedSettings.getU32("Mesh2MaxConcurrentRequests");
|
||||
//static LLCachedControl<U32> mesh2_max_req(gSavedSettings, "Mesh2MaxConcurrentRequests");
|
||||
//LLMeshRepoThread::sMaxConcurrentRequests = mesh2_max_req;
|
||||
//LLMeshRepoThread::sRequestHighWater = llclamp(scale * S32(LLMeshRepoThread::sMaxConcurrentRequests),
|
||||
// REQUEST2_HIGH_WATER_MIN,
|
||||
// REQUEST2_HIGH_WATER_MAX);
|
||||
|
|
|
|||
|
|
@ -416,7 +416,8 @@ void LLOutfitGallery::updateRowsIfNeeded()
|
|||
|
||||
bool compareGalleryItem(LLOutfitGalleryItem* item1, LLOutfitGalleryItem* item2)
|
||||
{
|
||||
if(gSavedSettings.getBOOL("OutfitGallerySortByName") ||
|
||||
static LLCachedControl<bool> outfit_gallery_sort_by_name(gSavedSettings, "OutfitGallerySortByName");
|
||||
if(outfit_gallery_sort_by_name ||
|
||||
((item1->isDefaultImage() && item2->isDefaultImage()) || (!item1->isDefaultImage() && !item2->isDefaultImage())))
|
||||
{
|
||||
std::string name1 = item1->getItemName();
|
||||
|
|
|
|||
|
|
@ -96,16 +96,21 @@ bool LLPanelBlockedList::postBuild()
|
|||
break;
|
||||
}
|
||||
|
||||
mBlockedGearBtn = getChild<LLMenuButton>("blocked_gear_btn");
|
||||
|
||||
// Use the context menu of the Block list for the Block tab gear menu.
|
||||
LLToggleableMenu* blocked_gear_menu = mBlockedList->getContextMenu();
|
||||
if (blocked_gear_menu)
|
||||
{
|
||||
getChild<LLMenuButton>("blocked_gear_btn")->setMenu(blocked_gear_menu, LLMenuButton::MP_BOTTOM_LEFT);
|
||||
mBlockedGearBtn->setMenu(blocked_gear_menu, LLMenuButton::MP_BOTTOM_LEFT);
|
||||
}
|
||||
mUnblockBtn = getChild<LLButton>("unblock_btn");
|
||||
mUnblockBtn->setCommitCallback(boost::bind(&LLPanelBlockedList::unblockItem, this));
|
||||
|
||||
getChild<LLButton>("unblock_btn")->setCommitCallback(boost::bind(&LLPanelBlockedList::unblockItem, this));
|
||||
getChild<LLFilterEditor>("blocked_filter_input")->setCommitCallback(boost::bind(&LLPanelBlockedList::onFilterEdit, this, _2));
|
||||
|
||||
mBlockLimitText = getChild<LLUICtrl>("block_limit");
|
||||
|
||||
return LLPanel::postBuild();
|
||||
}
|
||||
|
||||
|
|
@ -145,11 +150,12 @@ void LLPanelBlockedList::showPanelAndSelect(const LLUUID& idToSelect)
|
|||
void LLPanelBlockedList::updateButtons()
|
||||
{
|
||||
bool hasSelected = NULL != mBlockedList->getSelectedItem();
|
||||
getChildView("unblock_btn")->setEnabled(hasSelected);
|
||||
getChildView("blocked_gear_btn")->setEnabled(hasSelected);
|
||||
mUnblockBtn->setEnabled(hasSelected);
|
||||
mBlockedGearBtn->setEnabled(hasSelected);
|
||||
|
||||
getChild<LLUICtrl>("block_limit")->setTextArg("[COUNT]", llformat("%d", mBlockedList->getMuteListSize()));
|
||||
getChild<LLUICtrl>("block_limit")->setTextArg("[LIMIT]", llformat("%d", gSavedSettings.getS32("MuteListLimit")));
|
||||
static LLCachedControl<S32> mute_list_limit(gSavedSettings, "MuteListLimit");
|
||||
mBlockLimitText->setTextArg("[COUNT]", llformat("%d", mBlockedList->getMuteListSize()));
|
||||
mBlockLimitText->setTextArg("[LIMIT]", llformat("%d", mute_list_limit()));
|
||||
}
|
||||
|
||||
void LLPanelBlockedList::unblockItem()
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@
|
|||
|
||||
class LLAvatarName;
|
||||
class LLBlockList;
|
||||
class LLMenuButton;
|
||||
class LLButton;
|
||||
|
||||
class LLPanelBlockedList : public LLPanel
|
||||
{
|
||||
|
|
@ -80,7 +82,10 @@ private:
|
|||
static void callbackBlockByName(const std::string& text);
|
||||
|
||||
private:
|
||||
LLBlockList* mBlockedList;
|
||||
LLBlockList* mBlockedList = nullptr;
|
||||
LLUICtrl* mBlockLimitText = nullptr;
|
||||
LLMenuButton* mBlockedGearBtn = nullptr;
|
||||
LLButton* mUnblockBtn = nullptr;
|
||||
LLHandle<LLFloater> mPicker;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
#include "llfloater.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llfloatereditextdaycycle.h"
|
||||
#include "lliconctrl.h"
|
||||
#include "llmultisliderctrl.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llsettingsvo.h"
|
||||
|
|
@ -109,10 +110,7 @@ const U32 LLPanelEnvironmentInfo::DIRTY_FLAG_MASK(
|
|||
LLPanelEnvironmentInfo::DIRTY_FLAG_DAYOFFSET |
|
||||
LLPanelEnvironmentInfo::DIRTY_FLAG_ALTITUDES);
|
||||
|
||||
const U32 ALTITUDE_SLIDER_COUNT = 3;
|
||||
const F32 ALTITUDE_DEFAULT_HEIGHT_STEP = 1000;
|
||||
const U32 ALTITUDE_MARKERS_COUNT = 3;
|
||||
const U32 ALTITUDE_PREFIXERS_COUNT = 5;
|
||||
|
||||
const std::string slider_marker_base = "mark";
|
||||
|
||||
|
|
@ -167,24 +165,61 @@ LLPanelEnvironmentInfo::~LLPanelEnvironmentInfo()
|
|||
|
||||
bool LLPanelEnvironmentInfo::postBuild()
|
||||
{
|
||||
mIconGround = getChild<LLIconCtrl>(ICN_GROUND);
|
||||
mIconWater = getChild<LLIconCtrl>(ICN_WATER);
|
||||
|
||||
getChild<LLUICtrl>(BTN_USEDEFAULT)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnDefault(); });
|
||||
getChild<LLUICtrl>(BTN_SELECTINV)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnSelect(); });
|
||||
getChild<LLUICtrl>(BTN_EDIT)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnEdit(); });
|
||||
getChild<LLUICtrl>(BTN_RST_ALTITUDES)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnRstAltitudes(); });
|
||||
mPanelEnvAltitudes = getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES);
|
||||
mPanelEnvConfig = getChild<LLUICtrl>(PNL_SETTINGS);
|
||||
mPanelEnvButtons = getChild <LLUICtrl>(PNL_BUTTONS);
|
||||
mPanelEnvDisabled = getChild<LLUICtrl>(PNL_DISABLED);
|
||||
mPanelEnvRegionMsg = getChild<LLUICtrl>(PNL_REGION_MSG);
|
||||
|
||||
getChild<LLUICtrl>(SLD_DAYLENGTH)->setCommitCallback([this](LLUICtrl *, const LLSD &value) { onSldDayLengthChanged((F32)value.asReal()); });
|
||||
getChild<LLSliderCtrl>(SLD_DAYLENGTH)->setSliderMouseUpCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
|
||||
getChild<LLSliderCtrl>(SLD_DAYLENGTH)->setSliderEditorCommitCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
|
||||
getChild<LLUICtrl>(SLD_DAYOFFSET)->setCommitCallback([this](LLUICtrl *, const LLSD &value) { onSldDayOffsetChanged((F32)value.asReal()); });
|
||||
getChild<LLSliderCtrl>(SLD_DAYOFFSET)->setSliderMouseUpCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
|
||||
getChild<LLSliderCtrl>(SLD_DAYOFFSET)->setSliderEditorCommitCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
|
||||
mEnvironmentDisabledText = getChild<LLTextBox>(TXT_DISABLED);
|
||||
mLabelApparentTime = getChild<LLTextBox>(LBL_TIMEOFDAY);
|
||||
|
||||
getChild<LLMultiSliderCtrl>(SLD_ALTITUDES)->setCommitCallback([this](LLUICtrl *cntrl, const LLSD &value) { onAltSliderCallback(cntrl, value); });
|
||||
getChild<LLMultiSliderCtrl>(SLD_ALTITUDES)->setSliderMouseUpCallback([this](LLUICtrl *, const LLSD &) { onAltSliderMouseUp(); });
|
||||
mBtnUseDefault = getChild<LLButton>(BTN_USEDEFAULT);
|
||||
mBtnUseDefault->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnDefault(); });
|
||||
|
||||
mBtnSelectInv = getChild<LLButton>(BTN_SELECTINV);
|
||||
mBtnSelectInv->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnSelect(); });
|
||||
|
||||
mBtnEdit = getChild<LLButton>(BTN_EDIT);
|
||||
mBtnEdit->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnEdit(); });
|
||||
|
||||
mBtnResetAltitudes = getChild<LLButton>(BTN_RST_ALTITUDES);
|
||||
mBtnResetAltitudes->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnRstAltitudes(); });
|
||||
|
||||
mCheckAllowOverride = getChild<LLCheckBoxCtrl>(CHK_ALLOWOVERRIDE);
|
||||
|
||||
mSliderDayLength = getChild<LLSliderCtrl>(SLD_DAYLENGTH);
|
||||
mSliderDayLength->setCommitCallback([this](LLUICtrl *, const LLSD &value) { onSldDayLengthChanged((F32)value.asReal()); });
|
||||
mSliderDayLength->setSliderMouseUpCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
|
||||
mSliderDayLength->setSliderEditorCommitCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
|
||||
|
||||
mSliderDayOffset = getChild<LLSliderCtrl>(SLD_DAYOFFSET);
|
||||
mSliderDayOffset->setCommitCallback([this](LLUICtrl *, const LLSD &value) { onSldDayOffsetChanged((F32)value.asReal()); });
|
||||
mSliderDayOffset->setSliderMouseUpCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
|
||||
mSliderDayOffset->setSliderEditorCommitCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
|
||||
|
||||
mMultiSliderAltitudes = getChild<LLMultiSliderCtrl>(SLD_ALTITUDES);
|
||||
mMultiSliderAltitudes->setCommitCallback([this](LLUICtrl *cntrl, const LLSD &value) { onAltSliderCallback(cntrl, value); });
|
||||
mMultiSliderAltitudes->setSliderMouseUpCallback([this](LLUICtrl *, const LLSD &) { onAltSliderMouseUp(); });
|
||||
|
||||
mChangeMonitor = LLEnvironment::instance().setEnvironmentChanged([this](LLEnvironment::EnvSelection_t env, S32 version) { onEnvironmentChanged(env, version); });
|
||||
|
||||
for (U32 idx = 0; idx < ALTITUDE_MARKERS_COUNT; idx++)
|
||||
{
|
||||
mAltitudeMarkers[idx] = findChild<LLUICtrl>(slider_marker_base + llformat("%u", idx));
|
||||
}
|
||||
|
||||
for (U32 idx = 0; idx < ALTITUDE_PREFIXERS_COUNT; idx++)
|
||||
{
|
||||
mAltitudeDropTarget[idx] = findChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[idx]);
|
||||
mAltitudeLabels[idx] = findChild<LLTextBox>("txt_" + alt_prefixes[idx]);
|
||||
mAltitudeEditor[idx] = findChild<LLLineEditor>("edt_invname_" + alt_prefixes[idx]);
|
||||
mAltitudePanels[idx] = findChild<LLView>("pnl_" + alt_prefixes[idx]);
|
||||
}
|
||||
|
||||
for (U32 idx = 0; idx < ALTITUDE_SLIDER_COUNT; idx++)
|
||||
{
|
||||
LLSettingsDropTarget* drop_target = findChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[idx]);
|
||||
|
|
@ -192,11 +227,12 @@ bool LLPanelEnvironmentInfo::postBuild()
|
|||
{
|
||||
drop_target->setPanel(this, alt_sliders[idx]);
|
||||
}
|
||||
|
||||
// set initial values to prevent [ALTITUDE] from displaying
|
||||
updateAltLabel(alt_prefixes[idx], idx + 2, (F32)(idx * 1000));
|
||||
updateAltLabel(idx, idx + 2, (F32)(idx * 1000));
|
||||
}
|
||||
getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[3])->setPanel(this, alt_prefixes[3]);
|
||||
getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[4])->setPanel(this, alt_prefixes[4]);
|
||||
mAltitudeDropTarget[3]->setPanel(this, alt_prefixes[3]);
|
||||
mAltitudeDropTarget[4]->setPanel(this, alt_prefixes[4]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -262,8 +298,8 @@ void LLPanelEnvironmentInfo::refresh()
|
|||
if (dayoffset.value() > 12.0f)
|
||||
dayoffset -= F32Hours(24.0);
|
||||
|
||||
getChild<LLSliderCtrl>(SLD_DAYLENGTH)->setValue(daylength.value());
|
||||
getChild<LLSliderCtrl>(SLD_DAYOFFSET)->setValue(dayoffset.value());
|
||||
mSliderDayLength->setValue(daylength.value());
|
||||
mSliderDayOffset->setValue(dayoffset.value());
|
||||
|
||||
udpateApparentTimeOfDay();
|
||||
|
||||
|
|
@ -273,59 +309,58 @@ void LLPanelEnvironmentInfo::refresh()
|
|||
|
||||
if (altitudes.size() > 0)
|
||||
{
|
||||
LLMultiSliderCtrl *sld = getChild<LLMultiSliderCtrl>(SLD_ALTITUDES);
|
||||
sld->clear();
|
||||
mMultiSliderAltitudes->clear();
|
||||
|
||||
for (S32 idx = 0; idx < ALTITUDE_SLIDER_COUNT; ++idx)
|
||||
{
|
||||
// make sure values are in range, server is supposed to validate them,
|
||||
// but issues happen, try to fix values in such case
|
||||
F32 altitude = llclamp(altitudes[idx + 1], sld->getMinValue(), sld->getMaxValue());
|
||||
bool res = sld->addSlider(altitude, alt_sliders[idx]);
|
||||
F32 altitude = llclamp(altitudes[idx + 1], mMultiSliderAltitudes->getMinValue(), mMultiSliderAltitudes->getMaxValue());
|
||||
bool res = mMultiSliderAltitudes->addSlider(altitude, alt_sliders[idx]);
|
||||
if (!res)
|
||||
{
|
||||
LL_WARNS_ONCE("ENVPANEL") << "Failed to validate altitude from server for parcel id" << getParcelId() << LL_ENDL;
|
||||
// Find a spot to insert altitude.
|
||||
// Assuming everything alright with slider, we should find new place in 11 steps top (step 25m, no overlap 100m)
|
||||
F32 alt_step = (altitude > (sld->getMaxValue() / 2)) ? -sld->getIncrement() : sld->getIncrement();
|
||||
F32 alt_step = (altitude > (mMultiSliderAltitudes->getMaxValue() / 2)) ? -mMultiSliderAltitudes->getIncrement() : mMultiSliderAltitudes->getIncrement();
|
||||
for (U32 i = 0; i < 30; i++)
|
||||
{
|
||||
altitude += alt_step;
|
||||
if (altitude > sld->getMaxValue())
|
||||
if (altitude > mMultiSliderAltitudes->getMaxValue())
|
||||
{
|
||||
altitude = sld->getMinValue();
|
||||
altitude = mMultiSliderAltitudes->getMinValue();
|
||||
}
|
||||
else if (altitude < sld->getMinValue())
|
||||
else if (altitude < mMultiSliderAltitudes->getMinValue())
|
||||
{
|
||||
altitude = sld->getMaxValue();
|
||||
altitude = mMultiSliderAltitudes->getMaxValue();
|
||||
}
|
||||
res = sld->addSlider(altitude, alt_sliders[idx]);
|
||||
res = mMultiSliderAltitudes->addSlider(altitude, alt_sliders[idx]);
|
||||
if (res) break;
|
||||
}
|
||||
}
|
||||
if (res)
|
||||
{
|
||||
// slider has some auto correction that might have kicked in
|
||||
altitude = sld->getSliderValue(alt_sliders[idx]);
|
||||
altitude = mMultiSliderAltitudes->getSliderValue(alt_sliders[idx]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Something is very very wrong
|
||||
LL_WARNS_ONCE("ENVPANEL") << "Failed to set up altitudes for parcel id " << getParcelId() << LL_ENDL;
|
||||
}
|
||||
updateAltLabel(alt_prefixes[idx], idx + 2, altitude);
|
||||
updateAltLabel(idx, idx + 2, altitude);
|
||||
mAltitudes[alt_sliders[idx]] = AltitudeData(idx + 2, idx, altitude);
|
||||
}
|
||||
if (sld->getCurNumSliders() != ALTITUDE_SLIDER_COUNT)
|
||||
if (mMultiSliderAltitudes->getCurNumSliders() != ALTITUDE_SLIDER_COUNT)
|
||||
{
|
||||
LL_WARNS("ENVPANEL") << "Failed to add altitude sliders!" << LL_ENDL;
|
||||
}
|
||||
readjustAltLabels();
|
||||
sld->resetCurSlider();
|
||||
mMultiSliderAltitudes->resetCurSlider();
|
||||
}
|
||||
|
||||
updateAltLabel(alt_prefixes[3], 1, 0); // ground
|
||||
updateAltLabel(alt_prefixes[4], 0, 0); // water
|
||||
updateAltLabel(3, 1, 0); // ground
|
||||
updateAltLabel(4, 0, 0); // water
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -455,77 +490,75 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled)
|
|||
if (mNoEnvironment || (!LLEnvironment::instance().isExtendedEnvironmentEnabled() && !isRegion()))
|
||||
{
|
||||
is_unavailable = true;
|
||||
getChild<LLTextBox>(TXT_DISABLED)->setText(getString(STR_LEGACY));
|
||||
mEnvironmentDisabledText->setText(getString(STR_LEGACY));
|
||||
}
|
||||
else if (mNoSelection)
|
||||
{
|
||||
is_unavailable = true;
|
||||
getChild<LLTextBox>(TXT_DISABLED)->setText(getString(STR_NO_PARCEL));
|
||||
mEnvironmentDisabledText->setText(getString(STR_NO_PARCEL));
|
||||
}
|
||||
else if (mCrossRegion)
|
||||
{
|
||||
is_unavailable = true;
|
||||
getChild<LLTextBox>(TXT_DISABLED)->setText(getString(STR_CROSS_REGION));
|
||||
mEnvironmentDisabledText->setText(getString(STR_CROSS_REGION));
|
||||
}
|
||||
else if (!isRegion() && !mAllowOverride)
|
||||
{
|
||||
is_unavailable = true;
|
||||
getChild<LLTextBox>(TXT_DISABLED)->setText(getString(STR_DISALLOWED));
|
||||
mEnvironmentDisabledText->setText(getString(STR_DISALLOWED));
|
||||
}
|
||||
else if (!is_bigenough)
|
||||
{
|
||||
is_unavailable = true;
|
||||
getChild<LLTextBox>(TXT_DISABLED)->setText(getString(STR_TOO_SMALL));
|
||||
mEnvironmentDisabledText->setText(getString(STR_TOO_SMALL));
|
||||
}
|
||||
|
||||
if (is_unavailable)
|
||||
{
|
||||
getChild<LLUICtrl>(PNL_SETTINGS)->setVisible(false);
|
||||
getChild<LLUICtrl>(PNL_BUTTONS)->setVisible(false);
|
||||
getChild<LLUICtrl>(PNL_DISABLED)->setVisible(true);
|
||||
getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(false);
|
||||
getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(false);
|
||||
mPanelEnvConfig->setVisible(false);
|
||||
mPanelEnvButtons->setVisible(false);
|
||||
mPanelEnvDisabled->setVisible(true);
|
||||
mPanelEnvAltitudes->setVisible(false);
|
||||
mPanelEnvRegionMsg->setVisible(false);
|
||||
updateEditFloater(mCurrentEnvironment, false);
|
||||
|
||||
return false;
|
||||
}
|
||||
getChild<LLUICtrl>(PNL_SETTINGS)->setVisible(true);
|
||||
getChild<LLUICtrl>(PNL_BUTTONS)->setVisible(true);
|
||||
getChild<LLUICtrl>(PNL_DISABLED)->setVisible(false);
|
||||
getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(isRegion());
|
||||
mPanelEnvConfig->setVisible(true);
|
||||
mPanelEnvButtons->setVisible(true);
|
||||
mPanelEnvDisabled->setVisible(false);
|
||||
mPanelEnvRegionMsg->setVisible(isRegion());
|
||||
|
||||
getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(LLEnvironment::instance().isExtendedEnvironmentEnabled());
|
||||
getChild<LLUICtrl>(BTN_RST_ALTITUDES)->setVisible(isRegion());
|
||||
mPanelEnvAltitudes->setVisible(LLEnvironment::instance().isExtendedEnvironmentEnabled());
|
||||
mBtnResetAltitudes->setVisible(isRegion());
|
||||
|
||||
bool can_enable = enabled && !is_legacy && mCurrentEnvironment && (mCurEnvVersion != INVALID_PARCEL_ENVIRONMENT_VERSION);
|
||||
getChild<LLUICtrl>(BTN_SELECTINV)->setEnabled(can_enable);
|
||||
getChild<LLUICtrl>(BTN_USEDEFAULT)->setEnabled(can_enable);
|
||||
getChild<LLUICtrl>(BTN_EDIT)->setEnabled(can_enable);
|
||||
getChild<LLUICtrl>(SLD_DAYLENGTH)->setEnabled(can_enable);
|
||||
getChild<LLUICtrl>(SLD_DAYOFFSET)->setEnabled(can_enable);
|
||||
getChild<LLUICtrl>(SLD_ALTITUDES)->setEnabled(can_enable && isRegion());
|
||||
getChild<LLUICtrl>(ICN_GROUND)->setColor((can_enable && isRegion()) ? LLColor4::white : LLColor4::grey % 0.8f);
|
||||
getChild<LLUICtrl>(ICN_WATER)->setColor((can_enable && isRegion()) ? LLColor4::white : LLColor4::grey % 0.8f);
|
||||
getChild<LLUICtrl>(BTN_RST_ALTITUDES)->setEnabled(can_enable && isRegion());
|
||||
getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setEnabled(can_enable);
|
||||
getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setEnabled(can_enable && isRegion());
|
||||
mBtnSelectInv->setEnabled(can_enable);
|
||||
mBtnUseDefault->setEnabled(can_enable);
|
||||
mBtnEdit->setEnabled(can_enable);
|
||||
mSliderDayLength->setEnabled(can_enable);
|
||||
mSliderDayOffset->setEnabled(can_enable);
|
||||
mMultiSliderAltitudes->setEnabled(can_enable && isRegion());
|
||||
mIconGround->setColor((can_enable && isRegion()) ? LLColor4::white : LLColor4::grey % 0.8f);
|
||||
mIconWater->setColor((can_enable && isRegion()) ? LLColor4::white : LLColor4::grey % 0.8f);
|
||||
mBtnResetAltitudes->setEnabled(can_enable && isRegion());
|
||||
mPanelEnvAltitudes->setEnabled(can_enable);
|
||||
mCheckAllowOverride->setEnabled(can_enable && isRegion());
|
||||
|
||||
for (U32 idx = 0; idx < ALTITUDE_MARKERS_COUNT; idx++)
|
||||
{
|
||||
LLUICtrl* marker = findChild<LLUICtrl>(slider_marker_base + llformat("%u", idx));
|
||||
if (marker)
|
||||
if (mAltitudeMarkers[idx])
|
||||
{
|
||||
static LLColor4 marker_color(0.75f, 0.75f, 0.75f, 1.f);
|
||||
marker->setColor((can_enable && isRegion()) ? marker_color : marker_color % 0.3f);
|
||||
mAltitudeMarkers[idx]->setColor((can_enable && isRegion()) ? marker_color : marker_color % 0.3f);
|
||||
}
|
||||
}
|
||||
|
||||
for (U32 idx = 0; idx < ALTITUDE_PREFIXERS_COUNT; idx++)
|
||||
{
|
||||
LLSettingsDropTarget* drop_target = findChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[idx]);
|
||||
if (drop_target)
|
||||
if (mAltitudeDropTarget[idx])
|
||||
{
|
||||
drop_target->setDndEnabled(can_enable);
|
||||
mAltitudeDropTarget[idx]->setDndEnabled(can_enable);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -542,24 +575,18 @@ void LLPanelEnvironmentInfo::clearDirtyFlag(U32 flag)
|
|||
mDirtyFlag &= ~flag;
|
||||
}
|
||||
|
||||
void LLPanelEnvironmentInfo::updateAltLabel(const std::string &alt_prefix, U32 sky_index, F32 alt_value)
|
||||
void LLPanelEnvironmentInfo::updateAltLabel(U32 alt_index, U32 sky_index, F32 alt_value)
|
||||
{
|
||||
LLMultiSliderCtrl *sld = findChild<LLMultiSliderCtrl>(SLD_ALTITUDES);
|
||||
if (!sld)
|
||||
{
|
||||
LL_WARNS() << "Failed to find slider " << SLD_ALTITUDES << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
LLRect sld_rect = sld->getRect();
|
||||
LLRect sld_rect = mMultiSliderAltitudes->getRect();
|
||||
S32 sld_range = sld_rect.getHeight();
|
||||
S32 sld_bottom = sld_rect.mBottom;
|
||||
S32 sld_offset = sld_rect.getWidth(); // Roughly identical to thumb's width in slider.
|
||||
S32 pos = (S32)((sld_range - sld_offset) * ((alt_value - 100) / (4000 - 100)));
|
||||
|
||||
// get related views
|
||||
LLTextBox* text = findChild<LLTextBox>("txt_" + alt_prefix);
|
||||
LLLineEditor *field = findChild<LLLineEditor>("edt_invname_" + alt_prefix);
|
||||
LLView *alt_panel = findChild<LLView>("pnl_" + alt_prefix);
|
||||
LLTextBox* text = mAltitudeLabels[alt_index];
|
||||
LLLineEditor* field = mAltitudeEditor[alt_index];
|
||||
LLView* alt_panel = mAltitudePanels[alt_index];
|
||||
|
||||
if (text && (sky_index > 1))
|
||||
{
|
||||
|
|
@ -596,19 +623,16 @@ void LLPanelEnvironmentInfo::readjustAltLabels()
|
|||
// Very simple "adjust after the fact" method
|
||||
// Note: labels can be in any order
|
||||
|
||||
LLMultiSliderCtrl *sld = findChild<LLMultiSliderCtrl>(SLD_ALTITUDES);
|
||||
if (!sld) return;
|
||||
|
||||
LLView* view_midle = NULL;
|
||||
U32 midle_ind = 0;
|
||||
S32 shift_up = 0;
|
||||
S32 shift_down = 0;
|
||||
LLRect sld_rect = sld->getRect();
|
||||
LLRect sld_rect = mMultiSliderAltitudes->getRect();
|
||||
|
||||
// Find the middle one
|
||||
for (U32 i = 0; i < ALTITUDE_SLIDER_COUNT; i++)
|
||||
{
|
||||
LLView* cmp_view = findChild<LLView>(alt_panels[i], true);
|
||||
LLView* cmp_view = mAltitudePanels[i];
|
||||
if (!cmp_view) return;
|
||||
LLRect cmp_rect = cmp_view->getRect();
|
||||
S32 pos = 0;
|
||||
|
|
@ -619,7 +643,7 @@ void LLPanelEnvironmentInfo::readjustAltLabels()
|
|||
{
|
||||
if (i != j)
|
||||
{
|
||||
LLView* intr_view = findChild<LLView>(alt_panels[j], true);
|
||||
LLView* intr_view = mAltitudePanels[j];
|
||||
if (!intr_view) return;
|
||||
LLRect intr_rect = intr_view->getRect();
|
||||
if (cmp_rect.mBottom >= intr_rect.mBottom)
|
||||
|
|
@ -667,7 +691,7 @@ void LLPanelEnvironmentInfo::readjustAltLabels()
|
|||
{
|
||||
if (i != midle_ind)
|
||||
{
|
||||
LLView* trn_view = findChild<LLView>(alt_panels[i], true);
|
||||
LLView* trn_view = mAltitudePanels[i];
|
||||
LLRect trn_rect = trn_view->getRect();
|
||||
|
||||
if (trn_rect.mBottom <= midle_rect.mTop && trn_rect.mBottom >= midle_rect.mBottom)
|
||||
|
|
@ -787,7 +811,7 @@ void LLPanelEnvironmentInfo::onAltSliderCallback(LLUICtrl *cntrl, const LLSD &da
|
|||
}
|
||||
iter->second.mTrackIndex = new_index;
|
||||
|
||||
updateAltLabel(alt_prefixes[iter->second.mLabelIndex], iter->second.mTrackIndex, iter->second.mAltitude);
|
||||
updateAltLabel(iter->second.mLabelIndex, iter->second.mTrackIndex, iter->second.mAltitude);
|
||||
iter++;
|
||||
}
|
||||
|
||||
|
|
@ -907,10 +931,10 @@ void LLPanelEnvironmentInfo::udpateApparentTimeOfDay()
|
|||
|
||||
if ((!mCurrentEnvironment) || (mCurrentEnvironment->mDayLength.value() < 1.0) || (mCurrentEnvironment->mDayOffset.value() < 1.0))
|
||||
{
|
||||
getChild<LLUICtrl>(LBL_TIMEOFDAY)->setVisible(false);
|
||||
mLabelApparentTime->setVisible(false);
|
||||
return;
|
||||
}
|
||||
getChild<LLUICtrl>(LBL_TIMEOFDAY)->setVisible(true);
|
||||
mLabelApparentTime->setVisible(true);
|
||||
|
||||
S32Seconds now((S32)LLDate::now().secondsSinceEpoch());
|
||||
|
||||
|
|
@ -932,10 +956,10 @@ void LLPanelEnvironmentInfo::udpateApparentTimeOfDay()
|
|||
std::string lblminute(((minutesofhour.value() < 10) ? "0" : "") + LLSD(minutesofhour.value()).asString());
|
||||
|
||||
|
||||
getChild<LLUICtrl>(LBL_TIMEOFDAY)->setTextArg("[HH]", LLSD(hourofday.value()).asString());
|
||||
getChild<LLUICtrl>(LBL_TIMEOFDAY)->setTextArg("[MM]", lblminute);
|
||||
getChild<LLUICtrl>(LBL_TIMEOFDAY)->setTextArg("[AP]", std::string(am_pm ? "PM" : "AM"));
|
||||
getChild<LLUICtrl>(LBL_TIMEOFDAY)->setTextArg("[PRC]", LLSD((S32)(100 * perc)).asString());
|
||||
mLabelApparentTime->setTextArg("[HH]", LLSD(hourofday.value()).asString());
|
||||
mLabelApparentTime->setTextArg("[MM]", lblminute);
|
||||
mLabelApparentTime->setTextArg("[AP]", std::string(am_pm ? "PM" : "AM"));
|
||||
mLabelApparentTime->setTextArg("[PRC]", LLSD((S32)(100 * perc)).asString());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#include "llestateinfomodel.h"
|
||||
|
||||
class LLViewerRegion;
|
||||
class LLIconCtrl;
|
||||
|
||||
class LLPanelEnvironmentInfo : public LLPanel
|
||||
{
|
||||
|
|
@ -63,6 +64,10 @@ public:
|
|||
protected:
|
||||
LOG_CLASS(LLPanelEnvironmentInfo);
|
||||
|
||||
static constexpr U32 ALTITUDE_SLIDER_COUNT = 3;
|
||||
static constexpr U32 ALTITUDE_MARKERS_COUNT = 3;
|
||||
static constexpr U32 ALTITUDE_PREFIXERS_COUNT = 5;
|
||||
|
||||
static const std::string BTN_SELECTINV;
|
||||
static const std::string BTN_EDIT;
|
||||
static const std::string BTN_USEDEFAULT;
|
||||
|
|
@ -108,7 +113,7 @@ protected:
|
|||
bool getIsDirty() const { return (mDirtyFlag != 0); }
|
||||
bool getIsDirtyFlag(U32 flag) const { return ((mDirtyFlag & flag) != 0); }
|
||||
U32 getDirtyFlag() const { return mDirtyFlag; }
|
||||
void updateAltLabel(const std::string &alt_prefix, U32 sky_index, F32 alt_value);
|
||||
void updateAltLabel(U32 alt_index, U32 sky_index, F32 alt_value);
|
||||
void readjustAltLabels();
|
||||
|
||||
void onSldDayLengthChanged(F32 value);
|
||||
|
|
@ -168,6 +173,37 @@ protected:
|
|||
altitudes_data_t mAltitudes;
|
||||
S32 mCurEnvVersion; // used to filter duplicate callbacks/refreshes
|
||||
|
||||
LLUICtrl* mPanelEnvAltitudes = nullptr;
|
||||
LLUICtrl* mPanelEnvConfig = nullptr;
|
||||
LLUICtrl* mPanelEnvButtons = nullptr;
|
||||
LLUICtrl* mPanelEnvDisabled = nullptr;
|
||||
LLUICtrl* mPanelEnvRegionMsg = nullptr;
|
||||
|
||||
LLButton* mBtnSelectInv = nullptr;
|
||||
LLButton* mBtnEdit = nullptr;
|
||||
LLButton* mBtnUseDefault = nullptr;
|
||||
LLButton* mBtnResetAltitudes = nullptr;
|
||||
|
||||
LLMultiSliderCtrl* mMultiSliderAltitudes = nullptr;
|
||||
|
||||
LLSliderCtrl* mSliderDayLength = nullptr;
|
||||
LLSliderCtrl* mSliderDayOffset = nullptr;
|
||||
|
||||
LLTextBox* mEnvironmentDisabledText = nullptr;
|
||||
LLTextBox* mLabelApparentTime = nullptr;
|
||||
|
||||
LLCheckBoxCtrl* mCheckAllowOverride = nullptr;
|
||||
|
||||
LLIconCtrl* mIconGround = nullptr;
|
||||
LLIconCtrl* mIconWater = nullptr;
|
||||
|
||||
std::array<LLUICtrl*, ALTITUDE_MARKERS_COUNT> mAltitudeMarkers;
|
||||
std::array<LLSettingsDropTarget*, ALTITUDE_PREFIXERS_COUNT> mAltitudeDropTarget;
|
||||
|
||||
std::array<LLTextBox*, ALTITUDE_PREFIXERS_COUNT> mAltitudeLabels;
|
||||
std::array<LLLineEditor*, ALTITUDE_PREFIXERS_COUNT> mAltitudeEditor;
|
||||
std::array<LLView*, ALTITUDE_PREFIXERS_COUNT> mAltitudePanels;
|
||||
|
||||
protected:
|
||||
typedef boost::signals2::connection connection_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ void LLPanelGroup::onOpen(const LLSD& key)
|
|||
}
|
||||
else
|
||||
{
|
||||
getChild<LLAccordionCtrl>("groups_accordion")->expandDefaultTab();
|
||||
mGroupsAccordion->expandDefaultTab();
|
||||
}
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
|
@ -213,28 +213,32 @@ void LLPanelGroup::onOpen(const LLSD& key)
|
|||
|
||||
bool LLPanelGroup::postBuild()
|
||||
{
|
||||
mGroupsAccordion = findChild<LLAccordionCtrl>("groups_accordion");
|
||||
|
||||
mDefaultNeedsApplyMesg = getString("default_needs_apply_text");
|
||||
mWantApplyMesg = getString("want_apply_text");
|
||||
|
||||
LLButton* button;
|
||||
mButtonApply = getChild<LLButton>("btn_apply");
|
||||
mButtonApply->setClickedCallback(onBtnApply, this);
|
||||
mButtonApply->setVisible(true);
|
||||
mButtonApply->setEnabled(false);
|
||||
|
||||
button = getChild<LLButton>("btn_apply");
|
||||
button->setClickedCallback(onBtnApply, this);
|
||||
button->setVisible(true);
|
||||
button->setEnabled(false);
|
||||
mButtonCall = getChild<LLButton>("btn_call");
|
||||
mButtonCall->setClickedCallback(onBtnGroupCallClicked, this);
|
||||
|
||||
button = getChild<LLButton>("btn_call");
|
||||
button->setClickedCallback(onBtnGroupCallClicked, this);
|
||||
mButtonChat = getChild<LLButton>("btn_chat");
|
||||
mButtonChat->setClickedCallback(onBtnGroupChatClicked, this);
|
||||
|
||||
button = getChild<LLButton>("btn_chat");
|
||||
button->setClickedCallback(onBtnGroupChatClicked, this);
|
||||
mButtonRefresh = getChild<LLButton>("btn_refresh");
|
||||
mButtonRefresh->setClickedCallback(onBtnRefresh, this);
|
||||
|
||||
button = getChild<LLButton>("btn_refresh");
|
||||
button->setClickedCallback(onBtnRefresh, this);
|
||||
mButtonCancel = getChild<LLButton>("btn_cancel");
|
||||
|
||||
mGroupNameCtrl = getChild<LLUICtrl>("group_name");
|
||||
|
||||
// <FS:PP> FIRE-33939: Activate button
|
||||
button = getChild<LLButton>("btn_activate");
|
||||
button->setClickedCallback(onBtnActivateClicked, this);
|
||||
mButtonActivate = getChild<LLButton>("btn_activate");
|
||||
mButtonActivate->setClickedCallback(onBtnActivateClicked, this);
|
||||
// <FS:PP>
|
||||
|
||||
childSetCommitCallback("back",boost::bind(&LLPanelGroup::onBackBtnClick,this),NULL);
|
||||
|
|
@ -254,7 +258,7 @@ bool LLPanelGroup::postBuild()
|
|||
if(panel_general)
|
||||
{
|
||||
panel_general->setupCtrls(this);
|
||||
button = panel_general->getChild<LLButton>("btn_join");
|
||||
LLButton* button = panel_general->getChild<LLButton>("btn_join");
|
||||
button->setVisible(false);
|
||||
button->setEnabled(true);
|
||||
|
||||
|
|
@ -267,14 +271,13 @@ bool LLPanelGroup::postBuild()
|
|||
LLVoiceClient::getInstance()->addObserver(this);
|
||||
|
||||
// <FS:Ansariel> TabContainer switch
|
||||
mIsUsingTabContainer = (findChild<LLTabContainer>("groups_accordion") != NULL);
|
||||
mIsUsingTabContainer = (findChild<LLTabContainer>("groups_accordion") != nullptr);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLPanelGroup::reposButton(const std::string& name)
|
||||
void LLPanelGroup::reposButton(LLButton* button)
|
||||
{
|
||||
LLButton* button = findChild<LLButton>(name);
|
||||
if(!button)
|
||||
return;
|
||||
LLRect btn_rect = button->getRect();
|
||||
|
|
@ -284,24 +287,21 @@ void LLPanelGroup::reposButton(const std::string& name)
|
|||
|
||||
void LLPanelGroup::reposButtons()
|
||||
{
|
||||
LLButton* button_refresh = findChild<LLButton>("btn_refresh");
|
||||
LLButton* button_cancel = findChild<LLButton>("btn_cancel");
|
||||
|
||||
if(button_refresh && button_cancel && button_refresh->getVisible() && button_cancel->getVisible())
|
||||
if(mButtonRefresh && mButtonCancel && mButtonRefresh->getVisible() && mButtonCancel->getVisible())
|
||||
{
|
||||
LLRect btn_refresh_rect = button_refresh->getRect();
|
||||
LLRect btn_cancel_rect = button_cancel->getRect();
|
||||
LLRect btn_refresh_rect = mButtonRefresh->getRect();
|
||||
LLRect btn_cancel_rect = mButtonCancel->getRect();
|
||||
btn_refresh_rect.setLeftTopAndSize( btn_cancel_rect.mLeft + btn_cancel_rect.getWidth() + 2,
|
||||
btn_refresh_rect.getHeight() + 2, btn_refresh_rect.getWidth(), btn_refresh_rect.getHeight());
|
||||
button_refresh->setRect(btn_refresh_rect);
|
||||
mButtonRefresh->setRect(btn_refresh_rect);
|
||||
}
|
||||
|
||||
reposButton("btn_apply");
|
||||
reposButton("btn_refresh");
|
||||
reposButton("btn_cancel");
|
||||
reposButton("btn_chat");
|
||||
reposButton("btn_call");
|
||||
reposButton("btn_activate"); // <FS:PP> FIRE-33939: Activate button
|
||||
reposButton(mButtonApply);
|
||||
reposButton(mButtonRefresh);
|
||||
reposButton(mButtonCancel);
|
||||
reposButton(mButtonChat);
|
||||
reposButton(mButtonCall);
|
||||
reposButton(mButtonActivate); // <FS:PP> FIRE-33939: Activate button
|
||||
}
|
||||
|
||||
void LLPanelGroup::reshape(S32 width, S32 height, bool called_from_parent )
|
||||
|
|
@ -370,9 +370,9 @@ void LLPanelGroup::onBtnJoin()
|
|||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS() << "joining group: " << mID << LL_ENDL;
|
||||
LLGroupActions::join(mID);
|
||||
}
|
||||
LL_DEBUGS() << "joining group: " << mID << LL_ENDL;
|
||||
LLGroupActions::join(mID);
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelGroup::changed(LLGroupChange gc)
|
||||
|
|
@ -390,7 +390,7 @@ void LLPanelGroup::onChange(EStatusType status, const LLSD& channelInfo, bool pr
|
|||
return;
|
||||
}
|
||||
|
||||
childSetEnabled("btn_call", LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking());
|
||||
mButtonCall->setEnabled(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking());
|
||||
}
|
||||
|
||||
void LLPanelGroup::notifyObservers()
|
||||
|
|
@ -405,8 +405,8 @@ void LLPanelGroup::update(LLGroupChange gc)
|
|||
{
|
||||
// <FS:Ansariel> Standalone group floaters
|
||||
//std::string group_name = gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName;
|
||||
//childSetValue("group_name", group_name);
|
||||
//childSetToolTip("group_name",group_name);
|
||||
//mGroupNameCtrl->setValue(group_name);
|
||||
//mGroupNameCtrl->setValue(group_name);
|
||||
if (gSavedSettings.getBOOL("FSUseStandaloneGroupFloater"))
|
||||
{
|
||||
FSFloaterGroup* parent = dynamic_cast<FSFloaterGroup*>(getParent());
|
||||
|
|
@ -418,9 +418,8 @@ void LLPanelGroup::update(LLGroupChange gc)
|
|||
else
|
||||
{
|
||||
std::string group_name = gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName;
|
||||
LLUICtrl* group_name_ctrl = getChild<LLUICtrl>("group_name");
|
||||
group_name_ctrl->setValue(group_name);
|
||||
group_name_ctrl->setToolTip(group_name);
|
||||
mGroupNameCtrl->setValue(group_name);
|
||||
mGroupNameCtrl->setValue(group_name);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
|
|
@ -474,60 +473,48 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
|
|||
if(gdatap)
|
||||
{
|
||||
std::string group_name = gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName;
|
||||
LLUICtrl* group_name_ctrl = getChild<LLUICtrl>("group_name");
|
||||
group_name_ctrl->setValue(group_name);
|
||||
group_name_ctrl->setToolTip(group_name);
|
||||
mGroupNameCtrl->setValue(group_name);
|
||||
mGroupNameCtrl->setToolTip(group_name);
|
||||
}
|
||||
|
||||
LLButton* button_apply = findChild<LLButton>("btn_apply");
|
||||
LLButton* button_refresh = findChild<LLButton>("btn_refresh");
|
||||
|
||||
LLButton* button_cancel = findChild<LLButton>("btn_cancel");
|
||||
LLButton* button_call = findChild<LLButton>("btn_call");
|
||||
LLButton* button_chat = findChild<LLButton>("btn_chat");
|
||||
|
||||
|
||||
bool is_null_group_id = group_id == LLUUID::null;
|
||||
if(button_apply)
|
||||
button_apply->setVisible(!is_null_group_id);
|
||||
if(button_refresh)
|
||||
button_refresh->setVisible(!is_null_group_id);
|
||||
if(mButtonApply)
|
||||
mButtonApply->setVisible(!is_null_group_id);
|
||||
if(mButtonRefresh)
|
||||
mButtonRefresh->setVisible(!is_null_group_id);
|
||||
|
||||
if(button_cancel)
|
||||
button_cancel->setVisible(!is_null_group_id);
|
||||
if(mButtonCancel)
|
||||
mButtonCancel->setVisible(!is_null_group_id);
|
||||
|
||||
if(button_call)
|
||||
button_call->setVisible(!is_null_group_id);
|
||||
if(button_chat)
|
||||
button_chat->setVisible(!is_null_group_id);
|
||||
if(mButtonCall)
|
||||
mButtonCall->setVisible(!is_null_group_id);
|
||||
if(mButtonChat)
|
||||
mButtonChat->setVisible(!is_null_group_id);
|
||||
|
||||
// <FS:PP> FIRE-33939: Activate button
|
||||
LLButton* button_activate = findChild<LLButton>("btn_activate");
|
||||
if (button_activate)
|
||||
if (mButtonActivate)
|
||||
{
|
||||
button_activate->setVisible(!is_null_group_id);
|
||||
button_activate->setEnabled(group_id != gAgent.getGroupID());
|
||||
mButtonActivate->setVisible(!is_null_group_id);
|
||||
mButtonActivate->setEnabled(group_id != gAgent.getGroupID());
|
||||
}
|
||||
// </FS:PP>
|
||||
|
||||
getChild<LLUICtrl>("prepend_founded_by")->setVisible(!is_null_group_id);
|
||||
|
||||
// <FS:Ansariel> TabContainer switch
|
||||
//LLAccordionCtrl* tab_ctrl = getChild<LLAccordionCtrl>("groups_accordion");
|
||||
//tab_ctrl->reset();
|
||||
//mGroupsAccordion->reset();
|
||||
|
||||
//LLAccordionCtrlTab* tab_general = getChild<LLAccordionCtrlTab>("group_general_tab");
|
||||
//LLAccordionCtrlTab* tab_roles = getChild<LLAccordionCtrlTab>("group_roles_tab");
|
||||
//LLAccordionCtrlTab* tab_notices = getChild<LLAccordionCtrlTab>("group_notices_tab");
|
||||
//LLAccordionCtrlTab* tab_land = getChild<LLAccordionCtrlTab>("group_land_tab");
|
||||
//LLAccordionCtrlTab* tab_experiences = getChild<LLAccordionCtrlTab>("group_experiences_tab");
|
||||
LLAccordionCtrl* tab_ctrl = NULL;
|
||||
LLAccordionCtrlTab* tab_general = NULL;
|
||||
LLAccordionCtrlTab* tab_roles = NULL;
|
||||
LLAccordionCtrlTab* tab_notices = NULL;
|
||||
LLAccordionCtrlTab* tab_land = NULL;
|
||||
LLAccordionCtrlTab* tab_experiences = NULL;
|
||||
LLTabContainer* tabcont_ctrl = NULL;
|
||||
LLAccordionCtrlTab* tab_general = nullptr;
|
||||
LLAccordionCtrlTab* tab_roles = nullptr;
|
||||
LLAccordionCtrlTab* tab_notices = nullptr;
|
||||
LLAccordionCtrlTab* tab_land = nullptr;
|
||||
LLAccordionCtrlTab* tab_experiences = nullptr;
|
||||
LLTabContainer* tabcont_ctrl = nullptr;
|
||||
|
||||
if (mIsUsingTabContainer)
|
||||
{
|
||||
|
|
@ -535,8 +522,7 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
|
|||
}
|
||||
else
|
||||
{
|
||||
tab_ctrl = getChild<LLAccordionCtrl>("groups_accordion");
|
||||
tab_ctrl->reset();
|
||||
mGroupsAccordion->reset();
|
||||
|
||||
tab_general = getChild<LLAccordionCtrlTab>("group_general_tab");
|
||||
tab_roles = getChild<LLAccordionCtrlTab>("group_roles_tab");
|
||||
|
|
@ -583,16 +569,16 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
|
|||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
getChild<LLUICtrl>("group_name")->setVisible(false);
|
||||
mGroupNameCtrl->setVisible(false);
|
||||
getChild<LLUICtrl>("group_name_editor")->setVisible(true);
|
||||
|
||||
if(button_call)
|
||||
button_call->setVisible(false);
|
||||
if(button_chat)
|
||||
button_chat->setVisible(false);
|
||||
if(mButtonCall)
|
||||
mButtonCall->setVisible(false);
|
||||
if(mButtonChat)
|
||||
mButtonChat->setVisible(false);
|
||||
// <FS:PP> FIRE-33939: Activate button
|
||||
if(button_activate)
|
||||
button_activate->setVisible(false);
|
||||
if(mButtonActivate)
|
||||
mButtonActivate->setVisible(false);
|
||||
// </FS:PP>
|
||||
}
|
||||
else
|
||||
|
|
@ -644,26 +630,25 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
|
|||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
getChild<LLUICtrl>("group_name")->setVisible(true);
|
||||
mGroupNameCtrl->setVisible(true);
|
||||
getChild<LLUICtrl>("group_name_editor")->setVisible(false);
|
||||
|
||||
if(button_apply)
|
||||
button_apply->setVisible(is_member);
|
||||
if(button_call)
|
||||
button_call->setVisible(is_member);
|
||||
if(button_chat)
|
||||
button_chat->setVisible(is_member);
|
||||
if(mButtonApply)
|
||||
mButtonApply->setVisible(is_member);
|
||||
if(mButtonCall)
|
||||
mButtonCall->setVisible(is_member);
|
||||
if(mButtonChat)
|
||||
mButtonChat->setVisible(is_member);
|
||||
// <FS:PP> FIRE-33939: Activate button
|
||||
if(button_activate)
|
||||
button_activate->setVisible(is_member);
|
||||
if(mButtonActivate)
|
||||
mButtonActivate->setVisible(is_member);
|
||||
// </FS:PP>
|
||||
}
|
||||
|
||||
// <FS:Ansariel> TabContainer switch
|
||||
//tab_ctrl->arrange();
|
||||
if (!mIsUsingTabContainer)
|
||||
{
|
||||
tab_ctrl->arrange();
|
||||
mGroupsAccordion->arrange();
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
|
|
@ -740,28 +725,24 @@ void LLPanelGroup::draw()
|
|||
if (mRefreshTimer.hasExpired())
|
||||
{
|
||||
mRefreshTimer.stop();
|
||||
childEnable("btn_refresh");
|
||||
childEnable("groups_accordion");
|
||||
if(mButtonRefresh) mButtonRefresh->setEnabled(true);
|
||||
if(mGroupsAccordion) mGroupsAccordion->setEnabled(true);
|
||||
// <FS:PP> FIRE-33939: Activate button
|
||||
if (gAgent.getGroupID() != getID())
|
||||
if (gAgent.getGroupID() != getID() && mButtonActivate)
|
||||
{
|
||||
childEnable("btn_activate");
|
||||
mButtonActivate->setEnabled(true);
|
||||
}
|
||||
// </FS:PP>
|
||||
}
|
||||
|
||||
LLButton* button_apply = findChild<LLButton>("btn_apply");
|
||||
|
||||
if(button_apply && button_apply->getVisible())
|
||||
if(mButtonApply && mButtonApply->getVisible())
|
||||
{
|
||||
bool enable = false;
|
||||
std::string mesg;
|
||||
for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it)
|
||||
enable = enable || (*it)->needsApply(mesg);
|
||||
|
||||
// <FS:Ansariel> Don't parse the XML... again...
|
||||
//childSetEnabled("btn_apply", enable);
|
||||
button_apply->setEnabled(enable);
|
||||
mButtonApply->setEnabled(enable);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -777,9 +758,9 @@ void LLPanelGroup::refreshData()
|
|||
setGroupID(getID());
|
||||
|
||||
// 5 second timeout
|
||||
childDisable("btn_refresh");
|
||||
childDisable("groups_accordion");
|
||||
childDisable("btn_activate"); // <FS:PP> FIRE-33939: Activate button
|
||||
if(mButtonRefresh) mButtonRefresh->setEnabled(false);
|
||||
if(mGroupsAccordion) mGroupsAccordion->setEnabled(false);
|
||||
if(mButtonActivate) mButtonActivate->setEnabled(false); // <FS:PP> FIRE-33939: Activate button
|
||||
|
||||
mRefreshTimer.start();
|
||||
mRefreshTimer.setTimerExpirySec(5);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ const F32 UPDATE_MEMBERS_SECONDS_PER_FRAME = 0.005f; // 5ms
|
|||
// Forward declares
|
||||
class LLPanelGroupTab;
|
||||
class LLTabContainer;
|
||||
class LLAccordionCtrl;
|
||||
class LLAgent;
|
||||
|
||||
|
||||
|
|
@ -105,7 +106,7 @@ protected:
|
|||
static void onBtnGroupChatClicked(void*);
|
||||
static void onBtnActivateClicked(void*); // <FS:PP> FIRE-33939: Activate button
|
||||
|
||||
void reposButton(const std::string& name);
|
||||
void reposButton(LLButton* button);
|
||||
void reposButtons();
|
||||
|
||||
|
||||
|
|
@ -121,7 +122,16 @@ protected:
|
|||
|
||||
std::vector<LLPanelGroupTab* > mTabs;
|
||||
|
||||
LLButton* mButtonJoin;
|
||||
LLAccordionCtrl* mGroupsAccordion = nullptr;
|
||||
|
||||
LLUICtrl* mGroupNameCtrl = nullptr;
|
||||
LLButton* mButtonJoin = nullptr;
|
||||
LLButton* mButtonApply = nullptr;
|
||||
LLButton* mButtonCall = nullptr;
|
||||
LLButton* mButtonChat = nullptr;
|
||||
LLButton* mButtonRefresh = nullptr;
|
||||
LLButton* mButtonCancel = nullptr;
|
||||
LLButton* mButtonActivate = nullptr; // <FS:PP> FIRE-33939: Activate button
|
||||
LLUICtrl* mJoinText;
|
||||
|
||||
// <FS:Ansariel> TabContainer switch
|
||||
|
|
|
|||
|
|
@ -68,33 +68,36 @@ LLPanelGroupBulkImpl::LLPanelGroupBulkImpl(const LLUUID& group_id) :
|
|||
mAlreadyInGroup(),
|
||||
mConfirmedOwnerInvite(false),
|
||||
mListFullNotificationSent(false)
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
LLPanelGroupBulkImpl::~LLPanelGroupBulkImpl()
|
||||
{
|
||||
if(mAvatarNameCacheConnection.connected())
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelGroupBulkImpl::callbackClickAdd(void* userdata)
|
||||
{
|
||||
LLPanelGroupBulk* panelp = (LLPanelGroupBulk*)userdata;
|
||||
|
||||
if(panelp)
|
||||
if (LLPanelGroupBulk* panelp = (LLPanelGroupBulk*)userdata)
|
||||
{
|
||||
//Right now this is hard coded with some knowledge that it is part
|
||||
//of a floater since the avatar picker needs to be added as a dependent
|
||||
//floater to the parent floater.
|
||||
//Soon the avatar picker will be embedded into this panel
|
||||
//instead of being it's own separate floater. But that is next week.
|
||||
//This will do for now. -jwolk May 10, 2006
|
||||
// Right now this is hard coded with some knowledge that it is part
|
||||
// of a floater since the avatar picker needs to be added as a dependent
|
||||
// floater to the parent floater.
|
||||
// Soon the avatar picker will be embedded into this panel
|
||||
// instead of being it's own separate floater. But that is next week.
|
||||
// This will do for now. -jwolk May 10, 2006
|
||||
LLView* button = panelp->findChild<LLButton>("add_button");
|
||||
LLFloater* root_floater = gFloaterView->getParentFloater(panelp);
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
|
||||
boost::bind(callbackAddUsers, _1, panelp->mImplementation), true, false, false, root_floater->getName(), button);
|
||||
if(picker)
|
||||
[&](const uuid_vec_t& agent_ids, const std::vector<LLAvatarName>&)
|
||||
{
|
||||
panelp->mImplementation->addUsers(agent_ids);
|
||||
}, true, false, false, root_floater->getName(), button);
|
||||
if (picker)
|
||||
{
|
||||
root_floater->addDependentFloater(picker);
|
||||
LLGroupMgr::getInstance()->sendCapGroupMembersRequest(panelp->mImplementation->mGroupID);
|
||||
|
|
@ -102,70 +105,72 @@ void LLPanelGroupBulkImpl::callbackClickAdd(void* userdata)
|
|||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelGroupBulkImpl::callbackClickRemove(void* userdata)
|
||||
{
|
||||
LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*)userdata;
|
||||
if (selfp)
|
||||
if (LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*)userdata)
|
||||
{
|
||||
selfp->handleRemove();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelGroupBulkImpl::callbackClickCancel(void* userdata)
|
||||
{
|
||||
LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*)userdata;
|
||||
if(selfp)
|
||||
if (LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*)userdata)
|
||||
{
|
||||
(*(selfp->mCloseCallback))(selfp->mCloseCallbackUserData);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelGroupBulkImpl::callbackSelect(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*)userdata;
|
||||
if (selfp)
|
||||
if (LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*)userdata)
|
||||
{
|
||||
selfp->handleSelection();
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelGroupBulkImpl::callbackAddUsers(const uuid_vec_t& agent_ids, void* user_data)
|
||||
void LLPanelGroupBulkImpl::addUsers(const uuid_vec_t& agent_ids)
|
||||
{
|
||||
std::vector<std::string> names;
|
||||
for (S32 i = 0; i < (S32)agent_ids.size(); i++)
|
||||
for (const LLUUID& agent_id : agent_ids)
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(agent_ids[i], &av_name))
|
||||
if (LLAvatarNameCache::get(agent_id, &av_name))
|
||||
{
|
||||
onAvatarNameCache(agent_ids[i], av_name, user_data);
|
||||
onAvatarNameCache(agent_id, av_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*) user_data;
|
||||
if (selfp)
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
if (selfp->mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
selfp->mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
// *TODO : Add a callback per avatar name being fetched.
|
||||
selfp->mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_ids[i],boost::bind(onAvatarNameCache, _1, _2, user_data));
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
// *TODO : Add a callback per avatar name being fetched.
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_id,
|
||||
[&](const LLUUID& agent_id, const LLAvatarName& av_name)
|
||||
{
|
||||
onAvatarNameCache(agent_id, av_name);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelGroupBulkImpl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, void* user_data)
|
||||
void LLPanelGroupBulkImpl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
|
||||
{
|
||||
LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*) user_data;
|
||||
|
||||
if (selfp)
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
if (selfp->mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
selfp->mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
std::vector<std::string> names;
|
||||
uuid_vec_t agent_ids;
|
||||
agent_ids.push_back(agent_id);
|
||||
names.push_back(av_name.getCompleteName());
|
||||
|
||||
selfp->addUsers(names, agent_ids);
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
|
||||
std::vector<std::string> names;
|
||||
uuid_vec_t agent_ids;
|
||||
agent_ids.push_back(agent_id);
|
||||
names.push_back(av_name.getCompleteName());
|
||||
|
||||
addUsers(names, agent_ids);
|
||||
}
|
||||
|
||||
void LLPanelGroupBulkImpl::handleRemove()
|
||||
|
|
@ -174,17 +179,15 @@ void LLPanelGroupBulkImpl::handleRemove()
|
|||
if (selection.empty())
|
||||
return;
|
||||
|
||||
std::vector<LLScrollListItem*>::iterator iter;
|
||||
for(iter = selection.begin(); iter != selection.end(); ++iter)
|
||||
for (const LLScrollListItem* item : selection)
|
||||
{
|
||||
mInviteeIDs.erase((*iter)->getUUID());
|
||||
mInviteeIDs.erase(item->getUUID());
|
||||
}
|
||||
|
||||
mBulkAgentList->deleteSelectedItems();
|
||||
mRemoveButton->setEnabled(false);
|
||||
|
||||
if( mOKButton && mOKButton->getEnabled() &&
|
||||
mBulkAgentList->isEmpty())
|
||||
if (mOKButton && mOKButton->getEnabled() && mBulkAgentList->isEmpty())
|
||||
{
|
||||
mOKButton->setEnabled(false);
|
||||
}
|
||||
|
|
@ -192,24 +195,17 @@ void LLPanelGroupBulkImpl::handleRemove()
|
|||
|
||||
void LLPanelGroupBulkImpl::handleSelection()
|
||||
{
|
||||
std::vector<LLScrollListItem*> selection = mBulkAgentList->getAllSelected();
|
||||
if (selection.empty())
|
||||
mRemoveButton->setEnabled(false);
|
||||
else
|
||||
mRemoveButton->setEnabled(true);
|
||||
mRemoveButton->setEnabled(mBulkAgentList->getFirstSelected());
|
||||
}
|
||||
|
||||
void LLPanelGroupBulkImpl::addUsers(const std::vector<std::string>& names, const uuid_vec_t& agent_ids)
|
||||
{
|
||||
std::string name;
|
||||
LLUUID id;
|
||||
|
||||
if(mListFullNotificationSent)
|
||||
if (mListFullNotificationSent)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( !mListFullNotificationSent &&
|
||||
if (!mListFullNotificationSent &&
|
||||
(names.size() + mInviteeIDs.size() > MAX_GROUP_INVITES))
|
||||
{
|
||||
mListFullNotificationSent = true;
|
||||
|
|
@ -223,32 +219,35 @@ void LLPanelGroupBulkImpl::addUsers(const std::vector<std::string>& names, const
|
|||
|
||||
for (S32 i = 0; i < (S32)names.size(); ++i)
|
||||
{
|
||||
name = names[i];
|
||||
id = agent_ids[i];
|
||||
const LLUUID& id = agent_ids[i];
|
||||
|
||||
if(mInviteeIDs.find(id) != mInviteeIDs.end())
|
||||
if (mInviteeIDs.find(id) != mInviteeIDs.end())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//add the name to the names list
|
||||
// Add the name to the name list
|
||||
LLSD row;
|
||||
row["id"] = id;
|
||||
row["columns"][0]["value"] = name;
|
||||
row["columns"][0]["value"] = names[i];
|
||||
|
||||
mBulkAgentList->addElement(row);
|
||||
mInviteeIDs.insert(id);
|
||||
|
||||
// We've successfully added someone to the list.
|
||||
if(mOKButton && !mOKButton->getEnabled())
|
||||
if (mOKButton && !mOKButton->getEnabled())
|
||||
{
|
||||
mOKButton->setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelGroupBulkImpl::setGroupName(std::string name)
|
||||
{
|
||||
if(mGroupName)
|
||||
if (mGroupName)
|
||||
{
|
||||
mGroupName->setText(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -258,7 +257,8 @@ LLPanelGroupBulk::LLPanelGroupBulk(const LLUUID& group_id) :
|
|||
mPendingGroupPropertiesUpdate(false),
|
||||
mPendingRoleDataUpdate(false),
|
||||
mPendingMemberDataUpdate(false)
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
LLPanelGroupBulk::~LLPanelGroupBulk()
|
||||
{
|
||||
|
|
@ -269,11 +269,15 @@ void LLPanelGroupBulk::clear()
|
|||
{
|
||||
mImplementation->mInviteeIDs.clear();
|
||||
|
||||
if(mImplementation->mBulkAgentList)
|
||||
if (mImplementation->mBulkAgentList)
|
||||
{
|
||||
mImplementation->mBulkAgentList->deleteAllItems();
|
||||
}
|
||||
|
||||
if(mImplementation->mOKButton)
|
||||
if (mImplementation->mOKButton)
|
||||
{
|
||||
mImplementation->mOKButton->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelGroupBulk::update()
|
||||
|
|
@ -292,12 +296,14 @@ void LLPanelGroupBulk::updateGroupName()
|
|||
{
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mImplementation->mGroupID);
|
||||
|
||||
if( gdatap &&
|
||||
if (gdatap &&
|
||||
gdatap->isGroupPropertiesDataComplete())
|
||||
{
|
||||
// Only do work if the current group name differs
|
||||
if(mImplementation->mGroupName->getText().compare(gdatap->mName) != 0)
|
||||
if (mImplementation->mGroupName->getText().compare(gdatap->mName) != 0)
|
||||
{
|
||||
mImplementation->setGroupName(gdatap->mName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -308,43 +314,34 @@ void LLPanelGroupBulk::updateGroupName()
|
|||
void LLPanelGroupBulk::updateGroupData()
|
||||
{
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mImplementation->mGroupID);
|
||||
if(gdatap && gdatap->isGroupPropertiesDataComplete())
|
||||
if (gdatap && gdatap->isGroupPropertiesDataComplete())
|
||||
{
|
||||
mPendingGroupPropertiesUpdate = false;
|
||||
}
|
||||
else
|
||||
else if (!mPendingGroupPropertiesUpdate)
|
||||
{
|
||||
if(!mPendingGroupPropertiesUpdate)
|
||||
{
|
||||
mPendingGroupPropertiesUpdate = true;
|
||||
LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mImplementation->mGroupID);
|
||||
}
|
||||
mPendingGroupPropertiesUpdate = true;
|
||||
LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mImplementation->mGroupID);
|
||||
}
|
||||
|
||||
if(gdatap && gdatap->isRoleDataComplete())
|
||||
if (gdatap && gdatap->isRoleDataComplete())
|
||||
{
|
||||
mPendingRoleDataUpdate = false;
|
||||
}
|
||||
else
|
||||
else if (!mPendingRoleDataUpdate)
|
||||
{
|
||||
if(!mPendingRoleDataUpdate)
|
||||
{
|
||||
mPendingRoleDataUpdate = true;
|
||||
LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mImplementation->mGroupID);
|
||||
}
|
||||
mPendingRoleDataUpdate = true;
|
||||
LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mImplementation->mGroupID);
|
||||
}
|
||||
|
||||
if(gdatap && gdatap->isMemberDataComplete())
|
||||
if (gdatap && gdatap->isMemberDataComplete())
|
||||
{
|
||||
mPendingMemberDataUpdate = false;
|
||||
}
|
||||
else
|
||||
else if (!mPendingMemberDataUpdate)
|
||||
{
|
||||
if(!mPendingMemberDataUpdate)
|
||||
{
|
||||
mPendingMemberDataUpdate = true;
|
||||
LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mImplementation->mGroupID);
|
||||
}
|
||||
mPendingMemberDataUpdate = true;
|
||||
LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mImplementation->mGroupID);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -367,21 +364,20 @@ void LLPanelGroupBulk::setCloseCallback(void (*close_callback)(void*), void* dat
|
|||
void LLPanelGroupBulk::addUsers(uuid_vec_t& agent_ids)
|
||||
{
|
||||
std::vector<std::string> names;
|
||||
for (S32 i = 0; i < (S32)agent_ids.size(); i++)
|
||||
for (size_t i = 0; i < agent_ids.size(); i++)
|
||||
{
|
||||
std::string fullname;
|
||||
LLUUID agent_id = agent_ids[i];
|
||||
const LLUUID& agent_id = agent_ids[i];
|
||||
LLViewerObject* dest = gObjectList.findObject(agent_id);
|
||||
if(dest && dest->isAvatar())
|
||||
if (dest && dest->isAvatar())
|
||||
{
|
||||
LLNameValue* nvfirst = dest->getNVPair("FirstName");
|
||||
LLNameValue* nvlast = dest->getNVPair("LastName");
|
||||
if(nvfirst && nvlast)
|
||||
if (nvfirst && nvlast)
|
||||
{
|
||||
fullname = LLCacheName::buildFullName(
|
||||
nvfirst->getString(), nvlast->getString());
|
||||
|
||||
fullname = LLCacheName::buildFullName(nvfirst->getString(), nvlast->getString());
|
||||
}
|
||||
|
||||
if (!fullname.empty())
|
||||
{
|
||||
names.push_back(fullname);
|
||||
|
|
@ -394,20 +390,25 @@ void LLPanelGroupBulk::addUsers(uuid_vec_t& agent_ids)
|
|||
}
|
||||
else
|
||||
{
|
||||
//looks like user try to invite offline friend
|
||||
//for offline avatar_id gObjectList.findObject() will return null
|
||||
//so we need to do this additional search in avatar tracker, see EXT-4732
|
||||
// Looks like the user tries to invite a friend which is offline.
|
||||
// For offline avatar_id gObjectList.findObject() will return null
|
||||
// so we need to do this additional search in avatar tracker, see EXT-4732
|
||||
if (LLAvatarTracker::instance().isBuddy(agent_id))
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
if (!LLAvatarNameCache::get(agent_id, &av_name))
|
||||
{
|
||||
// actually it should happen, just in case
|
||||
LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(&LLPanelGroupBulk::addUserCallback, this, _1, _2));
|
||||
// Actually it shouldn't happen, just in case
|
||||
LLAvatarNameCache::get(LLUUID(agent_id),
|
||||
[&](const LLUUID& agent_id, const LLAvatarName& av_name)
|
||||
{
|
||||
addUserCallback(agent_id, av_name);
|
||||
});
|
||||
// for this special case!
|
||||
//when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence
|
||||
// when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence
|
||||
// removed id will be added in callback
|
||||
agent_ids.erase(agent_ids.begin() + i);
|
||||
i--; // To process the next agent_id with the same index
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,9 +50,10 @@ public:
|
|||
static void callbackClickCancel(void* userdata);
|
||||
|
||||
static void callbackSelect(LLUICtrl* ctrl, void* userdata);
|
||||
static void callbackAddUsers(const uuid_vec_t& agent_ids, void* user_data);
|
||||
|
||||
static void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, void* user_data);
|
||||
void addUsers(const uuid_vec_t& agent_ids);
|
||||
|
||||
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
|
||||
|
||||
void handleRemove();
|
||||
void handleSelection();
|
||||
|
|
|
|||
|
|
@ -833,25 +833,18 @@ bool LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
|
|||
{
|
||||
LLPanelGroupSubTab::postBuildSubTab(root);
|
||||
|
||||
// Upcast parent so we can ask it for sibling controls.
|
||||
LLPanelGroupRoles* parent = (LLPanelGroupRoles*) root;
|
||||
|
||||
// Look recursively from the parent to find all our widgets.
|
||||
bool recurse = true;
|
||||
mHeader = parent->findChild<LLPanel>("members_header", recurse);
|
||||
mFooter = parent->findChild<LLPanel>("members_footer", recurse);
|
||||
mHeader = root->findChild<LLPanel>("members_header");
|
||||
mFooter = root->findChild<LLPanel>("members_footer");
|
||||
|
||||
mMembersList = parent->getChild<LLNameListCtrl>("member_list", recurse);
|
||||
mAssignedRolesList = parent->getChild<LLScrollListCtrl>("member_assigned_roles", recurse);
|
||||
mAllowedActionsList = parent->getChild<LLScrollListCtrl>("member_allowed_actions", recurse);
|
||||
mMembersList = root->getChild<LLNameListCtrl>("member_list");
|
||||
mAssignedRolesList = root->getChild<LLScrollListCtrl>("member_assigned_roles");
|
||||
mAllowedActionsList = root->getChild<LLScrollListCtrl>("member_allowed_actions");
|
||||
// <FS:Ansariel> Undo changes from MAINT-2929
|
||||
//mActionDescription = parent->getChild<LLTextEditor>("member_action_description", recurse);
|
||||
|
||||
//if (!mMembersList || !mAssignedRolesList || !mAllowedActionsList || !mActionDescription) return false;
|
||||
//mActionDescription = root->getChild<LLTextEditor>("member_action_description");
|
||||
|
||||
//mAllowedActionsList->setCommitOnSelectionChange(true);
|
||||
//mAllowedActionsList->setCommitCallback(boost::bind(&LLPanelGroupMembersSubTab::updateActionDescription, this));
|
||||
if (!mMembersList || !mAssignedRolesList || !mAllowedActionsList) return false;
|
||||
// </FS:Ansariel>
|
||||
|
||||
// We want to be notified whenever a member is selected.
|
||||
|
|
@ -871,19 +864,16 @@ bool LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
|
|||
row["columns"][2]["column"] = "online";
|
||||
mMembersList->addElement(row);
|
||||
std::string order_by = gSavedSettings.getString("GroupMembersSortOrder");
|
||||
if(!order_by.empty())
|
||||
if (!order_by.empty())
|
||||
{
|
||||
mMembersList->sortByColumn(order_by, true);
|
||||
}
|
||||
|
||||
LLButton* button = parent->getChild<LLButton>("member_invite", recurse);
|
||||
if ( button )
|
||||
{
|
||||
button->setClickedCallback(onInviteMember, this);
|
||||
button->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_INVITE));
|
||||
}
|
||||
LLButton* button = root->getChild<LLButton>("member_invite");
|
||||
button->setClickedCallback(onInviteMember, this);
|
||||
button->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_INVITE));
|
||||
// [FS:CR] FIRE-12276
|
||||
button = parent->getChild<LLButton>("export_list", recurse);
|
||||
button = root->findChild<LLButton>("export_list");
|
||||
if (button)
|
||||
{
|
||||
button->setClickedCallback(boost::bind(&LLPanelGroupMembersSubTab::onExportMembersToXML, this));
|
||||
|
|
@ -891,19 +881,13 @@ bool LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
|
|||
}
|
||||
// [/FS:CR]
|
||||
|
||||
mEjectBtn = parent->getChild<LLButton>("member_eject", recurse);
|
||||
if ( mEjectBtn )
|
||||
{
|
||||
mEjectBtn->setClickedCallback(onEjectMembers, this);
|
||||
mEjectBtn->setEnabled(false);
|
||||
}
|
||||
mEjectBtn = root->getChild<LLButton>("member_eject");
|
||||
mEjectBtn->setClickedCallback(onEjectMembers, this);
|
||||
mEjectBtn->setEnabled(false);
|
||||
|
||||
mBanBtn = parent->getChild<LLButton>("member_ban", recurse);
|
||||
if(mBanBtn)
|
||||
{
|
||||
mBanBtn->setClickedCallback(onBanMember, this);
|
||||
mBanBtn->setEnabled(false);
|
||||
}
|
||||
mBanBtn = root->getChild<LLButton>("member_ban");
|
||||
mBanBtn->setClickedCallback(onBanMember, this);
|
||||
mBanBtn->setEnabled(false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1409,11 +1393,13 @@ void LLPanelGroupMembersSubTab::activate()
|
|||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
|
||||
LLPanelGroupSubTab::activate();
|
||||
if(!mActivated)
|
||||
if (!mActivated)
|
||||
{
|
||||
if (!gdatap || !gdatap->isMemberDataComplete())
|
||||
{
|
||||
LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID);
|
||||
const U32 page_size = 50;
|
||||
std::string sort_column = mMembersList->getSortColumnName();
|
||||
LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID, page_size, 0, sort_column);
|
||||
}
|
||||
|
||||
if (!gdatap || !gdatap->isRoleMemberDataComplete())
|
||||
|
|
@ -1521,8 +1507,7 @@ bool LLPanelGroupMembersSubTab::addOwnerCB(const LLSD& notification, const LLSD&
|
|||
|
||||
void LLPanelGroupMembersSubTab::applyMemberChanges()
|
||||
{
|
||||
//sucks to do a find again here, but it is in constant time, so, could
|
||||
//be worse
|
||||
// Sucks to do a find again here, but it is in constant time, so, could be worse
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
if (!gdatap)
|
||||
{
|
||||
|
|
@ -1530,8 +1515,7 @@ void LLPanelGroupMembersSubTab::applyMemberChanges()
|
|||
return;
|
||||
}
|
||||
|
||||
//we need to add all of the changed roles data
|
||||
//for each member whose role changed
|
||||
// We need to add all of the changed roles data for each member whose role changed
|
||||
for (member_role_changes_map_t::iterator member = mMemberRoleChangeData.begin();
|
||||
member != mMemberRoleChangeData.end(); ++member)
|
||||
{
|
||||
|
|
@ -1549,7 +1533,7 @@ void LLPanelGroupMembersSubTab::applyMemberChanges()
|
|||
mMemberRoleChangeData.clear();
|
||||
|
||||
LLGroupMgr::getInstance()->sendGroupRoleMemberChanges(mGroupID);
|
||||
//force a UI update
|
||||
// Force an UI update
|
||||
handleMemberSelect();
|
||||
|
||||
mChanged = false;
|
||||
|
|
@ -1560,32 +1544,23 @@ void LLPanelGroupMembersSubTab::applyMemberChanges()
|
|||
bool LLPanelGroupMembersSubTab::matchesSearchFilter(const std::string& fullname)
|
||||
{
|
||||
// If the search filter is empty, everything passes.
|
||||
if (mSearchFilter.empty()) return true;
|
||||
if (mSearchFilter.empty())
|
||||
return true;
|
||||
|
||||
// Create a full name, and compare it to the search filter.
|
||||
std::string fullname_lc(fullname);
|
||||
LLStringUtil::toLower(fullname_lc);
|
||||
|
||||
std::string::size_type match = fullname_lc.find(mSearchFilter);
|
||||
|
||||
if (std::string::npos == match)
|
||||
{
|
||||
// not found
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return match != std::string::npos;
|
||||
}
|
||||
|
||||
U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& agent_id)
|
||||
{
|
||||
//we loop over all of the changes
|
||||
//if we are adding a role, then we simply add the role's powers
|
||||
//if we are removing a role, we store that role id away
|
||||
//and then we have to build the powers up bases on the roles the agent
|
||||
//is in
|
||||
// We loop over all of the changes
|
||||
// If we are adding a role, then we simply add the role's powers
|
||||
// If we are removing a role, we store that role id away
|
||||
// and then we have to build the powers up bases on the roles the agent is in
|
||||
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
if (!gdatap)
|
||||
|
|
@ -1595,7 +1570,7 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
|
|||
}
|
||||
|
||||
LLGroupMgrGroupData::member_list_t::iterator iter = gdatap->mMembers.find(agent_id);
|
||||
if ( iter == gdatap->mMembers.end() )
|
||||
if (iter == gdatap->mMembers.end())
|
||||
{
|
||||
LL_WARNS() << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- No member data for member with UUID " << agent_id << LL_ENDL;
|
||||
return GP_NO_POWERS;
|
||||
|
|
@ -1608,37 +1583,36 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
|
|||
return GP_NO_POWERS;
|
||||
}
|
||||
|
||||
//see if there are unsaved role changes for this agent
|
||||
// See if there are unsaved role changes for this agent
|
||||
role_change_data_map_t* role_change_datap = NULL;
|
||||
member_role_changes_map_t::iterator member = mMemberRoleChangeData.find(agent_id);
|
||||
if ( member != mMemberRoleChangeData.end() )
|
||||
if (member != mMemberRoleChangeData.end())
|
||||
{
|
||||
//this member has unsaved role changes
|
||||
//so grab them
|
||||
role_change_datap = (*member).second;
|
||||
// This member has unsaved role changes
|
||||
// so grab them
|
||||
role_change_datap = member->second;
|
||||
}
|
||||
|
||||
U64 new_powers = GP_NO_POWERS;
|
||||
|
||||
if ( role_change_datap )
|
||||
if (role_change_datap)
|
||||
{
|
||||
uuid_vec_t roles_to_be_removed;
|
||||
|
||||
for (role_change_data_map_t::iterator role = role_change_datap->begin();
|
||||
role != role_change_datap->end(); ++ role)
|
||||
for (const auto& role : *role_change_datap)
|
||||
{
|
||||
if ( role->second == RMC_ADD )
|
||||
if (role.second == RMC_ADD)
|
||||
{
|
||||
new_powers |= gdatap->getRolePowers(role->first);
|
||||
new_powers |= gdatap->getRolePowers(role.first);
|
||||
}
|
||||
else
|
||||
{
|
||||
roles_to_be_removed.push_back(role->first);
|
||||
roles_to_be_removed.push_back(role.first);
|
||||
}
|
||||
}
|
||||
|
||||
//loop over the member's current roles, summing up
|
||||
//the powers (not including the role we are removing)
|
||||
// loop over the member's current roles, summing up
|
||||
// the powers (not including the role we are removing)
|
||||
for (LLGroupMemberData::role_list_t::iterator current_role = member_data->roleBegin();
|
||||
current_role != member_data->roleEnd(); ++current_role)
|
||||
{
|
||||
|
|
@ -1699,9 +1673,10 @@ void LLPanelGroupMembersSubTab::draw()
|
|||
|
||||
void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
|
||||
{
|
||||
if (mGroupID.isNull()) return;
|
||||
if (mGroupID.isNull())
|
||||
return;
|
||||
|
||||
if ( GC_TITLES == gc || GC_PROPERTIES == gc )
|
||||
if (GC_TITLES == gc || GC_PROPERTIES == gc)
|
||||
{
|
||||
// Don't care about title or general group properties updates.
|
||||
return;
|
||||
|
|
@ -1715,9 +1690,9 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
|
|||
}
|
||||
|
||||
// Wait for both all data to be retrieved before displaying anything.
|
||||
if ( gdatap->isMemberDataComplete()
|
||||
&& gdatap->isRoleDataComplete()
|
||||
&& gdatap->isRoleMemberDataComplete())
|
||||
if (gdatap->isMemberDataComplete() &&
|
||||
gdatap->isRoleDataComplete() &&
|
||||
gdatap->isRoleMemberDataComplete())
|
||||
{
|
||||
mMemberProgress = gdatap->mMembers.begin();
|
||||
mPendingMemberUpdate = true;
|
||||
|
|
@ -1728,18 +1703,18 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
|
|||
// Build a string with info on retrieval progress.
|
||||
std::ostringstream retrieved;
|
||||
|
||||
if ( gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete() && !gdatap->mMembers.size() )
|
||||
if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete() && !gdatap->mMembers.size())
|
||||
{
|
||||
// MAINT-5237
|
||||
retrieved << "Member list not available.";
|
||||
}
|
||||
else if ( !gdatap->isMemberDataComplete() )
|
||||
else if (!gdatap->isMemberDataComplete())
|
||||
{
|
||||
// Still busy retreiving member list.
|
||||
retrieved << "Retrieving member list (" << gdatap->mMembers.size()
|
||||
<< " / " << gdatap->mMemberCount << ")...";
|
||||
}
|
||||
else if( !gdatap->isRoleDataComplete() )
|
||||
else if (!gdatap->isRoleDataComplete())
|
||||
{
|
||||
// Still busy retreiving role list.
|
||||
retrieved << "Retrieving role list (" << gdatap->mRoles.size()
|
||||
|
|
@ -1757,7 +1732,9 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
|
|||
|
||||
void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data)
|
||||
{
|
||||
if (!data) return;
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
LLUIString donated = getString("donation_area");
|
||||
donated.setArg("[AREA]", llformat("%d", data->getContribution()));
|
||||
|
||||
|
|
@ -1806,7 +1783,7 @@ void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemb
|
|||
// </FS:CR>
|
||||
{
|
||||
addMemberToList(member);
|
||||
if(!mMembersList->getEnabled())
|
||||
if (!mMembersList->getEnabled())
|
||||
{
|
||||
mMembersList->setEnabled(true);
|
||||
}
|
||||
|
|
@ -1829,15 +1806,15 @@ void LLPanelGroupMembersSubTab::updateMembers()
|
|||
|
||||
// Make sure all data is still complete. Incomplete data
|
||||
// may occur if we refresh.
|
||||
if ( !gdatap->isMemberDataComplete()
|
||||
|| !gdatap->isRoleDataComplete()
|
||||
|| !gdatap->isRoleMemberDataComplete())
|
||||
if (!gdatap->isMemberDataComplete() ||
|
||||
!gdatap->isRoleDataComplete() ||
|
||||
!gdatap->isRoleMemberDataComplete())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//cleanup list only for first iteration
|
||||
if(mMemberProgress == gdatap->mMembers.begin())
|
||||
// Cleanup list only for first iteration
|
||||
if (mMemberProgress == gdatap->mMembers.begin())
|
||||
{
|
||||
mMembersList->deleteAllItems();
|
||||
}
|
||||
|
|
@ -1858,7 +1835,7 @@ void LLPanelGroupMembersSubTab::updateMembers()
|
|||
LLTimer update_time;
|
||||
update_time.setTimerExpirySec(UPDATE_MEMBERS_SECONDS_PER_FRAME);
|
||||
|
||||
for( ; mMemberProgress != end && !update_time.hasExpired(); ++mMemberProgress)
|
||||
for (; mMemberProgress != end && !update_time.hasExpired(); ++mMemberProgress)
|
||||
{
|
||||
if (!mMemberProgress->second)
|
||||
continue;
|
||||
|
|
@ -1921,7 +1898,8 @@ void LLPanelGroupMembersSubTab::onBanMember(void* user_data)
|
|||
void LLPanelGroupMembersSubTab::confirmBanMembers()
|
||||
{
|
||||
std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
|
||||
if (selection.empty()) return;
|
||||
if (selection.empty())
|
||||
return;
|
||||
|
||||
auto selection_count = selection.size();
|
||||
if (selection_count == 1)
|
||||
|
|
@ -1967,8 +1945,7 @@ void LLPanelGroupMembersSubTab::updateActionDescription()
|
|||
return;
|
||||
}
|
||||
|
||||
LLRoleAction* rap = (LLRoleAction*)action_item->getUserdata();
|
||||
if (rap)
|
||||
if (LLRoleAction* rap = (LLRoleAction*)action_item->getUserdata())
|
||||
{
|
||||
std::string desc = rap->mLongDescription.empty() ? rap->mDescription : rap->mLongDescription;
|
||||
mActionDescription->setText(desc);
|
||||
|
|
@ -2026,23 +2003,22 @@ void LLPanelGroupMembersSubTab::onExportMembersToXMLCallback(const std::vector<s
|
|||
void LLPanelGroupMembersSubTab::handleBanMember()
|
||||
{
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
if(!gdatap)
|
||||
if (!gdatap)
|
||||
{
|
||||
LL_WARNS("Groups") << "Unable to get group data for group " << mGroupID << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
|
||||
if(selection.empty())
|
||||
if (selection.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
uuid_vec_t ban_ids;
|
||||
std::vector<LLScrollListItem*>::iterator itor;
|
||||
for(itor = selection.begin(); itor != selection.end(); ++itor)
|
||||
for (const LLScrollListItem* item : selection)
|
||||
{
|
||||
LLUUID ban_id = (*itor)->getUUID();
|
||||
LLUUID ban_id = item->getUUID();
|
||||
ban_ids.push_back(ban_id);
|
||||
|
||||
LLGroupBanData ban_data;
|
||||
|
|
@ -2086,54 +2062,33 @@ bool LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
|
|||
LLPanelGroupRoles* parent = (LLPanelGroupRoles*) root;
|
||||
|
||||
// Look recursively from the parent to find all our widgets.
|
||||
bool recurse = true;
|
||||
mHeader = parent->findChild<LLPanel>("roles_header", recurse);
|
||||
mFooter = parent->findChild<LLPanel>("roles_footer", recurse);
|
||||
mHeader = parent->findChild<LLPanel>("roles_header");
|
||||
mFooter = parent->findChild<LLPanel>("roles_footer");
|
||||
|
||||
mRolesList = parent->getChild<LLScrollListCtrl>("role_list");
|
||||
mAssignedMembersList = parent->getChild<LLNameListCtrl>("role_assigned_members");
|
||||
mAllowedActionsList = parent->getChild<LLScrollListCtrl>("role_allowed_actions");
|
||||
//mActionDescription = parent->getChild<LLTextEditor>("role_action_description"); // <FS:Ansariel> Undo changes from MAINT-2929
|
||||
|
||||
mRolesList = parent->getChild<LLScrollListCtrl>("role_list", recurse);
|
||||
mAssignedMembersList = parent->getChild<LLNameListCtrl>("role_assigned_members", recurse);
|
||||
mAllowedActionsList = parent->getChild<LLScrollListCtrl>("role_allowed_actions", recurse);
|
||||
//mActionDescription = parent->getChild<LLTextEditor>("role_action_description", recurse); // <FS:Ansariel> Undo changes from MAINT-2929
|
||||
mRoleName = parent->getChild<LLLineEditor>("role_name");
|
||||
mRoleTitle = parent->getChild<LLLineEditor>("role_title");
|
||||
mRoleDescription = parent->getChild<LLTextEditor>("role_description");
|
||||
|
||||
mRoleName = parent->getChild<LLLineEditor>("role_name", recurse);
|
||||
mRoleTitle = parent->getChild<LLLineEditor>("role_title", recurse);
|
||||
mRoleDescription = parent->getChild<LLTextEditor>("role_description", recurse);
|
||||
|
||||
mMemberVisibleCheck = parent->getChild<LLCheckBoxCtrl>("role_visible_in_list", recurse);
|
||||
|
||||
if (!mRolesList || !mAssignedMembersList || !mAllowedActionsList //|| !mActionDescription // <FS:Ansariel> Undo changes from MAINT-2929
|
||||
|| !mRoleName || !mRoleTitle || !mRoleDescription || !mMemberVisibleCheck)
|
||||
{
|
||||
LL_WARNS() << "ARG! element not found." << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
mMemberVisibleCheck = parent->getChild<LLCheckBoxCtrl>("role_visible_in_list");
|
||||
|
||||
mRemoveEveryoneTxt = getString("cant_delete_role");
|
||||
|
||||
mCreateRoleButton =
|
||||
parent->getChild<LLButton>("role_create", recurse);
|
||||
if ( mCreateRoleButton )
|
||||
{
|
||||
mCreateRoleButton->setClickedCallback(onCreateRole, this);
|
||||
mCreateRoleButton->setEnabled(false);
|
||||
}
|
||||
mCreateRoleButton = parent->getChild<LLButton>("role_create");
|
||||
mCreateRoleButton->setClickedCallback(onCreateRole, this);
|
||||
mCreateRoleButton->setEnabled(false);
|
||||
|
||||
mCopyRoleButton =
|
||||
parent->getChild<LLButton>("role_copy", recurse);
|
||||
if ( mCopyRoleButton )
|
||||
{
|
||||
mCopyRoleButton->setClickedCallback(onCopyRole, this);
|
||||
mCopyRoleButton->setEnabled(false);
|
||||
}
|
||||
mCopyRoleButton = parent->getChild<LLButton>("role_copy");
|
||||
mCopyRoleButton->setClickedCallback(onCopyRole, this);
|
||||
mCopyRoleButton->setEnabled(false);
|
||||
|
||||
mDeleteRoleButton =
|
||||
parent->getChild<LLButton>("role_delete", recurse);
|
||||
if ( mDeleteRoleButton )
|
||||
{
|
||||
mDeleteRoleButton->setClickedCallback(onDeleteRole, this);
|
||||
mDeleteRoleButton->setEnabled(false);
|
||||
}
|
||||
mDeleteRoleButton = parent->getChild<LLButton>("role_delete");
|
||||
mDeleteRoleButton->setClickedCallback(onDeleteRole, this);
|
||||
mDeleteRoleButton->setEnabled(false);
|
||||
|
||||
mRolesList->setCommitOnSelectionChange(true);
|
||||
mRolesList->setCommitCallback(onRoleSelect, this);
|
||||
|
|
@ -3056,26 +3011,19 @@ void LLPanelGroupActionsSubTab::handleActionSelect()
|
|||
mActionMembers->deleteAllItems();
|
||||
mActionRoles->deleteAllItems();
|
||||
|
||||
std::vector<LLScrollListItem*> selection = mActionList->getAllSelected();
|
||||
if (selection.empty())
|
||||
return;
|
||||
|
||||
U64 power_mask = GP_NO_POWERS;
|
||||
std::vector<LLScrollListItem*> selection =
|
||||
mActionList->getAllSelected();
|
||||
if (selection.empty()) return;
|
||||
|
||||
LLRoleAction* rap;
|
||||
|
||||
std::vector<LLScrollListItem*>::iterator itor;
|
||||
for (itor = selection.begin() ;
|
||||
itor != selection.end(); ++itor)
|
||||
for (const LLScrollListItem* item : selection)
|
||||
{
|
||||
rap = (LLRoleAction*)( (*itor)->getUserdata() );
|
||||
power_mask |= rap->mPowerBit;
|
||||
power_mask |= ((LLRoleAction*)item->getUserdata())->mPowerBit;
|
||||
}
|
||||
|
||||
if (selection.size() == 1)
|
||||
{
|
||||
LLScrollListItem* item = selection[0];
|
||||
rap = (LLRoleAction*)(item->getUserdata());
|
||||
|
||||
LLRoleAction* rap = (LLRoleAction*)selection.front()->getUserdata();
|
||||
if (rap->mLongDescription.empty())
|
||||
{
|
||||
mActionDescription->setText(rap->mDescription);
|
||||
|
|
@ -3092,21 +3040,19 @@ void LLPanelGroupActionsSubTab::handleActionSelect()
|
|||
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
|
||||
if (!gdatap) return;
|
||||
if (!gdatap)
|
||||
return;
|
||||
|
||||
if (gdatap->isMemberDataComplete())
|
||||
{
|
||||
LLGroupMgrGroupData::member_list_t::iterator it = gdatap->mMembers.begin();
|
||||
LLGroupMgrGroupData::member_list_t::iterator end = gdatap->mMembers.end();
|
||||
LLGroupMemberData* gmd;
|
||||
|
||||
for ( ; it != end; ++it)
|
||||
for (const auto& it : gdatap->mMembers)
|
||||
{
|
||||
gmd = (*it).second;
|
||||
if (!gmd) continue;
|
||||
if ((gmd->getAgentPowers() & power_mask) == power_mask)
|
||||
if (LLGroupMemberData* gmd = it.second)
|
||||
{
|
||||
mActionMembers->addNameItem(gmd->getID());
|
||||
if ((gmd->getAgentPowers() & power_mask) == power_mask)
|
||||
{
|
||||
mActionMembers->addNameItem(gmd->getID());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,14 +62,26 @@ public:
|
|||
|
||||
bool LLPanelLandInfo::postBuild()
|
||||
{
|
||||
childSetAction("button buy land",boost::bind(onClickClaim));
|
||||
childSetAction("button abandon land", boost::bind(onClickRelease));
|
||||
childSetAction("button subdivide land", boost::bind(onClickDivide));
|
||||
childSetAction("button join land", boost::bind(onClickJoin));
|
||||
childSetAction("button about land", boost::bind(onClickAbout));
|
||||
mButtonBuyLand = getChild<LLButton>("button buy land");
|
||||
mButtonBuyLand->setCommitCallback(boost::bind(&LLPanelLandInfo::onClickClaim, this));
|
||||
|
||||
mButtonAbandonLand = getChild<LLButton>("button abandon land");
|
||||
mButtonAbandonLand->setCommitCallback(boost::bind(&LLPanelLandInfo::onClickRelease, this));
|
||||
|
||||
mButtonSubdivLand = getChild<LLButton>("button subdivide land");
|
||||
mButtonSubdivLand->setCommitCallback(boost::bind(&LLPanelLandInfo::onClickDivide, this));
|
||||
|
||||
mButtonJoinLand = getChild<LLButton>("button join land");
|
||||
mButtonJoinLand->setCommitCallback(boost::bind(&LLPanelLandInfo::onClickJoin, this));
|
||||
|
||||
mButtonAboutLand = getChild<LLButton>("button about land");
|
||||
mButtonAboutLand->setCommitCallback(boost::bind(&LLPanelLandInfo::onClickAbout, this));
|
||||
|
||||
mCheckShowOwners = getChild<LLCheckBoxCtrl>("checkbox show owners");
|
||||
getChild<LLUICtrl>("checkbox show owners")->setValue(gSavedSettings.getBOOL("ShowParcelOwners"));
|
||||
mCheckShowOwners->setValue(gSavedSettings.getBOOL("ShowParcelOwners"));
|
||||
|
||||
mTextArea = getChild<LLTextBox>("label_area");
|
||||
mTextAreaPrice = getChild<LLTextBox>("label_area_price");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -123,17 +135,14 @@ void LLPanelLandInfo::refresh()
|
|||
if (!parcel || !regionp)
|
||||
{
|
||||
// nothing selected, disable panel
|
||||
getChildView("label_area_price")->setVisible(false);
|
||||
getChildView("label_area")->setVisible(false);
|
||||
mTextAreaPrice->setVisible(false);
|
||||
mTextArea->setVisible(false);
|
||||
|
||||
//mTextPrice->setText(LLStringUtil::null);
|
||||
//getChild<LLUICtrl>("textbox price")->setValue(LLStringUtil::null); // <FS:Ansariel> Doesn't exist as of 2016-11-16
|
||||
|
||||
getChildView("button buy land")->setEnabled(false);
|
||||
getChildView("button abandon land")->setEnabled(false);
|
||||
getChildView("button subdivide land")->setEnabled(false);
|
||||
getChildView("button join land")->setEnabled(false);
|
||||
getChildView("button about land")->setEnabled(false);
|
||||
mButtonBuyLand->setEnabled(false);
|
||||
mButtonAbandonLand->setEnabled(false);
|
||||
mButtonSubdivLand->setEnabled(false);
|
||||
mButtonJoinLand->setEnabled(false);
|
||||
mButtonAboutLand->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -151,11 +160,11 @@ void LLPanelLandInfo::refresh()
|
|||
|
||||
if (is_public && !LLViewerParcelMgr::getInstance()->getParcelSelection()->getMultipleOwners())
|
||||
{
|
||||
getChildView("button buy land")->setEnabled(true);
|
||||
mButtonBuyLand->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
getChildView("button buy land")->setEnabled(can_buy);
|
||||
mButtonBuyLand->setEnabled(can_buy);
|
||||
}
|
||||
|
||||
bool owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_RELEASE);
|
||||
|
|
@ -167,16 +176,16 @@ void LLPanelLandInfo::refresh()
|
|||
bool manager_divideable = ( gAgent.canManageEstate()
|
||||
&& ((parcel->getOwnerID() == regionp->getOwner()) || owner_divide) );
|
||||
|
||||
getChildView("button abandon land")->setEnabled(owner_release || manager_releaseable || gAgent.isGodlike());
|
||||
mButtonAbandonLand->setEnabled(owner_release || manager_releaseable || gAgent.isGodlike());
|
||||
|
||||
// only mainland sims are subdividable by owner
|
||||
if (regionp->getRegionFlag(REGION_FLAGS_ALLOW_PARCEL_CHANGES))
|
||||
{
|
||||
getChildView("button subdivide land")->setEnabled(owner_divide || manager_divideable || gAgent.isGodlike());
|
||||
mButtonSubdivLand->setEnabled(owner_divide || manager_divideable || gAgent.isGodlike());
|
||||
}
|
||||
else
|
||||
{
|
||||
getChildView("button subdivide land")->setEnabled(manager_divideable || gAgent.isGodlike());
|
||||
mButtonSubdivLand->setEnabled(manager_divideable || gAgent.isGodlike());
|
||||
}
|
||||
|
||||
// To join land, must have something selected,
|
||||
|
|
@ -187,15 +196,15 @@ void LLPanelLandInfo::refresh()
|
|||
//&& LLViewerParcelMgr::getInstance()->getSelfCount() > 1
|
||||
&& !LLViewerParcelMgr::getInstance()->getParcelSelection()->getWholeParcelSelected())
|
||||
{
|
||||
getChildView("button join land")->setEnabled(true);
|
||||
mButtonJoinLand->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS() << "Invalid selection for joining land" << LL_ENDL;
|
||||
getChildView("button join land")->setEnabled(false);
|
||||
mButtonJoinLand->setEnabled(false);
|
||||
}
|
||||
|
||||
getChildView("button about land")->setEnabled(true);
|
||||
mButtonAboutLand->setEnabled(true);
|
||||
|
||||
// show pricing information
|
||||
S32 area;
|
||||
|
|
@ -210,22 +219,21 @@ void LLPanelLandInfo::refresh()
|
|||
&dwell);
|
||||
if(is_public || (is_for_sale && LLViewerParcelMgr::getInstance()->getParcelSelection()->getWholeParcelSelected()))
|
||||
{
|
||||
getChild<LLUICtrl>("label_area_price")->setTextArg("[PRICE]", llformat("%d",claim_price));
|
||||
getChild<LLUICtrl>("label_area_price")->setTextArg("[AREA]", llformat("%d",area));
|
||||
getChildView("label_area_price")->setVisible(true);
|
||||
getChildView("label_area")->setVisible(false);
|
||||
mTextAreaPrice->setTextArg("[PRICE]", llformat("%d",claim_price));
|
||||
mTextAreaPrice->setTextArg("[AREA]", llformat("%d",area));
|
||||
mTextAreaPrice->setVisible(true);
|
||||
mTextArea->setVisible(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
getChildView("label_area_price")->setVisible(false);
|
||||
getChild<LLUICtrl>("label_area")->setTextArg("[AREA]", llformat("%d",area));
|
||||
getChildView("label_area")->setVisible(true);
|
||||
mTextAreaPrice->setVisible(false);
|
||||
mTextArea->setTextArg("[AREA]", llformat("%d",area));
|
||||
mTextArea->setVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//static
|
||||
void LLPanelLandInfo::onClickClaim()
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
|
||||
|
|
@ -240,25 +248,21 @@ void LLPanelLandInfo::onClickClaim()
|
|||
}
|
||||
|
||||
|
||||
//static
|
||||
void LLPanelLandInfo::onClickRelease()
|
||||
{
|
||||
LLViewerParcelMgr::getInstance()->startReleaseLand();
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelLandInfo::onClickDivide()
|
||||
{
|
||||
LLViewerParcelMgr::getInstance()->startDivideLand();
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelLandInfo::onClickJoin()
|
||||
{
|
||||
LLViewerParcelMgr::getInstance()->startJoinLand();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPanelLandInfo::onClickAbout()
|
||||
{
|
||||
// Promote the rectangle selection to a parcel selection
|
||||
|
|
|
|||
|
|
@ -46,20 +46,27 @@ public:
|
|||
void refresh() override;
|
||||
static void refreshAll();
|
||||
|
||||
LLCheckBoxCtrl *mCheckShowOwners;
|
||||
|
||||
protected:
|
||||
static void onClickClaim();
|
||||
static void onClickRelease();
|
||||
static void onClickDivide();
|
||||
static void onClickJoin();
|
||||
static void onClickAbout();
|
||||
void onClickClaim();
|
||||
void onClickRelease();
|
||||
void onClickDivide();
|
||||
void onClickJoin();
|
||||
void onClickAbout();
|
||||
|
||||
protected:
|
||||
bool postBuild() override;
|
||||
|
||||
static LLPanelLandSelectObserver* sObserver;
|
||||
static LLPanelLandInfo* sInstance;
|
||||
private:
|
||||
LLCheckBoxCtrl *mCheckShowOwners = nullptr;
|
||||
LLButton* mButtonBuyLand = nullptr;
|
||||
LLButton* mButtonAbandonLand = nullptr;
|
||||
LLButton* mButtonSubdivLand = nullptr;
|
||||
LLButton* mButtonJoinLand = nullptr;
|
||||
LLButton* mButtonAboutLand = nullptr;
|
||||
LLTextBox* mTextArea = nullptr;
|
||||
LLTextBox* mTextAreaPrice = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -454,35 +454,32 @@ F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local, const
|
|||
bool LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
|
||||
// Skip if disabled globally.
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//if (!gSavedSettings.getBOOL("AvatarPhysics"))
|
||||
static LLCachedControl<bool> avatar_physics(gSavedSettings, "AvatarPhysics");
|
||||
if (!avatar_physics)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// Skip if disabled globally.
|
||||
static LLCachedControl<bool> av_physics(gSavedSettings, "AvatarPhysics");
|
||||
if (!av_physics)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool update_visuals = false;
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//for (motion_vec_t::iterator iter = mMotions.begin();
|
||||
// iter != mMotions.end();
|
||||
// ++iter)
|
||||
motion_vec_t::iterator motions_end_it = mMotions.end();
|
||||
for (motion_vec_t::iterator iter = mMotions.begin();
|
||||
iter != motions_end_it;
|
||||
++iter)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
LLPhysicsMotion *motion = (*iter);
|
||||
update_visuals |= motion->onUpdate(time);
|
||||
}
|
||||
bool update_visuals = false;
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//for (motion_vec_t::iterator iter = mMotions.begin();
|
||||
// iter != mMotions.end();
|
||||
// ++iter)
|
||||
motion_vec_t::iterator motions_end_it = mMotions.end();
|
||||
for (motion_vec_t::iterator iter = mMotions.begin();
|
||||
iter != motions_end_it;
|
||||
++iter)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
LLPhysicsMotion *motion = (*iter);
|
||||
update_visuals |= motion->onUpdate(time);
|
||||
}
|
||||
|
||||
if (update_visuals)
|
||||
mCharacter->updateVisualParams();
|
||||
if (update_visuals)
|
||||
mCharacter->updateVisualParams();
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Return true if character has to update visual params.
|
||||
|
|
|
|||
|
|
@ -135,6 +135,11 @@ bool LLProgressView::postBuild()
|
|||
{
|
||||
mProgressBar = getChild<LLProgressBar>("login_progress_bar");
|
||||
|
||||
mLogosLabel = getChild<LLTextBox>("logos_lbl");
|
||||
|
||||
mProgressText = getChild<LLTextBox>("progress_text");
|
||||
mMessageText = getChild<LLTextBox>("message_text");
|
||||
|
||||
// media control that is used to play intro video
|
||||
mMediaCtrl = getChild<LLMediaCtrl>("login_media_panel");
|
||||
mMediaCtrl->setVisible( false ); // hidden initially
|
||||
|
|
@ -145,10 +150,6 @@ bool LLProgressView::postBuild()
|
|||
mCancelBtn = getChild<LLButton>("cancel_btn");
|
||||
mCancelBtn->setClickedCallback( LLProgressView::onCancelButtonClicked, NULL );
|
||||
|
||||
mProgressText=getChild<LLTextBox>("progress_text");
|
||||
mMessageText=getChild<LLTextBox>("message_text");
|
||||
|
||||
|
||||
getChild<LLTextBox>("title_text")->setText(LLStringExplicit(LLAppViewer::instance()->getSecondLifeTitle()));
|
||||
|
||||
getChild<LLTextBox>("message_text")->setClickedCallback(onClickMessage, this);
|
||||
|
|
@ -317,9 +318,8 @@ void LLProgressView::drawLogos(F32 alpha)
|
|||
|
||||
// logos are tied to label,
|
||||
// due to potential resizes we have to figure offsets out on draw or resize
|
||||
LLTextBox *logos_label = getChild<LLTextBox>("logos_lbl");
|
||||
S32 offset_x, offset_y;
|
||||
logos_label->localPointToScreen(0, 0, &offset_x, &offset_y);
|
||||
mLogosLabel->localPointToScreen(0, 0, &offset_x, &offset_y);
|
||||
std::vector<TextureData>::const_iterator iter = mLogosList.begin();
|
||||
std::vector<TextureData>::const_iterator end = mLogosList.end();
|
||||
for (; iter != end; iter++)
|
||||
|
|
@ -469,8 +469,7 @@ void LLProgressView::initLogos()
|
|||
//#endif // defined(LL_FMODSTUDIO) || defined(LL_HAVOK) // <FS> FIRE-30937: Always needed
|
||||
|
||||
// We don't know final screen rect yet, so we can't precalculate position fully
|
||||
LLTextBox *logos_label = getChild<LLTextBox>("logos_lbl");
|
||||
S32 texture_start_x = (S32)logos_label->getFont()->getWidthF32(logos_label->getText()) + default_pad;
|
||||
S32 texture_start_x = (S32)mLogosLabel->getFont()->getWidthF32(mLogosLabel->getText()) + default_pad;
|
||||
S32 texture_start_y = -7;
|
||||
|
||||
// Normally we would just preload these textures from textures.xml,
|
||||
|
|
|
|||
|
|
@ -87,9 +87,10 @@ public:
|
|||
|
||||
protected:
|
||||
LLProgressBar* mProgressBar;
|
||||
LLTextBox* mProgressText;
|
||||
LLTextBox* mMessageText;
|
||||
LLMediaCtrl* mMediaCtrl;
|
||||
LLTextBox* mLogosLabel = nullptr;
|
||||
LLTextBox* mProgressText = nullptr;
|
||||
LLTextBox* mMessageText = nullptr;
|
||||
F32 mPercentDone;
|
||||
std::string mMessage;
|
||||
LLButton* mCancelBtn;
|
||||
|
|
|
|||
|
|
@ -615,6 +615,7 @@ bool LLFloaterTexturePicker::postBuild()
|
|||
mResolutionLabel = getChild<LLTextBox>("size_lbl");
|
||||
mResolutionWarning = getChild<LLTextBox>("over_limit_lbl");
|
||||
|
||||
mPreviewWidget = getChild<LLView>("preview_widget");
|
||||
|
||||
mDefaultBtn = getChild<LLButton>("Default");
|
||||
mNoneBtn = getChild<LLButton>("None");
|
||||
|
|
@ -796,7 +797,7 @@ void LLFloaterTexturePicker::draw()
|
|||
}
|
||||
|
||||
// Border
|
||||
LLRect border = getChildView("preview_widget")->getRect();
|
||||
LLRect border = mPreviewWidget->getRect();
|
||||
gl_rect_2d( border, LLColor4::black, false );
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -469,6 +469,7 @@ protected:
|
|||
LLButton* mPipetteBtn;
|
||||
LLButton* mSelectBtn;
|
||||
LLButton* mCancelBtn;
|
||||
LLView* mPreviewWidget = nullptr;
|
||||
// <FS> Special additions
|
||||
LLLineEditor* mUUIDEditor{ nullptr };
|
||||
LLButton* mUUIDBtn{ nullptr };
|
||||
|
|
|
|||
|
|
@ -1822,11 +1822,8 @@ void LLToolPie::handleDeselect()
|
|||
|
||||
LLTool* LLToolPie::getOverrideTool(MASK mask)
|
||||
{
|
||||
// <FS:Ansariel> Use faster LLCachedControls for frequently visited locations
|
||||
//if (gSavedSettings.getBOOL("EnableGrab"))
|
||||
static LLCachedControl<bool> enableGrab(gSavedSettings, "EnableGrab");
|
||||
if (enableGrab)
|
||||
// </FS:Ansariel>
|
||||
static LLCachedControl<bool> enable_grab(gSavedSettings, "EnableGrab");
|
||||
if (enable_grab)
|
||||
{
|
||||
if (mask == DEFAULT_GRAB_MASK)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -415,7 +415,10 @@ class LLMenuParcelObserver : public LLParcelObserver
|
|||
public:
|
||||
LLMenuParcelObserver();
|
||||
~LLMenuParcelObserver();
|
||||
virtual void changed();
|
||||
void changed() override;
|
||||
private:
|
||||
LLHandle<LLUICtrl> mLandBuyHandle;
|
||||
LLHandle<LLUICtrl> mLandBuyPassHandle;
|
||||
};
|
||||
|
||||
static LLMenuParcelObserver* gMenuParcelObserver = NULL;
|
||||
|
|
@ -424,6 +427,8 @@ static LLUIListener sUIListener;
|
|||
|
||||
LLMenuParcelObserver::LLMenuParcelObserver()
|
||||
{
|
||||
mLandBuyHandle = gMenuLand->getChild<LLMenuItemCallGL>("Land Buy")->getHandle();
|
||||
mLandBuyPassHandle = gMenuLand->getChild<LLMenuItemCallGL>("Land Buy Pass")->getHandle();
|
||||
LLViewerParcelMgr::getInstance()->addObserver(this);
|
||||
}
|
||||
|
||||
|
|
@ -438,17 +443,16 @@ void LLMenuParcelObserver::changed()
|
|||
if (gMenuLand && parcel)
|
||||
{
|
||||
// <FS:Ansariel> FIRE-4454: Cache controls because of performance reasons
|
||||
//LLView* child = gMenuLand->findChild<LLView>("Land Buy Pass");
|
||||
//if (child)
|
||||
//if (!mLandBuyPassHandle.isDead())
|
||||
//{
|
||||
// child->setEnabled(LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID() == gAgent.getID()));
|
||||
// LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
|
||||
// static_cast<LLMenuItemCallGL*>(mLandBuyPassHandle.get())->setEnabled(LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID() == gAgent.getID()));
|
||||
//}
|
||||
//
|
||||
//child = gMenuLand->findChild<LLView>("Land Buy");
|
||||
//if (child)
|
||||
//if (!mLandBuyHandle.isDead())
|
||||
//{
|
||||
// bool buyable = enable_buy_land(NULL);
|
||||
// child->setEnabled(buyable);
|
||||
// static_cast<LLMenuItemCallGL*>(mLandBuyHandle.get())->setEnabled(buyable);
|
||||
//}
|
||||
|
||||
static LLView* land_buy_pass = gMenuHolder->getChildView("Land Buy Pass");
|
||||
|
|
@ -482,10 +486,34 @@ void initialize_menus();
|
|||
// Break up groups of more than 6 items with separators
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void set_merchant_SLM_menu()
|
||||
void set_merchant_SLM_menu();
|
||||
|
||||
class LLSLMMenuUpdater
|
||||
{
|
||||
public:
|
||||
LLSLMMenuUpdater();
|
||||
~LLSLMMenuUpdater() = default;
|
||||
|
||||
void setMerchantMenu();
|
||||
void checkMerchantStatus(bool force);
|
||||
|
||||
private:
|
||||
LLHandle<LLView> mMarketplaceListingsItem;
|
||||
};
|
||||
|
||||
static LLSLMMenuUpdater* gSLMMenuUpdater = NULL;
|
||||
|
||||
LLSLMMenuUpdater::LLSLMMenuUpdater()
|
||||
{
|
||||
mMarketplaceListingsItem = gMenuHolder->getChild<LLView>("MarketplaceListings")->getHandle();
|
||||
}
|
||||
void LLSLMMenuUpdater::setMerchantMenu()
|
||||
{
|
||||
// All other cases (new merchant, not merchant, migrated merchant): show the new Marketplace Listings menu and enable the tool
|
||||
gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(true);
|
||||
if(!mMarketplaceListingsItem.isDead())
|
||||
{
|
||||
mMarketplaceListingsItem.get()->setVisible(true);
|
||||
}
|
||||
LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings");
|
||||
gToolBarView->enableCommand(command->id(), true);
|
||||
|
||||
|
|
@ -502,7 +530,7 @@ void set_merchant_SLM_menu()
|
|||
}
|
||||
}
|
||||
|
||||
void check_merchant_status(bool force)
|
||||
void LLSLMMenuUpdater::checkMerchantStatus(bool force)
|
||||
{
|
||||
// <FS:Ansariel> Don't show merchant outbox or SL Marketplace stuff outside SL
|
||||
if (!LLGridManager::getInstance()->isInSecondLife())
|
||||
|
|
@ -518,7 +546,10 @@ void check_merchant_status(bool force)
|
|||
LLMarketplaceData::instance().setSLMStatus(MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED);
|
||||
}
|
||||
// Hide SLM related menu item
|
||||
gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(false);
|
||||
if(!mMarketplaceListingsItem.isDead())
|
||||
{
|
||||
mMarketplaceListingsItem.get()->setVisible(false);
|
||||
}
|
||||
|
||||
// Also disable the toolbar button for Marketplace Listings
|
||||
LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings");
|
||||
|
|
@ -528,6 +559,16 @@ void check_merchant_status(bool force)
|
|||
LLMarketplaceData::instance().initializeSLM(boost::bind(&set_merchant_SLM_menu));
|
||||
}
|
||||
|
||||
void set_merchant_SLM_menu()
|
||||
{
|
||||
if(gSLMMenuUpdater) gSLMMenuUpdater->setMerchantMenu();
|
||||
}
|
||||
|
||||
void check_merchant_status(bool force)
|
||||
{
|
||||
if(gSLMMenuUpdater) gSLMMenuUpdater->checkMerchantStatus(force);
|
||||
}
|
||||
|
||||
void init_menus()
|
||||
{
|
||||
// Initialize actions
|
||||
|
|
@ -697,6 +738,8 @@ void init_menus()
|
|||
// Let land based option enable when parcel changes
|
||||
gMenuParcelObserver = new LLMenuParcelObserver();
|
||||
|
||||
gSLMMenuUpdater = new LLSLMMenuUpdater();
|
||||
|
||||
gLoginMenuBarView = LLUICtrlFactory::getInstance()->createFromFile<LLMenuBarGL>("menu_login.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
|
||||
gLoginMenuBarView->arrangeAndClear();
|
||||
LLRect menuBarRect = gLoginMenuBarView->getRect();
|
||||
|
|
@ -3073,6 +3116,9 @@ class LLAdminOnSaveState: public view_listener_t
|
|||
//-----------------------------------------------------------------------------
|
||||
void cleanup_menus()
|
||||
{
|
||||
delete gSLMMenuUpdater;
|
||||
gSLMMenuUpdater = nullptr;
|
||||
|
||||
delete gMenuParcelObserver;
|
||||
gMenuParcelObserver = NULL;
|
||||
|
||||
|
|
@ -3089,7 +3135,7 @@ void cleanup_menus()
|
|||
gMenuAttachmentSelf = NULL;
|
||||
|
||||
delete gMenuAttachmentOther;
|
||||
gMenuAttachmentSelf = NULL;
|
||||
gMenuAttachmentOther = NULL;
|
||||
|
||||
delete gMenuLand;
|
||||
gMenuLand = NULL;
|
||||
|
|
|
|||
|
|
@ -3523,6 +3523,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
|
|||
capabilityNames.append("VoiceSignalingRequest");
|
||||
capabilityNames.append("ReadOfflineMsgs"); // Requires to respond reliably: AcceptFriendship, AcceptGroupInvite, DeclineFriendship, DeclineGroupInvite
|
||||
capabilityNames.append("RegionObjects");
|
||||
capabilityNames.append("RegionSchedule");
|
||||
capabilityNames.append("RemoteParcelRequest");
|
||||
capabilityNames.append("RenderMaterials");
|
||||
capabilityNames.append("RequestTextureDownload");
|
||||
|
|
|
|||
|
|
@ -10829,10 +10829,13 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar, bool
|
|||
sShadowRender = false;
|
||||
popRenderTypeMask();
|
||||
|
||||
gGL.matrixMode(LLRender::MM_PROJECTION);
|
||||
gGL.popMatrix();
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.popMatrix();
|
||||
if (!preview_avatar)
|
||||
{
|
||||
gGL.matrixMode(LLRender::MM_PROJECTION);
|
||||
gGL.popMatrix();
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.popMatrix();
|
||||
}
|
||||
|
||||
if (!preview_avatar && !for_profile)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,278 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater
|
||||
height="180"
|
||||
layout="topleft"
|
||||
name="floater_region_restart_schedule"
|
||||
help_topic="Preferences_Graphics_Advanced"
|
||||
single_instance="true"
|
||||
save_rect="true"
|
||||
title="Region Restart Schedule"
|
||||
width="300">
|
||||
|
||||
<!-- This block shows Advanced Settings -->
|
||||
<floater.string name="am_string">am</floater.string>
|
||||
<floater.string name="pm_string">pm</floater.string>
|
||||
|
||||
<text
|
||||
name="days_general"
|
||||
type="string"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
height="16"
|
||||
top="15"
|
||||
left="20"
|
||||
width="328">
|
||||
Restart the region on following days:
|
||||
</text>
|
||||
|
||||
<check_box
|
||||
name="s_chk"
|
||||
label=""
|
||||
tool_tip="Sunday"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
height="20"
|
||||
width="20"
|
||||
left="60"
|
||||
top_pad="5" />
|
||||
|
||||
<check_box
|
||||
name="m_chk"
|
||||
label=""
|
||||
tool_tip="Monday"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
height="20"
|
||||
width="20"
|
||||
left_pad="5"
|
||||
top_delta="0" />
|
||||
|
||||
<check_box
|
||||
name="t_chk"
|
||||
label=""
|
||||
tool_tip="Tuesday"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
height="20"
|
||||
width="20"
|
||||
left_pad="5"
|
||||
top_delta="0" />
|
||||
|
||||
<check_box
|
||||
name="w_chk"
|
||||
label=""
|
||||
tool_tip="Wednesday"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
height="20"
|
||||
width="20"
|
||||
left_pad="5"
|
||||
top_delta="0" />
|
||||
|
||||
<check_box
|
||||
name="r_chk"
|
||||
label=""
|
||||
tool_tip="Thursday"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
height="20"
|
||||
width="20"
|
||||
left_pad="5"
|
||||
top_delta="0" />
|
||||
|
||||
<check_box
|
||||
name="f_chk"
|
||||
label=""
|
||||
tool_tip="Friday"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
height="20"
|
||||
width="20"
|
||||
left_pad="5"
|
||||
top_delta="0" />
|
||||
|
||||
<check_box
|
||||
name="a_chk"
|
||||
label=""
|
||||
tool_tip="Saturday"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
height="20"
|
||||
width="20"
|
||||
left_pad="5"
|
||||
top_delta="0" />
|
||||
|
||||
<text
|
||||
name="su_label"
|
||||
type="string"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
halign="center"
|
||||
height="16"
|
||||
top_pad="5"
|
||||
left="57"
|
||||
width="25">
|
||||
Su
|
||||
</text>
|
||||
|
||||
<text
|
||||
name="mo_label"
|
||||
type="string"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
halign="center"
|
||||
height="16"
|
||||
top_delta="0"
|
||||
left_pad="0"
|
||||
width="25">
|
||||
Mo
|
||||
</text>
|
||||
|
||||
<text
|
||||
name="tu_label"
|
||||
type="string"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
halign="center"
|
||||
height="16"
|
||||
top_delta="0"
|
||||
left_pad="0"
|
||||
width="25">
|
||||
Tu
|
||||
</text>
|
||||
|
||||
<text
|
||||
name="we_label"
|
||||
type="string"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
halign="center"
|
||||
height="16"
|
||||
top_delta="0"
|
||||
left_pad="1"
|
||||
width="25">
|
||||
We
|
||||
</text>
|
||||
|
||||
<text
|
||||
name="th_label"
|
||||
type="string"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
halign="center"
|
||||
height="16"
|
||||
top_delta="0"
|
||||
left_pad="0"
|
||||
width="25">
|
||||
Th
|
||||
</text>
|
||||
|
||||
<text
|
||||
name="fr_label"
|
||||
type="string"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
halign="center"
|
||||
height="16"
|
||||
top_delta="0"
|
||||
left_pad="0"
|
||||
width="25">
|
||||
Fr
|
||||
</text>
|
||||
|
||||
<text
|
||||
name="sa_label"
|
||||
type="string"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
halign="center"
|
||||
height="16"
|
||||
top_delta="0"
|
||||
left_pad="0"
|
||||
width="25">
|
||||
Sa
|
||||
</text>
|
||||
|
||||
<text
|
||||
name="at_label"
|
||||
type="string"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
halign="right"
|
||||
height="16"
|
||||
top_pad="15"
|
||||
left="30"
|
||||
width="40">
|
||||
at
|
||||
</text>
|
||||
<line_editor
|
||||
name="hours_edt"
|
||||
max_length_bytes="2"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
commit_on_focus_lost="true"
|
||||
height="23"
|
||||
width="40"
|
||||
left_pad="4"
|
||||
top_delta="-5"/>
|
||||
<text
|
||||
name="separator_label"
|
||||
type="string"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
halign="center"
|
||||
height="16"
|
||||
top_delta="5"
|
||||
left_pad="0"
|
||||
width="12">
|
||||
:
|
||||
</text>
|
||||
<line_editor
|
||||
name="minutes_edt"
|
||||
max_length_bytes="2"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
commit_on_focus_lost="true"
|
||||
height="23"
|
||||
width="40"
|
||||
left_pad="0"
|
||||
top_delta="-5"/>
|
||||
<button
|
||||
name="am_pm_btn"
|
||||
label="am"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
height="23"
|
||||
width="40"
|
||||
left_pad="1"
|
||||
top_delta="0"/>
|
||||
<text
|
||||
name="utc_label"
|
||||
type="string"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
height="16"
|
||||
top_delta="5"
|
||||
left_pad="5"
|
||||
width="22">
|
||||
UTC
|
||||
</text>
|
||||
<button
|
||||
name="save_btn"
|
||||
label="Save"
|
||||
follows="top|left"
|
||||
layout="topleft"
|
||||
top="145"
|
||||
left="25"
|
||||
height="25"
|
||||
width="110"/>
|
||||
<button
|
||||
name="cancel_btn"
|
||||
label="Cancel"
|
||||
follows="bottom|right"
|
||||
layout="topleft"
|
||||
left_pad="20"
|
||||
top_delta="0"
|
||||
height="25"
|
||||
width="110"/>
|
||||
</floater>
|
||||
|
|
@ -323,8 +323,20 @@
|
|||
left="250"
|
||||
name="manage_telehub_btn"
|
||||
top="70"
|
||||
width="150">
|
||||
width="180">
|
||||
<button.commit_callback
|
||||
function="RegionInfo.ManageTelehub" />
|
||||
</button>
|
||||
<button
|
||||
follows="left|top"
|
||||
height="20"
|
||||
label="Manage Restart Schedule..."
|
||||
layout="topleft"
|
||||
name="manage_restart_btn"
|
||||
top_pad="5"
|
||||
left_delta="0"
|
||||
width="180">
|
||||
<button.commit_callback
|
||||
function="RegionInfo.ManageRestart" />
|
||||
</button>
|
||||
</panel>
|
||||
|
|
|
|||
Loading…
Reference in New Issue