master
James Cook 2009-12-07 13:22:20 -08:00
commit aa2cdcfeef
26 changed files with 213 additions and 88 deletions

View File

@ -70,6 +70,8 @@ public:
virtual BOOL getMinimized() = 0;
virtual BOOL getMaximized() = 0;
virtual BOOL maximize() = 0;
virtual void minimize() = 0;
virtual void restore() = 0;
BOOL getFullscreen() { return mFullscreen; };
virtual BOOL getPosition(LLCoordScreen *position) = 0;
virtual BOOL getSize(LLCoordScreen *size) = 0;

View File

@ -45,6 +45,8 @@ public:
/*virtual*/ BOOL getMinimized() {return FALSE;};
/*virtual*/ BOOL getMaximized() {return FALSE;};
/*virtual*/ BOOL maximize() {return FALSE;};
/*virtual*/ void minimize() {};
/*virtual*/ void restore() {};
/*virtual*/ BOOL getFullscreen() {return FALSE;};
/*virtual*/ BOOL getPosition(LLCoordScreen *position) {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};

View File

@ -1033,6 +1033,7 @@ void LLWindowMacOSX::hide()
HideWindow(mWindow);
}
//virtual
void LLWindowMacOSX::minimize()
{
setMouseClipping(FALSE);
@ -1040,6 +1041,7 @@ void LLWindowMacOSX::minimize()
CollapseWindow(mWindow, true);
}
//virtual
void LLWindowMacOSX::restore()
{
show();

View File

@ -56,6 +56,8 @@ public:
/*virtual*/ BOOL getMinimized();
/*virtual*/ BOOL getMaximized();
/*virtual*/ BOOL maximize();
/*virtual*/ void minimize();
/*virtual*/ void restore();
/*virtual*/ BOOL getFullscreen();
/*virtual*/ BOOL getPosition(LLCoordScreen *position);
/*virtual*/ BOOL getSize(LLCoordScreen *size);
@ -139,9 +141,6 @@ protected:
// Restore the display resolution to its value before we ran the app.
BOOL resetDisplayResolution();
void minimize();
void restore();
BOOL shouldPostQuit() { return mPostQuit; }

View File

@ -49,6 +49,8 @@ public:
/*virtual*/ BOOL getMinimized() {return FALSE;};
/*virtual*/ BOOL getMaximized() {return FALSE;};
/*virtual*/ BOOL maximize() {return FALSE;};
/*virtual*/ void minimize() {};
/*virtual*/ void restore() {};
/*virtual*/ BOOL getFullscreen() {return FALSE;};
/*virtual*/ BOOL getPosition(LLCoordScreen *position) {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};

View File

@ -839,11 +839,13 @@ void LLWindowSDL::hide()
// *FIX: What to do with SDL?
}
//virtual
void LLWindowSDL::minimize()
{
// *FIX: What to do with SDL?
}
//virtual
void LLWindowSDL::restore()
{
// *FIX: What to do with SDL?

View File

@ -62,6 +62,8 @@ public:
/*virtual*/ BOOL getMinimized();
/*virtual*/ BOOL getMaximized();
/*virtual*/ BOOL maximize();
/*virtual*/ void minimize();
/*virtual*/ void restore();
/*virtual*/ BOOL getFullscreen();
/*virtual*/ BOOL getPosition(LLCoordScreen *position);
/*virtual*/ BOOL getSize(LLCoordScreen *size);
@ -165,9 +167,6 @@ protected:
// Go back to last fullscreen display resolution.
BOOL setFullscreenResolution();
void minimize();
void restore();
BOOL shouldPostQuit() { return mPostQuit; }
protected:

View File

@ -643,6 +643,7 @@ void LLWindowWin32::hide()
ShowWindow(mWindowHandle, SW_HIDE);
}
//virtual
void LLWindowWin32::minimize()
{
setMouseClipping(FALSE);
@ -650,7 +651,7 @@ void LLWindowWin32::minimize()
ShowWindow(mWindowHandle, SW_MINIMIZE);
}
//virtual
void LLWindowWin32::restore()
{
ShowWindow(mWindowHandle, SW_RESTORE);

View File

@ -54,6 +54,8 @@ public:
/*virtual*/ BOOL getMinimized();
/*virtual*/ BOOL getMaximized();
/*virtual*/ BOOL maximize();
/*virtual*/ void minimize();
/*virtual*/ void restore();
/*virtual*/ BOOL getFullscreen();
/*virtual*/ BOOL getPosition(LLCoordScreen *position);
/*virtual*/ BOOL getSize(LLCoordScreen *size);
@ -137,9 +139,6 @@ protected:
// Restore the display resolution to its value before we ran the app.
BOOL resetDisplayResolution();
void minimize();
void restore();
BOOL shouldPostQuit() { return mPostQuit; }
void fillCompositionForm(const LLRect& bounds, COMPOSITIONFORM *form);

View File

@ -208,7 +208,12 @@ BOOL LLFloaterAnimPreview::postBuild()
mPlayButton = getChild<LLButton>( "play_btn");
mPlayButton->setClickedCallback(onBtnPlay, this);
mPlayButton->setVisible(true);
mPauseButton = getChild<LLButton>( "pause_btn");
mPauseButton->setClickedCallback(onBtnPause, this);
mPauseButton->setVisible(false);
mStopButton = getChild<LLButton>( "stop_btn");
mStopButton->setClickedCallback(onBtnStop, this);
@ -560,24 +565,60 @@ void LLFloaterAnimPreview::onBtnPlay(void* user_data)
if (previewp->mMotionID.notNull() && previewp->mAnimPreview)
{
LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
if(!avatarp->isMotionActive(previewp->mMotionID))
{
previewp->resetMotion();
previewp->mPauseRequest = NULL;
previewp->mPauseButton->setVisible(TRUE);
previewp->mPauseButton->setEnabled(TRUE);
previewp->mPlayButton->setVisible(FALSE);
previewp->mPlayButton->setEnabled(FALSE);
}
else
else if (avatarp->areAnimationsPaused())
{
if (avatarp->areAnimationsPaused())
{
previewp->mPauseRequest = NULL;
}
else
previewp->mPauseRequest = NULL;
previewp->mPauseButton->setVisible(TRUE);
previewp->mPauseButton->setEnabled(TRUE);
previewp->mPlayButton->setVisible(FALSE);
previewp->mPlayButton->setEnabled(FALSE);
}
}
}
//-----------------------------------------------------------------------------
// onBtnPause()
//-----------------------------------------------------------------------------
void LLFloaterAnimPreview::onBtnPause(void* user_data)
{
LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data;
if (!previewp->getEnabled())
return;
if (previewp->mMotionID.notNull() && previewp->mAnimPreview)
{
LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
if(avatarp->isMotionActive(previewp->mMotionID))
{
if (!avatarp->areAnimationsPaused())
{
previewp->mPauseRequest = avatarp->requestPause();
previewp->mPlayButton->setVisible(TRUE);
previewp->mPlayButton->setEnabled(TRUE);
previewp->mPauseButton->setVisible(FALSE);
previewp->mPauseButton->setEnabled(FALSE);
}
}
}
}
//-----------------------------------------------------------------------------
@ -595,6 +636,10 @@ void LLFloaterAnimPreview::onBtnStop(void* user_data)
previewp->resetMotion();
previewp->mPauseRequest = avatarp->requestPause();
}
previewp->mPlayButton->setVisible(TRUE);
previewp->mPlayButton->setEnabled(TRUE);
previewp->mPauseButton->setVisible(FALSE);
previewp->mPauseButton->setEnabled(FALSE);
}
//-----------------------------------------------------------------------------
@ -912,43 +957,38 @@ void LLFloaterAnimPreview::refresh()
{
childShow("bad_animation_text");
mPlayButton->setEnabled(FALSE);
mPlayButton->setVisible(TRUE);
mPauseButton->setVisible(FALSE);
mStopButton->setEnabled(FALSE);
childDisable("ok_btn");
}
else
{
childHide("bad_animation_text");
mPlayButton->setEnabled(TRUE);
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
if (avatarp->isMotionActive(mMotionID))
{
mStopButton->setEnabled(TRUE);
LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID);
if (avatarp->areAnimationsPaused())
{
mPlayButton->setImages(std::string("button_anim_play.tga"),
std::string("button_anim_play_selected.tga"));
}
else
if (!avatarp->areAnimationsPaused())
{
if (motionp)
{
F32 fraction_complete = motionp->getLastUpdateTime() / motionp->getDuration();
childSetValue("playback_slider", fraction_complete);
}
mPlayButton->setImages(std::string("button_anim_pause.tga"),
std::string("button_anim_pause_selected.tga"));
mPlayButton->setVisible(FALSE);
mPauseButton->setVisible(TRUE);
}
}
else
{
mPauseRequest = avatarp->requestPause();
mPlayButton->setImages(std::string("button_anim_play.tga"),
std::string("button_anim_play_selected.tga"));
//mPlayButton->setVisible(TRUE);
//mPlayButton->setEnabled(TRUE);
mStopButton->setEnabled(TRUE); // stop also resets, leave enabled.
}
childEnable("ok_btn");

View File

@ -87,6 +87,7 @@ public:
void refresh();
static void onBtnPlay(void*);
static void onBtnPause(void*);
static void onBtnStop(void*);
static void onSliderMove(LLUICtrl*, void*);
static void onCommitBaseAnim(LLUICtrl*, void*);
@ -119,6 +120,7 @@ protected:
S32 mLastMouseX;
S32 mLastMouseY;
LLButton* mPlayButton;
LLButton* mPauseButton;
LLButton* mStopButton;
LLRect mPreviewRect;
LLRectf mPreviewImageRect;

View File

@ -810,13 +810,8 @@ void LLLocationInputCtrl::updateWidgetlayout()
{
const LLRect& rect = getLocalRect();
const LLRect& hist_btn_rect = mButton->getRect();
LLRect info_btn_rect = mInfoBtn->getRect();
// info button
info_btn_rect.setOriginAndSize(
2, (rect.getHeight() - info_btn_rect.getHeight()) / 2,
info_btn_rect.getWidth(), info_btn_rect.getHeight());
mInfoBtn->setRect(info_btn_rect);
// Info button is set in the XUI XML location_input.xml
// "Add Landmark" button
LLRect al_btn_rect = mAddLandmarkBtn->getRect();

View File

@ -40,9 +40,12 @@
#include "llurlsimstring.h"
#include "llviewercontrol.h" // gSavedSettings
#include "llviewernetwork.h" // EGridInfo
#include "llviewerwindow.h" // getWindow()
// library includes
#include "llmd5.h"
#include "llweb.h"
#include "llwindow.h"
// Must have instance to auto-register with LLCommandDispatcher
@ -174,6 +177,32 @@ bool LLLoginHandler::handle(const LLSD& tokens,
return true;
}
if (tokens.size() == 1
&& tokens[0].asString() == "reg")
{
LLWindow* window = gViewerWindow->getWindow();
window->incBusyCount();
window->setCursor(UI_CURSOR_ARROW);
// Do this first, as it may be slow and we want to keep something
// on the user's screen as long as possible
LLWeb::loadURLExternal( "http://join.eniac15.lindenlab.com/" );
window->decBusyCount();
window->setCursor(UI_CURSOR_ARROW);
// Then hide the window
window->minimize();
return true;
}
// Make sure window is visible
LLWindow* window = gViewerWindow->getWindow();
if (window->getMinimized())
{
window->restore();
}
parse(query_map);
//if we haven't initialized stuff yet, this is

View File

@ -5753,8 +5753,19 @@ void LLSelectMgr::redo()
//-----------------------------------------------------------------------------
BOOL LLSelectMgr::canDoDelete() const
{
bool can_delete = false;
LLViewerObject* obj = const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstDeleteableObject() ; // HACK: casting away constness - MG
// Note: Can only delete root objects (see getFirstDeleteableObject() for more info)
return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstDeleteableObject() != NULL; // HACK: casting away constness - MG
if (obj!= NULL)
{
// all the faces needs to be selected
if(const_cast<LLSelectMgr*>(this)->mSelectedObjects->contains(obj,SELECT_ALL_TES ))
{
can_delete = true;
}
}
return can_delete;
}
//-----------------------------------------------------------------------------

View File

@ -2309,6 +2309,12 @@ class LLObjectEnableReportAbuse : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
bool new_value = LLSelectMgr::getInstance()->getSelection()->getObjectCount() != 0;
/* // all the faces needs to be selected
if(LLSelectMgr::getInstance()->getSelection()->contains(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(),SELECT_ALL_TES ))
{
new_value = true;
}
*/
return new_value;
}
};
@ -2697,6 +2703,7 @@ BOOL enable_has_attachments(void*)
bool enable_object_mute()
{
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
bool new_value = (object != NULL);
if (new_value)
{
@ -2709,6 +2716,19 @@ bool enable_object_mute()
BOOL is_self = avatar->isSelf();
new_value = !is_linden && !is_self;
}
else
{
if( LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES ))
{
new_value = true;
}
else
{
new_value = false;
}
}
}
return new_value;
}

View File

@ -456,26 +456,43 @@ Maximum animation length is [MAX_LENGTH] seconds.
image_overlay="Play_Over"
image_unselected="SegmentedBtn_Left_Off"
image_selected="SegmentedBtn_Left_On_Selected"
image_disabled_selected="SegmentedBtn_Left_Selected_Disabled"
image_disabled="SegmentedBtn_Left_Disabled"
image_pressed="SegmentedBtn_Left_Press"
image_pressed_selected="SegmentedBtn_Left_Selected_Press"
image_disabled_selected="SegmentedBtn_Left_Selected_Disabled"
image_disabled="SegmentedBtn_Left_Disabled"
image_pressed="SegmentedBtn_Left_Press"
image_pressed_selected="SegmentedBtn_Left_Selected_Press"
layout="topleft"
left="10"
name="play_btn"
tool_tip="Play/pause your animation"
tool_tip="Play your animation"
top_pad="0"
width="23" />
<button
visible = "false"
follows="top|right"
height="23"
image_overlay="Pause_Over"
image_unselected="SegmentedBtn_Left_Off"
image_selected="SegmentedBtn_Left_On_Selected"
image_disabled_selected="SegmentedBtn_Left_Selected_Disabled"
image_disabled="SegmentedBtn_Left_Disabled"
image_pressed="SegmentedBtn_Left_Press"
image_pressed_selected="SegmentedBtn_Left_Selected_Press"
layout="topleft"
left="10"
name="pause_btn"
tool_tip="Pause your animation"
top_pad="-23"
width="23" />
<button
follows="top|right"
height="23"
image_overlay="StopReload_Over"
image_unselected="SegmentedBtn_Right_Off"
image_selected="SegmentedBtn_Right_On_Selected"
image_disabled_selected="SegmentedBtn_Right_Selected_Disabled"
image_disabled="SegmentedBtn_Right_Disabled"
image_pressed="SegmentedBtn_Right_Press"
image_pressed_selected="SegmentedBtn_Right_Selected_Press"
image_disabled_selected="SegmentedBtn_Right_Selected_Disabled"
image_disabled="SegmentedBtn_Right_Disabled"
image_pressed="SegmentedBtn_Right_Press"
image_pressed_selected="SegmentedBtn_Right_Selected_Press"
layout="topleft"
name="stop_btn"
tool_tip="Stop animation playback"
@ -508,7 +525,7 @@ Maximum animation length is [MAX_LENGTH] seconds.
We recommend BVH files exported from Poser 4.
</text>
<button
top="580"
top="580"
follows="bottom|left"
height="23"
label="Upload (L$[AMOUNT])"
@ -517,7 +534,7 @@ We recommend BVH files exported from Poser 4.
name="ok_btn"
width="128" />
<button
top="580"
top="580"
follows="bottom|left"
height="23"
label="Cancel"

View File

@ -182,7 +182,7 @@
width="130">
<combo_box.item
enabled="false"
label="-- select one --"
label="- Select one -"
name="--selectone--"
value="select" />
<combo_box.item

View File

@ -19,6 +19,7 @@
mouse_opaque="false"
name="nav_bar_container"
width="1024"
user_resize="false"
visible="false">
</layout_panel>
<layout_panel auto_resize="true"
@ -43,7 +44,7 @@
layout="topleft"
mouse_opaque="false"
name="non_side_tray_view"
user_resize="true"
user_resize="false"
width="500">
<view bottom="500"
follows="all"

View File

@ -3415,7 +3415,7 @@
name="Parcel"
tear_off="true">
<menu_item_call
label="Owner To Me"
label="Force Owner To Me"
layout="topleft"
name="Owner To Me">
<menu_item_call.on_click

View File

@ -107,7 +107,7 @@
top="48"
width="130">
<combo_box.item
label="- Select Mature -"
label="- Select one -"
name="select_mature"
value="Select" />
<combo_box.item

View File

@ -145,7 +145,7 @@ Hover your mouse over the options for more help.
layout="topleft"
left="10"
name="group_mature_check"
tool_tip="Sets whether your group information is considered moderate"
tool_tip="Sets whether your group contains information rated as Moderate"
top_pad="0"
width="190">
<combo_box.item

View File

@ -106,7 +106,7 @@
layout="topleft"
left_pad="15"
name="new_btn"
tool_tip="Create new pick or classified at current location"
tool_tip="Create a new pick or classified at the current location"
top="5"
width="18" />
<button
@ -138,7 +138,7 @@
left="5"
name="info_btn"
tab_stop="false"
tool_tip="Show pic information"
tool_tip="Show pick information"
top="0"
width="55" />
<button
@ -162,7 +162,7 @@
left_pad="5"
name="show_on_map_btn"
tab_stop="false"
tool_tip="Show corresponding area on the world map"
tool_tip="Show the corresponding area on the World Map"
top="0"
width="50" />
</panel>

View File

@ -332,7 +332,7 @@
control_name="ChatWindow"
name="chat_window"
top_pad="10"
tool_tip="Show chat in multiple windows(by default) or in one multi-tabbed window (requires restart)"
tool_tip="Show your Instant Messages in separate windows, or in one window with many tabs (Requires restart)"
width="331">
<radio_item
height="16"

View File

@ -28,44 +28,43 @@
top="0"
user_resize="false"
width="313">
<button
follows="left|top"
<button
enabled="false"
height="20"
label="Back"
layout="topleft"
follows="left|top"
height="18"
image_overlay="Arrow_Left_Off"
layout="topleft"
tab_stop="false"
left="0"
name="back"
top="0"
width="70">
tool_tip="Back"
width="25" >
<button.commit_callback
function="MediaBrowser.Back" />
</button>
<button
follows="left|top"
height="20"
<button
follows="left|top"
height="18"
enabled="false"
label="Forward"
layout="topleft"
tab_stop="false"
left_pad="3"
image_overlay="Arrow_Right_Off"
layout="topleft"
left_pad="3"
name="forward"
top_delta="0"
width="70">
tool_tip="Forward"
width="25">
<button.commit_callback
function="MediaBrowser.Forward" />
</button>
<button
follows="left|top"
height="20"
label="Home"
layout="topleft"
</button>
<button
follows="left|top"
height="18"
image_overlay="Home_Press"
layout="topleft"
left_pad="20"
tab_stop="false"
left_pad="2"
name="home"
top_delta="0"
width="70">
width="25">
<button.commit_callback
function="MediaBrowser.Home" />
</button>

View File

@ -22,9 +22,12 @@
>
<!-- *NOTE: Tooltips are in strings.xml so they can be localized.
See LocationCtrlAddLandmarkTooltip etc. -->
<info_button name="Place Information"
width="16"
height="16"
<info_button
name="Place Information"
width="16"
height="16"
left="4"
top="20"
follows="left|top"
hover_glow_amount="0.15"
image_unselected="Info_Off"

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<spinner text_enabled_color="LabelTextColor"
text_disabled_color="LabelDisabledColor"
font="SansSerif"
font="SansSerifSmall"
decimal_digits="3"
label_width="40" >
<spinner.up_button name="SpinCtrl Up"